Page 47 of 47 FirstFirst ... 37 45 46 47
Results 461 to 470 of 470

Thread: My personal Meat farming script

  1. #461
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    457

    Default

    IS there an easy to turn off using the PYEC if you or your clan doesn't own one?

  2. #462
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    It's coded to not use a PYEC if you or your stash does not own one.
    It's coded to not even look in the stash if autoSatisfyWithStash is false.
    My multis who do not own a PYEC and are in clans with no PYEC don't try to use it.

    What does it do for you?
    *puzzled*

  3. #463
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    457

    Default

    It flat out fails if it can't pull the PYEC from the stash for either it is not there or you have already reached your max pulls for 0 karma items

  4. #464
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    Here is a character in a clan with no PYEC.

    Code:
    > get autoSatisfyWithStash
    
    false
    
    > get autoSatisfyWithStash=true
    
    autoSatisfyWithStash => true
    
    > ash import <VeracityMeatFarm.ash>; platinum_yendorian_express_card()
    
    Refreshing stash contents...
    Stash list retrieved.
    autoSatisfyWithStash => false
    autoSatisfyWithStash => true
    Returned: void
    I cannot reproduce the "fails if ... it is not there ...

    Notice that it set autoSatisfyWithStash to false and then to true again. It uses available_amount() with that setting at false to determine if you have a PYEC of your own, somewhere, and, if not, again with that setting at false to see if you have one in your clan stash. That is so it can put it back, if it got it from the stash.

    I've never been in a clan where I was subjected to karma restrictions, so it never occurred to me that retrieve_item() could fail when we verified that it existed. I guess karma is one way - or, if it somebody pulled it from the stash after we verified it was there and before we tried to pull it ourself. That is a tiny tiny window, but it is a race condition.

    Easy enough to detect that retrieve_item() failed and have the script not bail.

  5. #465
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    Revision 207. Untested.

  6. #466
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    457

    Default

    Fix works thank you

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

    Default

    Quick example of the #460 issue in action:
    Using 1 milk of magnesium...
    You acquire an effect: Got Milk (15)
    Finished using 1 milk of magnesium.
    Searching for "super salad"...
    Search complete.
    Searching for "beer basted brat"...
    Search complete.
    Searching for "whole roasted chicken"...
    Search complete.
    Purchasing Mayoflex (5 @ 950)...
    You spent 4,750 Meat
    You acquire Mayoflex (5)
    Purchases complete.
    [-1] cannot be eaten.
    Net income = -6,209 Meat in 0 turns. Meat/Adventure = -6,209
    Cumulative income = 380,557,331 Meat in 263,713 turns. Meat/Adventure = 1,443
    Alternate one-line sanity check to eat_food in line 5383-5385:
    Code:
        if ( count == 0 || food.to_int() < 0 ) {
    	return;
        }
    Last edited by Theraze; 10-05-2019 at 06:55 AM.

  8. #468
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    Huh. Your post from yesterday did not appear to me because another post was made after yours and started a new page,

    I'll take a look when I get up tomorrow. Thanks for the additional input.

  9. #469
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    (I suspect that the fix will involve rejecting a non-existant food and choosing another. Might be a fix in vcon, rather than VMF. What is is the value of property

    get VMF.OptimalConsumables

    ?)
    Last edited by Veracity; 10-05-2019 at 07:15 AM.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #470
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,187

    Default

    Oh, wait. I see that you do NOT have that set, and the following is coming into play:

    Code:
    	    item_set choices = $items[ super salad, beer basted brat, whole roasted chicken ];
    	    item food = find_profitable_consumable( choices, 3, mpa ).it;
    	    eat_food( foods, food );
    In other words, you are choosing to use a handful of foods I have found to be profitable, but for your character, they are too expensive to be profitiable.

    I'll think about this

    Edit: Perhaps you should do this:

    set VMF.OptimalConsumables=true

    and let vcon decide what the best "profitable" consumables are - given your MPA and what you can actually afford.

    (Have you run this script before? Do you have an accurate MPA for this script?)
    Last edited by Veracity; 10-05-2019 at 07:16 AM.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

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