 |
kilion Newbie
Joined: 31 Jan 2002 Posts: 5
|
Posted: 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? |
|
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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 |
|
|
|
 |
|
|
|