Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --T3wjGB1J
- shell.run('clear')
- local Fuel = turtle.getFuelLevel()
- print("Current Fuel Level " ..Fuel)
- local length = 16
- local width = 16
- local counter =0
- local widthcount=1
- local direction =0
- local gohome=0
- local dropitem=2
- if Fuel==0 then
- turtle.refuel(30)
- else
- turtle.up()
- while counter<length do
- print("counter "..counter)
- print("Width "..width)
- print("Widthcount "..widthcount)
- print("direction ".. direction)
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- counter=counter+1
- if counter==length then
- if widthcount<width then
- if widthcount==8 then
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- widthcount= widthcount+1
- counter=0
- turtle.turnLeft()
- direction=0
- else
- if direction==0 then
- turtle.turnRight()
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- turtle.turnRight()
- direction=1
- counter=0
- widthcount = widthcount+1
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- turtle.turnLeft()
- direction=0
- counter=0
- widthcount = widthcount+1
- end
- end
- end
- end
- end
- turtle.turnRight()
- while gohome<17 do
- turtle.forward()
- gohome = gohome +1
- end
- turtle.down()
- while dropitem<7 do
- turtle.select(dropitem)
- turtle.drop()
- dropitem = dropitem +1
- end
- dropitem=2
- turtle.back()
- turtle.select(1)
- turtle.turnRight()
- length = 16
- width = 16
- counter =0
- widthcount=1
- direction =0
- gohome=0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement