Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local frames = 360
- local counter = frames
- local maxFish = 0
- local attempts = 0
- local fishSave = savestate.create(8)
- while true do
- if counter == frames then
- gui.text(10,40,"ATTEMPTS: "..attempts)
- gui.text(10,50,"MAX FISH: "..maxFish)
- gui.text(10,60,"COUNTER: "..counter)
- counter = counter - 1
- emu.frameadvance()
- elseif counter == (frames - 2) then
- savestate.save(fishSave)
- joypad.set(1, {x=1})
- gui.text(10,40,"ATTEMPTS: "..attempts)
- gui.text(10,50,"MAX FISH: "..maxFish)
- gui.text(10,60,"COUNTER: "..counter)
- counter = counter - 1
- emu.frameadvance()
- elseif counter == (frames - 3) then
- joypad.set(1, {x=0})
- gui.text(10,40,"ATTEMPTS: "..attempts)
- gui.text(10,50,"MAX FISH: "..maxFish)
- gui.text(10,60,"COUNTER: "..counter)
- counter = counter - 1
- emu.frameadvance()
- elseif counter == 0 then
- gui.text(10,40,"ATTEMPTS: "..attempts)
- gui.text(10,50,"MAX FISH: "..maxFish)
- gui.text(10,60,"COUNTER: "..counter)
- counter = frames
- local i
- for i = 0, 24, 1 do
- type = memory.readbyte(0x0014688E+i*0x98)
- length = memory.readbyte(0x00146918+i*0x98)
- if type == 2 and length >= 50 then
- maxFish = maxFish + 1
- end
- end
- attempts = attempts + 1
- savestate.load(fishSave)
- else
- gui.text(10,40,"ATTEMPTS: "..attempts)
- gui.text(10,50,"MAX FISH: "..maxFish)
- gui.text(10,60,"COUNTER: "..counter)
- counter = counter - 1
- emu.frameadvance()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement