Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- local trustedID = 26
- local ID = 25
- function checkCoal()
- print("Checking Coal")
- turtle.select(1)
- turtle.getItemCount()
- if turtle.getItemCount() <= 4 then
- print("Resuppling...")
- turtle.select(16)
- turtle.placeUp()
- turtle.select(1)
- turtle.suckUp(60)
- turtle.select(16)
- turtle.digUp()
- turtle.select(1)
- print("Resupplied")
- elseif turtle.getItemCount() >= 5 then
- print("Coal Good")
- end
- end
- function checkFuel()
- print("Checking Fuel")
- turtle.getFuelLevel()
- if turtle.getFuelLevel() <= 10 then
- print("Refueling...")
- turtle.select(1)
- turtle.refuel(1)
- print("Refueled")
- elseif turtle.getFuelLevel() >= 11 then
- print("Fuel Good")
- end
- end
- function moveLoader()
- sleep(15)
- print("Moving Chunkloader 2")
- turtle.select(2)
- turtle.digUp()
- turtle.forward(1)
- turtle.select(2)
- turtle.placeUp()
- print("Chunkloader 2 Moved")
- sleep(40)
- end
- function rednetControl()
- trustedID, message = rednet.receive()
- if message == "Identify" then
- print("Identifing")
- rednet.send(trustedID, "Miner1")
- print("Identified")
- trustedID, message = rednet.receive()
- if message == "Check" then
- print("Checking")
- checkCoal()
- checkFuel()
- rednet.send(trustedID, "Checked")
- print("Checked")
- trustedID, message = rednet.receive()
- if message == "Mine" then
- print("Moving")
- moveLoader()
- print("Chunkloader Moved")
- rednet.send(trustedID, "Complete")
- end
- end
- end
- end
- rednetControl()
Add Comment
Please, Sign In to add comment