Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dol()
- if turtle.detectDown() == true and not turtle.digDown() then
- print("nie da sie")
- powrot()
- else
- print("da sie")
- turtle.digDown()
- turtle.down()
- end
- end
- function powrot()
- while turtle.detectUp() == false do
- print("wracam")
- turtle.up()
- end
- end
- function rozladunek()
- turtle.select(12)
- if turtle.getItemCount(12) >= 1 then
- turtle.select(14)
- turtle.placeUp()
- turtle.select(1)
- turtle.dropUp()
- turtle.select(2)
- turtle.dropUp()
- turtle.select(3)
- turtle.dropUp()
- turtle.select(4)
- turtle.dropUp()
- turtle.select(5)
- turtle.dropUp()
- turtle.select(6)
- turtle.dropUp()
- turtle.select(7)
- turtle.dropUp()
- turtle.select(8)
- turtle.dropUp()
- turtle.select(9)
- turtle.dropUp()
- turtle.select(10)
- turtle.dropUp()
- turtle.select(11)
- turtle.dropUp()
- turtle.select(12)
- turtle.dropUp()
- turtle.select(14)
- turtle.digUp()
- end
- end
- function ruch()
- turtle.select(16)
- if turtle.compareUp() then
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(15)
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function sktret()
- turtle.select(16)
- print("nawracam")
- if turtle.compareUp() and turtle.compare() then
- turtle.turnRight()
- end
- end
- function main()
- while true do
- ruch()
- sktret()
- dol()
- rozladunek()
- end
- end
- return main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement