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


Joined: 04 Jul 2002
Posts: 6
Location: Germany

PostPosted: Fri Jan 31, 2003 5:14 am   

Need help on sub-trigger
 
I'm trying to make a trigger which detects if playernames are in my friends- or msp-stringlist or in both and after that it should send the appropriate action to the MUD.

This is what i've got so far:

#VAR friends "f1|f2|f3"
#VAR msp "f1|f4|f5"

#TRIGGER {({%dups(@friends|@msp)})} {#IF (%ismember( %1, @msp)) {#SUB {%ansi( magenta, bold)<send 'b %1|msp_emote 1 %1|msp_emote 2 %1' 'look at %1'>%1</send>}} {#CW magenta,bold}}

If the parsed name is in the msp-list it should make it a mxp-link if not it only should colorize it..
Unfortunately it does not work the way i want it to..

If the mud-output looks like this:

^MSP-list(3): f5|f6|f1

somehow the trigger gets totally confused and while the first mxp-link looks just fine the second starts with {#SUB {f6}} {#CW magenta,bold}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 31, 2003 6:02 am   
 
Simplify.
#TR {({@msp})} {#SUB {%ansi( magenta, bold)<send 'b %1|msp_emote 1 %1|msp_emote 2 %1' 'look at %1'>%1</send>}}
#TR {({@friends})} {#IF (%ismember( %1, @msp) = 0) {#CW magenta, bold}}


LightBulb
Advanced Member
Reply with quote
Kitana
Newbie


Joined: 04 Jul 2002
Posts: 6
Location: Germany

PostPosted: Fri Jan 31, 2003 6:17 am   
 
So i have to use two trigger.. and it works just perfect.

Thx...
Reply with quote
Kitana
Newbie


Joined: 04 Jul 2002
Posts: 6
Location: Germany

PostPosted: Fri Jan 31, 2003 6:33 am   
 
Sorry to bother once more.. but after further testing, the second trigger does not colorize the names of @friends.

Mud-Output like this:

msp1|f2|f3|f4|msp2

The MXP-Links of @msp-names work fine.


If the 2nd trigger looks like:

#TRIGGER {{@friends}} {#CW magenta,bold}

it finally works.. but i wonder why the #IF-syntax does not seem to work..

But i guess it fits my needs without it
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Jan 31, 2003 1:03 pm   
 
LightBulb included the #IF because you had a similar one in your original trigger. Basically, what the #IF in LightBulb's script does is to check that the person matched by the second trigger which is in the @friends list is not also in the @msp list. Only if that is true, the name is colored.

Kjata
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