Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- collect()
- clearInventory()
- goBack()
- end
- function collect()
- turtle.turnRight()
- turtle.turnRight()
- for i=0,14 do
- turtle.placeDown()
- while not turtle.forward() do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- end
- function goBack()
- turtle.turnRight()
- turtle.turnRight()
- for i=0,14 do
- while not turtle.forward() do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- end
- function clearInventory()
- local tmp = false
- if turtle.getFuelLevel()<500 then
- tmp = true
- end
- for i=1,16 do
- turtle.select(i)
- if tmp then
- -- turtle.refuel()
- end
- while not turtle.drop() do
- os.queueEvent("randomEvent")
- os.pullEvent()
- end
- end
- end
- function refillInventory()
- turtle.suck(16)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement