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
alaric
Novice


Joined: 13 Aug 2005
Posts: 32
Location: Cherry Point, NC

PostPosted: Sun Oct 09, 2005 3:18 pm   

trigger pattern w/changing words
 
Is there any way to have a trigger capture something when it can change words? For instance....if I wanted to capture a word into a database when identifying an object, but the word could change with each item. I tried using the {var1|var2} thing. But I am not sure if I did it right...

Any ideas?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Oct 09, 2005 4:23 pm   
 
Sounds like you want *, or [%w%s] if there's more than one.
_________________
EDIT: I didn't like my old signature
Reply with quote
alaric
Novice


Joined: 13 Aug 2005
Posts: 32
Location: Cherry Point, NC

PostPosted: Sun Oct 09, 2005 4:38 pm   
 
no, thats not going to work....I should have mentioned it or explained better....there is a lot more in the identify info that comes up...I want it to catch the right thing, if I just used (*) it would catch the first word that pop'd up....I can make a list of words for it to catch...thats not a problem, I just don't know how to make it catch it and throw it into a variable and all...I have never had much luck with the {var1|var2} thing...
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Sun Oct 09, 2005 5:50 pm   
 
You'd just want to surround it with () to capture the variable, something like:

#TRIGGER {^You have a broken ({arm|hand|leg|foot})} {#VAR VarName %1}

Then all your DB stuff too.
_________________

No-one ever gets flamed for posting too much information. Conform to the PPP (Preferred Posting Protocol) and give as much information as possible, including MUD output where needed.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 10, 2005 1:57 am   
 
There is no substitute for actual MUD output. If you search these forums for appropiate words I am sure you will find numerous examples that are very close to your MUD's output. Failing that, you should post actual outputs of a number of varieties and then we may be able to offer better then vague suggestions.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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