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
koga
Beginner


Joined: 08 Jul 2006
Posts: 17

PostPosted: Sat Jul 08, 2006 11:17 pm   

Triggers
 
can anyone let me know the variable to put in for when someone attacks something, (anyone that is, not just one person) to assist them? I want to think its %n, but I'm not sure
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jul 09, 2006 3:08 am   
 
%n is a trigger wildcard pattern that matches comma-delimited numbers. Perhaps you are thinking of %w, which matches any one-word combination of alphabetic symbols (a-z and A-Z)?
_________________
EDIT: I didn't like my old signature
Reply with quote
koga
Beginner


Joined: 08 Jul 2006
Posts: 17

PostPosted: Sun Jul 09, 2006 11:46 am   
 
I just need to know if I wanted to assist someone would I type
#TRIGGER {%n attacks} {assist %n} or what?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jul 09, 2006 12:51 pm   
 
The first %n would be (%w), since like MattLofton mentioned, you want the trigger to match a word before "attacks", not a number with commas. The second %n would be %1. Since the %w is surrounded in parenthesis, whatever zMUD matches for this wildcard will be stored in %1. Thus, you use this to refer to whatever was matched by the first wildcard surrounded in parenthesis, which in this case would be the word that comes before "attacks".
_________________
Kjata
Reply with quote
koga
Beginner


Joined: 08 Jul 2006
Posts: 17

PostPosted: Wed Jul 12, 2006 3:28 pm   
 
ok, thanks
anyway you could put it in the format that I would type it in please? just so that I can be 100% sure I'm doing it right?
Reply with quote
phranq
Beginner


Joined: 11 Jul 2006
Posts: 13

PostPosted: Wed Jul 12, 2006 5:18 pm   
 
If the wording is just like in your post above, it'd be

#TRIGGER {%w attacks} {assist %1}



...
Reply with quote
koga
Beginner


Joined: 08 Jul 2006
Posts: 17

PostPosted: Thu Jul 13, 2006 4:19 am   
 
ok, thanks
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