Guest User

Untitled

a guest
Sep 6th, 2011
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.29 KB | None | 0 0
  1. while true do
  2.  
  3. --declarations
  4. xposoncam = memory.readbyte(0xc704)
  5. xsub = memory.readbyte(0xc703)
  6. ypos = memory.readbyte(0xc706)
  7. ysub = memory.readbyte(0xc705)
  8. xcam = memory.readbyte(0xff43)
  9. xcamsection = memory.readbyte(0xc684)
  10. hp = memory.readbyte(0xc717)
  11. bosshp = memory.readbyte(0xc0c9) --variable, needs to be updated >_>
  12.  
  13. killcount1 = memory.readbyte(0xd00a)  -- bomb 3rd level, 3th
  14. killcount2 = memory.readbyte(0xd00b)  -- hp, 20th
  15. killcount3 = memory.readbyte(0xd00c)  -- <3, 50th
  16. killcount4 = memory.readbyte(0xd00d)  -- 1up, 90th
  17. killcount5 = memory.readbyte(0xd00e)  -- hp, lastlvl(?), 4th
  18. killcount6 = memory.readbyte(0xd00f)  -- bomb, last level, 8th
  19.  
  20. havebomb = memory.readbyte(0xd013)
  21.  
  22. --display
  23. gui.opacity(0.88)
  24. gui.drawbox(0,16,260,21, "black")
  25. gui.drawbox(0,0,127,15, "black")
  26. gui.drawline(44,2,44,16, "#666666")
  27. gui.drawline(81,2,81,16, "#666666")
  28. gui.opacity(0.55)
  29. gui.drawbox(0,22,260,23, "black")
  30. gui.opacity(0.88)
  31.  
  32. gui.text(6,6, "X", "yellow")
  33. gui.text(6,12, "Y", "yellow")
  34. gui.text(18,6, xposoncam+xsub/256)
  35. gui.text(18,12, ypos+ysub/256)
  36.  
  37. gui.text(2,0, "Cam", "yellow")
  38. gui.text(18,0, xcam)
  39.  
  40. gui.text(54,0, "HP", "yellow")
  41. gui.text(50,6, "Boss", "yellow")
  42. gui.text(68,0, hp)
  43. gui.text(71,6, bosshp)
  44.  
  45. gui.text(85,-1, "Bottle", "#99FFFF")
  46. gui.text(85,5, "Hearth", "#99FFFF")
  47. gui.text(85,11, "1up", "#99FFFF")
  48. gui.text(85,17, "Bomb", "#99FFFF")
  49. if killcount5 == 0 then gui.text(116,-1, 20-killcount2) else gui.text(116,-1, 4-killcount5) end
  50. gui.text(116,5, 50-killcount3)
  51. gui.text(116,11,90-killcount4)
  52. if killcount6 == 0 then gui.text(116,17,3-killcount1) else gui.text(116,17,8-killcount6) end
  53.  
  54. if havebomb == 1 then gui.text(51,14,"[Bomb]","orange") else end
  55.  
  56. --enemy x,y display
  57. for i = 0xC060, 0xC0FF, 32 do
  58. active = memory.readbytesigned(i+0)
  59.      if active ~= -1 and active ~= 3 then
  60.           local xenemy = memory.readbyte(i+2) -----subx unneeded +memory.readbyteunsigned(i+10)/256
  61.           local yenemy = memory.readbyte(i+3) -----suby unneeded +memory.readbyteunsigned(i+11)/256
  62. gui.opacity(0.4)
  63. gui.drawbox(xenemy-xposoncam+46,yenemy-37,xenemy-xposoncam+66,yenemy-26,"#009933")
  64. gui.opacity(0.95)
  65. gui.text(xenemy-xposoncam+47,yenemy-38,"X " ..xenemy)
  66. gui.text(xenemy-xposoncam+47,yenemy-32,"Y " ..yenemy)
  67.  
  68. end
  69. end
  70.  
  71.  
  72.  
  73.  
  74. vba.frameadvance()
  75. end
Advertisement
Add Comment
Please, Sign In to add comment