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
Alvyn
Newbie


Joined: 19 Jan 2002
Posts: 8
Location: Sweden

PostPosted: Tue Jan 22, 2002 9:17 pm   

Trigger question
 
Starting to feel like im spamming the forum..

I have <<174hp 360mv HS 915733xp>>where HS is hide sneak.Could anyone tell me what trigger to use so that when the HS dissapear it automatically writes HI(Alias hide/sneak)

Thnx

NewbieRetard
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Jan 22, 2002 10:07 pm   
 


#TR {~<~<(%d)hp %dmv([ HS])%dxp~>~>} {
#VAR hp %1
#IF !%pos( S, %2) {sneak}
#IF !%pos( H, %2) {hide}
} "" "prompt"


The expression [ HS] matches any combination of " ", "H", and "S". The expression is captured by the parentheses surrounding it and stored to %2. The %pos function is used to check if H or S is not present.

Troubadour
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Jan 22, 2002 10:55 pm   
 
Alvyn, please read the manual on #TRIGGER, #IF, pattern matching, and %pos(), then return with more specific questions.

Troubadour
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jan 23, 2002 6:19 pm   
 
Here's a simple solution:

#TR {^~<~<%dhp %dmv %dxp} {HI}

LightBulb
All scripts untested unless otherwise noted
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