Don't have to actually call 9 variable EatDrink, just define "SIM_CONSUME=false;" before you call EatDrink and it should work great. It's what I do in my aliases...
So I take it you think it's a good idea to streamline the process rather than force users to check their eatdrink settings before running Harvest too Theraze? Hmm, I'll think about it.
Actually, would setting simConsume to false work? Let's assume a user of Harvest has never used ED before (because if they had then this wouldn't be a problem for them). Setting simConsume to false before calling the script won't do a thing because the zlib settings won't have been created yet. I could have Harvest run ED once filling to 0 of each fullstat before changing the setting, but that doesn't seem very elegant.
However, if I use the 9 parameter version with simConsume set to false and it's the first time a user has run ED it should work, yes?
The SIM_CONSUME variable is set in the top level of ED. Therefore, by the time your script runs, the import will have set it (and set the default value of vars[simConsume], but that's another matter), so setting that will affect the rest of the script.
Oh I see. Sorry, I misunderstood you. OK, it's probably a good idea. I'll post an updated version.
Yeah... my 'regular' eatdrink alias is this:If someone else used it, regardless of what settings they have saved, that would actually (not simulated) eat and drink from empty to full using whatever they have set for VoA and the pricing limits and the rest of it. As a different example, my simulation alias is this:eatdrink => ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);As you can see, I redefine simfulness, siminebriety, and simspleen as well as the SIM_CONSUME... this way they are properly set, but since I'm defining them after I've imported the script, I'm overwriting the script's defaults.seatdrink => ashq import <EatDrink.ash>; SIM_CONSUME=true; simfullness = my_fullness(); siminebriety = my_inebriety(); simspleen = my_spleen_use(); eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
Yeah, still working on it... for example, found out yesterday that even though I have it auto-purchasing worthless items if you have the money for it and the painful penne pasta is a good choice, if you start with no worthless items, creatable_amount is 0 despite the NPC store setting, because it's not a 'standard' NPC store. Soon as you get a (or a bunch of) worthless item somehow, your creatable_amount is 1+, and you'll create the 3-5 you'd normally make. Somewhat bizarre. Anyways, the fix was to allow for people using EAT_ACCURATE (the default) to consider each item whether you have it officially creatable or not, and for people with EAT_ACCURATE off for speed to use creatable_amount, since that's what it'll use below to decide if it can make the item, similar to current EatDrink.
All that to say, working on it, I'll post a new version for people to test once I think we've got some actual improvements in there.
First, your call to eatdrink.ash fails on Linux. Author of that script calls it EatDrink.ash, and case is significant in Unices
Second, running the script yields an error message as follows:
Harvest.ash , line 878:Code:Cannot store boolean in ocd_profit of type int (Harvest.ash, line 878)
Code:int ocd_profit = ocd_control(false);