Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = "ok"
- b = "ok"
- c = "ok"
- function drop()
- turtle.select(3)
- turtle.drop()
- turtle.select(2)
- turtle.drop()
- turtle.select(1)
- turtle.drop()
- end
- function verif()
- turtle.select(1)
- if turtle.compareTo(14) == true then
- a = "ok"
- else
- a = "notok"
- end
- turtle.select(2)
- if turtle.compareTo(15) == true then
- b = "ok"
- else
- b = "notok"
- end
- turtle.select(3)
- if turtle.compareTo(16) == true then
- c = "ok"
- else
- c = "notok"
- end
- end
- while true do
- term.clear()
- --sleep(5)
- event = os.pullEvent("redstone")
- turtle.select(1) --phosphore--
- turtle.suckUp()
- turtle.select(2) --phosphore--
- turtle.suckUp()
- turtle.select(3) --cobble--
- turtle.suckDown()
- if (turtle.getItemCount(1) == 64) and (turtle.getItemCount(2) == 64) and (turtle.getItemCount(3) == 64) then
- verif()
- if a == "ok" and b == "ok" and c == "ok" then
- print("verif ok")
- print("livraison")
- drop()
- end
- if a == "notok" or b == "notok" or c == "notok" then
- print("verif not ok ")
- print("nettoyage")
- --turtle.turnLeft()
- turtle.turnRight()
- drop()
- turtle.turnLeft()
- --turtle.turnRight()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement