Harvest – A highly customisable farming script

Winterbay

Active member
I think you can use it whenever, but earlier is probably better since you may finish the fight without getting the combo off otherwise...
 

lostcalpolydude

Developer
Staff member
You can use rave steal any time during the fight. It can even be worth not using pickpocket if the most valuable item has a low drop rate.
 

Banana Lord

Member
@winterbay: Oh good catch! I forgot that the skills themselves would hurt the monster. I'll leave the combos at the end of the macro since none of the actions before then are likely to do any real damage, but I'll put the more valuable combos first.

@lost: Ugh, don't tell me that, I might feel obliged to actually calculate it :p. I think that that would add too much additional complexity to the script to be worth the effort. If Zarqon ever gets Batman finished I'll probably drop support for Harvest Combat anyway, since it'll have all of the same functionality (and then some) with even more optimality.
 

Banana Lord

Member
Harvest has finally made it to version 2.0!

Most noticably, the relay script has had a complete rewrite. I hope you enjoy using it as much as I enjoyed designing and making it (please forgive the code, some of it is... messy, but it was my very first experience with CSS and JS, and my second with HTML). One downside of this change is that internet explorer is not supported, even if I had the time, I simply am not interested in working through IE's many quirks and bugs. On the bright side Safari, Chrome and Firefox all work beautifully. As a quick glance at the changelog will tell you, I've added a bunch of new features (many of them suggested by helpful users like yourself :)), made a few changes and squished a couple of bugs.

Faxbot support is now my top priority. It will happen, but only once I know what direction mafia's devs are taking with regards to the bot.

In order to provide some more interesting statistics, Harvest will now record the number of turns you spent farming each day. This is mildly problematic for current users as they will be missing data for all days up until now. Harvest 2.0 will automatically update the structure of your HAR_Daily_Profit.txt data file (after saving a backup copy as HAR_Old_Profit_Data.txt) the first time you run it and in the process it will insert an estimate of the number of turns you spend a day (this is simply <turns this ascension>/<days this ascension>). If you are unhappy with this estimate you can use a text editor (plain text only) to find and replace these estimated entries with a number you think is more accurate.

It's more important than usual to make sure that when you update, you update all three scripts before running anything. Nothing horrible will happen if you don't do this (touchwood), but it'll make for a smoother transition.
 
Last edited:

Ima Felyn

Member
What do we set the Custom combat script in Harvest too? it was defaulted to "None" but harvest wont run now.

Actually scratch that I just set it to default, but now there is this issue I'm having, in the kol options > combat > my Auto-Attack* is set to a custom combat macro that I like, but every time I let Harvest run it sets it to (disabled) and doesn't execute the macro, anyway to fix this? I'd like Harvest to run with the macro I set.
 
Last edited:

Banana Lord

Member
Hmm, I never considered the case where someone didn't want to run a CCS at all (hence the not running when you don't specify one, and the changing of your battle action). I'll upload a new version sometime in the next hour, hopefully.

EDIT: Actually, never mind, I've uploaded a new version already (didn't bother bumping the version number for something so minor). You can either download that or change line 621 as follows:

Change
Code:
failure("You have not specified a custom combat script, you must do this before you can run Harvest");
to
Code:
announce(3, "No CCS specified");
 
Last edited:

Tom Sawyer

Member
Banana Lord

Once more congrats on what continues to be a great script. I took 2.0 for a drive and it seemed to work well. If I spot anything odd will post, cheers!
 

Ima Felyn

Member
The new version fixed it. But now I'm noticing that Harvest dumps all my money into my closet leaving me with 0 and is unable to buy stuff instead of the normal all minus 100,000, I checked the vars file and "har_gen_budget 100000" is set correctly so I dunno.
 

Banana Lord

Member
@Tom: Thanks very much :). I spent quite a long time on v2, including a couple of days of testing, but there's some stuff I can't test so it's always encouraging to hear that nothing went wrong!

@Ima Felyn: That's odd, I don't have that issue at all. Just to double check, copy paste this into the gCLI and tell me what it prints out: ash import<zlib.ash>; print(vars["har_gen_budget"].to_int());

EDIT: There's only one function in Harvest that could possibly be putting your meat in your closet, and I can't see how that could be malfunctioning. Humour me and try running this as well:
ash import<harvest.ash>; closet_meat(); print("My meat: "+my_meat()); print("Closet: "+my_closet_meat()); take_closet(my_closet_meat());
 
Last edited:

Ima Felyn

Member
@Ima Felyn: That's odd, I don't have that issue at all. Just to double check, copy paste this into the gCLI and tell me what it prints out: ash import<zlib.ash>; print(vars["har_gen_budget"].to_int());

EDIT: There's only one function in Harvest that could possibly be putting your meat in your closet, and I can't see how that could be malfunctioning. Humour me and try running this as well:
ash import<harvest.ash>; closet_meat(); print("My meat: "+my_meat()); print("Closet: "+my_closet_meat()); take_closet(my_closet_meat());

> ash import<zlib.ash>; print(vars["har_gen_budget"].to_int());

100000
Returned: void

> ash import<harvest.ash>; closet_meat(); print("My meat: "+my_meat()); print("Closet: "+my_closet_meat()); take_closet(my_closet_meat());

My meat: 94395
Closet: 88300085
Removing meat from closet...
Returned: true

Okay I swear this was borked before, I didn't change anything but now it's seems to be working?... knocks on wood. Maybe it was a restart that fixed it.

EDIT: Okay so scratch that above, something is still borked, it worked for the character above, but then I tried a new character, and am getting this...

> > ash import<zlib.ash>; print(vars["har_gen_budget"].to_int());

Unable to invoke >

> > ash import<harvest.ash>; closet_meat(); print("My meat: "+my_meat()); print("Closet: "+my_closet_meat()); take_closet(my_closet_meat());

Unable to invoke >

It was the first time on this character to load up Harvest 2.0, first thing i did was run Harvest in the relay and saved settings, then ran Harvest. Hope those steps can lead you to the bug, not sure what else to say.
 
Last edited:

Banana Lord

Member
You could have a look in your session logs to see if you can pin point the issue. But if it's working fine now maybe there's no need. Glad it's working anyway :).
 

Theraze

Active member
Yeah... you ran the wrong thing. You ran the quoted version, which includes a > to tell you that it's a command. Skip the initial >, your line should start with the ash (or ashq), not > ash.
 

BlanketThief

New member
Not sure if this is known, but currently the script still breaks when trying to farm with a mad hatrack (Equips the hat onto the player)
 

Banana Lord

Member
Thanks for that Theraze and Slyz, be sure to let us know if removing the extra character fixed the problem Felyn.

@BlanketThief: It wasn't, but I should have thought of that. It's a pretty easy fix so I've uploaded a new version of Harvest.ash (again, I won't bump the version number, but I'll include the fix in the changelog for the next update).
 

Ima Felyn

Member
Derp me, Slyz and Theraze are right, that extra > was the issue there. With that said it seems to be working now for all my characters, my experience using Harvest 2.0 on a character for the first time seems to still bug out, as in all meat going to closet leaving you with 0, having to manually remove 100k to continue, but some magic happens the next day because everything ends up just working, I don't know if its just a restart of Mafia or computer reboot that fixes it, and now I'm all out of characters who haven't ran Harvest 2.0 now so I can't invoke this bug anymore.
 

Banana Lord

Member
I was reasonably thorough when I tested 2.0. I made a fresh account on my computer, installed mafia and all relevant scripts from scratch (I didn't even cheat and write a script to do the set up automatically) and then ran Harvest on a KoL account which I've never used Harvest with before. It goes without saying that I didn't see this issue. I also tested the upgrade process by running 2.0 on an account which had previously been using the old version of Harvest, again without seeing this issue. The setting that remembers your budget is only accessed twice in all three scripts. There is only one function that puts meat in your closet and it is called only once in Harvest (it's a pretty basic function too). Also it would seem that no-one else has run into this issue.

I'm not saying that you're wrong or that you're imagining the problem, I'm just saying that there are very few ways in which Harvest could stuff this up and I can't see how the issue you're reporting could occur. The main thing is that the script is working for you now. If someone else has a similar issue then we'll know for sure that there's something untoward going on.
 

Ioeth

Member
First of all, great script! I really appreciate the addition of duck hunting with version 2.0. I do have a question about it, though. I completed the farm subquest in hippy fatigues, so I can hunt 10 ducks a day now, but Harvest only does 5. Is there some way I can get it to hunt the correct number of ducks, or hunt ducks until it isn't allowed anymore? I also had a question about the automatic buffbot request for Ode...is there any configuration required to get that set up? Thanks again!
 
Top