Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// turtle-slot [1] Item
- --// turtle-slot [2] Coal
- --// turtle-slot [3] Wireless Modem
- -------------------------------------------------------------------------------------------------------------------------
- --CODE-------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------------
- --Start height
- local args = {...}
- a = args[1]-1 --Height
- b = args[2] --Mining Times
- c = a/2
- d = 0 --help
- --Startcheck: Fuel-------------------------------------------------------------------------------------------------------
- function Start()
- while turtle.getFuelLevel()<(2*a+1000) do
- turtle.select(2)
- turtle.dig()
- turtle.place()
- turtle.suck()
- shell.run("refuel all")
- turtle.select(2)
- turtle.dig()
- end
- print(" ")
- print("--------------------------------")
- print("Starting Quarry!")
- print("Height: ",a+1)
- print("Times: ",b)
- print("--------------------------------")
- end
- --Items to Ender-Chest---------------------------------------------------------------------------------------------------
- function Item()
- turtle.dig()
- turtle.select(1)
- turtle.place()
- for i=4,16,1 do
- turtle.select(i)
- turtle.drop()
- sleep(0.5)
- end
- turtle.select(1)
- turtle.dig()
- end
- --Mining actions---------------------------------------------------------------------------------------------------------
- function forward()
- while turtle.forward()==false do
- sleep(0.5)
- turtle.dig()
- attack()
- end
- end
- function up()
- while turtle.up()==false do
- sleep(0.5)
- attackUp()
- end
- end
- function down()
- while turtle.down()==false do
- sleep(0.5)
- turtle.digDown()
- attackDown()
- end
- end
- --Attack actions---------------------------------------------------------------------------------------------------------
- function attack()
- turtle.select(3)
- turtle.equipLeft()
- turtle.attack()
- turtle.equipLeft()
- end
- function attackUp()
- turtle.select(3)
- turtle.equipLeft()
- turtle.attackUp()
- turtle.equipLeft()
- end
- function attackDown()
- turtle.select(3)
- turtle.equipLeft()
- turtle.attackDown()
- turtle.equipLeft()
- end
- --Mining Forms-----------------------------------------------------------------------------------------------------------
- function Mine()
- Start()
- turtle.digDown()
- turtle.turnRight()
- turtle.dig()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- turtle.dig()
- for o=1,c,1 do
- turtle.digDown()
- down()
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.digDown()
- down()
- turtle.dig()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- turtle.dig()
- end
- turtle.digDown()
- turtle.down()
- if turtle.down()==true then
- d=1
- end
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.turnLeft()
- if d==1 then
- up()
- end
- for p=1,c*2,1 do
- up()
- end
- Item()
- end
- function Next()
- up()
- for i=1,16,1 do
- while turtle.forward()==false do
- sleep(1)
- end
- end
- down()
- end
- -------------------------------------------------------------------------------------------------------------------------
- --Actions----------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------------
- for t=1,b,1 do
- Mine()
- Next()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement