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