Harvest – A highly customisable farming script

Script updated. If you've completed a bounty today without Harvest the script will now detect this properly and not abort when it can't select one (thanks cobalt60, you put me on the right track! :)).
 
My logs indicate that it's not using putty for my bounty, despite what I chose in my preferences. Any idea what's going on?
 
Apologies for not getting back to you sooner. Did you have any putty uses free when you started Harvest? Does your putty currently have a monster trapped in it? Do you see any relevant messages? Could you copy paste the output of a combat in which you believe Harvest should be using your putty but isn't? Could you set Verbosity to 3 (from the relay script), run the script and then attach the log to a post in this thread?
 
Random Error?

Hey, i keep getting the error text "[¶-1] has no matches." and the script immediately aborts. This occurs right after changing my outfit, it gets through eatdrink.ash fine, but just dies after printing that message. Thanks
 
I would say that Bananalord would probably want to have CLI-output for the time around the event, always a good start when troubleshooting.
 
Thanks for that Winterbay :-) CLI output would be nice. CLI output with Verbosity set to 3 (from the relay script) would be even nicer :-) My immediate reaction would be to say that something weird is happening with a data file, but no-one else has reported that problem, and I haven't changed the files on Zarqon's server recently. Did you open up any of the data files in a text editor? That includes the user configurable ones. If you didn't edit it in plaintext strange things could happen. I'm shooting in the dark here, I really need some more output.
 
I got the same error, here's the context with verbosity at 3. For what it's worth, i just downloaded this script.
I'm using r9832

Code:
> call scripts\Harvest.ash

Countdown:     1 second...
Waiting completed.
main

Preparing     to bring in the harvest

set_default_settings
create_data_files
file_empty
true
file_empty
true
file_empty
true
set_puttyfarming_options
set_bountyhunting_options
have_foldable
set_general_options
set_farming_options
set_rollover_options
Initialisation     complete
save_prerun_settings
finished_farming
false

Getting     you ready for your day

prep_for_day
closet_meat
Filling     organs
fill_organs
equip_song_raiser
load_at_buff_data
at_buffs     contains:
Fat Leon's Phat Loot Lyric
num_at_songs
You     have 1 AT songs active
max_at_songs
You     can currently hold 3 AT songs in your head
Countdown: 1 second...
Waiting     completed.
Refreshing stash contents...
Stash list retrieved.
Internal     checkpoint created.
Loading favorite consumables from user settings...
adding     favorite: rockin' wagon
adding favorite: pr0n chow mein
adding     favorite: twinkly wad
Starting EatDrink.ash (version 3.1.4).
Consuming     up to 14 food, 19 booze, and 15 spleen
Considering food from inventory     closet Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 25000.0.
Retrieval     cap is 20000. Price will be a factor if you own it already.
An     adventure has the value of 1000 meat. Moxie subpoint is 10.0.     Nonprime stat subpoint is 2.0.
Pass 1: food.
Skipping food.
Pass     2: drink.
Skipping drink.
Pass 3: spleen.
Skipping spleen.
Pass     4: drink.
Skipping drink.
choc: Checking non-filling crimbo     chocolates - all 3 kinds
Best find was chocolate disco ball with a     value of -450. That's no good, so not consuming and moving on.
Finished.
Spent     0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0.
Adventures: 0.     Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening     complete. Commence merrymaking (at your own discretion).
******************************************
Now,     to recap...
******************************************
Starting     EatDrink.ash (version 3.1.4).
Consuming up to 14 food, 19 booze, and 15     spleen
Considering food from inventory closet Hagnk's Coinmasters NPCs     the mall. Per-item budget cap is 25000.0.
Retrieval cap is 20000. Price     will be a factor if you own it already.
An adventure has the value of 1000     meat. Moxie subpoint is 10.0. Nonprime stat subpoint is 2.0.
choc:     Checking non-filling crimbo chocolates - all 3 kinds
Best find was     chocolate disco ball with a value of -450. That's no good, so not     consuming and moving on.
Finished.
Spent 0 meat. Gained Fullness: 0.     Inebriety: 0. Spleen: 0.
Adventures: 0. Muscle: 0. Moxie: 0.     Mysticality: 0.
Eating, drinking, and spleening complete. Commence     merrymaking (at your own discretion).

finished_bountyhunting
false

Commencing     bountyhunting

bountyhunt
best_hunt
Abandonned     current bounty
can_access_hunt
Can     access Goatlet: true
Current best_hunt is     Goatlet: 40.0 turns
can_access_hunt
Can     access Outskirts of The Knob: true
Current     best_hunt is Outskirts of The Knob: 14.1 turns
can_access_hunt
Can     access Whitey's Grove: true
Current     best_hunt is Outskirts of The Knob: 14.1 turns
Accepted     bounty for bloodstained briquettes, Outskirts of The Knob
equip_gear
equip_gear
have_foldable
have_foldable

-     No Change -
Birthday Suit
8-Bit Finery
Antique Arms and Armor
Arrrbor     Day Apparrrrrel
Black Armaments
BRICKOfig Outfit
Bugbear Costume
Cloaca-Cola     Uniform
Clockwork Apparatus
Cold Comforts
Dyspepsi-Cola Uniform
Encephalic     Ensemble
eXtreme Cold-Weather Gear
Filthy Hippy Disguise
Frat Boy     Ensemble
Frat Warrior Fatigues
Furry Suit
Glad Bag Glad Rags
Gnauga     Hides
Grass Guise
Hot and Cold Running Ninja Suit
Knight's Armor
Knob     Goblin Elite Guard Uniform
Knob Goblin Harem Girl Disguise
Mining     Gear
Mutant Couture
OK Lumberjack Outfit
Palmist Paraphernalia
Paperclippery
Roy     Orbison Disguise
Star Garb
Swashbuckling Getup
Tapered Threads
Terrifying     Clown Suit
Terrycloth Tackle
Unblemished Uniform
Vestments of the     Treeslayer
War Hippy Fatigues
Wumpus-Hair Wardrobe
Yendorian     Finery
[¶-1] has no matches.


Also, I just noticed that right now that the relay says:
Code:
Turns spent 	207
Meat gained	-1208371
Meat per adventure	-5837
despite not having spent any adventures. The meat weirdness probably has something to do with closeting my meat, as that was my on-hand meat at the time.
EDIT: this fixed itself after running.


and finally, i tried turning off bounty hunting, since that seemed to be where it broke. It is running (seemingly) fine now.
 
Last edited:
Yes, that error is occurring while the script tries to bountyhunt (just before it begins adventuring). The output at the end is to be expected, Harvest assumes that if it gets to that point everything went well and so tries to continue as normal, the bug upstream causes weirdness downstream, if that makes sense. From what I can see it's breaking in the equip_gear function, which is odd because there's nothing too tricky happening there. Just some obvious questions to rule out basic problems: Can you confirm whether or not you have the stinky cheese and origami foldables (that's not a condition of using the script, it'd just be handy to know)? What is the name of your bountyhunting outfit? How recent is your build of mafia?

EDIT: I'm fairly sure that that output (the bit that contains a large number of outfits) would mean something to someone who knows more about mafia/ash than I do. If no-one chimes in in this thread, and we don't happen upon a solution soon, I might post it in the support forum tomorrow or the day after.
 
Last edited:
I think that error shows up if you try to enter a negative number to a to_item() or similar function. I seem to recall some similar thing when Theraze managed to add sushis to the internal database of Mafia.
 
Well it definitely makes it to line 651 ("have_foldable("origami")"). Assuming iamacow doesn't have the origami foldable it makes it past there and down to line 660 where it finds assignment statements (not much to go wrong there) and then on to 675 with a call to outfit(). Using "outfit" as a string variable isn't likely to cause problems is it?
 
I've been trying this out, very well done! My one wish so far is that the script would use eyedrops to remove "On the Trail" before bounty hunting, but otherwise the integration of Bale's inventory script makes this the premier farming script.
 
Thank you! It's always nice to hear that my script's useful :-) That's a good idea, and one that should be fairly easy to implement. I'll probably post an update tomorrow or the next day.
 
Yeah... I considered whether or not to say anything, but... :) I got those sorts of errors when I had an item with ID of -1. There were some other things that caused it, but I think it's possible that any 'bad' item... yeah.
> ash to_int(to_item("ahoy mateys"))

Returned: -1
Any non-existent item shows up as a value of -1. So the most likely possibility for getting an ID of -1, when other people aren't, is that you haven't updated to the latest version of mafia.
 
Hmm... since iamacow was only 1 revision off main, that's somewhat less likely... but hey, try and see if running "update clear" in the gCLI and rebooting mafia fixes it. We're long past when that should still be needed, but it's always a possibility. I suppose.
 
One other nicety that might already be in the pipeline is faxbot support, it would be particularly nice for bounties.

And still usage, since it's not currently supported in mafia's breakfast options.
 
Last edited:
More good ideas. I've added them to my todo list (which I intend to start working through in about two months). Remind me, faxbot requires the bot to have a whitelist to your clan doesn't it? That could complicate matters, as would waiting for the bot to get around to processing your request, but I'll certainly look into it.
 
Mr Edge has support for the still, but the script won't check if you actually have the ingredients first and skip buying them. I posted a change somewhere in that script thread that makes it check ingredients on hand... allows you to run it against your current ingredients first, and then run it against best profit later if you aren't in a fist run and want to spend meat, etc. :)
 
I wonder if Bale would be interested in adding support for auto-Stilling on-hand ingredients. It feels more like an "inventory management" than an "incidental pre-farming" activity. Can't hurt to ask.
 
Well, the farming bit comes in when you have none on hand, and need to determine what's optimal to buy and refine. As mentioned by Theraze the work has already been done by others in the past, you just need to find it and politely ask to steal it.
 
Back
Top