Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- tArgs[2] = tonumber(tArgs[2])
- term.clear()
- term.setCursorPos(1,1)
- print("Digging:")
- print(" "..tArgs[1].." blocks Down")
- print(" "..tArgs[2].." blocks Forward")
- print(" "..tArgs[3].." blocks Side")
- term.setCursorPos(18, 9)
- textutils.slowPrint("made by okok99haha")
- function fuel()
- while turtle.getFuelLevel() < 20 do
- turtle.select(16)
- turtle.refuel()
- turtle.select(1)
- end
- end
- function down()
- for i = 1, tArgs[1]-1 do
- while not turtle.down()
- do turtle.digDown()
- end
- turtle.digDown()
- end
- end
- function up()
- for i = 1, tArgs[1]-1 do
- while not turtle.up()
- do turtle.digUp()
- end
- end
- end
- function forward()
- while not turtle.forward()
- do turtle.dig()
- end
- end
- function line()
- for aa = 1, tArgs[2] do
- down()
- up()
- if aa < tArgs[2] then
- forward()
- end
- end
- end
- function turn()
- turtle.turnRight()
- turtle.turnRight()
- end
- function back()
- for ab = 1, tArgs[2]-1 do
- turtle.forward()
- end
- end
- function moveLine()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- for i = 1, tArgs[3] do
- fuel()
- line()
- turn()
- back()
- moveLine()
- end
- term.setCursorPos(1,11)
- print("Done!")
- print("Print Any Key to Exit")
- os.pullEvent("key")
- term.clear()
- term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement