Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Slot = 1
- Scarico = false
- lunghezza = 0
- function contaSlot()
- slotPieni = 0
- for i = 1,16 do
- if turtle.getItemCount(Slot) > 0 then
- slotPieni = slotPieni + 1
- end
- Slot = Slot + 1
- end
- if slotPieni == 16 then
- Scarico = true
- else
- slotPieni = 0
- end
- Slot = 1
- end
- function avanti()
- turtle.forward()
- end
- function indietro()
- turtle.back()
- end
- function destra()
- turtle.turnRight()
- end
- function sinistra()
- turtle.turnLeft()
- end
- function up()
- turtle.up()
- end
- function down()
- turtle.down()
- end
- function scava()
- turtle.dig()
- avanti()
- sinistra()
- turtle.dig()
- turtle.digUp()
- up()
- turtle.dig()
- turtle.digUp()
- up()
- turtle.dig()
- destra()
- destra()
- turtle.dig()
- down()
- turtle.dig()
- down()
- turtle.dig()
- sinistra()
- end
- while true do
- scava()
- lunghezza = lunghezza + 1
- contaSlot()
- if Scarico == true then
- for y = 1,lunghezza do
- indietro()
- end
- sinistra()
- sinistra()
- for z = 1,16 do
- turtle.select(Slot)
- turtle.drop()
- Slot = Slot + 1
- end
- Slot = 1
- sinistra()
- sinistra()
- for x = 1,lunghezza do
- avanti()
- end
- Slot = 1
- Scarico = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement