Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- --!************LOCALLER****************
- write("Monitor ID?")
- local id=read()
- write("Uzunlugu : ")
- local uzunluk=read()
- write("Kac Sira : ")
- local sira=read()
- local tunelx=uzunluk
- local sirax=sira
- --Fonksiyon ileriKaz
- function ileriKaz()
- repeat
- turtle.dig()
- sleep(1)
- until turtle.detect()==false
- end
- --Fonksiyon yukariKaz
- function yukariKaz()
- repeat
- turtle.digUp()
- sleep(1)
- until turtle.detectUp()==false
- end
- --Fonkisyon sol
- function sol(s)
- repeat
- turtle.turnLeft()
- s=s-1
- until s==0
- end
- --Fonksiyon sag
- function sag(w)
- repeat
- turtle.turnRight()
- w=w-1
- until w==0
- end
- --Fonksiyon ileriGit
- function ileriGit(x)
- repeat
- if turtle.detect()==false then
- if turtle.detectUp()==true then yukariKaz() end
- turtle.forward()
- x=x-1
- else
- ileriKaz()
- end
- until x==0
- end
- --Fonksiyon tunel
- function tunel()
- repeat
- ileriGit(1)
- tunelx=tunelx-1
- until tunelx==0
- end
- repeat
- tunelx=uzunluk
- tunel()
- sol(2)
- ileriGit(uzunluk)
- if sirax~=sira then
- sag(1)
- ileriGit((sira-sirax)*3)
- sol(1)
- end
- --ENVANTER BOŞALT && YAKIT AL
- sol(1)
- ileriGit((sira-sirax+1)*3)
- sol(1)
- sirax=sirax-1
- until sirax==0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement