|
zmudnoob Beginner
Joined: 09 Sep 2005 Posts: 14
|
Posted: 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? |
|
|
|
zmudnoob Beginner
Joined: 09 Sep 2005 Posts: 14
|
Posted: Sun Sep 18, 2005 7:02 am |
Oh! And I'm using zmud 7.13b and windows xp :-P thanks!
|
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
|
|