Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Robot producteur de ressource botania (sans mouvement)
- -- Video : https://youtu.be/o6xE2RX5Sks
- function verif()
- ok, donne = turtle.inspectDown()
- if ok then
- if donne.name=="Botania:livingrock" then
- return false
- elseif donne.name=="Botania:livingwood" then
- return false
- else
- return true
- end
- else
- perma=false
- return false
- end
- end
- -- Affichage info
- function info(text)
- term.clear()
- term.setCursorPos(1,1)
- print(text)
- end
- function pose()
- info("Pose du block")
- turtle.select(1)
- turtle.suckUp(1)
- if turtle.getItemCount(1) == 0 then
- info("Plus de ressource")
- return false
- else
- turtle.placeDown()
- return true
- end
- end
- local perma=true
- -- function recolte
- function go()
- while perma do
- info("Attente du bloc de vif bois ou vif roche")
- while verif() do
- os.sleep(3)
- end
- info("Recuperation du block")
- turtle.select(2)
- turtle.digDown()
- turtle.drop()
- perma=pose()
- end
- end
- -- si pas vide on passee en normal
- ok, donne = turtle.inspectDown()
- if ok then
- go()
- else
- perma=pose()
- go()
- end
Add Comment
Please, Sign In to add comment