Plazter

Timer test

May 22nd, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. local args = {...}
  3. local param = args[1]
  4.  
  5. if param == nil then
  6. param = 29
  7. end
  8. --local param = 0
  9.  
  10. print("param: ", param)
  11.  
  12. local trolls = {
  13. [2] = "tonumber(1)"
  14.  
  15. [3] = "tonumber(2)"
  16. [4] = "tonumber(3)"
  17. [5] = "tonumber(4)"
  18. [6] = "tonumber(5)"
  19. [7] = "tonumber(6)"
  20. [8] = "tonumber(7)"
  21. [9] = "tonumber(8)"
  22. [10] = "tonumber(9)"
  23. }
  24.  
  25. function displayText (key)
  26. term.clear()
  27. term.setCursorPos(1,1)
  28. --print("They see me trolling, they hatin!")
  29.  
  30. print(Timer set to: ".. trolls[key])
  31. end
  32.  
  33. displayText(param)
  34.  
  35. repeat
  36. event, key = os.pullEvent("key")
  37.  
  38. displayText(key)
  39. until key == 14
Advertisement
Add Comment
Please, Sign In to add comment