REQUEST: automate my vacation

dannn28

New member
First off I want to thank everyone at this site, the scripts are amazing, especially Zarqon and Bale. I am about to go on a vacation for 2 1/2 months but i want to make the most of my adventures. I want to create a script that i can get my brother to run for me (he also plays) that will do all the work for him.

What i am looking for is the following:
  • Changes outfit
  • calls dj_d's eatdrink script with the variables 15, 19, 15, false, false
  • buys 10 sugar sheets and makes them sugar shields
  • consumes all adventures at the giants castle
  • uses kolmafia's builtin cleanup script
  • pays for an ode buff
  • overdrinks and then changes into pajamas

other things that aren't required but would be awesome would be buff upkeep and adding then removing cantata of confrontation

I'm brand new to ash scripting but i do want to attempt to build this at least in part on my own, any hints or suggestions would be awesome.
 
Last edited:

Rinn

Developer
Here's some things that'll help you out.

I have a scheduled task that runs the following command "-java jar KoLmafia-latest.jar --CLI automation-epicgamer.ash" every day at 5:30 pm (if you have a scheduled task make sure the start in folder is correctly set to your mafia directory)

automation-epicgamer.ash contains something like the following, this should get you started.

Code:
cli_execute("login epicgamer");

// get ode
if ( (inebriety_limit() - my_inebriety()) > 0)
{
    if ( have_effect( $effect[Ode to Booze] ) == 0 )
    {
        cli_execute("uneffect cantata, sonata, aria");
        //    get_ode
    }
}
// eat/drink

if ( (inebriety_limit() - my_inebriety()) >= 0 && my_adventures() > 0)
{
    cli_execute("uneffect ode");
    
    //    get_other_buffs, make sure you have more then my_adventures() of everything you can't cast on yourself
    cli_execute("pool 1, 1, 1; concert winklered; use bag o' tricks; use outrageous sombrero; friars food");

    if ( !(get_property("olfactedMonster") == "goth giant") )
    {
        cli_execute("uneffect on the trail");
    }
    
    set_location($location[Giant's Castle]);

    cli_execute("mood +meat");

    use_familiar($familiar[jitterbug]);
    cli_execute("maximize meat");
    equip($slot[familiar], $item[plastic pumpkin bucket]);
    
    adventure(my_adventures(), $location[Giant's Castle]);
}

// get ode again
// overdrink


cli_execute("maximize adv, switch disembodied hand");

//cli_execute("cleanup"); // I do this manually but this is what you want


cli_execute("quit");
My script to get buffs
http://kolmafia.us/showthread.php?4048-acquireBuff-Get-a-buff-from-a-buffbot

Make sure you have a good ccs, moot, etc set up.

I threw this together without checking anything, show me what you come up with and I'll help you out more.
 
Last edited:

StDoodle

Minion
It will make a lot of things simpler if you can manually set up a few moods first. Also set up all your combat stuff, of course. I don't know how do work with eatdrink.ash, as I've never played with it, but the rest is fairly simple;
Code:
outfit my_outfit_for_adventuring
//stuff for eatdrink.ash
buy 10 sugar sheet
make 10 sugar shield
adv * Giant's Castle
cleanup
shrug (name of cheapest AT buff in your mood here; ignore if your mood has <3 songs)
csend 2 kolabuff
acquire 1 (name of preferred nightcap)
wait 500
overdrink 1 (name of preferred nightcap)
cleanup
outfit (name of pj outfit)

Edit to add: this is just a regular script, not ash; just save as a text file and call it on login (if using a sep. computer) or have your bro manually call it when logged in for your character.
 

dannn28

New member
Hey thats a lot simpler than I thought it would be, CLI commands are an option I didn't think of, and definitely make things easier to program

its looking like this now:
Code:
outfit farming
run eatdrink.ash
shrug Ode to Booze
csend 1025 kolabuff (farming pack)
friars blessing booze
wait 300
buy 10 sugar sheet
make 10 sugar shield
adv * Giant's Castle
cleanup
shrug Cantata of Confrontation
csend 2 kolabuff
acquire 1 Gordon Bennett
wait 300
overdrink 1 Gordon Bennett
cleanup
outfit pajamas

I just have to figure out how to hardcode eatdrink.ash or come up with my own diet, whichever turns out to be easier.

Thank you both for your help with this, definitely makes it faster, and gave me some basic breakfast ideas also.
 

Bale

Minion
you can CLI eatdrink.ash like this:

Code:
zlib eatdrink_simConsume = false
ash import <eatdrink.ash>; eatdrink(15, 19, 15, false);
 

dannn28

New member
Its all done!

tested, and worked.

Code:
outfit farming
zlib eatdrink_simConsume = false
ash import <eatdrink.ash>; eatdrink(15, 19, 0, false);
shrug Ode to Booze
buffpack //alias for csend 1025 meat to kolabuff
friars blessing booze
wait 180
buy 9 sugar sheet
make 9 sugar shield
adv * Giant's Castle
shrug Cantata of Confrontation
buffode //alias for csend 2 meat to kolabuff
wait 180
cleanup
aquire 1 Gordon Bennett
overdrink 1 Gordon Bennett
outfit pajamas

Thank you all for your wonderful help.
 
Top