Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("tt")
- curve = fs.open("curve1","r")
- cur = curve.readLine()
- x = 0
- y = 0
- for a = 1,#cur do
- c = string.sub(cur,a,a)
- if c == "F" then
- turtle.forward()
- x = x + 1
- end
- if c == "P" then turtle.placeDown() end
- if c == "R" then turtle.digDown() end
- if c == "U" then
- turtle.up()
- y = y - 1
- end
- if c == "D" then
- turtle.down()
- y = y + 1
- end
- if c == "B" then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- tt.restock()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for a = 1,y+1 do
- turtle.up()
- end
- for a = 1,x do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement