Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --declare vars
- x=0
- z=0
- args = {...}
- x =9* tonumber(args[1])
- z= 5
- h = 1+ tonumber(args[2])
- canCont = true
- --this function checks the slot in use for item count
- function restock()
- for sl=1,15 do
- turtle.select(1)
- --if the count is less than 5 then it asks each slot 2 to 15 to give it blocks up to 64
- if turtle.getItemCount() < 5 then
- turtle.select(sl)
- turtle.transferTo(1)
- else end
- end
- --if it is still less than 5 it accesses its ender chest (slot 16) to refuel the entire turtle
- turtle.select(1)
- if turtle.getItemCount() < 5 then
- --places ender chest and fills first slot
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- turtle.suck(64-turtle.getItemCount())
- -- pulls out 14 stacks filling up the rest
- for i=1,14 do
- turtle.suck(64)
- end
- turtle.select(16)
- turtle.dig()
- turtle.select(1)
- end
- end
- function platform()
- for i=1,x do
- restock()
- for o=1,z do
- turtle.placeDown()
- if o~=z then turtle.forward() end
- end
- if math.fmod(i,2) == 1 and i~=x then turtle.turnRight() turtle.forward() turtle.turnRight()
- elseif i~=x then turtle.turnLeft() turtle.forward() turtle.turnLeft()
- else
- end
- end
- end
- function goDown()
- turtle.forward()
- for i=1,h do
- if turtle.down() then
- else
- canCont = false
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- end
- repeat
- platform()
- goDown()
- until canCont == false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement