Page 56 of 57 FirstFirst ... 6 46 54 55 56 57 LastLast
Results 551 to 560 of 562

Thread: My personal Meat farming script

  1. #551
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    I learned from that exercise that if you want to call VMF's main - i.e. the whole thing - from within a wrapper script, I'll need to let you configure the counter script relative to your wrapper script. Otherwise KoLmafia will try to get an interpreter for VMF itself. I'll fix that.

  2. #552
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    OK, revision 262 lets a wrapper script adjust VMF's counterScript initialization.
    Here's a new wrapper script.

    Code:
    import <VeracityMeatFarm>;
    
    // All static initialization for VMF has been done.
    
    // Here you can include your own static initialization - including your
    // own vprops configuration, if you wish
    
    // If you are going to run turns and want an internal counterScript,
    // you can do it here.
    boolean localCounterExpired( string label, string turns_remaining )
    {
        print( "Counter '" + label + "' expires in " + turns_remaining + " turns" );
        if ( !handling_counters ) {
    	print( "We are not currently handling counters in a counterScript" );
        } else {
    	// *** Stuff here.
        }
        print( "Done with counter script" );
    
        // This means we handled it. Which is always true: we either did
        // something special or intentionally ignored it.
        return true;
    }
    
    // This says don't use a local counterScript: either you are calling
    // main@VMF() or don't want a counterScript
    boolean use_local_counter_script = false;
    
    string VMFCounterScript = "counterExpired";
    string myCounterScript = "localCounterExpired";
    
    string counter_script_name = use_local_counter_script ? myCounterScript : VMFCounterScript;
    
    // If you are calling main@VMF() directly, you need to fix the
    // counterScript that VMF will use to be relative to this script.
    // That counterScript will collect semirares and use Luck Lindys
    
    new_counter_script = configure_counter_script( counter_script_name, __FILE__ );
    
    void main()
    {
        // Here you can override VMF settings by simply setting the
        // associated internal variable to the value of your choice.
        default_familiar = my_familiar();
        mumming_costume = "none";
    
        // Check VMF configuration and either correct or abort
        // This will do additional dynamic configuration.
        validate_configuration();
    
        try {
    	if ( use_local_counter_script ) {
    	    set_property( COUNTER_SCRIPT, new_counter_script );
    	}
    
    	// Run functions from VMF
    	consult_with_madame_zatara();
    	send_smiles();
    	use_still();
        } finally {
    	if ( use_local_counter_script ) {
    	    set_property( COUNTER_SCRIPT, old_counter_script );
    	}
        }
    
        print( "Done running functions from VMF." );
    }
    I set "use_local_counter_script" to true and ran it:

    Code:
    > VMF.InRun.ash
    
    Validating configuration.
    All is well!
    counterScript => localCounterExpired@VMF.InRun.ash
    counterScript =>
    Done running functions from VMF.

  3. #553
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    Revision 267 will celebrate Arrrbor Day if you have installed my Arrrbor Day script.

    This consumes turns, so it is optional. Set "VMF.CelebrateArrrborDay" to false if you don't wish to run it.

    If true (the default), it will spend either 3 or 102 turns in the Arrrboretum, depending on whether it is setting up to get a potion or to complete the Arrrbor Day Apparrrrrel outfit. You can configure the script to control that.

    It will run the Arrrbor Day script after eating and drinking (to generate turns) but before poisoning your spleen, since the Arrrboretum is all non-combats and it would be a waste to burn Sweet Synthesis turns.

  4. #554
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    468

    Default

    I am seeing this know with the most recent daily build and version of the script. Do I have a setting wrong?

    Encounter: Lending a Hand (and a Foot)
    Submitting option 1 for choice 1065
    Encounter: Lending a Hand (and a Foot)
    Internal checkpoint created.

    [24031] Madness Bakery
    Encounter: Lending a Hand (and a Foot)
    Manual control requested for choice #1065
    choice 3: Okay, I'll be right back.
    choice 6: Goodbye.
    Click here to continue in the relay browser.

  5. #555
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    I assume that you have a protonic accelerator and got an announcement of paranormal activity in the Madness Bakery.
    When we went to the Armory and Leggery to talk to the owner and open up the location, apparently you'd already agreed to get him the pie.

    What is the value of this property? questM25Armorer

    I'm guessing it is "unstarted".

    Set it to "started" and you won't have an issue.

    I will ponder how that could be and how I can make this script resiliant in this case.

  6. #556
    Senior Member
    Join Date
    Feb 2010
    Posts
    1,144

    Default

    This may be outside the scope of what you want to handle but I just came right out of a run, pulled everything from storage, and ran your meat farm script. Initialization failed because it tried to equip my "Meat Farm" outfit and that required a Gold Detective's Badge. It wasn't in inventory because I hadn't visited the precinct.

    I'm going to guess that the same thing would happen if an outfit required the L&T cowboy boots.

    Would you be willing to have the script visit those locations, if available, to make sure that the badge and boots are in inventory, during initialization?

    Edit: The script just stopped again with the following in the gCLI:

    Code:
    Cannot store string in vgc_banish of type boolean     [monster] (Gingerbread City.ash, line 644)
    counterScript =>     scripts\CounterChecker.ash
    I've been using Bales CounterChecker script for years. I did see that you've incorporated a counter script so I'll try removing Bale's and see what happens. Nope. Removing Bale's script from the mix didn't fix the problem.
    Last edited by Magus_Prime; 05-13-2020 at 12:13 PM.

  7. #557
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    This may be outside the scope of what you want to handle but I just came right out of a run, pulled everything from storage, and ran your meat farm script. Initialization failed because it tried to equip my "Meat Farm" outfit and that required a Gold Detective's Badge. It wasn't in inventory because I hadn't visited the precinct.

    I'm going to guess that the same thing would happen if an outfit required the L&T cowboy boots.

    Would you be willing to have the script visit those locations, if available, to make sure that the badge and boots are in inventory, during initialization?

    Edit: The script just stopped again with the following in the gCLI:

    Code:
    Cannot store string in vgc_banish of type boolean     [monster] (Gingerbread City.ash, line 644)
    counterScript =>     scripts\CounterChecker.ash
    I've been using Bales CounterChecker script for years. I did see that you've incorporated a counter script so I'll try removing Bale's and see what happens. Nope. Removing Bale's script from the mix didn't fix the problem.
    Originally Posted by Magus_Prime View Post
    The fact that the outfits are named and predefined has been a feature I have had to work with. In my case, I finish a run, run the script and the outfit cannot be equipped because one or more character stats are not high enough.

    In my case I have script get_outfit that looks at an outfit and makes sure that everything listed is in inventory or already equipped. It will pull from Hagnks or the display case which are the two places equipment I want end up. You could do something similar with special cases where an item is generated from a visit and not just a take/get/pull. This also seems like a job for a post Ascension script or something in an aftercore login.
    Well, thank you.
    Originally Posted by Veracity View Post

  8. #558
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    Code:
    Cannot store string in vgc_banish of type boolean [monster] (Gingerbread City.ash, line 644)
    is a compile error in Gingerbread City, due to a bug in KoLmafia, which I fixed in revision 20091.
    I guess I should put a "since" directive into that script now.

    Regarding outfits:

    We call the "outfit" command, which will "retrieve" all the outfit pieces - pull from storage, etc. It will not pull from the display case; frono is unique in my experience in keeping things there that he wants to actually use, rather than display.

    However, visiting the Detective School and LT&T are not known ways to "retrieve" an item.
    I'll consider looking over the outfit pieces and fetching those specific items if they are needed.
    However, as frono suggests, you could put it in a kingLiberatedScript. I do that myself:

    Code:
        // Visit LT&T office to collect cowboy boots
        visit_url( "place.php?whichplace=town_right&action=townright_ltt" );
    
        // Visit 5th Precinct to collect golden detective badge
        visit_url( "place.php?whichplace=town_wrong&action=townwrong_precinct" );
    For outfits you cannot equip, you might consider writing a wrapper script (as I detailed above) which will set outfit parameters differently depending on your stats.

  9. #559
    Senior Member
    Join Date
    Feb 2010
    Posts
    1,144

    Default

    I normally visit both locations when starting an aftercore run. I just forgot this time.
    I have thought about, and will probably write, a VMF wrapper script using yours as a model.

    Thank you!

  10. #560
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    It will not pull from the display case; frono is unique in my experience in keeping things there that he wants to actually use, rather than display.
    Originally Posted by Veracity View Post
    http://dcdb.coldfront.net/collection...&Search=Search

    Slowly working my way up. Since it is only updated once every 24 hours, I can have my cake and use it so long as the taking and returning are automated :-)
    Well, thank you.
    Originally Posted by Veracity View Post

Posting Permissions

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