 |
Morgreth Newbie
Joined: 02 Feb 2002 Posts: 1
|
Posted: Sat Feb 02, 2002 11:27 pm
Triggers.. groan... |
I've recently switched to zMUD 6.16 from gMUD because of the potential capabilities zMud has that gMud severely lacks. Well, gMud has made me stupid with its easy-to-use trigger system. I play a MUD called Medieval Times, and you can multiplay 2 chars at once. I want my cleric to basically answer spell requests defined by single word commands issued by anyone who speaks them. I shall give some examples.
Morgreth says, 'heal'
I want my cleric to cast the 'cure critic' spell upon him, using...
cast 'cure critic' Morgreth
in gMud this was done by using * says, 'heal' as the pattern, and then as the output text putting down cast 'cure critic' %1. Can anyone help me translate this into proper zMud script?  |
|
|
 |
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sun Feb 03, 2002 12:42 am |
#TR {(%w) says, 'heal'}{cast 'cure critic' %1}
It's always better to use a picky wildcard :P
 |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Feb 03, 2002 1:33 pm |
By the way,
* says, 'heal'
would have worked exactly as in gMUD, but like einar said, it is better to use %w since that will only match one word and not everything.
Kjata |
|
|
 |
Berion Newbie
Joined: 10 Nov 2001 Posts: 8 Location: Norway
|
Posted: Sun Feb 03, 2002 5:20 pm |
Wouldn't it have to be:
(*) says 'heal'
to store the name in the %1 variable?
Also, if you want to limit it even more,
you can use
^(%w) says 'heal'.
The ^ forces it to start at the beginning of the line, so that emotes or Someone says 'Someone says 'heal'' wont work.
-Berion |
|
|
 |
Darker GURU
Joined: 24 Sep 2000 Posts: 1237 Location: USA
|
Posted: Sun Feb 03, 2002 7:53 pm |
Good catch, Berion
zMUD 6 Online Help: All the power you'll ever need. |
|
|
 |
|
|