Page 55 of 57 FirstFirst ... 5 45 53 54 55 56 57 LastLast
Results 541 to 550 of 562

Thread: My personal Meat farming script

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

    Default

    I too would be interested in VCON as an EatDrink replacement although my recollection is that I was able to do that with the earlier algorithm and so I expect I could do it now, as well.

    Tangentially, that said, I would find fighting the tentacle, the NEP, if available, and using VMF to max the still all of interest in run. I have experimented with importing and had some success but last time I tried there were things with outfits that I chose not to resolve. As I recall, the script would use an outfit but the saved outfit of the name could not be equipped in run for any one of several reasons. Since the "best" outfit tends to vary between freeing the king and level 15, or so, and I tend to stash a lot of useful gear in my display case, my personal solution is going to be a script that pulls potentially useful items from the DC, runs the maximizer and then saves the outfit with the appropriate names. But I have not written that yet :-)
    Originally Posted by fronobulax View Post
    As we know, all of VMF is not intended to work in-run. You can certainly import it and use individual functions. For example, I have a CLI alias called "zatara":

    Code:
    ashq import <VeracityMeatFarm.ash>; consult_with_madame_zatara()
    You can import it and call multiple functions from it. I do this all the time when I am creating/debugging a function that will be in it and expects to run in its environment - static initialization, etc.
    Your script which does that could also dynamically change the outfit name; when you run a script that imports it, VMF's static initialization happens at the beginning, along with your script's and you can then change a configured variable:

    Code:
    import <VeracityMeatFarm.ash>;
    
    print( "static initialization done" );
    print( "Current farm_outfit (from VMF.DefaultOutfit) = '" + farm_outfit + "'" );
    farm_outfit = "L13 Meat Drop";
    print( "VMF functions will now use '" + farm_outfit + "'"  );
    That doesn't change the setting, so if you run VMF from the CLI by itself, it will use the configured setting. But the script which imported VMF could then call any functions it desired. Or even its main function. Hmm. How do you do that? In Calling main from imported scripts, Winterbay says:

    Yes you can. You can call the main function from WHAM by doing, for example:

    Code:
    import wham.ash;
    
    void main() {
    main@wham();
    }
    ETA: The part after the @ is either the name of the file or the name of the script as defined by the script-predicate. Any odd characters needs to be replaced with underscores.
    Maybe I should choose a name for the script using the "script" directive. Something like "VMF".
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Yes.

    Code:
    import <VeracityMeatFarm>;
    
    void main()
    {
        // *** Programatically change VMF configuration here.
        main@VMF();
    }

  3. #543
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    467

    Default

    I keep getting this when it does the Bastillion
    ncounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion
    Encounter: Bastille Battalion (turn #1)
    Encounter: Cheese Seeking Behavior
    Getting Enhancement from Source Terminal
    Encounter: Cheese Seeking Behavior
    Source Terminal: enhance meat.enh
    Encounter: Cheese Seeking Behavior
    Manual control requested for choice #1319
    choice 1: Stand in the waterfall
    choice 2: Rob the suburb
    choice 3: Submit embarrassing catapult photos
    Click here to continue in the relay browser.

  4. #544
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    How odd. It starts running Ezandora's script and it apparently returned - while the script was still running - and continued in VMF to go to the Source Terminal.

    It doesn't do that for me.

    Code:
    use 1 Bastille Battalion control rig
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/2: (secret choice)
    choice.php?whichchoice=1313&option=2&pwd
    Encounter: Bastille Battalion
    Took choice 1313/2: (secret choice)
    choice.php?whichchoice=1313&option=2&pwd
    Encounter: Bastille Battalion
    Took choice 1313/2: (secret choice)
    choice.php?whichchoice=1313&option=2&pwd
    Encounter: Bastille Battalion
    Took choice 1313/3: (secret choice)
    choice.php?whichchoice=1313&option=3&pwd
    Encounter: Bastille Battalion
    Took choice 1313/3: (secret choice)
    choice.php?whichchoice=1313&option=3&pwd
    Encounter: Bastille Battalion
    Took choice 1313/3: (secret choice)
    choice.php?whichchoice=1313&option=3&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/5: (secret choice)
    choice.php?whichchoice=1313&option=5&pwd
    Encounter: Bastille Battalion (turn #1)
    Took choice 1314/3: Look for cheese
    choice.php?whichchoice=1314&option=3&pwd
    Encounter: Cheese Seeking Behavior
    Took choice 1319/1: Try the wall thing
    choice.php?whichchoice=1319&option=1&pwd
    Encounter: Bastille Battalion (turn #2)
    You gain 120 cheese!
    Took choice 1314/3: Look for cheese
    choice.php?whichchoice=1314&option=3&pwd
    Encounter: Cheese Seeking Behavior
    Took choice 1319/2: Enter the Weakest Army competition
    choice.php?whichchoice=1319&option=2&pwd
    Encounter: Castle vs. Castle
    You gain 103 cheese!
    Took choice 1315/3: Ready your defenses and wait for them
    choice.php?whichchoice=1315&option=3&pwd
    Encounter: Bastille Battalion (turn #4)
    You gain 40 cheese!
    Took choice 1314/3: Look for cheese
    choice.php?whichchoice=1314&option=3&pwd
    Encounter: Cheese Seeking Behavior
    Took choice 1319/3: Raid the cart
    choice.php?whichchoice=1319&option=3&pwd
    Encounter: Bastille Battalion (turn #5)
    You gain 22 cheese!
    Took choice 1314/3: Look for cheese
    choice.php?whichchoice=1314&option=3&pwd
    Encounter: Cheese Seeking Behavior
    Took choice 1319/3: Put on the bad art show
    choice.php?whichchoice=1319&option=3&pwd
    Encounter: Castle vs. Castle
    You gain 49 cheese!
    Took choice 1315/3: Ready your defenses and wait for them
    choice.php?whichchoice=1315&option=3&pwd
    Encounter: GAME OVER
    Took choice 1316/3: I'm done for now
    choice.php?whichchoice=1316&option=3&pwd
    You gain 462 Sarcasm
    You gain a Moxie point!
    You acquire an item: Draftsman's driving gloves
    You acquire an effect: Bastille Braggadocio (100)
    You acquire an item: interrogative elixir
    > Getting Enhancement from Source Terminal
    Source Terminal: enhance meat.enh
    You acquire an effect: meat.enh (100)
    Source Terminal: enhance meat.enh
    You acquire an effect: meat.enh (100)
    Source Terminal: enhance meat.enh
    You acquire an effect: meat.enh (100)

  5. #545
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    467

    Default

    Heres from the log itself:

    use 1 Bastille Battalion control rig
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/1: (secret choice)
    choice.php?whichchoice=1313&option=1&pwd
    Encounter: Bastille Battalion
    Took choice 1313/2: (secret choice)
    choice.php?whichchoice=1313&option=2&pwd
    Encounter: Bastille Battalion
    Took choice 1313/3: (secret choice)
    choice.php?whichchoice=1313&option=3&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/4: (secret choice)
    choice.php?whichchoice=1313&option=4&pwd
    Encounter: Bastille Battalion
    Took choice 1313/5: (secret choice)
    choice.php?whichchoice=1313&option=5&pwd
    Encounter: Bastille Battalion (turn #1)
    Took choice 1314/3: Look for cheese
    choice.php?whichchoice=1314&option=3&pwd
    Encounter: Cheese Seeking Behavior
    Took choice 1319/3: Submit embarrassing catapult photos
    choice.php?whichchoice=1319&option=3&pwd
    > Getting Enhancement from Source Terminal
    Encounter: Cheese Seeking Behavior
    Source Terminal: enhance meat.enh
    Encounter: Cheese Seeking Behavior

  6. #546
    Senior Member
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    467

    Default

    I think Im going to delete everything and start over with mafia I think I have something corrupted somewhere

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

    Default

    Guard code guarded and VMF works as expected. I paid attention and EatDrink was targeting 19 drunk, and planned 6 3 drunk drinks and a 1 drunk drink. When it consumed that drink it used the shot glass and finished with 18.

    Thank you.

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

    Default

    Revision 260 uses an embedded counterScript to collect semirares and drink Lucky Lindys during external scripts - Gingerbread City, Veracity Spacegate, and Garden Harvester (which can use a turn if it harvests a skulldozer.)

  9. #549
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    A generous friend gave me a Golden Mr. Accessory a few years ago. I haven't used it much. That changes today.

    Revision 261 supports bestowing The Smile of Mr. A. upon your chosen (configurable) set of victims. Or friends.
    It's similar to how you configure time pranks, but you can choose to bestow more than one on a particular player.

    Create a file named <PLAYER_NAME>.goldens.txt in your "data" directory.
    Each line is "NAME<TAB>COUNT".

    If COUNT is 0, this player will not be blessed today.
    If COUNT is 1, this player (might) be blessed once today
    If COUNT is >1, this player (might) be blessed that many times today.

    For the total number of blessings you can bestow each day:
    We will randomly select a player from the set, and if the count is > 0, will bless them once.
    If the count > 1, we'll decrement the count and consider them again.
    Otherwise, we will remove them from the set and not consider them again today.

  10. #550
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    Here's a sample script for running selected functions from VMF in-run.

    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;
    }
    
    // Or you can use VMF's which will collect semirares and drink Lucky Lindys
    string VMFCounterScript = "counterExpired";
    string myCounterScript = "localCounterExpired";
    
    // This says don't use a counterScript
    string use_counter_script = "";
    
    // If you want to use a counter script, here's how
    static string COUNTER_SCRIPT = "counterScript";
    string new_counter_script = use_counter_script + "@" + __FILE__;
    string old_counter_script = get_property( COUNTER_SCRIPT );
    
    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_counter_script != "" ) {
    	    set_property( COUNTER_SCRIPT, new_counter_script );
    	}
    
    	// Run functions from VMF
    	consult_with_madame_zatara();
    	send_smiles();
    	use_still();
        } finally {
    	if ( use_counter_script != "" ) {
    	    set_property( COUNTER_SCRIPT, old_counter_script );
    	}
        }
    
        print( "Done running functions from VMF." );
    }
    yields this (note that I have already run VMF today, so the once-per-day things are done):

    Code:
    > call VMF.InRun.ash
    
    Validating configuration.
    All is well!
    Done running functions from VMF.

Posting Permissions

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