Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Event handlers:
- --gmcp.Char.Defences.List
- --gmcp.Char.Defences.Add
- --gmcp.Char.Defences.Remove
- Track = Track or {}
- Track.defences = Track.defences or {}
- Track.defences.list = Track.defences.list or {}
- Track.defences.hide = {
- }
- Track.defences.show = function(win)
- if win then
- win = win.name
- clearWindow(win)
- else
- win = "main"
- end
- for x,_ in pairs(Track.defences.list) do
- cecho(win, x .. "\n")
- end
- end
- function defences(event, arg)
- if event == "gmcp.Char.Defences.List" then
- Track.defences.list = {}
- for _,x in ipairs(gmcp.Char.Defences.List) do
- Track.defences.list[x.name] = x.desc
- end
- end
- if event == "gmcp.Char.Defences.Add" then
- Track.defences.list[gmcp.Char.Defences.Add.name] = gmcp.Char.Defences.Add.desc
- cecho("--<green>[DEFENCE][+]" .. gmcp.Char.Defences.Add.name:title())
- end
- if event == "gmcp.Char.Defences.Remove" then
- for _,x in ipairs(gmcp.Char.Defences.Remove) do
- cecho("--<red>[DEFENCE][-]" .. x:title())
- Track.defences.list[x] = nil
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement