SHARE
TWEET

Untitled

a guest Jun 27th, 2017 160 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. countFrames = 0
  2. doSubtractFrames = 0
  3.  
  4. while true do
  5.     local inLevel = mainmemory.read_u8(0x64B)
  6.  
  7.     if inLevel == 0 and countFrames > 0 and doSubtractFrames == 0 then
  8.         countFrames = countFrames - 40
  9.         doSubtractFrames = 1
  10.     end
  11.  
  12.     if inLevel == 1 then
  13.         if doSubtractFrames == 1 then
  14.             countFrames = 0
  15.             doSubtractFrames = 0
  16.         end
  17.  
  18.         countFrames = countFrames + 1
  19.     end
  20.  
  21.     cs = math.floor(countFrames * 100 / 60.098814)
  22.     sec = math.floor(cs / 100)
  23.     minute = math.floor(sec / 60)
  24.  
  25.     gui.pixelText(1, 216, string.format("%d", minute) .. ":" .. string.format("%02d", sec - (minute * 60)) .. "." .. string.format("%02d", cs - (sec * 100)), 0xFF00FF00, 0x00000000);
  26.     emu.frameadvance()
  27. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top