--[[ 0x7E0000:モンスター1グループ目 0x7E0002:モンスター2グループ目 0x7E0004:モンスター3グループ目 0x7E0006:モンスター4グループ目 ]] local state = savestate.create(2) savestate.load(state) local flag = 0 local monster = {} while flag ==0 do local start = snes9x.framecount() local final = start + 100 while snes9x.framecount() < final do joypad.set(1,{A = true}) snes9x.frameadvance() joypad.set(1,{A = false}) snes9x.frameadvance() snes9x.speedmode("maximum") monster[1] = memory.readbyte(0x7E2000) monster[2] = memory.readbyte(0x7E2002) monster[3] = memory.readbyte(0x7E2004) monster[4] = memory.readbyte(0x7E2006) end if monster[1] == 0x89 or monster[2] == 0x89 or monster[3] == 0x89 or monster[4] == 0x89 then print("end") snes9x.speedmode("normal") flag = 1 else print(string.format("%x",monster[1]),string.format("%x",monster[2])) savestate.load(state) snes9x.frameadvance() savestate.save(state) end end