|
dalkinn Newbie
Joined: 24 Nov 2003 Posts: 6 Location: USA
|
Posted: Mon Nov 24, 2003 5:46 am
Sleeping Cycles |
I've looked around all over and I can't figure how to make this trigger work right.
What I want to do is to basically set up a trigger so that if my HP are above a certain value, cast a spell, otherwise sleep.
The problem is that I want it just to send the sleep command once. I'm reading off the prompt and any input from the user causes the prompt to pop up again. So when the trigger is executed and I sleep, the sleep command keeps getting sent to the mud over and over and over until I heal HP past that value I set.
How do I have it execute the sleep command, and then just wait until I wake up before sending it again? |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Mon Nov 24, 2003 7:03 am |
#alias wa {wake;stand;#var sleep 0}
#alias sl {sleep;save;#var sleep 1}
#trigger {~<(%d)hp~>} {#if (%1>10) {#if (@sleep=1) {wa};#if (@cast=0) {cast 'strength';#var cast 1}} {sl}}
Of course, there are some things you'll have to tweak, like if the cast doesn't work or you are fighting or whatnot, but that should get you what you want. |
|
|
|
dalkinn Newbie
Joined: 24 Nov 2003 Posts: 6 Location: USA
|
Posted: Mon Nov 24, 2003 5:53 pm |
Thanks for the reply. I understood basically what needed to be done, but I have problems getting nested #IF statements to work right. I'll tweak the code you gave and it should work fine.
|
|
|
|
|
|