ASH Script

Grotfang

Developer
Pretty good.

Code:
cli_execute("set counterScript = cookie.ash");

Will set cookie.ash to run as your counterScript. In ASH, that can be expressed as:

Code:
set_property( "counterScript" , "cookie.ash" );

The rest looks pretty good. I think you are still forgetting semi colons on a few lines, but otherwise you're definitely on the right track!

Code:
put_shop( 0, 0, $item[irradiated Pet Snacks] )
put_shop( 0, 0, $item[freezerburned icecube] )
put_shop( 0, 0, $item[Knob Goblin lunchbox] )
put_shop( 0, 0, $item[cyclops eyedrops] )
 
Thanks!
I forgot that all lines needed the semicolon, oops.
Um, it's giving me an error that says Function 'eatdrink( int, int, int, boolean, boolean )' undefined (castlefarming2.ash, line 7).
Any help?
 

Attachments

  • castlefarming2.ash
    2.2 KB · Views: 30
Last edited:

slyz

Developer
Oh, and I put in cli_execute("set counterScript = cookie.ash");. Will that work? Since I would like to get some semi-rares along with my regular items/meat, so I can mallsell them.

You only need to do that once, from the gCLI. It will set Mafia's counterScript setting.
 

heeheehee

Developer
Staff member
Not entirely sure if this has been answered yet, but the error that you've been getting is because your parameters aren't quite right.

Here's the function that you probably want to call, taken from EatDrink:
Code:
void eatdrink(int foodMax, int drinkMax, int spleenMax, boolean overdrink)

You're supplying an extra boolean, which is what the main function of EatDrink takes, as opposed to this particular function. Try replacing
Code:
eatdrink( eat , drink , spleen , false , false );
with
Code:
eatdrink( eat , drink , spleen , false );
SIM_CONSUME = false;

Set SIM_CONSUME to true if you want it to simulate.
 
Oh, thanks!
EDIT: I have SIM_CONSUME set to false, but it's still simulating it, and I don't know what to do.
 
Last edited:

heeheehee

Developer
Staff member
Move the line SIM_CONSUME up one. (Easiest fix ever? Also, a moron is me!™)
 
Last edited:
Top