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


Joined: 23 Jul 2002
Posts: 3
Location: USA

PostPosted: Wed Jul 24, 2002 8:07 pm   

Memory
 
I need to know how to set up a trigger that can memorize a piece of text and then, in another trigger triggered by a different message, use that piece of text in the reaction.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Jul 24, 2002 9:20 pm   
 
You would do that by saving the piece of text to a variable. Lets take this trigger as an example:
#TRIGGER {%w tells you '(*)'} {#VAR message "%1"}

This would save whatever was matched by the * into a variable names message. Notice the use of double-quotes since the contents of %1 might contain spaces and thus only the first word would be saved into the variable.

You can then use this variable in another trigger. For example:
#TRIGGER {%w tells you 'What were you just told~?'} {reply I was told this - @message}

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