Guswut

Basic Timer (Farm)

Feb 15th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. bEnd = false
  2.  
  3. parallel.waitForAny(
  4.  function()
  5.   while true do
  6.    redstone.setOutput("bottom",true)
  7.    redstone.setOutput("top",false)
  8.  
  9.    iCounterNeg=60
  10.  
  11.    for iCounter=1,600,1 do
  12.     shell.run('clear')
  13.     print("Harvesting...")
  14.     iCounterNeg=iCounterNeg-0.1
  15.     print("Time remaining until WAITING: "..iCounterNeg.." seconds")
  16.     print("")
  17.     print("Press any key (except ESC) to end")
  18.     sleep(0.1)
  19.    end
  20.  
  21.    redstone.setOutput("bottom",false)
  22.    redstone.setOutput("top",true)
  23.  
  24.    iCounterNeg=180
  25.  
  26.    for iCounter=1,1800,1 do
  27.     shell.run('clear')
  28.     print("WAITING")
  29.     iCounterNeg=iCounterNeg-0.1
  30.     print("Time remaining until HARVEST: "..iCounterNeg.." seconds")
  31.     print("")
  32.     print("Press any key (except ESC) to end")
  33.     sleep(0.1)
  34.    end
  35.   end
  36.  end,
  37.  
  38.  function()
  39.   while not bEnd do
  40.    local event, key = os.pullEvent("key")
  41.    if key ~= keys.escape then
  42.     bEnd = true
  43.    end
  44.   end
  45.  end
  46. )
  47.  
  48. shell.run('clear')
  49.  
  50. redstone.setOutput("bottom",false)
  51. redstone.setOutput("top",true)
  52.  
  53. print("Farm Turned Off")
Advertisement
Add Comment
Please, Sign In to add comment