Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dofile("turtleMoveApi")
- local CHEST_SLOT = 1
- local COBBLE_SLOT = 2
- function test()
- if turtle.getFuelLevel() <= 1000 then
- refuelPrompt()
- end
- local count = 0
- while true do
- turtle.digDown()
- if true == turtle.down() then
- count = count + 1
- if 2 == count then
- turtle.select(COBBLE_SLOT)
- turtle.placeUp()
- end
- else
- break
- end
- end
- for i = 1, count do
- turtle.digUp()
- turtle.up()
- end
- turtle.select(COBBLE_SLOT)
- turtle.placeDown()
- print("count = " .. tostring(count))
- end
- function dropUpAll()
- for i = 3, 16 do
- turtle.select(i)
- turtle.dropUp()
- end
- end
- function seekAndDropUpAll()
- local cnt = 0
- turtle.select(CHEST_SLOT)
- while true do
- b()
- cnt = cnt + 1
- if true == turtle.compareUp() then
- dropUpAll()
- break
- end
- end
- for i = 1, cnt do
- f()
- end
- end
- function selectChestSlot()
- turtle.select(CHEST_SLOT)
- end
- registFunction("test", test)
- registFunction("dropUpAll", dropUpAll)
- registFunction("selectChestSlot", selectChestSlot)
- registFunction("seekAndDropUpAll", seekAndDropUpAll)
- registScript(
- rep(16,
- test,selectChestSlot,p0,dropUpAll,e1,f,
- test,selectChestSlot,p0,dropUpAll,e1,f,
- rep(13,test,seekAndDropUpAll,e1,f),
- test,
- breakLast,
- swOddEven({r,e1,f,r},{l,e1,f,l})
- )
- )
- loadData()
- executeScript()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement