|
takke Beginner
Joined: 11 Oct 2002 Posts: 29 Location: Sweden
|
Posted: Sun Aug 09, 2020 10:35 am
Need help to trigger this line |
Hi
I want to trigger on following line:
Takke [party]: Hp: 4198/(4242) [-44] Sp: 971/(971) [+0] Ep: 4336/(4380) [-6]
I want to store the values in variables. I have a problem with the [-44]. I want to store that in a variable, lets say
#var minusregen
and change the color to hi-green
and the if it's a positive value i want to store it in a variable, lets say
#var plusregen.
Can anyone help me with this? The Hp, Sp and Ep values i can trigger but not the values in the []
Thanks in advance. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Mon Aug 10, 2020 4:13 pm |
%n will capture signed (+/-) numbers.
~[(%n)~]
If it can be either signed or unsigned you will need something like:
~[({%d|%n})~] |
|
_________________ Discord: Shalimarwildcat |
|
|
|
takke Beginner
Joined: 11 Oct 2002 Posts: 29 Location: Sweden
|
Posted: Mon Aug 10, 2020 6:55 pm |
Thanks, worked like a charm. Have never seen %n anywhere.
If i now want to change the color of that [] value, how would you go about that? |
|
|
|
chaossdragon Apprentice
Joined: 09 Apr 2008 Posts: 168
|
Posted: Mon Aug 10, 2020 8:39 pm |
Like green for + value and red for - to reflect dmg vs healing?
#CW
%color()
are the things to use. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Mon Aug 10, 2020 9:26 pm |
#TR {~[(%n)~]} {#IF (%1>0) {#CW green} {#CW red}}
You would want to enter that on the command line, then go into the settings editor and make sure the 'repeat within line' option is checked on the bottom panel of the trigger. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
takke Beginner
Joined: 11 Oct 2002 Posts: 29 Location: Sweden
|
Posted: Tue Aug 11, 2020 9:26 am |
Thank you guys :)
|
|
|
|
|
|