Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RCT()
- while true do
- local scrap, msg = rednet.recieve()
- local td = turtle.detect()
- if msg == "RCF" then
- print("Attempting to Move Forward")
- if td == true then
- print("Move Failed, Block Detected!")
- else
- print("Success! Moving Forward")
- turtle.forward()
- end
- elseif msg == "RCMF" then
- print("Moving and Mining Forward")
- if td == true then
- print("Block detected, Mining and Moving Forward")
- turtle.dig()
- else
- print("No block detected, Moving Forward normally")
- end
- turtle.forward()
- elseif msg == "RCBF" then
- print("Attempting to Mine Block at Front")
- if td == true then
- print("Mining Block at Front")
- turtle.dig()
- else
- print("Mine Front Failed! No Block to Mine")
- end
- elseif msg == "RCPF" then
- print("Attempting to Place block Front")
- if turtle.detect() == true then
- print("Place block Front Failed! Block Detected")
- else
- print("Placing block Front")
- turtle.place()
- end
- elseif msg == "RCAF" then
- print("Attacking Front")
- turtle.attack()
- elseif msg == "RCB" then
- print("Moving Backwards")
- turtle.back()
- elseif msg == "RCR" then
- print("Turning Right")
- turtle.turnRight()
- elseif msg == "RCL" then
- print("Turning Left")
- turtle.turnLeft()
- elseif msg == "RCU" then
- print("Attempting to Move Up")
- if turtle.detectUp() == true then
- print("Move Up Failed! Block Detected")
- else
- print("Success! Moving Up")
- turtle.up()
- end
- elseif msg == "RCMU" then
- print("Moving and Mining Up")
- if turtle.detectUp() == true then
- print("Block detected, Mining and Moving Up")
- turtle.digUp()
- else
- print("No block detected, Moving Up normally")
- end
- turtle.up()
- elseif msg == "RCBU" then
- print("Attempting to Mine Block Above")
- if turtle.detectUp() == true then
- print("Mining Block Above")
- turtle.digUp()
- else
- print("Mine Up Failed! No Block to Mine")
- end
- elseif msg == "RCPU" then
- print("Attempting to Place Block Up")
- if turtle.detectUp() == true then
- print("Place block Up Failed! Block Detected")
- else
- print("Placing Block Up")
- turtle.placeUp()
- end
- elseif msg == "RCAU" then
- print("Attacking Up")
- turtle.attackUp()
- elseif msg == "RCD" then
- print("Attempting to Move Down")
- if turtle.detectDown() == true then
- print("Move Down Failed! Block Detected")
- else
- print("Success! Moving Down")
- turtle.down()
- end
- elseif msg == "RCMD" then
- print("Moving and Mining Down")
- if turtle.detectDown() == true then
- print("Block detected, Mining and Moving Down")
- turtle.digDown()
- else
- print("No block detected, Moving Down normally")
- end
- turtle.down()
- elseif msg == "RCBD" then
- print("Attempting to Mine Block Below")
- if turtle.detectDown() == true then
- print("Mining Block Below")
- turtle.digDown()
- else
- print("Mine Down Failed! No Block to Mine")
- end
- elseif msg == "RCPD" then
- print("Attempting to Place Block Down")
- if turtle.detectDown() == true then
- print("Place block Down Failed! Block Detected")
- else
- print("Placing Block Down")
- turtle.placeDown()
- end
- elseif msg == "RCAD" then
- print("Attacking Down")
- turtle.attackDown()
- elseif msg == "RC1" then
- turtle.select(1)
- elseif msg == "RC2" then
- turtle.select(2)
- elseif msg == "RC3" then
- turtle.select(3)
- elseif msg == "RC4" then
- turtle.select(4)
- elseif msg == "RC5" then
- turtle.select(5)
- elseif msg == "RC6" then
- turtle.select(6)
- elseif msg == "RC7" then
- turtle.select(7)
- elseif msg == "RC8" then
- turtle.select(8)
- elseif msg == "RCRF" then
- print("Attempting Refuel")
- if turtle.getItemCount(16) = 0 then
- print("Refuel Failed, No fuel in Slot 16!")
- elseif turtle.getItemCount(16) > 0 then
- if turtle.getFuelLevel() > 64 then
- print("No need to refuel, atleast 64 blocks to go")
- elseif turtle.getFuelLevel() < 64 then
- if turtle.refuel(0) == false then
- print("Refuel failed, Item in slot 16 is not fuel!")
- elseif turtle.refuel(0) == true then
- turtle.refuel(1)
- print("Refuelling")
- end
- end
- end
- end
- end
- end
- rednet.open("right")
- term.clear()
- term.setCursorPos(1,1)
- print("Remote Turtle Initiated")
- RCT()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement