Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. --Alias-------------------------------------------------------------------------------
  2. Pattern
  3. ^abc (\w+)(?: (\S+))?$
  4.  
  5. Send
  6. abcheat.ab(matches[2], matches[3])
  7.  
  8. --Script------------------------------------------------------------------------------
  9. abcheat = abcheat or {}
  10.  
  11. abcheat.doab = false
  12.  
  13. abcheat.ab = function(group, name)
  14. if not name then
  15. sendGMCP([[Char.Skills.Get {"group" : "]] .. group .. [["}]])
  16. else
  17. sendGMCP([[Char.Skills.Get {"group" : "]] .. group .. [[", "name" : "]] .. name .. [["}]])
  18. end
  19. abcheat.doab = true
  20. send("\n", false)
  21. end
  22.  
  23. abcheat.list = function()
  24. if not abcheat.doab then return end
  25. abcheat.doab = false
  26. local abs = gmcp.Char.Skills.List.list
  27. local descs = gmcp.Char.Skills.List.descs
  28. local n = 21--4 + abcheat.longest(abs)
  29. for i, ab in ipairs(abs) do
  30. echo(ab .. string.rep(" ", n - #ab) .. descs[i] .. "\n")
  31. end
  32. end
  33.  
  34. abcheat.longest = function(abs)
  35. local l = 0
  36. for _, ab in ipairs(abs) do
  37. if l < #ab then l = #ab end
  38. end
  39. return l
  40. end
  41.  
  42. abcheat.info = function()
  43. if not abcheat.doab then return end
  44. abcheat.doab = false
  45. echo(gmcp.Char.Skills.Info.info)
  46. end
  47.  
  48. registerAnonymousEventHandler("gmcp.Char.Skills.List", "abcheat.list")
  49.  
  50. registerAnonymousEventHandler("gmcp.Char.Skills.Info", "abcheat.info")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement