Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Start with Redstone Signal
- term.clear()
- term.setCursorPos(1,1)
- print("Recuerda Poner un EnderChest en el primer casillero del turtle")
- term.setCursorPos(1,6)
- print("Para encender el turtle, tienes que darle un tick de redstone")
- os.pullEvent("redstone")
- ----------------------------
- x = 0
- y = 0
- z = 0
- a = 30
- b = 30
- c = 30
- isRunning = true
- isLeft = true
- isFinishCycle = false
- function turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- function turnLeft()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- function digDown()
- turtle.digDown()
- turtle.down()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function ivFull()
- if turtle.getItemCount(16) ~= 1 then
- return false
- end
- return true
- end
- function transferBase()
- turtle.digUp()
- turtle.select(1)
- turtle.placeUp()
- for i = 2,16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- while isRunning do
- if ivFull() then
- transferBase()
- end
- if x == a and z == b then
- isFinishCycle = true
- end
- if x == a then
- if isFinishCycle then
- if y ~= c then
- digDown()
- isFinishCycle = false
- isLeft = not isLeft
- z = 0
- y = y + 1
- else
- break
- end
- else
- if isLeft then
- turnRight()
- else
- turnLeft()
- end
- z = z + 1
- end
- isLeft = not isLeft
- x = 0
- else
- turtle.dig()
- turtle.forward()
- x = x + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement