|
jimbabwe Beginner
Joined: 25 Feb 2002 Posts: 18 Location: USA
|
Posted: Mon Feb 25, 2002 1:41 pm
ifcheck question |
i am trying to make a trigger, so that if my hitpoints, goes below.. say 200, that it will make my character say healall1, but if my hp does not fall below 200... then nothing happens. i cant seem to get it working correctly, it seems to just keep scrolling. and making the mud say "Huh?"
this is what i have, my prompt has my HPs in it, as
1249hpnow
i set a trigger for (*)hpnow
then in the value box, i have
#if %n<=200 {say healall} {donothing}
but it just keeps scrolling. is there a way to do this correctly?
James |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Feb 25, 2002 1:45 pm |
Are you putting "donothing" in the else part of the #IF? If so, since zMUD doesn't recognize that as a zMUD command or function, it just sends it to the MUD. What you need is to either eliminate the else part of the #IF (if there is no else part, nothing is done when the condition is false) or just put #NOOP in it which is a zMUD command that does nothing.
Kjata |
|
|
|
jimbabwe Beginner
Joined: 25 Feb 2002 Posts: 18 Location: USA
|
Posted: Mon Feb 25, 2002 2:23 pm |
Based upon what information i can find in the helpfile, i dont see what i am doing wrong, i am providing the #IF, expression comparing v1 to v2, and then i am providing the true and false results. all i can really say is that i am still pretty new to this program, and to ifchecks in general, i have only really used them when i was building, in smaug.
1249hpnow
Trigger: (*)hpnow
#IF (%1 <= 200) {say heal} {#noop}
that is all i have, i believe the format is correct.
maybe i can not use a less than or equal to statement in an ifcheck? i dont see why i wouldnt.. but, like i said, this is pretty new to me. |
|
|
|
jimbabwe Beginner
Joined: 25 Feb 2002 Posts: 18 Location: USA
|
Posted: Mon Feb 25, 2002 4:46 pm |
Thanks for your help, i got it going, with some help from searching through the forum, Many Thanks to Lightbulb :)
here is what i needed to get it going.
#TR <(*)hpnow
#if ((%1)<200) {say Bheals}
#T- autoheal
James |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Feb 25, 2002 9:24 pm |
You're welcome. *wonders what he did*
LightBulb
All scripts untested unless otherwise noted |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|