Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("t")
- local length = 25
- local myPos = 0
- local returnin = false
- local args = {...}
- print (#args)
- if #args > 1 then length = args[1] end
- function mineOne()
- t.df()
- t.f()
- t.dd()
- t.du()
- if returning then myPos = myPos -1
- else myPos = myPos + 1
- end
- print(myPos)
- end
- while (myPos < length) do
- mineOne()
- end
- print("end of line")
- turtle.turnRight()
- t.df()
- t.f()
- t.du()
- t.dd()
- turtle.turnRight()
- returning = true
- print("turn complete")
- while (myPos > 0) do
- mineOne()
- end
- print ("returned home")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement