Ada said: Select 'Omit from output' in the trigger to remove the original trigger text, after that use ColourNote("black", "red", "%0") etc. to rewrite the same line but now with colour. %0 holds the entire match text by the way.
Hmm... that sounds good, but it doesn't seem to have the desired effect. The output color is ordinary white/gray text on black.
Screenshot: http://i.imgur.com/MDxLn.png
Is my trigger missing anything?
<triggers>
<trigger
enabled="y"
group="Status Check"
keep_evaluating="y"
match="^\>?You have (.*?)\/(.*?) hitpoints.*?$"
name="HealthCheck"
omit_from_output="y"
send_to="12"
sequence="100"
>
<send>EnableTrigger("HealthCheck", false)
if (%1 < (%2 * .25)) then
EnableTrigger("FlaskEmergency", true)
Send ("drink flask")
ColourNote("black", "red", "%0")
elseif (%1 < (%2 * .35)) then
--ColourNote ("black", "orange", "Health is %1")
ColourNote("black", "orange", "%0")
elseif (%1 < (%2 * .45)) then
--ColourNote ("black", "orange", "Health is %1")
ColourNote("black", "yellow", "%0")
elseif (%1 < (%2 * .7)) then
ColourNote ("black", "green", "%0")
else
ColourNote ("black", "blue", "%0")
end</send>
</trigger>
</triggers>
|