Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin run FuQ3WvPs jh0kMxQc suicidePath
- -- REFUELS ON START FROM SLOT 1
- -- EVERY OTHER SLOT HAS TO CONTAIN BUILDING BLOCKS
- local args = {...}
- -- CONFIG -- EDIT BELOW
- local maxLength = -1 -- -1 means infinite, everything else is amount of forward steps
- -- END CONFIG / START CODE -- DO NOT EDIT BELOW
- function hasBuildingBlock()
- for i = 1, 16 do
- local hasItem = turtle.getItemDetail(i)
- if hasItem then
- turtle.select(i)
- return true
- end
- end
- return false
- end
- function main ()
- turtle.refuel()
- while maxLength == -1 or maxLength > 0 do
- if hasBuildingBlock() then
- turtle.placeDown()
- else return end
- while not turtle.forward() do
- turtle.dig()
- end
- while turtle.detectUp() do
- turtle.digUp()
- end
- maxLength = maxLength - 1
- end
- end
- -- END CODE
- if args[1] == "update" then
- if args[2] == "run" then
- shell.run("pastebin", "run", "FuQ3WvPs jh0kMxQc suicidePath run")
- else
- shell.run("pastebin", "run", "FuQ3WvPs jh0kMxQc suicidePath")
- end
- else
- -- RUN MAIN PROGRAM
- main()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement