Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- countFrames = 0
- doSubtractFrames = 0
- while true do
- local inLevel = mainmemory.read_u8(0x64B)
- if inLevel == 0 and countFrames > 0 and doSubtractFrames == 0 then
- countFrames = countFrames - 40
- doSubtractFrames = 1
- end
- if inLevel == 1 then
- if doSubtractFrames == 1 then
- countFrames = 0
- doSubtractFrames = 0
- end
- countFrames = countFrames + 1
- end
- cs = math.floor(countFrames * 100 / 60.098814)
- sec = math.floor(cs / 100)
- minute = math.floor(sec / 60)
- gui.pixelText(1, 216, string.format("%d", minute) .. ":" .. string.format("%02d", sec - (minute * 60)) .. "." .. string.format("%02d", cs - (sec * 100)), 0xFF00FF00, 0x00000000);
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement