Advertisement
gabriele298

test

Oct 16th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function countdown()
  2. monitor.clear()
  3. monitor = peripheral.wrap("left")
  4. monitor.setCursorPos(1,1)
  5.  
  6. local m = 59
  7. local s = 60
  8.  
  9. repeat
  10. if m > 0 then
  11. if s > 0 then
  12. s = s - 1
  13. else
  14. j = 59
  15. m = m - 1
  16. end
  17. else
  18. if s > 0 then
  19. s = s - 1
  20. end
  21. end
  22. monitor.setCursorPos(1,1)
  23. monitor.write("La turtle parte tra:")
  24. monitor.setCursorPos(2,1)
  25. monitor.write(m..":"..s)
  26.  
  27. until m == 0 and s == 60
  28. sleep(1)
  29. monitor.clear()
  30. monitor.setCursorPos(4,1)
  31. monitor.write("Turtle partita")
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement