Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ========================
- -- == bmPrepare
- -- ========================
- dofile("turtleMoveApi")
- local function makeUsageFunc(message)
- return function()
- print(message)
- print("Hit enter key when ready.")
- read()
- end
- end
- local function makeSelectFunc(detailName, detailDamage)
- return function()
- for i = 1, 16 do
- dat = turtle.getItemDetail(i)
- if nil ~= dat then
- if nil == detailDamage then
- if dat.name == detailName then
- turtle.select(i)
- return
- end
- else
- if dat.name == detailName and dat.damage == detailDamage then
- turtle.select(i)
- return
- end
- end
- end
- end
- end
- end
- function dropOnly1()
- turtle.drop(1)
- end
- selectCobblestone = makeSelectFunc("minecraft:cobblestone")
- selectTurtle = makeSelectFunc("ComputerCraft:CC-Turtle")
- selectChest = makeSelectFunc("minecraft:chest")
- registFunction("selectTurtle", selectTurtle)
- registFunction("selectChest", selectChest)
- registFunction("selectCobblestone", selectCobblestone)
- registFunction("dropOnly1", dropOnly1)
- registScript(
- makeAndRegistFunc("phase1usage", makeUsageFunc(
- [[<phase1>
- chest x 32
- mining turtle x 4
- cobblestone x 58]])),
- rep(4,
- rep(7, e2, selectCobblestone, p2, e1, f),
- l, e2, selectCobblestone, p2, e1, selectTurtle, p1,
- l, rep(2, e1, f), r,
- rep(2, e1, selectChest, p1, e0, u), e1, rep(2, e2, d), r, e1, f, l,
- rep(2, e1, selectChest, p1, e0, u), e1, rep(2, e2, d), r, rep(2, e1, f), l,
- e2, selectCobblestone, p2,
- rep(2, e1, selectChest, p1, e0, u), e1, rep(2, e2, d), r, e1, f, l,
- e2, selectCobblestone, p2,
- rep(2, e1, selectChest, p1, e0, u), e1, rep(2, e2, d), r,
- rep(5, e2, selectCobblestone, p2, e1, f), r
- ),
- makeAndRegistFunc("phase2usage", makeUsageFunc(
- [[<phase2>
- torch x 64 x 8
- stone x 4
- dirt x 4
- gravel x 4
- obsidian x 4
- cobblestone x 4]])),
- rep(4,
- rep(7, e1, f), l,
- rep(2, makeAndRegistFunc("sel_torch", makeSelectFunc("minecraft:torch")), t1),
- makeAndRegistFunc("sel_Stone", makeSelectFunc("minecraft:stone")), dropOnly1,
- makeAndRegistFunc("sel_dirt", makeSelectFunc("minecraft:dirt")), dropOnly1,
- makeAndRegistFunc("sel_gravel", makeSelectFunc("minecraft:gravel")), dropOnly1,
- makeAndRegistFunc("sel_obsidian", makeSelectFunc("minecraft:obsidian")), dropOnly1,
- selectCobblestone, dropOnly1,
- r, rep(7, e1, f), r
- )
- )
- -- loadData()
- executeScript()
- print("completed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement