Advertisement
Guest User

Sword Master.lua

a guest
Sep 28th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. local px, py, pxs, pys
  2. local lpx = 0
  3. local lpy = 0
  4.  
  5. local function Stuff()
  6.  
  7. if (memory.readbyte(0x1b) == 2) then
  8. px = memory.readbyte(0x423) + memory.readbyte(0x620) + memory.readbyte(0x621) * 256
  9. else
  10. px = memory.readbyte(0x423) + memory.readbyte(0x624) + memory.readbyte(0x625) * 256
  11. end
  12. -- for level 1, 624 and 625
  13.  
  14.  
  15. py = memory.readbyte(0x425)
  16.  
  17. pxs = px - lpx
  18. pys = py - lpy
  19.  
  20. gui.text(120, 24, string.format("X: %3d (%2d)\nY: %3d (%2d)",px, pxs, py, pys))
  21. gui.text(186, 24, string.format("XP: %3d|%3d", memory.readbyte(0x6dc), memory.readbyte(0x6da)))
  22.  
  23. lpx = px
  24. lpy = py
  25. end
  26.  
  27. emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement