SHOW:
|
|
- or go back to the newest paste.
| 1 | function digF() | |
| 2 | while not turtle.forward() do | |
| 3 | turtle.dig() | |
| 4 | end | |
| 5 | end | |
| 6 | ||
| 7 | function digU() | |
| 8 | while not turtle.up() do | |
| 9 | turtle.digUp() | |
| 10 | end | |
| 11 | end | |
| 12 | ||
| 13 | function digD() | |
| 14 | while not turtle.down() do | |
| 15 | turtle.digDown() | |
| 16 | end | |
| 17 | end | |
| 18 | ||
| 19 | function detectU() | |
| 20 | while turtle.detectUp() do | |
| 21 | turtle.digUp() | |
| 22 | end | |
| 23 | end | |
| 24 | ||
| 25 | function detectD() | |
| 26 | while turtle.detectDown() do | |
| 27 | turtle.digDown() | |
| 28 | end | |
| 29 | end | |
| 30 | ||
| 31 | function tF() | |
| 32 | - | if turtle.getFuelLevel()=0 do |
| 32 | + | if turtle.getFuelLevel()>0, than turtle.getFuelLevel()==0 do |
| 33 | turtle.refuel() | |
| 34 | end | |
| 35 | end | |
| 36 | ||
| 37 | print("Enter lenght vaule of corridor")
| |
| 38 | local lenght=read()/2 | |
| 39 | ||
| 40 | for i=1,lenght do | |
| 41 | tF() |