Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local torchSlot = 1
- local counter = 0
- local torchCounter = 0
- local secondCounter = 0
- function torchesslotcheck()
- if turtle.getItemCount(torchslot) < 1 then
- turtle.select(torchslot)
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- print("put torches in the chest!")
- repeat
- turtle.suck()
- until turtle.getItemCount(torchslot) > 10
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- end
- end
- function mineForward()
- turtle.select(1)
- print(counter)
- -- dig vooruit, dig boven, dig onder
- repeat
- turtle.dig()
- until not turtle.detect() == true
- repeat
- turtle.digUp()
- until turtle.up() == true
- turtle.down()
- turtle.digDown()
- -- ga naar links, dig, naar voren, dig up
- turtle.turnLeft()
- repeat
- turtle.dig()
- until not turtle.detect() == true
- turtle.forward()
- repeat
- turtle.digUp()
- until turtle.up() == true
- turtle.down()
- turtle.digDown()
- -- ga naar rechts, vooren, dig up dig down
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- repeat
- turtle.dig()
- until not turtle.detect() == true
- turtle.forward()
- repeat
- turtle.digUp()
- until turtle.up() == true
- turtle.down()
- turtle.digDown()
- -- ga weer terug naar midden positie
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- print(counter)
- repeat
- turtle.dig()
- until not turtle.detect() == true
- counter = counter + 1
- secondCounter = secondCounter + 1
- if secondCounter == 8 then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.select(1)
- turtle.placeDown()
- torchCounter = torchCounter + 1
- secondCounter = 0
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- end
- checkSlots()
- endCheck()
- end
- function checkSlots()
- turtle.getItemCount(16)
- if turtle.getItemCount(16) > 0 then
- print("gotte go clean my inventory!")
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1,counter do
- turtle.forward()
- end
- for q=3,16 do
- turtle.select(q)
- turtle.dropDown()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1,counter do
- turtle.forward()
- end
- end
- end
- function endCheck()
- turtle.getItemCount(1)
- if turtle.getItemCount(1) == 1 then
- turtle.placeDown()
- turtle.turnLeft()
- turtle.turnLeft()
- for i=1,counter do
- turtle.forward()
- end
- end
- end
- print("Lets GO!")
- torchesslotcheck()
- while true do
- mineForward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement