I am reposting this from the previous thread to better define the problem. The following (numbered for convenience) behaves incorrectly:
1 [sales] Kaster: any poison for sale?
2 HP: [1243/1243] CONC: [2473/2473]
3 [sales] Sparhawk: 234 int, 10k/vial
4 Your body clock is back to normal.
5 [sales]: Kaster waves his hand in disapproval and goes 'bah'.
6 [sales] Sparhawk: try to find as good cheaper...
7 body clock
8 You begin concentrating.
9 Fri Aug 2 03:07:21 2002 Ex = 16416095>
10 Your blessing of Godspeed is lifted from your body.
11 xxXX Godspeed XXxx
What should be happening here is>
4 Your body clock is back to normal.
4a xxXX Body Clock XXxx
5 [sales]: Kaster waves his hand in disapproval and goes 'bah'.
The triggers and script actually involved with this are as follows:
<triggers>
<trigger
custom_colour="9"
enabled="y"
match="^[sales](.*)"
name="Sales"
regexp="y"
script="setcolorgrab"
sequence="5"
>
</trigger>
<trigger
enabled="y"
match="^Your body clock is back.*"
name="Body_Clock"
regexp="y"
script="PartyTellIt"
sequence="99"
sound="C:\My Documents\MUD Files\Clock Ticks Loudly.wav"
>
</trigger>
<trigger
keep_evaluating="y"
match="^\S{1,}(.*)"
name="General2"
regexp="y"
script="setcolorgrab"
sequence="6"
>
</trigger>
</triggers>
sub PartyTellIt (name, output, wildcards)
dim temp, temp2
temp = world.getvariable("InParty")
temp2 = Replace(name, "_", " ")
'world.note name
'world.note temp2
if temp = "True" then
world.send "party tell xxXX " & temp2 & " XXxx"
else
world.colournote "#FFE188","#0","xxXX "& temp2 & " XXxx"
end if
end sub
sub setcolorgrab (trigname, output, wildcards)
dim exptemp, exptemp2
exptemp = "^ ([ ]*)(.*)"
'exptemp2 = "^\S{1,}(.*)"
select case trigname
case "Newbie"
world.addtrigger "colorcode", exptemp, "", 1065, 7, 0, "", ""
world.enabletrigger "General2", 1
case "General"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
world.enabletrigger "General2", 0
case "General2"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
world.enabletrigger "General2", 0
case "General3"
world.addtrigger "colorcode", exptemp, "", 1065, -1, 0, "", ""
world.enabletrigger "General2", 0
case "Sales"
world.addtrigger "colorcode", exptemp, "", 1065, 8, 0, "", ""
world.enabletrigger "General2", 1
case "Hero"
world.addtrigger "colorcode", exptemp, "", 1065, 0, 0, "", ""
world.enabletrigger "General2", 1
end select
end sub
So.. To step through the problem that 'seems' to be happening..
3 - Trigger colors text and calls setcolorgrab, which turns on coloring of further lines.
4 - Trigger matching on non-indented lines calls setcolorgrab, coloring is turned off. Evaluation continues.
4a - Trigger matches on spell warning, executes the sound, exits without calling the script.
5 and 6 - See 3
7 User command
8 Response to command from mud - calls setcolorgrab and turns off coloring.
9 Prompt + newline
10 Wanring text triggers and calls the previously failed script.
11 Warning from the script.
Looks like this happens for me when two triggers match on the same text and both execute scripts, in which case the second one does not get called. Or at least that would seem to be the case, but considering how rare it seems to be, I can't say with 100% certainty. |