Guest User

startup

a guest
Mar 30th, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. shell.run("clear")
  2. print("Farm Central Command")
  3. rednet.open("right")
  4. print("Press Y to begin the farm.")
  5. print("Press N to stop the farm.")
  6. while true do
  7.   local event,key = os.pullEvent("char")
  8.   if key == "y" then
  9.     print("Now beginning harvest.")
  10.     rednet.broadcast("work")
  11.     os.sleep(3)
  12.     shell.run("startup")
  13.   elseif key == "n" then
  14.     print("Stopping the harvest.")
  15.     rednet.broadcast("stop")
  16.     os.sleep(3)
  17.     shell.run("startup")
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment