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 BuildLength = 0 | |
| 6 | local getItem = tonumber(turtle.getItemCount(1)) | |
| 7 | function AntiObstruct() | |
| 8 | if turtle.detectDown() then | |
| 9 | turtle.digDown() | |
| 10 | end | |
| 11 | end | |
| 12 | function PlaceBlock() | |
| 13 | turtle.placeDown() | |
| 14 | turtle.forward() | |
| 15 | end | |
| 16 | function roundCorner() | |
| 17 | turtle.forward() | |
| 18 | turtle.turnRight() | |
| 19 | turtle.forward() | |
| 20 | turtle.turnLeft() | |
| 21 | end | |
| 22 | function BuildCylinder() | |
| 23 | if (getItem < 1) then print("Place materials in slot 1 to start building.") else
| |
| 24 | turtle.select(1) | |
| 25 | end | |
| 26 | if (BuildLength < 10) then PlaceBlock() else | |
| 27 | roundCorner() | |
| 28 | - | BuildLength - 10 |
| 28 | + | (BuildLength - 10) |
| 29 | end | |
| 30 | if (BuildLength < 2) then PlaceBlock() else | |
| 31 | roundCorner() | |
| 32 | - | BuildLength 2 |
| 32 | + | (BuildLength - 2) |
| 33 | end | |
| 34 | if (BuildLength < 1) then PlaceBlock() else | |
| 35 | roundCorner() | |
| 36 | - | BuildLength - 1 |
| 36 | + | (BuildLength - 1) |
| 37 | end | |
| 38 | if (BuildLength < 2) then PlaceBlock() else | |
| 39 | roundCorner() | |
| 40 | - | BuildLength - 2 |
| 40 | + | (BuildLength - 2) |
| 41 | end | |
| 42 | if (BuildLength < 10) then PlaceBlock() else | |
| 43 | roundCorner() | |
| 44 | - | BuildLength - 10 |
| 44 | + | (BuildLength - 10) |
| 45 | end | |
| 46 | term.clear() | |
| 47 | BuildCylinder() | |
| 48 | end |