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
zmudnoob
Beginner


Joined: 09 Sep 2005
Posts: 14

PostPosted: Sun Sep 18, 2005 7:02 am   

%expandlist problems
 
I'm trying to figure out how to add specific ansi to items in a stringlist then expandlist the entire variable. This is what I created and it's not working:

#VAR statuswindowhealth %expandlist( %if( %ismember( %item( @grpwndwhlth, %i), @vitlist), %ansi( 3), %ansi( 15)),%cr)

trying to create a script such that if the item in @grpwndwhlth is also found in @vitlist, it will be colored cyan, otherwise it's white and then the entire stringlist is expanded w/a carriage return into @statuswindowhealth. The script I wrote, however, creates an empty variable. Help! I don't know if %expandlist will allow for what I am trying to do (since I really know so little about scripting) so if not, any suggestions as to what I can do instead?
Reply with quote
zmudnoob
Beginner


Joined: 09 Sep 2005
Posts: 14

PostPosted: Sun Sep 18, 2005 7:02 am   
 
Oh! And I'm using zmud 7.13b and windows xp :-P thanks!
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: Sun Sep 18, 2005 8:08 am   
 
What i use to color items in my status windows is a variable..

Aid goes down: c_aid = red
i cast aid, c_aid = blue
im successfull in aid, c_aid = green

then in my status window i have:

%ansi(high, @c_aid)aid

it is colored to reflect its state.

so instead of trying to store ansi(3) or (15) set statuswindowhealth to a number, then use:

%ansi(@statuswindowhealth)@your_health_variable
in your status window
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Sep 18, 2005 8:18 pm   
 
This is going to be very processor intensive.

#FUNCTION statuswindowhealth {%expandlist(%exec("#FORALL @groupwndwhlth {#IF (%ismember(%i,@vitlist)) {%ansi(3)%i} {%ansi(15)%i}}"),%cr)}

You can just put @statuswindowhealth in a status window setting and it will display correctly.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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