SHARE
TWEET

Untitled

a guest Apr 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function RCslave()
  2. while true do
  3. local scrap, message = rednet.receive()
  4. if message == "TS Forward" then
  5. print("Forward")
  6. if turtle.detect() == true then
  7. turtle.dig()
  8. end
  9. turtle.forward()
  10. elseif message == "TS Backward" then
  11. print("Backward")
  12. turtle.back()
  13. elseif message == "TS TurnLeft" then
  14. print("Turn Left")
  15. turtle.turnLeft()
  16. elseif message == "TS Bomb" then
  17. print("Bomb")
  18. turtle.placeDown()
  19. redstone.setOutput("back", true)
  20. sleep(0.5)
  21. redstone.setOutput("back", false)
  22. elseif message == "TS TurnRight" then
  23. print("Turn Right")
  24. turtle.turnRight()
  25. elseif message == "TS PlaceBlock" then
  26. if turtle.detect() == true then
  27. print("Block Present")
  28. else
  29. print("Place Block")
  30. turtle.place()
  31. end
  32. end
  33. end
  34. end
  35. rednet.open("right")
  36. textutils.slowPrint("TurtleReceive Initiated.")
  37. RCslave()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top