Some folks were very helpful in putting this together, so I thought I'd put it here, free for anybody to use. It highlights your lines in Sawbones so that you can better see your prep progress.
In your onLoad function, add the following:
// Sawbones
var limbName;
var limbStatus;
client.reflex_enable(client.reflex_find_by_name("trigger", "limbprepped", true, true));
Then create a trigger called limbprepped (you can name it whatever you like as long as you change the argument in the client.reflex_enable function):
^(Right leg|Left leg|Right arm|Left arm|Torso|Head): \s+ (Perfect health|Barely damaged|Lightly damaged|Moderately damaged|Heavily damaged|Crippled)$
In this trigger, copy and paste the following:
limbName = args[1];
limbStatus = args[2];
if (args[2].match(/Perfect health/)) {
client.current_line.parsed_line.colorize(0, 30, 'black', 'white');
}
if (args[2].match(/Barely damaged/)) {
client.current_line.parsed_line.colorize(0, 30, 'black', 'green');
}
if (args[2].match(/Lightly damaged/)) {
client.current_line.parsed_line.colorize(0, 30, 'black', 'yellow');
}
if (args[2].match(/Moderately damaged/)) {
client.current_line.parsed_line.colorize(0, 33, 'black', 'orange');
}
if (args[2].match(/Heavily damaged/)) {
client.current_line.parsed_line.colorize(0, 30, 'black', 'red');
}
if (args[2].match(/Crippled/)) {
client.current_line.parsed_line.colorize(0, 30, 'white', 'black');
}
You can change the colors to whatever you like. I haven't added lines for epseth/epteth/shatter/smash breaks.
Be sure to type "onLoad" in your prompt to get rid of the initial error messages.
Comments
It also looks like you're not actually using the limbName thing. If that's the case, no point in saving it - change the first capture group to "(?:Right leg|...)" and you can just use args[1].
I have tested the trigger and it works for all instances, so \s+ has caused no problems, at least none that I could produce.
"...): \s+ (Perfect health|..."
instead of
"...):\s+(Perfect health|..."
is strange.
There are no tabs in the message, so all you actually need is " +".