|
Radiak Newbie
Joined: 16 Oct 2002 Posts: 6 Location: Sweden
|
Posted: Sat Feb 01, 2003 1:16 am
Colorizing combat. |
I'm having some problems getting combat colorized the way I want it. This is my current trigger:
@DamageTypes contains a list of the different damage types the MUD uses(punch, pierce)
@DamageMsgs contains a list of the different damage message(misses, tickles, grazes etc)
@tank contains a list of people in the current party. (People can change their name as to
look like 'Blah Radiak Blah' on the MUD, so %pos is needed, @tank contains only name like 'Radiak').
#trigger {^(*)({@DamageTypes}) ({@DamageMsgs})(*)} {
#var col1 %ansi( white)
#var col2 %ansi( white)
#forall @tank {
#if (%pos( %i, {%1})) {
#var col1 %ansi( blue)
}
#if (%pos( %i, {%4})) {
#var col2 %ansi( red)
}
}
#var NewText {@col1%1 %ansi( green)%2 %3 @col2%4}
#sub @NewText
}
The problem is, in the #var NewText it won't let me use {%1} so %1 and %4 is off there.
I tried assigning %1 and %4 to a variable, but as combat happens so fast, things got messy
since the different lines variables overwrote eachother. Then I tried using #prio but then
the some lines just weren't processed.
Anyone know how to fix it? |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Feb 01, 2003 1:36 am |
try using %concat() for your #var NewText? i didn't quite get what you meant by it wouldn't let you use {%1}. The syntax checker gave you an error message?
also, maybe use mxp colors instead you can get such nice colors that way.
#trigger {^(*)({@DamageTypes}) ({@DamageMsgs})(*)} {
#var col1 ~#FFFFFF
#var col2 ~#FFFFFF
#forall @tank {
#if (%pos( %i, {%1})) {
#var col1 ~#00FF00
}
#if (%pos( %i, {%4})) {
#var col2 ~#FF0000
}
}
#var NewText {~<color @col1>%1~</c> ~<color ~#0000FF>%2 %3~</c>~<color @col2>%4~</c>}
#sub @NewText
}
and that way you can play with the shades a little more :-D
--note: i haven't tested this, you may have to add or subtract ~ characters to make it work just right.
--------
moon.icebound.net:9000 |
|
|
|
|
|
|
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
|
|