Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_mobs_list(event)
- if gmcp.Char.Items.List.location ~= "inv" then
- if not mobs_in_room then mobs_in_room = {} end
- if event == "gmcp.Char.Items.List" then
- mobs_in_room = {}
- for i,v in pairs(gmcp.Char.Items.List.items) do
- if v.attrib ~= "t" and v.attrib ~= "mdt" then
- mobs_in_room[tonumber(v.id)] = v.name
- end
- end
- elseif event == "gmcp.Char.Items.Remove" then
- for i,v in pairs(mobs_in_room) do
- if tonumber(i) == tonumber(gmcp.Char.Items.Remove.item.id) then
- mobs_in_room[i] = nil
- end
- end
- else
- if gmcp.Char.Items.Add.location == "room" and gmcp.Char.Items.Add.item.attrib ~= "t" and gmcp.Char.Items.Add.item.icon ~= "guard" then
- mobs_in_room[gmcp.Char.Items.Add.item.id] = gmcp.Char.Items.Add.item.name
- end
- end
- agui_denizens_tracker:clear()
- for i,v in pairs(mobs_in_room) do
- if tonumber(i) == target then
- agui_denizens_tracker:cecho("<white>[<red>"..string.rep(" ", 6-string.len(i))..i.."<white>] <yellow>"..v.."\n")
- else
- agui_denizens_tracker:cecho("<white>[<green>"..string.rep(" ", 6-string.len(i))..i.."<white>] <yellow>"..v.."\n")
- end
- end
- raiseEvent("targets updated")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement