Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Functions 20130818
- --VARIABLES
- --CobblestoneCounter
- cslot = 1
- turtle.select(cslot)
- --FUNCTIONS
- -- Ensure turtle goes up
- function goUp()
- while not turtle.up() do
- upDig()
- end
- end
- --Ensure turtle goes down
- function goDown()
- while not turtle.down() do
- downDig()
- end
- end
- -- Ensure turtle moves forward
- function goForward()
- while not turtle.forward() do
- forwardDig()
- end
- end
- -- Dig forward
- function forwardDig()
- while turtle.detect() do
- turtle.dig()
- end
- end
- -- Dig up
- function upDig()
- while turtle.detectUp() do
- turtle.digUp()
- end
- end
- -- Dig Down
- function downDig()
- turtle.digDown()
- end
- --Place Cobblestone Below
- function placeCobblestoneDown()
- turtle.select(cslot)
- turtle.placeDown()
- CounterCobblestone()
- end
- --Place Cobblestone Regularly
- function placeCobblestone()
- turtle.select(cslot)
- turtle.place()
- CounterCobblestone()
- end
- --Place Cobblestone Above
- function placeCobblestoneUp()
- turtle.select(cslot)
- turtle.placeUp()
- CounterCobblestone()
- end
- --Counts stacks of cobble
- function CounterCobblestone()
- while turtle.getItemCount(cslot) < 1 do
- cslot = (cslot%13)+1
- end
- end
- --Place Cobblestone Below and then move forward
- function CobbleDForward()
- placeCobblestoneDown()
- goForward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement