Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function mineDown()
- print("mineDown")
- continue = false
- 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()
- end
- function mineUp()
- print("mineUp")
- continue = false
- 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()
- end
- function keepFuel()
- while turtle.getFuelLevel() < 100 do
- turtle.select(1)
- turtle.refuel(1)
- rednet.send(12, "ready")
- end
- end
- function getStatus()
- rednet.send(12, continue)
- print(continue)
- end
- function store()
- 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()
- end
- function mainLoop()
- while true do
- 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
- mainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement