Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- local continue = false
- local i = 0
- local receive = true
- function mineDown()
- receive = false
- print("mineDown")
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- local succ, t = turtle.inspectDown()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.digDown()
- turtle.down()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- local succ, t = turtle.inspectDown()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.digDown()
- turtle.down()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- local succ, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnRight()
- receive = true
- end
- function mineUp()
- receive = false
- print("mineUp")
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- local suc, t = turtle.inspectUp()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.digUp()
- turtle.up()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- local suc, t = turtle.inspectUp()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.digUp()
- turtle.up()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- local suc, t = turtle.inspect()
- if t.name == "gregtech:gt.blockores.gc" then continue = true end
- turtle.dig()
- turtle.turnRight()
- receive = true
- end
- function keepFuel()
- receive = false
- while turtle.getFuelLevel() < 100 do
- turtle.select(1)
- turtle.refuel(1)
- rednet.send(12, "ready")
- end
- receive = true
- end
- function getStatus()
- receive = false
- rednet.send(12, continue)
- print(continue)
- receive = true
- end
- function store()
- receive = false
- turtle.select(2)
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.select(1)
- turtle.suck()
- for i = 3, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(2)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- receive = true
- end
- function mainLoop()
- while true do
- while receive == true do
- rednet.send(12, "listening")
- print("Listening")
- id, msg = rednet.receive()
- if msg == "mineUp" then
- mineUp()
- end
- if msg == "mineDown" then
- mineDown()
- end
- if msg == "getStatus" then
- getStatus()
- end
- if msg == "store" then
- store()
- end
- if msg == "refuel" then
- keepFuel()
- end
- end
- end
- end
- mainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement