2.4.3 addon, tells you how far you are from nearest graveyards
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
492B

  1. -- player module
  2. player = {}
  3. -- get player's current zone
  4. function player.zone()
  5. return GetZoneText()
  6. end
  7. -- get player name
  8. function player.name()
  9. return UnitName("player")
  10. end
  11. -- get player's X position
  12. function player.x()
  13. local x, y = GetPlayerMapPosition("player")
  14. return tonumber(string.format("%.2f", (100 * x)))
  15. end
  16. -- get player's Y position
  17. function player.y()
  18. local x, y = GetPlayerMapPosition("player")
  19. return tonumber(string.format("%.2f", (100 * y)))
  20. end