Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearConsole()
- term.clear()
- term.setCursorPos(1,1)
- end
- function turtleUp()
- while turtle.up() == false do
- turtle.digUp()
- turtle.attackUp()
- end
- end
- function turtleDown()
- while turtle.down() == false do
- turtle.digDown()
- turtle.attackDown()
- end
- end
- function turtleRight()
- turtle.turnRight()
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- end
- function turtleLeft()
- turtle.turnLeft()
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- end
- function turtleFore()
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- end
- function turtleBack()
- if turtle.back() == false then
- turtle.turnRight(2)
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- turtle.turnRight()
- turtle.turnRight()
- else
- end
- end
- function compareDown()
- turtle.select(1)
- if turtle.compareDown() == false then
- turtle.select(2)
- if turtle.compareDown(2) == false then
- turtle.select(3)
- while turtle.placeDown() == false do
- turtle.digDown()
- turtle.attackDown()
- end
- else
- end
- else
- end
- end
- clearConsole()
- write('Wie weit nach vorne? ')
- x = read()
- j = 0
- clearConsole()
- print('Programm in Arbeit...')
- print()
- print()
- print('< >')
- term.setCursorPos(13,5)
- print('0%')
- for i=1,x-1 do
- if j%11 == 0 then
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- elseif (j-5)%11 == 0 then
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- end
- j = j+1
- turtleFore()
- compareDown()
- turtleUp()
- turtleUp()
- turtleLeft()
- turtle.turnRight()
- turtleDown()
- turtle.turnLeft()
- turtleDown()
- compareDown()
- turtle.turnRight()
- turtle.turnRight()
- turtleFore()
- turtleFore()
- compareDown()
- turtle.turnLeft()
- turtleUp()
- turtle.turnRight()
- turtleUp()
- turtle.turnLeft()
- turtle.turnLeft()
- turtleFore()
- turtle.turnRight()
- turtleDown()
- turtleDown()
- p = (i/x-(i/x)%0.0001)*100
- term.setCursorPos(13,5)
- n = tostring(p)
- term.clearLine()
- print(n .. '%')
- term.setCursorPos(2,4)
- while p>4 do
- p = p-4
- write('=')
- end
- end
- term.setCursorPos(13,5)
- term.clearLine()
- print('100%')
- print()
- print('Programm beendet.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement