Consumption Level Trigger?

typelogin

New member
While adventuring in the Nearby Plains, or where ever I happen to be, how do I set an .ash script to consume 3 glimmering roc feathers once I reach level 4 and then automatically adventure again after consuming the glimmering roc feathers?
 

heeheehee

Developer
Staff member
Let's say you're adventuring in the Pre-Cyrpt Cemetary. A while loop containing an if-statement should be what you want.
PHP:
while(my_adventures()>0) {
    if(my_level()==4 && my_spleen_use()<4) use(3,$item[glimmering roc feather]);
    // This extended check is actually to make sure that the script doesn't try to use the feathers more than once.
    adventure(1,$location[pre-cyrpt cemetary]);
}
 

slyz

Developer
I would rather have this set as a mood or a betweenBattle script.
Save this as useRoc.ash (or anything else):
PHP:
if(my_level()==4 && my_spleen_use()<4) use(3,$item[glimmering roc feather]);

Simply type set betweenBattleScript = useRoc.ash in the gCLI to set Mafia to check it after each adventure (or before each adventure if you are automating turns).

Another way to have Mafia check this after each adventure is to set it as a mood: use Trigger on: unconditional trigger and Command: call useRoc.ash.
 
Top