 |
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Wed May 21, 2003 3:40 pm
Colour trigger: getting an underline... |
When a player (or a mob) begins casting a spell I want a trigger to check if that player is on my enemylist (@pk_enemy_list). If so I want the name in the pattern "(%w) begins casting a spell..." to be underlined, and the whole pattern (regardless of a positive match in enemy_list) to be coloured "lightblue".
Example:
Darkforce begins casting a spell...
(Assuming Darkforce is in my @pk_enemy_list), else;
Darkforce begins casting a spell...
(if it is possible to have the underline in a different colour from the word that is even better :)
This is what I have come up with so far:
Pattern: (%w) begins casting a spell...$
Value: [blue]#IF (%ismember( %1, @pk_enemy_list)) {
#CW lightblue, underline The question is what code I should replace the fictive "lightblue, underline" with
} {
#Color lightblue
#VAR spell_caster ""
} |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed May 21, 2003 6:54 pm |
#TR {{%w} (begins casting a spell...)$} {#IF (%ismember( %1, @pk_enemy_list)) {#PCOL {underline,aqua} %x1;#PCOL {lightblue} %x2}}
LightBulb
Advanced Member |
|
|
|
 |
nostra Wanderer
Joined: 23 May 2001 Posts: 68 Location: Sweden
|
Posted: Sat May 24, 2003 1:54 pm |
I'm afraid the trigger doesn't work as intended.
If the player casting a spell ismember of the variable list (pk_enemy_list) the line is coloured lightblue but the player name is not underlined and coloured aqua.
Indeed, if the player is NOT a member of the variable list the line is not coloured at all ("%w begins casting a spell").
Please advice  |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 24, 2003 2:48 pm |
It's a fairly simple typo, you could probably have found it yourself. Likewise, it's fairly simple to add a second command for the false result of #IF.
#TR {(%w) (begins casting a spell...)$} {#IF (%ismember( %1, @pk_enemy_list)) {#PCOL {underline,aqua} %x1;#PCOL {lightblue} %x2} {#COL lightblue}}
%ismember is case-sensitive. This will underline Darkforce but it won't underline darkforce (assuming Darkforce is in the list).
LightBulb
Advanced Member |
|
|
|
 |
|
|
|