Advertisement
Kirkq

Zen Lua

May 5th, 2015
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.59 KB | None | 0 0
  1. --0x0002 Damage Movement
  2. --0x0006 Zen Invuln
  3. --0x000A Zen Action Timer
  4. --0x000F Zen Y position offset from camera?
  5. --0x0014 Zen X offset from left side of screen
  6. --0x0015 Zen is charging
  7. --0x0083 Zen is charging timer 1
  8. --0x0084 Zen is charging timer 2
  9. --0x0089 Zen Health
  10. --0x008B Camera Y offset
  11. --0x0099 Waterfall 1
  12. --0x009B Waterfall 2
  13. --0x009D Waterfall 3
  14. --0x0600 Enemy Slot 1 Type
  15. --0x0602 Boss Invuln
  16. --0x0605 Enemy Slot 1 Health
  17. --0x0606 Enemy Slot 1 Invuln
  18. --0x0608 Enemy Slot 1 Dead
  19. --0x060A Enemy Slot 1 Lightning Timer in Dam
  20. --0x060F Enemy Slot 1 Y
  21. --0x0614 Enemy Slot 1 X
  22. --0x0705 Enemy Slot 2 Health
  23. --0x0714 Enemy Slot 2 X
  24. --0x1007 Rising Platform in Oil Spawn
  25. --0x100A Rising Platform in Oil Timer
  26. --0x1014 Rising Platform in Oil X Pos
  27. --0x100F Rising Platform in Oil Y Pos
  28. --0x110A Rising Platform in Oil Timer
  29. --0x110F Rising Platform in Oil Y Pos
  30. --0x1D49 screen number?
  31. --0x1EAA X offset from left side of screen    
  32. --0x1EF8 X Position
  33.    
  34. local DisplaySize = 4
  35.  
  36. local EnemyBaseHealth = 0x0605
  37. local EnemyBaseX = 0x0614
  38. local NumSlots = 10
  39. local NumPlats = 3
  40. local NumberTimers = 4
  41. local Loop = 0
  42. local XPos = 0
  43. local YPos = 0
  44. local Invuln = 0
  45. local Type = 0
  46. local Timer = 0
  47.    
  48. while true do
  49.  
  50. --memory.writebyte(0x0089, 5)
  51.  
  52. gui.text(0,60,"X: " .. memory.readbyte(0x1EF8) .. "+" .. memory.readbyte(0x0014))
  53. gui.text(0,75,"Y: " .. memory.readbyte(0x000F) .. "+" .. memory.readbyte(0x008B))
  54. gui.text(0,90,"I: " .. memory.readbyte(0x0006))
  55. gui.text(0,105,"T: " .. memory.readbyte(0x000A))
  56. if(memory.readbyte(0x0015)~=0) then
  57. gui.text(0,120,"C: " .. 5*memory.readbyte(0x0084) .. "+" .. memory.readbyte(0x0083))
  58. end
  59. if(memory.readbyte(0x0002)>=3) then
  60. gui.text(0,135,"M: " .. memory.readbyte(0x0002))
  61. end
  62.  
  63. for Loop = 0, NumSlots - 1, 1 do
  64.     Health = memory.readbyte(0x0605 + Loop * 0x100)
  65.     YPos = memory.readbyte(0x060F + Loop * 0x100)
  66.     XPos = memory.readbyte(0x0614 + Loop * 0x100)
  67.     Type = memory.readbyte(0x0600 + Loop * 0x100)
  68.     Timer = memory.readbyte(0x060A + Loop * 0x100)
  69.     if Type ~= 53 and Type ~= 52 and Type ~= 36 and Type ~= 47 and Type ~= 25 and Type ~= 69 then
  70.         Invuln = memory.readbyte(0x0606 + Loop * 0x100)        
  71.     else
  72.         if Type ~= 69 then
  73.         Invuln = memory.readbyte(0x0602 + Loop * 0x100)
  74.         else
  75.         Invuln = memory.readbyte(0x0031)   
  76.         end
  77.     end
  78.     Dead = memory.readbyte(0x0608 + Loop * 0x100)
  79.     if Dead ~= 0 and Type ~= 0 then
  80.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 0, "S" .. Loop .. " T" .. Type)
  81.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 15, "H" .. Health)
  82.         if Invuln ~= 0 then
  83.             gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 30, "I" .. Invuln)
  84.         end
  85.         if Timer ~= 0 then
  86.             gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 45, "T" .. Timer)
  87.         end
  88.         gui.text(0,165 + 15*Loop, ("S" .. Loop .. " T" .. Type))
  89.     end
  90. end
  91.  
  92. for Loop = 0, NumPlats- 1, 1 do
  93.         Dead = memory.readbyte(0x1007 + Loop * 0x100)
  94.     YPos = memory.readbyte(0x0100F + Loop * 0x100)
  95.     XPos = memory.readbyte(0x1014 + Loop * 0x100)
  96.     Timer = memory.readbyte(0x100A + Loop * 0x100)
  97.     if Dead ~= 0 then
  98.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 0, "S" .. Loop)
  99.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 15, "T" .. Timer)
  100.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 30, "X" .. XPos)
  101.         gui.text(DisplaySize * XPos, (DisplaySize * YPos) + 45, "Y" .. YPos)
  102.         gui.text(0,165 + 15*NumSlots + 15*Loop, ("P" .. Loop))
  103.     end
  104. end
  105.  
  106. for Loop = 0, NumberTimers - 1, 1 do
  107.     Timer = memory.readbyte(0x0099 + Loop * 0x002)
  108.     gui.text(DisplaySize * 145, (Loop * 15), "T" .. Timer)
  109. end
  110.  
  111. emu.frameadvance()
  112. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement