Advertisement
Rolanmen1

Nightmare Snake Killer

Oct 20th, 2011
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. check = 15
  2. xpos = 0x000970AA
  3. frame = emu.framecount()
  4. finframe = frame + 230
  5. counter = 0
  6.  
  7. local c={}
  8. c['r2']=1
  9.  
  10. Save = savestate.create()
  11. savestate.save(Save)
  12.  
  13. function printstuff(frame, pos)
  14.     gui.text(4,28,"Frame: " .. frame)
  15.     gui.text(4,40,"Position: " .. pos)
  16. end
  17.  
  18. a = memory.readword(xpos)
  19.  
  20. while true do
  21.     memory.writeword(xpos, a)
  22.     if emu.framecount() >= frame + counter and emu.framecount() < finframe then
  23.         joypad.set(1, c)
  24.         printstuff(frame+counter, memory.readwordsigned(xpos))
  25.         emu.frameadvance()
  26.     else
  27.         if emu.framecount() > finframe then
  28.             savestate.load(Save)
  29.             counter = counter + 1
  30.             if counter > check then
  31.                 counter = 0
  32.                 a = a + 1
  33.             end
  34.         end
  35.     end
  36.     emu.frameadvance() 
  37. end
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement