<triggers> <trigger enabled="y" group="script-scan" keep_evaluating="y" match="^You don\'t see anything (to the )?(\w+)\.$" omit_from_output="y" regexp="y" sequence="110" > </trigger> <trigger enabled="y" group="script-scan" keep_evaluating="y" match="^(.*?) (?P<scantext>(is a brief walk away|is almost out of sight|is close by|is in the distance|is not far off|is rather far off|is right here)) (?:to the )?(.*?)\.$" omit_from_output="y" regexp="y" send_to="12" sequence="110" > <send> local scandistance = { ["is right here"] = "(1)", ["is close by"] = "(2)", ["is not far off"] = "(3)", ["is a brief walk away"] = "(4)", ["is rather far off"] = "(5)", ["is in the distance"] = "(6)", ["is almost out of sight"] = "(7)" } --[[ local TriggerStyleRuns = GetStyleInfo (GetInfo(201)) for stylenum, stylecontent in ipairs(TriggerStyleRuns) do ColourTell(RGBColourToName (stylecontent.textcolour), RGBColourToName (stylecontent.backcolour), stylecontent.text) end ColourNote("lightgrey", "", " " .. scandistance["%<scantext>"]) ]] if string.find("%1", "Player") then ColourNote("darkturquoise", "", "%1" .. " - " .. "%4" .. " " .. scandistance["%<scantext>"]) else ColourNote("lightgrey", "", "%1" .. " - " .. "%4" .. " " .. scandistance["%<scantext>"]) end </send> </trigger> </triggers>
Usage
Each time you type scan, the script will rewrite the lines to show you how many exact rooms away an NPC / Player is. Players are coloured in turquoise for easier spotting. It also suppresses empty scan results to reduce spam but that also means you won't see anything at all if nothing is visible on scanning.
Sample output:
|
To uninstall
1. Game, Immediate (or Ctrl+I)
2. Copy the next line, then paste it into the Immediate window:
DeleteTriggerGroup ("script-scan")
3. Click [Run]