Your version won't work (well, for a number of reasons) but you also need to include quotes around your strings (and your wildcards).
Anyway, here's a quick and dirty little hack (it really is rather ugly) that works:
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="^You see (?:a single )?exits? leading (.*)\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>dim i,j
dim yesDirs, noDirs
dim noArr, yesArr
noArr = array("north","northeast","east","southeast","south","southwest","west","northwest","up","down","in","out")
yesDirs = "%1"
yesDirs = Replace(yesDirs," (open door)","")
yesDirs = Replace(yesDirs," (closed door)","")
yesDirs = Replace(yesDirs," and",",")
yesDirs = Replace(yesDirs," ","")
yesDirs = Replace(yesDirs,",,",",")
yesArr = split(yesDirs,",")
for i = 0 to UBound(yesArr)
for j = 0 to UBound(noArr)
if yesArr(i) = noArr(j) then
noArr(j) = ""
exit for
end if
next
next
noDirs = ""
for i = 0 to UBound(noArr)
if noArr(i) <> "" then
if noDirs <> "" then
noDirs = noDirs & ","
end if
noDirs = noDirs & noArr(i)
end if
next
note noDirs</send>
</trigger>
</triggers>
You'll almost certainly want to keep it as an array (although I suppose you could just split it again afterwards) but you'll need to keep that last bit of logic in whatever you use it with (provided you don't convert it from an array) because you need to screen out the empty strings.
You can even just replace the whole appending thing and just send from there (provided you do just want to send a bunch of directions), like this:
for i = 0 to UBound(noArr)
if noArr(i) <> "" then
send noArr(i)
end if
next
|