|
|
|
@ -32,16 +32,17 @@
|
|
|
|
|
|
|
|
|
|
<!-- Triggers -->
|
|
|
|
|
<triggers>
|
|
|
|
|
<trigger group="scans"
|
|
|
|
|
<trigger group="scans" enabled="y"
|
|
|
|
|
match="{scan}" name="scanOpen"
|
|
|
|
|
omit_from_output="y" send_to="12" sequence="10" keep_evaluating="y">
|
|
|
|
|
<send>
|
|
|
|
|
if startScan then
|
|
|
|
|
TSROutput = {}
|
|
|
|
|
dirTemp = {}
|
|
|
|
|
EnableTrigger("scanDir")
|
|
|
|
|
EnableTrigger("scanLine")
|
|
|
|
|
EnableTrigger("scanClose")
|
|
|
|
|
EnableTrigger("scanOpen", false)</send>
|
|
|
|
|
end</send>
|
|
|
|
|
></trigger>
|
|
|
|
|
|
|
|
|
|
<trigger group="scans"
|
|
|
|
@ -71,7 +72,7 @@
|
|
|
|
|
</trigger>
|
|
|
|
|
|
|
|
|
|
<trigger group="scans"
|
|
|
|
|
match="{/scan}" name="scanClose"
|
|
|
|
|
match="{/scan}" name="scanClose" enabled="y"
|
|
|
|
|
omit_from_output="y" script="scanClosed" sequence="10" keep_evaluating="y">
|
|
|
|
|
></trigger>
|
|
|
|
|
</triggers>
|
|
|
|
@ -87,8 +88,11 @@ TSROutput = {}
|
|
|
|
|
dirTemp = {}
|
|
|
|
|
|
|
|
|
|
function scanMobs(name, line, wildcards)
|
|
|
|
|
|
|
|
|
|
scanCmd = (gmcp("char.status.state") == "8" and "survey") or "scan"
|
|
|
|
|
|
|
|
|
|
startScan = false
|
|
|
|
|
|
|
|
|
|
if #wildcards[1] > 0 then
|
|
|
|
|
checkNames = {}
|
|
|
|
|
for word in wildcards[1]:gmatch("%w+") do
|
|
|
|
@ -97,12 +101,12 @@ function scanMobs(name, line, wildcards)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if #checkNames > 0 then
|
|
|
|
|
EnableTrigger("scanOpen")
|
|
|
|
|
startScan = true
|
|
|
|
|
else
|
|
|
|
|
ColourNote("white", "black", "No mobs to scan for, executing regular scan.")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Send(scanCmd)
|
|
|
|
|
Send("scan")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function scannedDir(name, line, wildcards)
|
|
|
|
@ -124,9 +128,9 @@ function scanCheck(name, line, wildcards)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function scanClosed()
|
|
|
|
|
if startScan then
|
|
|
|
|
EnableTrigger("scanDir", false)
|
|
|
|
|
EnableTrigger("scanLine", false)
|
|
|
|
|
EnableTrigger("scanClose", false)
|
|
|
|
|
|
|
|
|
|
if #TSROutput > 0 then
|
|
|
|
|
for i,j in pairs(TSROutput) do
|
|
|
|
@ -141,6 +145,8 @@ function scanClosed()
|
|
|
|
|
ColourNote("white", "blue", "Nothing found!")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
startScan = false
|
|
|
|
|
end
|
|
|
|
|
]]>
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|