Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Get the arguments
- local tArgs = { ... }
- local branches = tonumber(tArgs[1])
- local branchSize = tonumber(tArgs[2])
- --Defaults for arguments
- local branches = branches or 5
- local branchSize = branchSize or 50
- -- Alias for easier typing
- local tt = turtle
- function turnAround()
- tt.turnRight()
- tt.turnRight()
- end
- function digBranch( branchLength )
- print("Digging Branch...")
- for i=0,branchLength do
- if tt.detect() then
- tt.dig()
- end
- tt.forward()
- if tt.detectUp() then
- tt.digUp()
- end
- end
- print("Torching Branch...")
- turnAround()
- for i=0,branchLength do
- if ( i % 10 ) == 0 then
- tt.placeUp()
- end
- tt.forward()
- end
- end
- digBranch( 20 )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement