Tectoon

[TFM] Cronômetro

Jul 6th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true)
  2. tfm.exec.disableAutoShaman(true)
  3. tfm.exec.disableAutoTimeLeft(true)
  4. min1=0
  5. min2=0
  6. seg1=0
  7. seg2=0
  8. loop=0;
  9. start=false;
  10. tfm.exec.disableAfkDeath(true)
  11. system.disableChatCommandDisplay("start")
  12. system.disableChatCommandDisplay("reset")
  13. tfm.exec.setShaman("Enzohquest")
  14. tfm.exec.setUIMapName("Cronômetro")
  15. function eventChatCommand(name,message)
  16.     if message == "start" then
  17.         start=true;
  18.     end
  19.     if message == "reset" then
  20.         start=false;
  21.         min2=0
  22.         min1=0
  23.         seg1=0
  24.         seg2=0
  25.         loop=0;
  26.     end
  27. end
  28. function eventLoop()
  29.     ui.addTextArea(0,"<font face='OCR A Extended'><font size='54'><font color='#ff0000'>"..min2..""..min1..":"..seg1..""..seg2.."", nil, 360, 63, 190, 56, 1, 1, 1.0, true)
  30.     if start == true then
  31.         loop=loop+0.5
  32.         if loop == 1 then
  33.             seg2=seg2+1
  34.         if seg2 >= 10 then
  35.             seg2=0
  36.             seg1=seg1+1
  37.             if seg1 >= 6 then
  38.                 min1=min1+1
  39.                 seg1=0
  40.                 seg2=0
  41.                 if min1 >= 10 then
  42.                     min2=min2+1
  43.                     min1=0
  44.                     seg1=0
  45.                     seg2=0
  46.                 end
  47.             end
  48.         end
  49.             loop=0;
  50.         end
  51.     end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment