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


Joined: 12 May 2002
Posts: 0
Location: USA

PostPosted: Sat Apr 13, 2002 1:02 am   

String Variables and Triggering
 
Ok, I've created a variable called @vENEMIES and placed a lot of different names into it. How would I set up a trigger for when they arrive/fly in to check if the name is in the variable and execute a command if they are?

Person arrives syntax:

Player arrives.
Player flies in.

I'd want the trigger to highlight/caps the name if they are on the list, and do nothing if they arent..

Right now I have it all set up as seperate triggers for each person on the list, both arriving, and flying in, and I think the string variable might cut down on processing a bit so it doesnt have to search through 400+ triggers.

-Brak
Reply with quote
Muorshai
Newbie


Joined: 20 Jan 2002
Posts: 3

PostPosted: Sat Apr 13, 2002 1:16 am   
 
The way I use the stringlist for multiple whatever detection is using the %ismembercommand.

trigger to the line "(%w) flies in."
#IF (%ismember(%1,@enemieslist) {highlight commands}

(actually I get a little fancy in the highlight using MXP...but then again I'm different)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Apr 13, 2002 2:32 am   
 
#TRIGGER {^({@vENEMIES}) {arrives|flies|stumbles|enters|falls from above}} {#CW 71;#ECHO Entered %1}

Doesn't cap it but highlights and echos to you.

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