|
soulgiver Beginner
Joined: 27 Oct 2001 Posts: 16 Location: USA
|
Posted: Thu Aug 22, 2002 4:00 am
Uh, help with a trigger? |
Mud output:
Beggar leaves south.
or
Lookout leaves south.
right now my @badbad is set for lookout. and this is my trigger:
#TRIGGER {(%w) leaves (%w).} {%if ( %lower(%1)==@badbad) %2}
why when the begger leaves i follow instead of just lookout? what am I missing? please?
Ryan Young |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Aug 22, 2002 5:03 am |
#TRIGGER {(%w) leaves (%w).} {#IF ( %lower(%1)==@badbad) {%2}}
Ton Diening |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Thu Aug 22, 2002 7:41 am |
Since == is not officially a valid operator (see here), you should use = which is used for both comparison and assignment in zScript unlike some other programming languages.
So:
#TRIGGER {(%w) leaves (%w).} {#IF (%lower(%1)=@badbad) {%2}}
If you aren't planning on having the trigger do anything when the person leaving _isn't_ @badbad, you can simplify it further:
#TRIGGER {@badbad leaves (%w).} {%1}
- Charbal |
|
|
|
|
|