Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local dis = tonumber(tArgs[1])
- local cPath = 1
- local Edge = 5
- local uPath = 9
- local cPathEnChest = 4
- local EdgeEnChest = 8
- local uPathEnChest = 12
- --local y = 0
- --Functions
- local function dumpCrap()
- turtle.select(16)
- turtle.place()
- turtle.select(2)
- turtle.drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(6)
- turtle.drop()
- turtle.select(7)
- turtle.drop()
- turtle.select(10)
- turtle.drop()
- turtle.select(11)
- turtle.drop()
- turtle.select(13)
- turtle.drop()
- turtle.select(14)
- turtle.drop()
- turtle.select(15)
- turtle.drop()
- turtle.select(16)
- turtle.dig()
- end
- local function getItem(slot,chestslot)
- turtle.dig()
- turtle.select(chestslot)
- turtle.place()
- turtle.select(slot)
- turtle.suck()
- turtle.select(chestslot)
- turtle.dig()
- end
- local function CheckslotCount(slot,chestslot)
- if turtle.getItemCount(slot) < 4 then
- getItem(slot,chestslot)
- end
- end
- local function tfuel(amount)
- if turtle.getFuelLevel() < 5 then
- turtle.select(5)
- turtle.refuel(amount)
- end
- end
- local function checkHeight()
- if turtle.detectDown() then
- for i = 1, 10 do
- turtle.up()
- sleep(0.2)
- end
- else
- turtle.down()
- sleep(0.2)
- tfuel(1)
- --y = y + 1
- checkHeight()
- end
- end
- -- Main Script
- for i = 1, dis do
- --if i % 2 == 0 then
- checkHeight()
- --end
- tfuel(1)
- turtle.digDown()
- turtle.select(uPath)
- turtle.placeDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.select(Edge)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.select(Edge)
- turtle.place()
- turtle.turnLeft()
- turtle.dig()
- tfuel(1)
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(cPath)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- if i % 4 == 0 then
- dumpCrap()
- end
- CheckslotCount(cPath,cPathEnChest)
- CheckslotCount(Edge,EdgeEnChest)
- CheckslotCount(uPath,uPathEnChest)
- print( i .. " of " .. dis .. " meters built")
- end
Advertisement
Add Comment
Please, Sign In to add comment