Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. SlashCmdList['PARENTSTACK'] = function(message, editbox)
  2.    local t = GetTime()
  3.    local f = _G[message]
  4.    repeat
  5.       local name = f:GetName() or "noname"
  6.       local point, relativeTo, relativePoint, xOffset, yOffset  = f:GetPoint()
  7.      
  8.       point = type(point) == "string" and point or "<no point>"
  9.       relativeTo = relativeTo ~= nil and relativeTo:GetName() or "<no relativeTo>"
  10.       relativePoint = type(relativePoint) == "string" and relativePoint or "<no relativePoint>"
  11.       xOffset =  type(xOffset) == "number" and xOffset or "<no xOffset>"
  12.       yOffset =  type(yOffset) == "number" and yOffset or "<no yOffset>"
  13.      
  14.       DEFAULT_CHAT_FRAME:AddMessage(name..": "..point..", "..relativeTo..", "..relativePoint..", "..xOffset..", "..yOffset)
  15.       f = f:GetParent()
  16.    until ( GetTime() - t > 0.1 ) or f == nil
  17.    
  18. end
  19. SLASH_PARENTSTACK1 = '/parentstack'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement