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


Joined: 31 Jan 2002
Posts: 5

PostPosted: Wed Apr 10, 2002 2:51 am   

Pkill trigger
 
How do I set a trigger to pk a player when he appears in the room? This was what i tried to do...

Trigger:
(%w) %2 the room.
(e.g. Sun flies into the room, Sun appears in the room.)

Action:
#IF (%w =~ @target) {
stun @target
gt @target is here!
}

What is wrong?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Apr 10, 2002 5:35 am   
 
The items you put brackets around () in the
trigger are the things you can refer to in
the script.

Trigger:
^(%w) %* the room.$
(e.g. Sun flies into the room, Sun appears in the room.)

Action:
#IF (%1 =~ @target) {
stun @target
gt @target is here!
}

So the first () item being (%w) can be referred
to as %1.

Using %# in the trigger is frowned upon as it
could mix you up. Best to use the trigger
patterns (help Pattern Matching).

I tied the trigger to match the beginning
of the line with ^ and the end of the line
with $ as I used a * pattern to match which
I personnaly dislike as a rule of thumb.


Ton Diening
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