|
ADullTree Newbie
Joined: 21 Aug 2002 Posts: 1
|
Posted: Tue Sep 03, 2002 9:57 am
Trying to get this salve trigger to work |
HP: 18/75 SP: 66/66
that is my base line i am working off of. I have @hp to be a variable set so that everytime the line comes up it records that number as my current hps. I want it to send the salve command to the MUD any time i am below 50 hps. So my initial idea was
#TR { HP: (%d)/(%d) SP: (%d)/(%d)} {#VAR hp %1;#VAR hpmax %2;#VAR sp %3;#VAR spmax %4}
#TR {#IF (@hp < 50)} {salve}
But this doesn't seem to work. Any ideas would be great. |
|
|
|
cingulli Wanderer
Joined: 30 Aug 2001 Posts: 53 Location: Finland
|
Posted: Tue Sep 03, 2002 11:12 am |
how about
#TR { HP: (%d)/(%d) SP: (%d)/(%d)} {#IF (%1 < 50) {salve}} |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Sep 03, 2002 12:39 pm |
You should enable the Trigger on Prompt option for that trigger. Also, to avoid trying to heal continually, you might want to set up a control variable:
#TRIGGER { HP: (%d)/(%d) SP: (%d)/(%d)} {#IF ((%1 < 50) and (@heal)) {#VAR heal 0;salve}} "" {prompt}
#TRIGGER {You are healed.} {#VAR heal 1}
The pattern of the second trigger is made up and you should modify it to whatever message you receive after doing the "salve" command.
The trigger will now check to see if your hp is below 50 and if a control variable (@heal) is 1. If ti is, it heals and sets the control variable to 0. The variable is set to 1 again after you receive the message that you have been healed. This prevents that when you first go below 50, the trigger would try to send the "salve" command multiple times until the prompt showed your hp above 50.
Kjata |
|
|
|
|
|