Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- z = 0
- bbx = 0
- bbz = 0
- dx = 10
- dz = 10
- -- Funcion Fuel
- function fuel()
- -- miramos inventario para chequear fuel
- turtle.select(1)
- a = 0
- for a = 2,16 do
- if turtle.compareTo(a) then
- -- compruebo items primer slot, muevo y recargo fuel.
- turtle.select(1)
- if turtle.getItemCount(1) < 10 then
- -- Transfers 32 items from the selected slot to slot 6.
- -- turtle.transferTo(6, 32)
- -- turtle.transferTo(slot destino,cantidad)
- -- Cogemos un carbon del slot selecionado turtle.select(a) y lo ponemos en slot (1)
- turtle.select(a)
- turtle.transferTo(1, 1)
- end
- end
- end
- if turtle.getFuelLevel() < 1 then
- turtle.refuel(1)
- end
- end
- -- Funcion cavax
- function cavax()
- x = x + 1
- turtle.dig()
- turtle.forward()
- if x == dx then
- x = 0
- z = z + 1
- for bbx = 1,dx do
- turtle.back()
- end
- cavaz()
- end
- end
- -- Funcion cavaz
- function cavaz()
- if z == dz then
- z = 0
- turtle.turnLeft()
- for bbz = 1,dz do
- turtle.forward()
- end
- turtle.turnRight()
- os.shutdown()
- end
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- -- Empezamos el programa
- while true do
- fuel()
- cavax()
- end
Advertisement
Add Comment
Please, Sign In to add comment