<triggers>
<trigger
group="script-wholist"
keep_evaluating="y"
match="^(\.|\`)\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-(\'|\.)$"
name="linegag"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
group="script-wholist"
keep_evaluating="y"
match="^\[C\]ontinue \[R\]edraw \[B\]ack \[E\]xit\: $"
name="multipage"
omit_from_output="y"
regexp="y"
sequence="100"
>
<send>C</send>
</trigger>
<trigger
group="script-wholist"
keep_evaluating="y"
match="^ Visible Immortals online\: (.*?) Visible Players Online\: (.*?)$"
name="totalsgag"
omit_from_output="y"
regexp="y"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="script-wholist"
keep_evaluating="y"
match="^ MATERIA MAGICA\: Current Players Online$"
name="wholistbegin"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>Note("WHO-FILTER: Collecting information, please wait...")
wholist = {}
EnableTrigger("wholistcore", true)
EnableTrigger("multipage", true)
EnableTrigger("linegag", true)
EnableTrigger("totalsgag", true)
EnableTrigger("wholistend", true)</send>
</trigger>
<trigger
group="script-wholist"
keep_evaluating="y"
match="^\s\[(?:\d+)(?:\s+)?\:(?:\d+)(?:\s+)?(?:M|F|N)\s(?:[A-Za-z\- ]{11})\s(.*?)\]\s(\w+)(?:\s)?(?:.+)?$"
name="wholistcore"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>local location = "%1"
if location == " " then
location = "Nowher"
elseif string.sub(location, 1, 1) == " " then
location = string.sub(location, 2, string.len(location)) .. " "
end
-- build a "places" table if it doesn't already exist
if not wholist[location] then wholist[location] = {} end
-- insert people in the above defined table
table.insert(wholist[location], "%2")</send>
</trigger>
<trigger
group="script-wholist"
keep_evaluating="y"
match="^ Total Online\: (.*?)$"
name="wholistend"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>EnableTrigger("wholistcore", false)
EnableTrigger("multipage", false)
EnableTrigger("linegag", false)
EnableTrigger("totalsgag", false)
EnableTrigger("wholistend", false)
Note(".-------------------------------------------------------------------------.")
local namelist, total
for placename, peoplehere in pairs(wholist) do
namelist = placename .. " : "
total = 0
for index,name in pairs(peoplehere) do
--Note(placename .. " : " .. name)
if string.len(namelist) + string.len(name) + 4 > 75 then
Note(namelist)
namelist = " "
end
namelist = namelist .. name .. ", "
total = total + 1
end
namelist = string.sub(namelist, 1, string.len(namelist) - 2)
Note(namelist .. " (" .. total .. ")")
end
Note("`-------------------------------------------------------------------------'")
Note("%0")</send>
</trigger>
</triggers>
Usage
This trigger set lets you filter the WHO list to show you a summary of where (area) everybody is. It only rewrites the global WHO output. So just write WHO on your command line and hit enter to see it at work. Oh, do give it a couple of seconds to scan through the original WHO list.
Sample output:
|
To uninstall
1. Game, Immediate (or Ctrl+I)
2. Copy the next line, then paste it into the Immediate window:
DeleteGroup ("script-wholist")
3. Click [Run]