Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- turtle.refuel()
- print("Computer id: ", os.getComputerID())
- c = 0
- rednet.broadcast("Turtle got online! My id: ", os.getComputerID())
- while true do
- computer, action = rednet.receive()
- print("Got connection from: ", computer, "action: ", action)
- if action == "forward" then
- turtle.forward()
- end
- if action == "forward 10" then
- turtle.forward(10)
- end
- if action == "forward 5" then
- turtle.forward(5)
- end
- if action == "back" then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- if action == "left" then
- turtle.turnLeft()
- end
- if action == "right" then
- turtle.turnRight()
- end
- if action == "fuel" then
- turtle.refuel()
- end
- if action == "attack" then
- turtle.attack()
- end
- if action == "up" then
- turtle.up()
- end
- if action == "down" then
- turtle.down()
- end
- if action == "mine" then
- turtle.dig()
- end
- action = "none"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement