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
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Fri Mar 29, 2002 7:24 pm   

Sub and ansi
 
Im having a spot of trouble figuring out how to do this. I have a variable named Enemy with a listing of all of my enemies, i.e. Bob|Joe|Jim|Billy....etc.
And what Im trying to do is get it so that whenever any of these names appear to get them to be red and blinking via the %ansi(blink,red) function...the trigger i have now gives me some REALLY wierd results and Im at a loss of how to set this up.

Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
Reply with quote
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Fri Mar 29, 2002 7:44 pm   
 
quote:

Im having a spot of trouble figuring out how to do this. I have a variable named Enemy with a listing of all of my enemies, i.e. Bob|Joe|Jim|Billy....etc.
And what Im trying to do is get it so that whenever any of these names appear to get them to be red and blinking via the %ansi(blink,red) function...the trigger i have now gives me some REALLY wierd results and Im at a loss of how to set this up.

Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.



Why not just do this?

#TR {@enemy} {#CW red,bold,blink}

Should work.

Alan

Come play with us in Dragonrealms

http://www.play.net/dr
Reply with quote
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Fri Mar 29, 2002 8:25 pm   
 
Tested that trig with Enemy being Nilgo|Zephid
didnt fire on Nilgo or Zephid
but did on Nilgo|Zephid


Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
Reply with quote
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Fri Mar 29, 2002 8:27 pm   
 
i got it...the trigger needed braces around it becoming
#TR {[@Enemy]} {#CW red,bold,blink}
Thanks to reddytedy for your insight


Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
Reply with quote
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Fri Mar 29, 2002 8:29 pm   
 
Ok...that ended up blinking every letter that was in the Enemy variable no matter where it was

Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Mar 29, 2002 9:10 pm   
 
In a pattern, square brackets indicate a range. Each letter in the range is matched individually.

Place the variable in curly braces to match each item in a string list.

#TR {{@enemy}} {#CW red,bold,blink}



Troubadour
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