Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local e = {...}local t = turtle local a = true local o = 0
- rednet.open("right")turtle.refuel()local i = 0 local function n(s)for _ = 0, s - 1 do
- while not t.forward()do t.dig()end t.digUp()end end function
- digLeft(r)n(1)t.turnLeft()n(r - 1)t.turnRight()end function
- digRight(d)n(1)t.turnRight()n(d - 1)t.turnLeft()end local function l(u)for
- _ = 0, u / 2 - 1 do digRight(u)digLeft(u)if i > 0 then o = o + 1 rednet.broadcast(o * 2)end
- end end if e[1] == "w"then _, b = rednet.receive()end while a do if e[1] == "w"then
- print("wireless mode: active")if b ~= nil then res = b end
- save = e[1]e[1] = tonumber(res)if e[2] == "%"then i = 1
- print("percentage mode: active")end end if t.getFuelLevel() < 50 then repeat
- turtle.refuel(1)until t.getFuelLevel() > 50 end l(e[1])sleep(3)a = false end if
- save == "w"then
- rednet.broadcast("FINISHED")shell.run("dig w %")end
Add Comment
Please, Sign In to add comment