Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --varibles
- --local binput = tonumber( read() ) --length of cycle
- --local tinput = tonumber( read() ) --number of cycles
- local i = 1
- --Opening dialogue
- term.write("Welcome!")
- sleep(1)
- term.clear()
- term.write("Please place fuel in first slot and torches in second slot.")
- sleep(1)
- term.clear()
- --Begin Input Request
- term.write("How many blocks between torches?")
- local binput = tonumber( read() )
- term.clear()
- term.write("How many cycles i.e. torches?")
- local tinput = tonumber( read() )
- term.clear()
- term.write("Thank You!")
- --dig enough space for steve to step through
- function mine()
- turtle.dig()
- turtle.digUp()
- end
- --Check if required space for steve is available and locomotion.
- function moveCheck()
- turtle.forward()
- turtle.up()
- turtle.down()
- end
- --Place torch.
- function torch() --Place torch.
- turtle.select(16)
- turtle.place()
- end
- --Turn around.
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function placeTorch()
- turnAround()
- torch()
- turnAround()
- end
- --Move until hit block then mine.
- function digMove()
- for i = 1, binput + 1 do
- while not moveCheck() do
- mine()
- end
- end
- end
- for i = 1, tinput, 1 do
- while not digMove() do
- placeTorch()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement