Might be overthinking how to do this. Probably a simpler way. This seems to work (as in, the right triggers are being enabled at the right times), but the colors aren't changing and I don't know why:
The goal is for the line that looks like "** HP: 202/202" in MUD to change color based on how much HP I have.
The goal is for the line that looks like "** HP: 202/202" in MUD to change color based on how much HP I have.
<triggers>
<trigger
enabled="y"
group="HP Colors"
match="^(.*?)\*\* HP\: (.*?)\/202$"
name="hp_color_start"
regexp="y"
send_to="12"
sequence="50"
>
<send>if %2 > 165 then
	
EnableTrigger ("hp_color_green", true)
EnableTrigger ("hp_color_red", false)
EnableTrigger ("hp_color_orange", false)
EnableTrigger ("hp_color_yellow", false)
elseif %2 > 130 and %2 < 166 then
EnableTrigger ("hp_color_yellow", true)
EnableTrigger ("hp_color_green", false)
EnableTrigger ("hp_color_red", false)
EnableTrigger ("hp_color_orange", false)
elseif %2 > 90 and %2 < 131 then
EnableTrigger ("hp_color_orange", true)
EnableTrigger ("hp_color_green", false)
EnableTrigger ("hp_color_yellow", false)
EnableTrigger ("hp_color_red", false)
elseif %2 < 91 then
EnableTrigger ("hp_color_red", true)
EnableTrigger ("hp_color_orange", false)
EnableTrigger ("hp_color_green", false)
EnableTrigger ("hp_color_yellow", false)
end</send>
</trigger>
<trigger
custom_colour="7"
group="HP Colors"
match="^(.*?)\*\* HP\: (.*?)\/202$"
name="hp_color_red"
regexp="y"
sequence="100"
>
</trigger>
<trigger
custom_colour="2"
group="HP Colors"
match="^(.*?)\*\* HP\: (.*?)\/202$"
name="hp_color_yellow"
regexp="y"
sequence="100"
>
</trigger>
<trigger
custom_colour="11"
group="HP Colors"
match="^(.*?)\*\* HP\: (.*?)\/202$"
name="hp_color_orange"
regexp="y"
sequence="100"
>
</trigger>
<trigger
custom_colour="3"
enabled="y"
group="HP Colors"
match="^(.*?)\*\* HP\: (.*?)\/202*$"
name="hp_color_green"
regexp="y"
sequence="100"
>
</trigger>
</triggers>