Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Navigation Functions]]--
- --[[Refill Functions]]--
- --[[Schematic Functions]]--
- --[[Movement Functions]]--
- --[[Working Functions]]--
- --[[
- function run()
- print("Press key to start building...")
- read()
- --invList = scanInv()
- up()
- n = 1
- turtle.select(n)
- for x=1,height do
- for y=1,width do
- for z=1,length do
- blockID = getBlockId(x-1,y-1,z-1)
- blockData = getData(x-1,y-1,z-1)
- forward()
- turtle.digDown()
- slot_lst = slots[blockID][blockData]
- if(slot_lst ~= nil) then
- if(#slot_lst > 0) then
- local found=false
- for i,v in ipairs(slot_lst) do
- if(turtle.getItemCount(v) > 0) then
- found=true
- turtle.select(v)
- break
- end
- end
- if not found then
- print("Not enough " .. getBlockName(blockID, blockData) .. ". Please refill...")
- refill()
- end
- while turtle.getItemCount() == 0 do
- refill()
- end
- if turtle.getFuelLevel() < 200 then
- refill()
- end
- end
- end
- end
- left()
- forward()
- left()
- for i=1,length do
- forward()
- end
- right()
- right()
- end
- right()
- for i=1,width do
- forward()
- end
- left()
- up()
- end
- for i=1,height+1 do
- down()
- end
- end
- ]]--
Add Comment
Please, Sign In to add comment