SHOW:
|
|
- or go back to the newest paste.
| 1 | function select() | |
| 2 | while not turtle.select(slot) do | |
| 3 | slot = slot + 1 | |
| 4 | end | |
| 5 | end | |
| 6 | ||
| 7 | function placeDown() | |
| 8 | select() | |
| 9 | turtle.placeDown() | |
| 10 | end | |
| 11 | ||
| 12 | function move() | |
| 13 | if forward then | |
| 14 | turtle.forward() | |
| 15 | posX = posX + 1 | |
| 16 | end | |
| 17 | ||
| 18 | if backward then | |
| 19 | turtle.backward() | |
| 20 | posX = posX - 1 | |
| 21 | end | |
| 22 | ||
| 23 | end | |
| 24 | ||
| 25 | function newline() | |
| 26 | turtle.left() | |
| 27 | turtle.forward() | |
| 28 | turtle.right() | |
| 29 | ||
| 30 | if forward () then | |
| 31 | forward = false | |
| 32 | backward = true | |
| 33 | end | |
| 34 | ||
| 35 | if backward () then | |
| 36 | forward = ture | |
| 37 | backeward = false | |
| 38 | end | |
| 39 | ||
| 40 | end | |
| 41 | ||
| 42 | slot = 2 | |
| 43 | forward = true | |
| 44 | blockcount = 0 | |
| 45 | ||
| 46 | print("Starting to work")
| |
| 47 | turtle.select(1) | |
| 48 | ||
| 49 | if turtle.refuel() then | |
| 50 | ||
| 51 | turtle.forward() | |
| 52 | turtle.turnRight() | |
| 53 | ||
| 54 | for posZ = 0, 22, 1 do | |
| 55 | ||
| 56 | for posY = 0, 22, 1 do | |
| 57 | blockcount = blockcount + 1 | |
| 58 | - | if blockcount not 5 then |
| 58 | + | if blockcount ~= 5 then |
| 59 | placeDown() | |
| 60 | end | |
| 61 | ||
| 62 | - | if blockcount 5 then |
| 62 | + | if blockcount == 5 then |
| 63 | blockcount = 0 | |
| 64 | end | |
| 65 | ||
| 66 | move() | |
| 67 | end | |
| 68 | ||
| 69 | newline() | |
| 70 | ||
| 71 | end | |
| 72 | ||
| 73 | else | |
| 74 | print("No Fuel found")
| |
| 75 | end | |
| 76 | print("Done!") |