Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
croman
Newbie


Joined: 17 May 2002
Posts: 7

PostPosted: Wed Jun 19, 2002 1:01 am   

Help with a trigger please
 
I have setup a alias called Healon that when used will create a action (used to heal myself faster)

I have another alias called Healoff that I use to remove the first action.

However, I would like to have this done automatically when my HPs are full. How can I go about doing this?

my prompt looks like

[3523/3523 HP]

Any help is appreciated.. thanks (need help setting up any variable and triggers I would need)

Thanks
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jun 19, 2002 1:14 am   
 
#TRIGGER {~[(%d)~/(%d) HP~]} {#IF (%1 < %2) {healon} {healoff}} {nocr|prompt|notrig}

Try that.

Special characters need to have a ~ in front of them.
View->Preferences->Special Characters has the list.

Trigger pattern %d is used to capture a number.

Brackets are used to capture stuff so you can refer to them.
ie (%d) is %1 and the second bracketed thing (%d) is %2

Prompted things should have trigger options:
[ ] Newline
[X] Prompt
[ ] Trigger on Trigger

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
croman
Newbie


Joined: 17 May 2002
Posts: 7

PostPosted: Wed Jun 19, 2002 2:17 am   
 
Thanks, I will try some of that out!

Btw, I do not understand everything from {healon} {healoff} to the end.. however I do not think that I need that much.. it was just the prompt variable part that I needed help with

Thanks!
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Jun 19, 2002 12:24 pm   
 
Yes, you do need it. {nocr|prompt|notrig} are trigger options that let you specify special behavior for that trigger. Each option is separated by a pipe (|) and each has its use. The nocr tells zMUD to not check to see if this trigger matches at the end of a line (when zMUD receives a newline character). The prompt options tells zMUD to check this trigger for matches when it receives a buffer of text (basically, a prompt). Finally, the notrig options tells zMUD to not check any trigger for matches agaisnt any output that this trigger produces. You need specially the prompt option because otherwise, zMUD will wait for a newline to come before checking your trigger for matches and you'll end up having the trigger fire not when the prompt is displayed, but when you enter a command or some other output is sent from the MUD after the prompt.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net