Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 0
- print("What distanse")
- a = read()
- b = ""
- print("Where should I go after work?")
- print("Right or left?")
- b = read()
- c = ""
- f = ""
- g = true
- print("Should I place torches?")
- print("Yes or no?")
- c = read()
- if c == "Yes" then
- print("Where must I place torches?")
- print("Left or right?")
- f = read()
- if turtle.getItemCount(16) < 1 then
- while g do
- if turtle.getItemCount(16) < 1 then
- print("Place some torches in the 16th slot")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- sleep(1)
- else g = false
- end
- end
- end
- end
- d = "Yes"
- --print("Should I clean place?")
- --print("Yes or no?")
- --d = read()
- function slot()
- e = true
- if turtle.getItemCount(4) >= 3 then
- turtle.select(4)
- elseif turtle.getItemCount(3) >= 3 then
- turtle.select(3)
- elseif turtle.getItemCount(2) >= 3 then
- turtle.select(2)
- elseif turtle.getItemCount(1) >= 3 then
- turtle.select(1)
- else
- while e do
- if turtle.getItemCount(1) < 3 then
- print("Place some resourses in the first slot")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- sleep(1)
- else e = false
- slot()
- end
- end
- end
- end
- function torch()
- if f == "Left" then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(16)
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- elseif f == "Right" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.select(16)
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- function clean()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- function step()
- slot()
- turtle.placeDown()
- turtle.placeUp()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- function ending()
- if b == "Right" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- slot()
- turtle.place()
- elseif b == "Left" then
- turtle.Left()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- slot()
- turtle.place()
- end
- end
- function begin()
- if b == "Right" then
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- elseif b == "Left" then
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- if d == "Yes" then
- h = 1
- begin()
- turtle.digUp()
- turtle.digDown()
- slot()
- turtle.placeDown()
- turtle.placeUp()
- for i = 1, a do
- clean()
- step()
- h = h + 1
- if h == 3 then
- torch()
- h = 0
- end
- end
- elseif d == "No" then
- slot()
- turtle.placeDown()
- turtle.placeUp()
- for i = 1, a do
- step()
- turtle.forward()
- h = h + 1
- if h == 3 then
- torch()
- h = 0
- end
- end
- end
- ending()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement