SHOW:
|
|
- or go back to the newest paste.
| 1 | if turtle.getFuelLevel() < 1000 then | |
| 2 | turtle.select(16) | |
| 3 | turtle.refuel(64) | |
| 4 | end | |
| 5 | function AntiObstruct() | |
| 6 | if turtle.detectDown() then | |
| 7 | turtle.digDown() | |
| 8 | end | |
| 9 | end | |
| 10 | function PlaceBlock() | |
| 11 | turtle.placeDown() | |
| 12 | turtle.forward() | |
| 13 | end | |
| 14 | function roundCorner() | |
| 15 | turtle.forward() | |
| 16 | turtle.turnRight() | |
| 17 | turtle.forward() | |
| 18 | turtle.turnLeft() | |
| 19 | end | |
| 20 | function BuildCylinder() | |
| 21 | local BuildLength = 0 | |
| 22 | local getItem = tonumber(turtle.getItemCount(1)) | |
| 23 | if (getItem < 1) then | |
| 24 | print("Place materials in slot 1 to start building.")
| |
| 25 | else | |
| 26 | turtle.select(1) | |
| 27 | end | |
| 28 | ||
| 29 | if (BuildLength < 10) then | |
| 30 | PlaceBlock() | |
| 31 | - | BuildLength + 1 |
| 31 | + | BuildLength += 1 |
| 32 | else | |
| 33 | roundCorner() | |
| 34 | - | BuildLength - 10 |
| 34 | + | BuildLength -= 10 |
| 35 | end | |
| 36 | ||
| 37 | if (BuildLength < 2) then | |
| 38 | PlaceBlock() | |
| 39 | - | BuildLength + 1 |
| 39 | + | BuildLength += 1 |
| 40 | else | |
| 41 | roundCorner() | |
| 42 | - | BuildLength - 2 |
| 42 | + | BuildLength -= 2 |
| 43 | end | |
| 44 | ||
| 45 | if (BuildLength < 1) then | |
| 46 | PlaceBlock() | |
| 47 | - | BuildLength + 1 |
| 47 | + | BuildLength += 1 |
| 48 | else | |
| 49 | roundCorner() | |
| 50 | - | BuildLength - 1 |
| 50 | + | BuildLength -= 1 |
| 51 | end | |
| 52 | ||
| 53 | if (BuildLength < 2) then | |
| 54 | PlaceBlock() | |
| 55 | - | BuildLength + 1 |
| 55 | + | BuildLength += 1 |
| 56 | else | |
| 57 | roundCorner() | |
| 58 | - | BuildLength - 2 |
| 58 | + | BuildLength -= 2 |
| 59 | end | |
| 60 | ||
| 61 | if (BuildLength < 10) then | |
| 62 | PlaceBlock() | |
| 63 | - | BuildLength + 1 |
| 63 | + | BuildLength += 1 |
| 64 | else | |
| 65 | roundCorner() | |
| 66 | - | BuildLength - 10 |
| 66 | + | BuildLength -= 10 |
| 67 | end | |
| 68 | end | |
| 69 | term.clear() | |
| 70 | BuildCylinder() | |
| 71 | end |