Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a = {...}
- turtle.turnLeft()
- turtle.turnLeft()
- local function find()
- for x = 1,16 do
- if turtle.getItemCount(x) > 0 then
- turtle.select(x)
- return true
- end
- end
- print("wating for blocks")
- while true do
- local e,e1 = os.pullEvent("key")
- if e1 == 28 then break end
- end
- end
- for i = 1,a[1] do
- for a = 1,a[2] do
- turtle.back()
- if not turtle.place() and find() then
- turtle.place()
- end
- end
- if math.fmod(i,2) == 0 then
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment