Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Torches in Slot 16
- Enderchest to Storage System in 15
- Enderchest filled with Torches in 14
- If you don't want this to use torches
- you'll need to modify the script a little.
- I'll tell you how.
- Go to function torchtunnel() and find these:
- MoreTorches()
- turtle.select(16)
- turtle.placeDown()
- turtle.select(1)
- and then delete them, or simply do the
- two half square thingies followed by the
- two dashes like the ones this entire thing
- is written inside of and your turtle won't
- place any torches.f ]]--
- local tArgs = {...}
- local length = tonumber(tArgs[1])
- local shaft = tonumber(tArgs[2])
- turtle.select(1)
- function Front()
- while turtle.detect() do
- turtle.dig()
- sleep(.5)
- end
- end
- function Top()
- while turtle.detectUp() do
- turtle.digUp()
- sleep(1)
- end
- end
- function Go()
- Front()
- turtle.forward()
- Top()
- Bottom()
- end
- function Bottom()
- turtle.digDown()
- turtle.select(1)
- end
- function Refuel()
- for n = 1,13 do
- turtle.select(n)
- turtle.refuel()
- end
- end
- function CheckFuel()
- if turtle.getFuelLevel() < 100 then
- Refuel()
- NoFuel()
- end
- end
- function NoFuel()
- while turtle.getFuelLevel() < 100 do
- print("I need fuel, put some in.")
- Refuel()
- sleep(10)
- end
- end
- function torchtunnel()
- for b = 1,5 do
- Go()
- DropOff()
- end
- MoreTorches()
- turtle.select(16)
- turtle.placeDown()
- turtle.select(1)
- CheckFuel()
- end
- function MoreTorches()
- if turtle.getItemCount(16) == 0 then
- turtle.select(14)
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.select(16)
- TorchChest()
- turtle.select(14)
- turtle.dig()
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function TorchChest()
- if turtle.suck() then
- print("Torches Received")
- else
- while turtle.suck() == false do
- print ("Chest is out of Torches!")
- sleep(10)
- end
- end
- end
- function DropOff()
- if turtle.getItemCount(13) > 0 then
- print("full")
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(15)
- turtle.place()
- for j = 1,13 do
- turtle.select(j)
- turtle.drop()
- end
- turtle.select(15)
- turtle.dig()
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function Ready()
- for i = 1,length,1 do
- torchtunnel()
- end
- end
- function Start()
- for h = 1,shaft,1 do
- Ready()
- local num = length*5
- for c = 1,num,1 do
- turtle.back()
- end
- turtle.turnLeft()
- Go()
- Go()
- Go()
- turtle.turnRight()
- end
- end
- Start()
Add Comment
Please, Sign In to add comment