Needing a little help with a script.

Mystia

Member
I'd like to automate a meatfarming script on days I can't get on KoL, but some of it's eluding me. I can't figure out how to change the goals in an area, among other things. This is what I've got so far.

Any help would be appreciated.

cli_execute("acquire milk of magnesium");
cli_execute("cheapest Twinkly Wad, Hot Wad, Sleaze Wad, Spooky Wad, Cold Wad, Hot Wad, Stench Wad; buy 15 it; use 15 it;");
cli_execute("cast ode");
cli_execute("acquire 19 blackberry schnapps");
cli_execute("drink 19 blackberry schnapps");
cli_execute("use 1 milk of magnesium");
cli_execute("cheapest Hot Hi Mein, Cold Hi Mein, Sleazy Hi Mein, Stinky Hi Mein, Spooky Hi Mein; buy 3 it; eat 3 it;");
cli_execute("outfit MPMachine");
cli_execute("familiar Rogue Program");
cli_execute("equip ittah bittah hookah");
int numSprays = ceil( (my_adventures() - have_effect($effect[Wasabi Sinuses]) )/10.0 );
use( numSprays , $item[Knob Goblin Nasal Spray]);
cli_execute("cast 3 sugar");
cli_execute("mallsell 3 sugar sheet");
cli_execute("cast 5 saucecrafting");
cli_execute("cast 5 cocktailcrafting");
cli_execute("cast 3 pastamastery");
cli_execute("cast * bricko");

//This is where I get stuck. I'd like to adventure in the Giant's Castle until I've acquired 102 brickos and at least 4 game grid tokens.
//1.) I'd like to change my attack script to an appropriate starfishing combat macro I've created (21. Starfish Action).
//2.) I'd like to change the goal to "+102 Bricko Brick, +4 Game Grid Token", then continue with the script.

cli_execute("outfit castle");
cli_execute("familiar Sandworm");
cli_execute("equip ittah bittah hookah");
//1.) I'd like to change my attack script to "Pickpocket, then attack with weapon".
//2.) I'd like to change the goal to "+4 Agua de Vida", then continue with the script.

cli_execute("familiar Llama lama");
cli_execute("equip ittah bittah hookah");
//1.) I'd like to change the goal to "+4 Llama lama gong", then continue with the script.

cli_execute("familiar he-boulder");
cli_execute("equip ittah bittah hookah");
cli_execute("adventure * Giant's Castle");
cli_execute("mallsell * Bricko eye, * bricko brick");
cli_execute("autosell * heavy D, * Original G, * disturbing fanfic, * furry fur, * wolf mask, * awful poetry journal, * thin black candle, * chaos

butterfly, * plot hole, * probability potion, * procrastination potion, * angry farmer candy, * giant needle, * Mick's IcyVapoHotness Rub, * rave

whistle");
cli_execute("cast ode");
cli_execute("cheapest +fuzzbump, +tropical swill ; buy 1 it; drink 1 it;");
cli_execute("use * Warm Subject gift certificate");
cli_execute("outfit Rollover");
 

Bale

Minion
first of all, you should know that there is a great resource for ash: The KoLmafia wiki. There are better ways to do most of the things you're doing if you use ash instead of cli_execute().

Second, for setting goals you need to use cli_execute("goal add 4 Llama lama gong"). Use goal clear to remove all previous goals.
 

Mystia

Member
I'm actually having quite a bit of trouble making sense of that. I caught the link in another topic, but my lack of coding experience is making it such that attempting to decipher it leads to me giving up rather quickly.
 

Bale

Minion
Here's an example. I'll convert this:

cli_execute("outfit MPMachine");
cli_execute("familiar Rogue Program");
cli_execute("equip ittah bittah hookah");
int numSprays = ceil( (my_adventures() - have_effect($effect[Wasabi Sinuses]) )/10.0 );
use( numSprays , $item[Knob Goblin Nasal Spray]);
cli_execute("cast 3 sugar");
cli_execute("mallsell 3 sugar sheet");
cli_execute("cast 5 saucecrafting");
cli_execute("cast 5 cocktailcrafting");
cli_execute("cast 3 pastamastery");
cli_execute("cast * bricko");

//This is where I get stuck. I'd like to adventure in the Giant's Castle until I've acquired 102 brickos and at least 4 game grid tokens.
//1.) I'd like to change my attack script to an appropriate starfishing combat macro I've created (21. Starfish Action).
//2.) I'd like to change the goal to "+102 Bricko Brick, +4 Game Grid Token", then continue with the script.


Code:
outfit("MPMachine");
use_familiar($familiar[Rogue Program]);
equip($slot[familiar], $item[ittah bittah hookah]);
int numSprays = ceil( (my_adventures() - have_effect($effect[Wasabi Sinuses]) )/10.0 );
use( numSprays , $item[Knob Goblin Nasal Spray]);
use_skill(3, $skill[sugar sheet]);
put_shop(0,0,3, $item[sugar sheet]);
use_skill(5, $skill[saucecrafting]);
use_skill(5, $skill[cocktailcrafting]);
use_skill(3, $skill[pastamastery]);
cli_execute("cast * bricko");
set_property("customCombatScript", "starfishing");
cli_execute("goal clear");
cli_execute("goal add 102 Bricko Brick, 4 Game Grid Token");

You can change combat action to a CCS named "starfishing" with set_property("customCombatScript", "starfishing"). Note that this means you'll need a CCS containing the macro. You cannot do it with a macro in your KoL preferences.
 
Top