Trying to work around the auto-wrap on my mud I am using this:
Trigger (reg exp): ^([ ]*)[newbie](.*)
Calling the following script>
sub setcolorgrab (trigname, output, wildcards)
dim exptemp
exptemp = "^ ([ ]*)(.*)"
select case trigname
case "Newbie"
world.addtrigger "Colorcode", exptemp, "", 1065, 7, 0, "", ""
case "General"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
case "General2"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
case "General3"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
case "Sales"
world.addtrigger "Colorcode", exptemp, "", 1065, 8, 0, "", ""
case "Hero"
world.addtrigger "Colorcode", exptemp, "", 1065, 0, 0, "", ""
end select
end sub
I then have another trigger for this like this:
^([ ]*)([[:alnum:]]+)(.*)
which calls the same script with the General2 name to stop the coloring. Now the problem is this, when I recieve a series of line that need to be colored I get:
[sales] Turbo: wts Thinking cap, Light elven platemail, Black cloak, <- colored correctly by initial trigger.
Light elven platemail, A sturdy leather belt, Light elven <- colored correctly by the capture trigger.
platemail <- colored incorrectly (as 'no change').
[bs]: Mirak goes "You've got mail."
It appears that changing the triggers color setting 'while' the current line is still pending, i.e. no new info has been recieved, is incorrectly coloring the current line, even though the line that changes this setting is recieved 'after' the color should have already been changed. :p |