Thorgal2005-04-08 21:02:56
QUOTE(CroX @ Apr 6 2005, 11:57 AM)
And this is because..? I'm using timers for all my curing in another IRE game (Imperian), and I'm able to keep up with the afflictions of a good Malignist (massive afflictions).
90829
If you can keep up with 4 of them, you don't have a reason to change your system. Otherwise I refer to Gol's post.
Unknown2005-04-09 10:49:36
I don't know much about JMC but why the hassle with the $check variable, why not use IF - ELSE constructs instead?
Regarding preventing the trigger from firing double healings if you get spammed:
I personally would go with the variable option - Set a variable like $sipping whenever you sip health/mana/whatever, add a timer to reset $sipping after a few milliseconds, and have your prompt trigger check whether $sipping is set so it only sips if $sipping = 0. That way the trigger itself still fires and does whatever it does apart from making you sip health.
Of course, if sipping health really is the only thing your trigger does, you can just do as Zarquan suggested and temporarily deactivate the trigger for a few fractions of a second.
Regarding preventing the trigger from firing double healings if you get spammed:
I personally would go with the variable option - Set a variable like $sipping whenever you sip health/mana/whatever, add a timer to reset $sipping after a few milliseconds, and have your prompt trigger check whether $sipping is set so it only sips if $sipping = 0. That way the trigger itself still fires and does whatever it does apart from making you sip health.
Of course, if sipping health really is the only thing your trigger does, you can just do as Zarquan suggested and temporarily deactivate the trigger for a few fractions of a second.
Summer2005-04-09 16:21:32
I don't have a timer or an Else statement. The most I can do is to trigger something to disable part of the triggers, and trigger something else to enable the part again.
/if $variable = 3, do this
/if $variable = 2, do this
/if $variable < 2, do this
Yeah, I figured out how to remove the $check. Makes for harder (messier) coding though. Was a lot simpler to see what I have and re-arrange with the $check. But I guess it's a price I should pay.
Also figured out the problem of the spamming thing
Was because the $hme=0 was supposed to be $hhme=0, which doesn't get changed till I actually get the sipped message, and the $check got reset by the prompt. So every single prompt line I got made me drink until I got the drinking line.

The prompt does set and reset other things. I just typed out the relevant bits (and ended up making a mistake
) to make it easier to understand since the rest of it is full of aliases and other stuff.
Thanks muchly for the help.
My latest prompt (still need to add to it) after a bunch of rewrites if anyone's interested in it for whatever reason.
/action {%1h, %2m, %3e,}{
 /if {$manausingaction=1}{/var manausingaction 0;/if {%2=$maxmana}{/var afflictedreckless 1}};
 /if {%2<$maxmana}{/var afflictedreckless 0};
 /if {%1<2200}{/var needtodrinkhealth 1};
 /if {%2<2300}{/var needtodrinkmana 1};
 /if {%3<1800}{/var needtodrinkbromide 1};
 /if {%1>2199}{/var needtodrinkhealth 0};
 /if {%2>2299}{/var needtodrinkmana 0};
 /if {%3>1799}{/var needtodrinkbromide 0};
 /if {$aslp=1}{cannotdoeatapplysmoke;/if {$checksleep=0}{wake;/var checksleep 1}};
 /if {$afflictedstun=1}{cannotdoeatapplysmoke;/if {$checkstun=0}{msg summer;/var checkstun 1}};
 /if {$afflictedsleep=0}{/if {$afflictedstun=0}{
   /var cando 0;
   /if {$afflictedoily=0}{/var canapply 0};
   /if {$afflictedanorexia=0}{/var caneat 0};
   /if {$afflictedasthma=0}{/var cansmoke 0}
 }};
 /if {$cando=0}
   /if {$definsomnia=1}{/if {$afflictednarcolepsy=0}{/if {$checkinsomnia=0}{insomnia;/var checkinsomnia 1}}};
   /if {$afflictedfear=1}{compose};
   /if {$balance=0}{/if {$equilibrium=0}{
    /if {$afflictedprone=1}{stand}
   }}
 }
}{combat class}
/if $variable = 3, do this
/if $variable = 2, do this
/if $variable < 2, do this
Yeah, I figured out how to remove the $check. Makes for harder (messier) coding though. Was a lot simpler to see what I have and re-arrange with the $check. But I guess it's a price I should pay.

Also figured out the problem of the spamming thing






The prompt does set and reset other things. I just typed out the relevant bits (and ended up making a mistake

Thanks muchly for the help.
My latest prompt (still need to add to it) after a bunch of rewrites if anyone's interested in it for whatever reason.
CODE
/action {%1h, %2m, %3e,}{
 /if {$manausingaction=1}{/var manausingaction 0;/if {%2=$maxmana}{/var afflictedreckless 1}};
 /if {%2<$maxmana}{/var afflictedreckless 0};
 /if {%1<2200}{/var needtodrinkhealth 1};
 /if {%2<2300}{/var needtodrinkmana 1};
 /if {%3<1800}{/var needtodrinkbromide 1};
 /if {%1>2199}{/var needtodrinkhealth 0};
 /if {%2>2299}{/var needtodrinkmana 0};
 /if {%3>1799}{/var needtodrinkbromide 0};
 /if {$aslp=1}{cannotdoeatapplysmoke;/if {$checksleep=0}{wake;/var checksleep 1}};
 /if {$afflictedstun=1}{cannotdoeatapplysmoke;/if {$checkstun=0}{msg summer;/var checkstun 1}};
 /if {$afflictedsleep=0}{/if {$afflictedstun=0}{
   /var cando 0;
   /if {$afflictedoily=0}{/var canapply 0};
   /if {$afflictedanorexia=0}{/var caneat 0};
   /if {$afflictedasthma=0}{/var cansmoke 0}
 }};
 /if {$cando=0}
   /if {$definsomnia=1}{/if {$afflictednarcolepsy=0}{/if {$checkinsomnia=0}{insomnia;/var checkinsomnia 1}}};
   /if {$afflictedfear=1}{compose};
   /if {$balance=0}{/if {$equilibrium=0}{
    /if {$afflictedprone=1}{stand}
   }}
 }
}{combat class}