Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Program for computer craft's turtles (Minecraft)
- a = 0
- print("What width?")
- y = read()
- a = y/2
- b = 0
- print("What length?")
- z = read()
- b = z - 1
- c = 0
- print("Where should I go after work?")
- print("0-down, 1-up")
- c = read()
- function slot()
- d = 0
- turtle.select(4)
- d = turtle.getItemCount(4)
- if d == 0 then turtle.select(3)
- end
- d = turtle.getItemCount(3)
- if d == 0 then turtle.select(2)
- end
- d = turtle.getItemCount(2)
- if d == 0 then turtle.select(1)
- end
- l = true
- d = turtle.getItemCount(1)
- if d == 0 then while l do
- print("Waiting for resourses")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- sleep(1)
- u = 0
- u = turtle.getItemCount(1)
- if u > 0 then
- l = false
- end
- end
- end
- end
- function way()
- turtle.back()
- slot()
- turtle.place()
- end
- for i = 0, a do
- turtle.turnRight()
- turtle.turnRight()
- for i = 0, b do
- way()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- for i = 0, b do
- way()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- end
- if c == 0 then
- turtle.down()
- slot()
- turtle.placeUp()
- else turtle.up()
- slot()
- turtle.placeDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement