|
balberith Newbie
Joined: 02 Aug 2002 Posts: 2
|
Posted: Fri Aug 02, 2002 11:20 pm
Strange patterns and nested IF statements. |
Im finding a little trouble with If statements and multiple wildcards.
For instance, i wish to pickup on the following pattern:
[51 Human Pri] [ Pirates ] (WANTED) mofoplay'er
so i use the following trigger
~[*~] ~[ ~P~i~r~a~t~e~s ~] ~(~W~A~N~T~E~D~) (%w~'%w)
which operates correctly, and colors thier name fine.
but when i use an if statement with a large OR expression, it does not seem to pick up things correctly.
I am tring to surpass the surname, and highlight only the charactors name, although not all players have surnames.
[51 Human Pri] [ Pirates ] (WANTED) Novitiate Tanoth,
use pattern:
~[*~] ~[ ~P~i~r~a~t~e~s ~] ~(~W~A~N~T~E~D~) (%w) (%w)
with this command:
#if (%1 != 'Novitiate' | 'Deacon' | 'Bishop' | 'Abbott' | 'Monsignor' | 'Cardinal')
#trigger {%1} {#cw 6} pk_names_active
#trigger {%2} {#cw 6} pk_names_active
now i threw #echo's in there and the variables do get picked up right, although the OR expression is always failing.
should i put both expressions in parens? (%1) != ('nov' | 'bish') ect?
Edited by - Troubadour on 08/04/2002 13:50:56 |
|
|
|
Darker GURU
Joined: 24 Sep 2000 Posts: 1237 Location: USA
|
Posted: Sat Aug 03, 2002 12:41 am |
This forum is for finished mud scripts only. Please post questions in the General forum. Thanks!
zMUD 6 Online Help: All the power you'll ever need. |
|
|
|
LEit Novice
Joined: 27 Jul 2002 Posts: 38 Location: USA
|
Posted: Mon Aug 05, 2002 4:07 pm |
Try:
#if (!%ismember(%1, 'Novitiate|Deacon|Bishop|Abbott|Monsignor|Cardinal')
or
#if (%1 != 'Novitiate' and %1 != 'Deacon' and %1 != 'Bishop' and %1 != 'Abbott' and %1 != 'Monsignor' and %1 != 'Cardinal') |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
|
|
|
|
|