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


Joined: 02 Feb 2002
Posts: 1

PostPosted: 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?
Reply with quote
einar
Wanderer


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: 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

Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Berion
Newbie


Joined: 10 Nov 2001
Posts: 8
Location: Norway

PostPosted: 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
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Sun Feb 03, 2002 7:53 pm   
 
Good catch, Berion



zMUD 6 Online Help: All the power you'll ever need.
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