Can I set "stomach capacity +1" as a goal?

Sarmatron

Member
Figured it'd be helpful to make the most of the latest IOTM, but I can't make it work with any of the commands I know.
 
I don't think you can (assuming the Goals page on the wiki is comprehensive).

There are a few ways you could stop adventuring when you're no longer at max fullness, probably the easiest would be a mood:

Trigger On: Unconditional Trigger
Command: ashq if ( fullness_limit() - my_fullness() > 0 ) abort();

I think that should work, although if you're scripting adventures then the abort might not entirely break you out of the script.

Personally, on my multi who has pantsgiving I run a PostAdventure script that uses EatDrink.ash to eat to full if I'm not at max fullness.
 

Dukeofdoitung

New member
Personally, on my multi who has pantsgiving I run a PostAdventure script that uses EatDrink.ash to eat to full if I'm not at max fullness.

Is it a modified version of Eatdrink? How do you avoid the dialogue boxes (sim, overdrink etc) from popping up?

Thanks
 

Theraze

Active member
Just import EatDrink and then run it with whichever flags you want it to do. As a basic alias, you can do something like:
alias fillmeup => ashq import <EatDrink.ash> eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);

Which should go to your fullness, inebriety, and spleen limits and NOT overdrink when done. As your stomach capacity increases, the fullness_limit goes up and EatDrink will find something else. If you want it to run a lot faster at the expense of losing readability, you could do something like:
alias fillmeup => ashq import <EatDrink.ash> if (my_fullness() != fullness_limit() || my_inebriety() != inebriety_limit() || my_spleen() != spleen_limit()) eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);

In both cases, if you type "fillmeup" it will eat to the limits. In the second case, it will only do it if you're not already full, which means that EatDrink won't trigger and it will be much faster.

Disclaimer: All this was done off the top of my head without any command-checking. Hopefully it works. :D
 

Dukeofdoitung

New member
Thanks very much!

It works but it's simming. I put an extra false at the end but that gives me: Function 'eatdrink( int, int, int, boolean, boolean )' undefined.

Not sure where I'm going wrong..
 

Winterbay

Active member
For the last version (which is the most useful one anyway), you can add a SIM_CONSUME = false; after the if statement leading to:
Code:
import eatdrink.ash;
if (my_fullness() != fullness_limit() || my_inebriety() != inebriety_limit() || my_spleen() != spleen_limit()) {
   SIM_CONSUME = false;
   eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
}

That should solve it I think. It's either that or use the larger eatdrink-call of:
eatdrink(int foodMax, int drinkMax, int spleenMax, boolean overdrink, int advmeat, int primemeat, int offmeat, int pullmeat, boolean sim)
 

Bale

Minion
alias Theraze => ashq if(my_name() == "Theraze") print("I am awesome!"); else print("I'd be more awesome if I was Theraze!");
 

fronobulax

Developer
Staff member
alias Theraze => ashq if(my_name() == "Theraze") print("I am awesome!"); else print("I'd be more awesome if I was Theraze!");

I'll be sending you the repair bill for my keyboard which was sprayed with coffee while laughing at this :)
 
Top