Disclaimer: I know that the way my system does things isn't as efficient as it could be, relying on internal variables instead of gmcp.
THE PROBLEM
Sometimes, when I take a lot of burst damage - so, anywhere endgame - my system sends the command to eat moss through twice, resulting in me going through moss at twice the speed I should.
HERE'S MY CODE
First, my prompt sends my healing check. This is the moss part:
[spoiler]
[/spoiler]
Assuming that flags as true on the required levels, it sends 'Feat moss' which is just my eat alias, and the plant I want eaten:
[spoiler]
#if (%ismember( %1, goldenseal) and %ismember( stupidity,
@MyAffs)) {#2 outc goldenseal;#2 eat goldenseal} {
outc %1;eat %1}
[/spoiler]
In there, my 'eat' alias is called:
[spoiler]
Featcheck %1
~eat %1
LastCure=%1
[/spoiler]
It's my 'featcheck' alias that sets lost balances and flags to mark my having attempted to eat something:
[spoiler]
#if (%1 == moss) {
Fadd MyFlags Emoss
Fadd LostBals moss
#T+ EMossCheck
} {
#if (%ismember( %1, ash|bayberry|bellwort|bloodroot|ginseng|goldenseal|hawthorn|kelp|lobelia|cohosh)) {
Fadd MyFlags EHerb
Fadd LostBals herb
#T+ EHerbCheck
} {
#if ( %1 == kola) {
Fadd MyFlags EKola
#T+ EKolaCheck
}
}
}
[/spoiler]
SO, HOW CAN I FIX IT?
I've tried most things I can think of. This issue doesn't happen with any other herbs, it doesn't happen with health -sipping- which is coded in essentially the same fashion. It's not a huge issue, but it does become sort of expensive when I go through 800 moss every time I'm in tiyen.
Comments
Message #17059 Sent By: Oleis Received On: 1/03/2014/17:24
"If it makes you feel better, just checking your artifact list threatens to crash my mudlet."
is what I think Ezalor meant.. I have the same issue with kidney/moss but everything else runs fine...
or instead of adding the eatingmoss you can do something like
#additem lostbals "moss"
#alarm "EatingMoss" +1 {#delitem lostbals "moss"}
What happens is you get a prompt, it sends to eat moss, then you get another prompt before your eat moss command goes through, so it sends another eat command. Your limiter isn't actually effective without a small delay to ensure that doesn't happen.