|
Xiija Beginner
Joined: 24 Apr 2018 Posts: 10
|
Posted: Tue Mar 24, 2020 11:33 pm
coloring words sent to another window |
I have a trigger to get my group's hp & stam
(%w)(*)Health: (%d)%.(*)Stamina: (%d)%.
i send it to the group window like so
@memb = %1
:group: @memb %3 %5
works good but all the text is yellow.
i'd like to change the text color based on hp / stam levels.
tried alot of stuff like this...
#IF ( %3<70) {#sub { %ansi(orange)%3} } {#IF ( %3<40) {#sub { %ansi(red)%3} } {} }
#gag
:group: @memb %3 %5
and
#IF ( %3<70) {#PCOL mxporange %x3} {#IF ( %3<40) {#PCOL mxpred %x3}{}}
not working, any ideas?
ty :) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Wed Mar 25, 2020 6:19 am |
first off, you don't use the @ symbol when defining a variable
memb=%1
#IF (%3<70) {memb=%concat(@memb, " <color orange>%3</color>")} {memb=%concat(@memb, " <color red>%3</color>")}
and then something similar for stamina |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Xiija Beginner
Joined: 24 Apr 2018 Posts: 10
|
Posted: Wed Mar 25, 2020 4:09 pm |
Tysm :)
it was very close, yours didn't recolor the group window text, but this did...
#IF (%3<70) {memb=%concat( @memb, " %ansi(high,green)- HP: %ansi(high,red)%3 ")} {memb=%concat( @memb, "%ansi(high,green) - HP: %ansi(high,green)%3 ")}
#IF (%5<70) {memb=%concat( @memb, " %ansi(high,green)- ST: %ansi(high,red)%5 ")} {memb=%concat( @memb, "%ansi(high,green) - ST: %ansi(high,green)%5 ")}
:group: @memb
Thnax again, was drivin me crazy :) |
|
|
|
|
|
|
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
|
|