SHARE
TWEET

Untitled

a guest Aug 30th, 2014 197 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local p = {0,0,0,0}
  2. local cam = {0,0}
  3.  
  4. --[[
  5. other locations
  6.  
  7. 60f+i*32 HP
  8. ]]--
  9.  
  10. -- base address, check object alive?, struct length, quantity (objects), show table?, gui text position
  11. --[[
  12. local function object_from(b, a, l, q, t, pos)
  13.         for i = 0, q do
  14.                 if (a == true and memory.readbyte(b+i*l) ~= 0) then
  15.                         gui.box(memory.readbyteunsigned(b+3+i*l),memory.readbyteunsigned(b+6+i*l)-8,memory.readbyteunsigned(b+3+i*l)+16,memory.readbyteunsigned(0x606+i*32)+32,"#FFFF0080")
  16.                 end else
  17.                         gui.text(memory.readbyte(0x603+i*32)+4,memory.readbyte(0x606+i*32)+36,string.format("%d",i),"#000000f0","#ff0000f0")
  18.                
  19.                         gui.text(125,7*i+55,string.format("%3d %3d %3d %3d %2d/%d  ",
  20.                         memory.readbyte(0x603+i*32),memory.readbyte(0x606+i*32),
  21.                         memory.readbyte(0x604+i*32),memory.readbyte(0x607+i*32),
  22.                         memory.readbytesigned(0x60a+i*32),memory.readbyte(0x60e+i*32)),"#FFFFFFf0","#00000060")
  23.                 end
  24.         end
  25. end
  26. ]]--
  27.  
  28. local function objects()
  29.                                                                         -- action / timer
  30.         gui.text(130,48," X   Y subx suby  a/t  ","#FFFFFF","#000000f0")
  31.         for i = 0, 2 do
  32.                 if memory.readbyte(0x600+i*32) ~= 0 then gui.box(memory.readbyteunsigned(0x603+i*32),memory.readbyteunsigned(0x606+i*32)-8,memory.readbyteunsigned(0x603+i*32)+17,memory.readbyteunsigned(0x606+i*32)+32,"#FFFF0080") end
  33.                 gui.text(memory.readbyte(0x603+i*32)+5,memory.readbyte(0x606+i*32)+36,string.format("%d",i),"#000000f0","#ff0000f0")
  34.                
  35.                 gui.text(125,7*i+55,string.format("%3d %3d %3d %3d %2d/%d  ",
  36.                 memory.readbyte(0x603+i*32),memory.readbyte(0x606+i*32),
  37.                 memory.readbyte(0x604+i*32),memory.readbyte(0x607+i*32),
  38.                 memory.readbytesigned(0x60a+i*32),memory.readbyte(0x60e+i*32)),"#FFFFFFf0","#00000060")
  39.                
  40.                 -- NON INTERACTIVE SPRITES
  41.                 --gui.text(memory.readbyte(0x5+i*8),memory.readbyte(0x4+i*8)+16,string.format("%d",i),"#FFFFFF70","#FF0000A0")
  42.         end
  43.        
  44.         for i = 0, 7 do
  45.                 if memory.readbyte(0x4a0+i*16) ~= 0 then gui.text(memory.readbyte(0x4a3+i*16),memory.readbyte(0x4a6+i*16)+16,string.format("%d",i),"#000000f0","#00ff00f0") end
  46.  
  47.                 gui.text(125,7*i+95,string.format("%3d %3d %3d %3d %2d/%d  ",
  48.                 memory.readbyte(0x4a3+i*16), memory.readbyte(0x4a6+i*16),
  49.                 memory.readbyte(0x4a4+i*16),memory.readbyte(0x4a7+i*16),
  50.                 memory.readbytesigned(0x4aa+i*16),memory.readbyte(0x4ae+i*16)),"#FFFFFF80","#00000030")
  51.         end
  52.  
  53. end
  54.  
  55. local function Stuff()
  56. p[1] = memory.readwordunsigned(0x604,0x603)/256
  57. p[3] = memory.readwordunsigned(0x606,0x607)/256
  58.  
  59. --0x609 camera subx, depends on player pos
  60. cam[1] = memory.readwordunsigned(0xeb,0xec)
  61.  
  62. gui.text(1, 48, string.format("X %.3f (%.3f)\nY %.3f (%.3f)",p[1],p[1]-p[2],p[3],p[3]-p[4]),"#ffffff","#00000000")
  63. gui.text(1, 70, string.format("Xcam: %4d (%d)",cam[1],cam[1]-cam[2]),"#ffffff","#00000000")
  64.  
  65. -- enemy spawn position: if 0x309 side (0 == left, 1 == right) enemy still alive, spawn to opposite side
  66. gui.text(130,208, string.format("subtimer: %d\nEnemies: %d\nSpawned enemies: %3d\nNext enemy in %3d frames", memory.readbyte(0x301), memory.readbyte(0x305), memory.readbyte(0x30b), memory.readbyte(0x307)),"#ffffff","#00000000")
  67.  
  68. p[2] = p[1] - p[2]
  69. p[4] = p[3] - p[4]
  70.  
  71. p[2] = p[1]
  72. p[4] = p[3]
  73. cam[2] = cam[1]
  74.  
  75. objects()
  76.  
  77. end
  78.  
  79. emu.registerafter(Stuff)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top