SHARE
TWEET

NES Trojan HUD by MESHUGGAH

a guest Sep 4th, 2014 165 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 object group location
  6.  
  7. 60f+i*32 HP
  8. ]]--
  9.  
  10. local function objects()
  11.                                                                         -- action / timer
  12.         gui.text(130,48," X   Y subx suby  a/t  ","#FFFFFF","#000000f0")
  13.         for i = 0, 2 do
  14.                 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
  15.                 gui.text(memory.readbyte(0x603+i*32)+5,memory.readbyte(0x606+i*32)+36,string.format("%d",i),"#000000f0","#ff0000f0")
  16.                
  17.                 gui.text(125,7*i+55,string.format("%3d %3d %3d %3d %2d/%d  ",
  18.                 memory.readbyte(0x603+i*32),memory.readbyte(0x606+i*32),
  19.                 memory.readbyte(0x604+i*32),memory.readbyte(0x607+i*32),
  20.                 memory.readbytesigned(0x60a+i*32),memory.readbyte(0x60e+i*32)),"#FFFFFFf0","#00000060")
  21.                
  22.                 -- NON INTERACTIVE SPRITES
  23.                 --gui.text(memory.readbyte(0x5+i*8),memory.readbyte(0x4+i*8)+16,string.format("%d",i),"#FFFFFF70","#FF0000A0")
  24.         end
  25.        
  26.         for i = 0, 7 do
  27.                 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
  28.  
  29.                 gui.text(125,7*i+95,string.format("%3d %3d %3d %3d %2d/%d  ",
  30.                 memory.readbyte(0x4a3+i*16), memory.readbyte(0x4a6+i*16),
  31.                 memory.readbyte(0x4a4+i*16),memory.readbyte(0x4a7+i*16),
  32.                 memory.readbytesigned(0x4aa+i*16),memory.readbyte(0x4ae+i*16)),"#FFFFFF80","#00000030")
  33.         end
  34.  
  35. end
  36.  
  37. local function Stuff()
  38. p[1] = memory.readwordunsigned(0x604,0x603)/256
  39. p[3] = memory.readwordunsigned(0x606,0x607)/256
  40.  
  41. --0x609 camera subx, depends on player pos
  42. cam[1] = memory.readwordunsigned(0xeb,0xec)
  43.  
  44. 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")
  45. gui.text(1, 70, string.format("Xcam: %4d (%d)",cam[1],cam[1]-cam[2]),"#ffffff","#00000000")
  46.  
  47. 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")
  48.  
  49. p[2] = p[1] - p[2]
  50. p[4] = p[3] - p[4]
  51.  
  52. p[2] = p[1]
  53. p[4] = p[3]
  54. cam[2] = cam[1]
  55.  
  56. objects()
  57.  
  58. end
  59.  
  60. 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