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
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Feb 27, 2002 6:12 am   

Matching wrong trigger
 
Im trying to take 3 lines of text and store a variable from that it says

You hit a victim.
You hit a victim hard.
You hit a victim extremely hard.

I have the triggers set up as


#tr {You hit *.} {whatever}
#tr {You hit * hard.} {whatever}
etc...

My problem is the first trigger would ALSO match the second and third trigger. I was wondering if there was a way to keep it from doing that. Im not too bad with triggers and variables. just too tired to think about it at the moment
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Feb 27, 2002 7:32 am   
 
Combine them into one big trigger:

#TR {You hit *({.| hard.| extremely hard.})$} {#VAR damage %ismember("%1", {.| hard.| extremely hard.})}

Notice that the trigger captures the end of the sentence. In this case I've used %ismember to convert this into an arbitrary number.

Troubadour
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