While we can set up/add in trigger matches for colours 0-7 (basic black, red, green, yellow, blue, magenta, cyan, white), is there some way, or can some advanced SetTriggerOption equivalent command be added to give scripts a means to, require a trigger to match an exact RGB or Hex colour code?
The MUD I play on lets you set any HEX colour code at all for anything, so for instance a user might set their incoming soul commands to be #C0C0C0. Some souls can look like some combat messages if done right, eg an unarmed attack could include poking somebody in the eyes, but there is also a playful soul command that can generate the same text.
I want to be able to let the plugin user specify (or get my script to automatically work out/scrape for) their current exact combat message colours, and then set all combat-message triggers to only match both text and colour - so the silly non-combat souls/emotes/remotes that happen to be able to share exact texts don't cause false-triggers matches.
Is there any way to do this currently? Can a way be added in future versions to let us, via scripting, set a trigger option to not only match on the regex string but also an exact RGB colour code (and anything that doesn't match both doesn't trigger)?
Note: I don't want to do this WITHIN the trigger-function call (eg checking the styles table) - this is because the triggers in question are ALSO re-colouring the incoming messages based on the type of combat message.
I realise one solution CAN be to force omit all incoming matches, have a function check the styles table, then have it re-output the line either with the original styles intact (eg if it was a false-positive), or with the new re-coloured texts depending on the type of combat message... so I know I'm not without solutions altogether, but it'd be nice to just simply be able to do something like;
SetTriggerOption("<trigger name>", "match_rgb_colour", ColourNameToRGB("<their current combat message colours as sent by the MUD>"))
So, I guess this is just an ease-of-life feature request in the end, if there isn't already anything in to let me do this!
Thanks! |