Telepathy Party Reporting

Game: 
Achaea
Client Type: 
Mudlet
Script File: 

Usage:
Toggle on or off using TELEREPORT

Reports most telepathy attacks to your party channel for raid situations.

0
Your rating: None

Comments

Can anyone tell me how to capture the crowdmap info that follows and add that to the report?

ie: "(###) From your knowledge, that room is in _____"

And then it would presumably announce:  "I sense "..matches[2]..": "..matches[3].." in "..matches[4]

There may of course be a better way, but try it out, just use

 

vlua returnAreaForParty("Stygian Crossroads") -- worked for me, returned "Mhaldor"

 

function returnAreaForParty(room, person)

local t = mmp.searchRoomExact(room)

-- lowercase results

for k,v in pairs(t) do if tonumber(k) then t[k] = v:lower() else t[k:lower()] = v end end

if not (t[room:lower()] or table.contains(t, room:lower())) then return end

if table.size(t) == 1 then

local k,v = next(t)

return mmp.cleanAreaName(mmp.areatabler[getRoomArea(type(k) == "number" and k or v)] or "?")

else

local k,v = next(t)

local areas = {}

if type(k) == "number" then

for k, _ in pairs(t) do

areas[mmp.areatabler[getRoomArea(k)] or "?"] = true

end

else

for _, k in pairs(t) do

areas[mmp.areatabler[getRoomArea(k)] or "?"] = true

end

end

local flattened_areas = {}

for k, _ in pairs(areas) do

if k ~= "" then flattened_areas[#flattened_areas+1] = mmp.cleanAreaName(k) end

end

return table.concat(flattened_areas, ", or ")

end

if person then

mmp.pdb[person] = room

mmp.pdb_lastupdate[person] = true

raiseEvent("mmapper updated pdb")

end

end