|
koga Beginner
Joined: 08 Jul 2006 Posts: 17
|
Posted: 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
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
koga Beginner
Joined: 08 Jul 2006 Posts: 17
|
Posted: 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? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
|
koga Beginner
Joined: 08 Jul 2006 Posts: 17
|
Posted: 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? |
|
|
|
phranq Beginner
Joined: 11 Jul 2006 Posts: 13
|
Posted: 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}
... |
|
|
|
koga Beginner
Joined: 08 Jul 2006 Posts: 17
|
Posted: Thu Jul 13, 2006 4:19 am |
ok, thanks
|
|
|
|
|
|