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


Joined: 25 Aug 2003
Posts: 26

PostPosted: Tue Oct 28, 2003 12:02 pm   

Triggering on One thing.. but NOT another
 
I have this greet trigger I've been workin on and I can't seem to figure out how to get it so that it WON'T fire off when I login.... Basically what it does currently is greet myself when I log onto the mud because you see the greeting message:
[ INFO ] Anthrax has entered -+- Dark Haven -+-
Along with everyone else on the mud after you've entered your username and password.

Current trigger:

Pattern = ^~[ INFO ] %1 has entered -+- Dark Haven -+-
Value = #WAIT 10000; ooc Hiya %1 :)

Now I know this can be done using if statements, but would I have to create a variable to catch what %1 actually represents as a value? And how would the variable look?
Reply with quote
bluedragon
Novice


Joined: 01 Jul 2003
Posts: 30
Location: USA

PostPosted: Tue Oct 28, 2003 2:00 pm   
 
you shouldn't use %1 in the pattern, you want to use %w for a word, * for a phrase, %d for a number, or %x for a mixture of numbers and letters..
putting () around the %w (or *, %d, ect) makes it place the word it matched in the first available variable.

so the pattern would be: ^~[ INFO ~] (%w) has entered -+- Dark Haven -+-
value:
#if ("%1" != "<yourname>") {
#wait 10000
ooc Hiya %1 :)
}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Oct 28, 2003 4:55 pm   
 
As long as you're fixing things, you should remove #WAIT. It's recommended that you don't use that command in triggers, see the Support section for reasons.

Pattern: ^~[ INFO ~] (%w) has entered -+- Dark Haven -+-
Value: #IF ("%1" != %char) {#ALA +10 {ooc Hiya %1 :)}}

NOTE: #IF is case sensitive. Make sure zMUD capitalizes your character name the same way the MUD does. Changes can be made using the Edit button from the character selection screen.
Reply with quote
Mud_Automater
Beginner


Joined: 25 Aug 2003
Posts: 26

PostPosted: Tue Oct 28, 2003 10:15 pm   
 
The wait is in there so the greeting goes off after the person being greeted gets a chance to actually log in all the way... Makes it look more realistic like someone is actually typing the message manually. But I'll check out the Support section like ya suggested.
Reply with quote
bluedragon
Novice


Joined: 01 Jul 2003
Posts: 30
Location: USA

PostPosted: Tue Oct 28, 2003 10:27 pm   
 
ah, i have heard not to use wait in triggers before, but never researched why, thanks for the input.

and to respond to mud automater, the alarm (#ALA) command will still delay the response, by the same 10 seconds you wanted it delayed by.
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