Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dist = {...}
- local slot = 1
- function invCheck()
- if turtle.getItemCount(slot) == 0 then
- if slot == 15 then
- print ("Reset inventory and press any key")
- local event, param1 = os.pullEvent ("char")
- slot = 1
- turtle.select(slot)
- invCheck()
- else
- slot = slot + 1
- turtle.select(slot)
- invCheck()
- end
- end
- end
- function torch()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(16)
- turtle.place()
- turtle.select(slot)
- turtle.turnRight()
- turtle.turnRight()
- end
- function dig()
- if turtle.dig() == true then
- os.sleep(0.5)
- dig()
- end
- end
- function digUp()
- if turtle.digUp() == true then
- os.sleep(0.5)
- digUp()
- end
- end
- function layer()
- dig()
- turtle.forward()
- invCheck()
- turtle.placeDown()
- digUp()
- turtle.up()
- invCheck()
- turtle.placeUp()
- turtle.down()
- turtle.turnLeft()
- dig()
- turtle.forward()
- invCheck()
- turtle.placeDown()
- invCheck()
- turtle.place()
- digUp()
- turtle.up()
- invCheck()
- turtle.place()
- invCheck()
- turtle.placeUp()
- turtle.turnRight()
- turtle.turnRight()
- dig()
- turtle.forward()
- invCheck()
- turtle.placeUp()
- dig()
- turtle.forward()
- invCheck()
- turtle.placeUp()
- invCheck()
- turtle.place()
- turtle.digDown()
- turtle.down()
- invCheck()
- turtle.place()
- invCheck()
- turtle.placeDown()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- if dist[1] == dist[111] then
- dist[1] = 1
- end
- for i=1,dist[1] do
- layer()
- if math.fmod(i,5) == 1 and i ~= 1 then
- torch()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement