Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wool
- local function sheer()
- turtle.select(1)
- turtle.place()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.select(2)
- wool = turtle.getItemCount()
- turtle.dropUp()
- rednet.send(id,"Harvested" ..wool.. "wool.")
- os.sleep(15)
- end
- rednet.open("left") --enable modem on the left side of the PC
- id,message = rednet.receive() --wait until a mesage is received
- if message == "WHOA! Double Rainbow!" then
- rednet.send(id,"Beginning rainbow harvest.") -- send a message to only the PC with ID
- while true do
- event, id, message = os.pullEvent()
- if event == "rednet_message" then
- if message == "Rest at ease." then
- print("Stopping harvest.")
- rednet.broadcast("Taking a break.") -- Send to all PCs in range
- break
- else
- sheer()
- end
- end
- end
- end
- rednet.close("left") -- disable modem on the left side of the PC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement