Advertisement
Guest User

startup

a guest
Feb 5th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  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 redstone" then
  11. redstone.setOutput(left, true)
  12. elseif message == "TS Backward" then
  13. print("Backward")
  14. turtle.back()
  15. elseif message == "TS select1" then
  16. turtle.select(1)
  17. elseif message == "TS select2" then
  18. turtle.select(2)
  19. elseif message == "TS select3" then
  20. turtle.select(3)
  21. elseif message == "TS drop64" then
  22. turtle.drop(64)
  23. elseif message == "TS TurnLeft" then
  24. print("Turn Left")
  25. turtle.turnLeft()
  26. elseif message == "TS TurnRight" then
  27. print("Turn Right")
  28. turtle.turnRight()
  29. elseif message == "TS PlaceBlock" then
  30. if turtle.detect() == true then
  31. print("Block Present")
  32. else
  33. print("Place Block")
  34. turtle.place()
  35. end
  36. end
  37. end
  38. end
  39. rednet.open("left")
  40. textutils.slowPrint("TurtleReceive Initiated.")
  41. RCslave()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement