Mush Client WHO List Filter

Order Of Chaos Alliance Wiki | RecentChanges | Visiting as a guest. Login for full access.
Script

<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 &gt; 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:
WHO-FILTER: Collecting information, please wait...
.-------------------------------------------------------------------------.
Castle : Brinnie (1)
Underg : Rainn, Example, Gnomar (3)
At Sea : Grimsoar (1)
Novice : Mikmokette (1)
Towne  : Mischka, Inarien, Ylfa, Asyllan, Donald, Perrin, Sanger, 
         Delicious, Deathsmasher, Nicky, Saellyn, Zerg, Grife, Udolf, 
         Siege, Enbringer (16)
Underw : Bahamutt (1)
Suburb : Nebula (1)
Tower  : Silverbell (1)
Office : Duende (1)
Nowher : Bloodrose, Vlidash, Malphist (3)
Clan   : Adaeriel, Overpowered, Galalad, Stromgarde, Araxia, Romus, 
         Nixcraft, Cantilenae, Shadowling, Hatred, Kazmo, Kayuki, 
         Shinde (13)
Hall   : Sinbad, Magiick (2)
Dungn  : Zaren (1)
Wilds  : Warpig (1)
Social : Krew, Ixy, Ardant, Anodyne, Aryne, Blueknight, Mazza, Tao, 
         Sevaum, Demonboy, Beefking, Pointyhat, Manofroce, Passive, 
         Dinah, Mowcow, Snoogans, Brodie, Looter, Omarion, Balimos, 
         Razec, Kaine, Nadezhda, Insanity, Alduvan, Saitok, Grogar, 
         Kaayni, Larean, Kurik, Oakidog, Yryllyn, Lucigones, Tannyon, 
         Tyela, Krim, Yorke, Maglor, Karo, Moreena, Lioane, Rydiah, 
         Angelou, Hiekola, Mayhem, Snyder, Bimpzig, Karlie, Enelya, 
         Brindle, Nightshade, Coan, Sparow, Banished (55)
Home   : Slothy, Aesir, Katran, Xane, Ovelia, Sensi, Cleopatra, Scrooge, 
         Valiance (9)
Inn    : Lyneirari (1)
`-------------------------------------------------------------------------'
 Total Online: 113


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]



Order Of Chaos Alliance Wiki | RecentChanges | Visiting as a guest. Login for full access.
This page is read-only.
Last edited June 11, 2011 3:44 pm by Enelya (diff)
Search: