Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Wprowac dlugosc boku")
- local x=read()
- a=5*x+5
- b=2*x+3
- c=5*x+4
- d=2*x+3-1
- local l=0
- local j=1
- local bl=0
- function inv()
- bl=0
- while bl==0 do
- local lv=turtle.getFuelLevel()
- print(lv)
- --napelnienie
- if lv<100 then
- turtle.select(16)
- turtle.refuel()
- end
- turtle.select(j)
- l=turtle.getItemCount(j)
- if l==0 then
- j=j+1
- else
- bl=1
- end
- if j==16 then
- j=1
- end
- end
- end
- for i=1,a do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- for i=1,b do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- for i=1,c do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- for i=1,d do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- --Zakonczenie ramy
- --Obrut i pozycja m1
- turtle.turnRight()
- turtle.forward()
- --pierwsze klockimarkerowe
- for i=1,5 do
- inv()
- turtle.placeDown()
- krss=x-1
- for krs=1,krss do
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- --i=i+1
- if i==5 then
- else
- turtle.forward()
- turtle.forward()
- end
- end
- --koniec 1 markeeow
- turtle.turnRight()
- d1=x-1+3+x
- for i=1,d1 do
- turtle.forward()
- end
- --koniec d1
- turtle.turnRight()
- --2 klockimarkerowe
- for i=1,5 do
- inv()
- turtle.placeDown()
- krss=x-1
- for krs=1,krss do
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- --i=i+1
- if i==5 then
- else
- turtle.forward()
- turtle.forward()
- end
- end
- turtle.turnRight()
- d1=x-1+3+1
- for i=1,d1 do
- turtle.forward()
- end
- --koniec d2
- turtle.turnRight()
- --3 klockimarkerowe
- for i=1,5 do
- inv()
- turtle.placeDown()
- krss=x-1
- for krs=1,krss do
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- --i=i+1
- if i==5 then
- else
- turtle.forward()
- turtle.forward()
- end
- end
- turtle.turnRight()
- d1=4
- for i=1,d1 do
- turtle.forward()
- end
- --koniec d3
- turtle.turnRight()
- --4 klockimarkerowe
- for i=1,5 do
- inv()
- turtle.placeDown()
- krss=x-1
- for krs=1,krss do
- turtle.forward()
- end
- inv()
- turtle.placeDown()
- --i=i+1
- if i==5 then
- else
- turtle.forward()
- turtle.forward()
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- inv()
- turtle.placeDown()
- krss=4*x+x-1+4
- for i=1,krss do
- turtle.forward()
- inv()
- turtle.placeDown()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- inv()
- turtle.placeDown()
- krss=4*x+x-1+4
- for i=1,krss do
- turtle.forward()
- inv()
- turtle.placeDown()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- inv()
- turtle.placeDown()
- krss=4*x+x-1+4
- for i=1,krss do
- turtle.forward()
- inv()
- turtle.placeDown()
- end
- turtle.turnRight()
- krss=1+x
- for i=1,krss do
- turtle.forward()
- end
- turtle.turnRight()
- krss=x
- for i=1,krss do
- turtle.forward()
- end
- turtle.turnRight()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.forward()
- turtle.forward()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- ------------
- turtle.turnLeft()
- krss=x+1
- for i=1,krss do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.forward()
- turtle.forward()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.turnRight()
- krss=x+1
- for i=1,krss do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.forward()
- turtle.forward()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- ------------
- turtle.turnLeft()
- krss=x+1
- for i=1,krss do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.forward()
- turtle.forward()
- turtle.forward()
- krss=x
- for i=1,krss do
- inv()
- turtle.placeDown()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement