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


Joined: 05 Jul 2003
Posts: 24
Location: Sweden

PostPosted: Sat Jul 05, 2003 11:56 pm   

speach, chat and trigger problem
 
I was wondering what I am doing wrong with these triggers....
the mudoutput is:

Sailor tells you 'You are not yet ready.'

and I want to capure name and what that person says and send it to the #speak funtion.

I tried

#TRIGGER {(%w) tells you '(%w)'} {#speak {%1 tells you %2}}

but for some reason its not working.

Can someone please tell me what im doign wrong?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jul 06, 2003 4:01 am   
 
%w - match any number of alpha characters (a-z) (a word)

This does not include spaces. As long as Sailor limits himself to one-word tells you'll be fine, but your trigger won't pick up anything longer. The * wildcard is usually your best choice for multi-word phrases.

#TRIGGER {(%w) tells you '(*)'} {#speak {%1 tells you %2}}
Reply with quote
zex0s
Wanderer


Joined: 29 Jun 2003
Posts: 64

PostPosted: Sun Jul 06, 2003 4:01 am   
 
The most abvious answer would be that %w corresponds to a single word, and the trigger would only fire if someone told you one word, minus the period. the fix would be replace the second %w with *
Reply with quote
zex0s
Wanderer


Joined: 29 Jun 2003
Posts: 64

PostPosted: Sun Jul 06, 2003 4:06 am   
 
Heh, lightbulb, you were composing while I was, but the forum seems to be slightly laggy for me tonight.
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