I have a trigger set up to give me a visual cue when I take damage. It's real basic. It works like this:
I noticed MUSHclient can replace the color of text. So I was wondering if instead of using these ColourNotes - which add more text to the screen - if I could instead use custom_colour to do the same thing?
When I tried to replace ColourNote with custom_colour in this trigger, I got compile errors. Is it the case that you can only use the custom_colour that is defined in the trigger header? Can you not set the custom_colour inside of the trigger? Something like this:
<triggers>
<trigger
group="Status Check"
match="^\>?You have (.*?)\/(.*?) hitpoints.*?$"
name="HealthCheck"
regexp="y"
send_to="12"
sequence="100"
>
<send>EnableTrigger("HealthCheck", false)
if (%1 < (%2 * .20)) then
EnableTrigger("FlaskEmergency", true)
Send ("drink flask")
elseif (%1 < (%2 * .35)) then
ColourNote ("black", "red", "Health is %1")
elseif (%1 < (%2 * .45)) then
ColourNote ("black", "orange", "Health is %1")
end</send>
</trigger>
</triggers>I noticed MUSHclient can replace the color of text. So I was wondering if instead of using these ColourNotes - which add more text to the screen - if I could instead use custom_colour to do the same thing?
When I tried to replace ColourNote with custom_colour in this trigger, I got compile errors. Is it the case that you can only use the custom_colour that is defined in the trigger header? Can you not set the custom_colour inside of the trigger? Something like this:
<triggers>
<trigger
enabled="y"
group="Tests"
keep_evaluating="y"
match="^\>?You have (.*?)\/(.*?) hitpoints.*?$"
name="colour_test"
regexp="y"
send_to="12"
sequence="100"
>
<send>if (%1 < (%2 * .85)) then
custom_colour="7"
elseif (%1 < (%2 * .90)) then
custom_colour="11"
elseif (%1 < (%2 * .95)) then
custom_colour="3"
end</send>
</trigger>
</triggers>