Page 2 of 79 FirstFirst 1 2 3 4 12 52 ... LastLast
Results 11 to 20 of 788

Thread: Harvest A highly customisable farming script

  1. #11
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    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...

  2. #12
    Senior Member Banana Lord's Avatar
    Join Date
    Nov 2008
    Location
    New Zealand
    Posts
    681

    Default

    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.

  3. #13
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    Well, if you're going to call EatDrink, make it work. If calling EatDrink is the responsibility of the user, leave it the responsibility of the user.

  4. #14
    Senior Member Banana Lord's Avatar
    Join Date
    Nov 2008
    Location
    New Zealand
    Posts
    681

    Default

    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?

  5. #15
    Senior Member
    Join Date
    Jul 2008
    Posts
    526

    Default

    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.

  6. #16
    Senior Member Banana Lord's Avatar
    Join Date
    Nov 2008
    Location
    New Zealand
    Posts
    681

    Default

    Oh I see. Sorry, I misunderstood you. OK, it's probably a good idea. I'll post an updated version.

  7. #17
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    Yeah... my 'regular' eatdrink alias is this:
    eatdrink => ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
    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:
    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);
    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.

  8. #18
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,145

    Default

    When Theraze is happy with the EatDrink additions I expect to add a couple of things that make it easier to import and call EatDrink without making the user fiddle with everything.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  9. #19
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,743

    Default

    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.

  10. #20
    Junior Member
    Join Date
    Sep 2010
    Posts
    3

    Default

    Two things:

    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:
    Code:
    Cannot store boolean in ocd_profit of type int (Harvest.ash, line 878)
    Harvest.ash , line 878:
    Code:
    int ocd_profit = ocd_control(false);

Similar Threads

  1. JTN's All-In-One Farming Script
    By jtn2002 in forum Scripting Discussion
    Replies: 16
    Last Post: 05-09-2012, 06:00 PM
  2. The Neo-Cow Farming Script
    By Banana Lord in forum Turn-Burning Scripts
    Replies: 191
    Last Post: 07-07-2011, 10:08 AM
  3. First try at a farming script
    By AgnesM in forum Turn-Burning Scripts
    Replies: 7
    Last Post: 07-14-2008, 04:54 AM
  4. Daily Farming Script (Formerly Known As "Script Noob")
    By T-Unit in forum Turn-Burning Scripts
    Replies: 14
    Last Post: 07-26-2007, 11:50 PM
  5. Farming Script
    By mmo.stuff in forum Scripting Discussion
    Replies: 1
    Last Post: 11-29-2006, 09:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •