User File #59309460583669439

Upload All User Files

#59309460583669439 - Script for FFVII NES to get critical hits

criticalhit.lua
340 downloads
Uploaded 11/15/2019 12:01 AM by InfamousKnight (see all 69)
I have not tested the script yet, as bizhawk linux lua function seems to be broken, but I believe it should work fine.
How to use, when the cursor is on an enemy that you're targeting, run the script. You don't have to pay attention either as the script will pause the emulator once it succeeds at getting the hit.
Yes, I am planning on redoing the FFVII NES Tas. Im still very curios to see how fast it can be beaten.
local HPAddr=0x600
local HP
local FrameHit
local num=true
local findingFrame = true
local advanceframes = 0
savestate.saveslot(1)
while findingFrame do
   if HPAddr == 2 then
      savestate.loadslot(1)
      findFrame = false
   end
   FrameHit = FrameHit+1
   emu.frameadvance()
end
while num do
 HP=memory.readword(HPAddr)
 if HP != 3 then
   savestate.loadslot(1)
   emu.frameadvance()
   savestate.saveslot(1)
 end
 print(HP)
 joypad.set({["P1 A"] = true}) 
 while advanceframes <= Framehit do
   emu.frameadvance()
   advanceframes = advanceframes+1
 end
 advanceframes = 0
end
emu.frameadvance()