Advertisement
Guest User

Untitled

a guest
May 25th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. local wool
  2.  
  3. local function sheer()
  4. turtle.select(1)
  5. turtle.place()
  6. turtle.turnRight()
  7. turtle.place()
  8. turtle.turnRight()
  9. turtle.place()
  10. turtle.turnRight()
  11. turtle.place()
  12. turtle.turnRight()
  13. turtle.select(2)
  14. wool = turtle.getItemCount()
  15. turtle.dropUp()
  16. rednet.send(id,"Harvested" ..wool.. "wool.")
  17. os.sleep(15)
  18. end
  19.  
  20.  
  21.  
  22. rednet.open("left") --enable modem on the left side of the PC
  23. id,message = rednet.receive() --wait until a mesage is received
  24.  
  25. if message == "WHOA! Double Rainbow!" then
  26. rednet.send(id,"Beginning rainbow harvest.") -- send a message to only the PC with ID
  27.  
  28. while true do
  29. event, id, message = os.pullEvent()
  30.  
  31. if event == "rednet_message" then
  32. if message == "Rest at ease." then
  33. print("Stopping harvest.")
  34. rednet.broadcast("Taking a break.") -- Send to all PCs in range
  35. break
  36. else
  37. sheer()
  38. end
  39. end
  40. end
  41. end
  42.  
  43. rednet.close("left") -- disable modem on the left side of the PC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement