ravneravn

Turtle wait

Jun 22nd, 2014
193
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("waiting for orders")
  2. rednet.open("right")
  3. while true do
  4. event, sid, mes, dis = os.pullEvent()
  5. print("Orders received by event: "..event)
  6.  
  7. if event == "rednet_message" and mes == "go" then
  8. event, sid, mes, dis = os.pullEvent("rednet_message")
  9. shell.run("mine", "65", mes)
  10.  
  11. elseif event == "rednet_message" and mes == "download" then
  12. shell.run("download")
  13.  
  14. elseif event == "key" and sid == 28 then
  15. print("How many mines?")
  16. local input = read()
  17. input = tonumber(input)
  18. shell.run("mine", "65", input)
  19. end
  20. end
RAW Paste Data