calling an ash script (eatdrink.ash) from gCLI

zekaonar

Member
So what is the proper way to call eatdrink in a GCLI script/command? I've seen references to:

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

So in my script I'll call:

shrug Polka of Plenty;
csend 2 meat to kolabuff;
wait 60;
zlib eatdrink_simConsume = false;
ash import <eatdrink.ash>; eatdrink(15, 19, 15, false);
shrug Ode to Booze;
csend 102 meat to kolabuff;
wait 60;

And it will give the error:

Previous value of eatdrink_simConsume: true
Changed to false.
Unknown variable 'shrug' ()
 
The ash part needs to be last, since that makes following commands all run as ash. What you probably actually want to do is ashq (you don't care about the results) and just define SIM_CONSUME as false rather than changing your defaults and making it so you can't test as easily. That means you have 2 major choices on how to do it... you can either put your EatDrink stuff into another file and run that, which makes it easy, or you can run your post-ED kolabuff through a CLI_EXECUTE(""); to get it to work again.

I'd suggest putting your EatDrink stuff into a file. Call it something like RunEatDrink.txt and put this into it:
ashq import <EatDrink.ash> SIM_CONSUME = false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);

Then change your CLI script to:
shrug Polka of Plenty;
csend 2 meat to kolabuff;
wait 60;
RunEatDrink.txt
shrug Ode to Booze;
csend 102 meat to kolabuff;
wait 60;
 
If you don't want to mess around with ash, and your fullness/spleen/drunkenness value will always be the same you can simply put "eatdrink (15,19,15,false,false)" into the gCLI. Assuming those are the value you want to eat/drink/spleen to.

To overdrink at the end of the day, simply change the first boolean value to true ("eatdrink (15,19,15,true,false)").
 
Back
Top