SHOW:
|
|
- or go back to the newest paste.
| 1 | --// turtle-slot [1] Item | |
| 2 | --// turtle-slot [2] Coal | |
| 3 | ------------------------------------------------------------------------------------------------------------------------- | |
| 4 | --CODE------------------------------------------------------------------------------------------------------------------- | |
| 5 | ------------------------------------------------------------------------------------------------------------------------- | |
| 6 | --Start height | |
| 7 | local args = {...}
| |
| 8 | a = 89-1 --Height | |
| 9 | b = args[1] --Mining Time | |
| 10 | ||
| 11 | --Startcheck: Fuel------------------------------------------------------------------------------------------------------- | |
| 12 | function Start() | |
| 13 | while turtle.getFuelLevel()<(2*a+1000) do | |
| 14 | turtle.select(2) | |
| 15 | turtle.digDown() | |
| 16 | turtle.placeDown() | |
| 17 | turtle.suckDown() | |
| 18 | shell.run("refuel all")
| |
| 19 | turtle.select(2) | |
| 20 | turtle.digDown() | |
| 21 | end | |
| 22 | end | |
| 23 | ||
| 24 | --Items to Ender-Chest--------------------------------------------------------------------------------------------------- | |
| 25 | function Item() | |
| 26 | turtle.select(1) | |
| 27 | turtle.placeDown() | |
| 28 | for i=3,16,1 do | |
| 29 | turtle.select(i) | |
| 30 | turtle.dropDown() | |
| 31 | sleep(0.5) | |
| 32 | end | |
| 33 | turtle.select(1) | |
| 34 | turtle.digDown() | |
| 35 | end | |
| 36 | ||
| 37 | --Mining actions--------------------------------------------------------------------------------------------------------- | |
| 38 | function forward() | |
| 39 | while turtle.forward()==false do | |
| 40 | sleep(0.5) | |
| 41 | end | |
| 42 | end | |
| 43 | ||
| 44 | function up() | |
| 45 | while turtle.up()==false do | |
| 46 | sleep(0.5) | |
| 47 | end | |
| 48 | end | |
| 49 | ||
| 50 | --Mining Forms----------------------------------------------------------------------------------------------------------- | |
| 51 | function Mine() | |
| 52 | Start() | |
| 53 | turtle.turnRight() | |
| 54 | turtle.digDown() | |
| 55 | - | turtle.turnLeft() |
| 55 | + | |
| 56 | turtle.turnRight() | |
| 57 | - | turtle.turnLeft() |
| 57 | + | |
| 58 | turtle.turnRight() | |
| 59 | turtle.dig() | |
| 60 | while turtle.down()==true do | |
| 61 | turtle.digDown() | |
| 62 | turtle.dig() | |
| 63 | turtle.turnLeft() | |
| 64 | turtle.dig() | |
| 65 | turtle.turnLeft() | |
| 66 | turtle.dig() | |
| 67 | turtle.down() | |
| 68 | turtle.digDown() | |
| 69 | turtle.dig() | |
| 70 | turtle.turnRight() | |
| 71 | turtle.dig() | |
| 72 | turtle.turnRight() | |
| 73 | turtle.dig() | |
| 74 | end | |
| 75 | - | turtle.turnRight() |
| 75 | + | |
| 76 | for p=1,a,1 do | |
| 77 | up() | |
| 78 | end | |
| 79 | Item() | |
| 80 | end | |
| 81 | ||
| 82 | ||
| 83 | function Next() | |
| 84 | up() | |
| 85 | for i=1,4,1 do | |
| 86 | forward() | |
| 87 | end | |
| 88 | turtle.digDown() | |
| 89 | turtle.down() | |
| 90 | end | |
| 91 | ||
| 92 | ------------------------------------------------------------------------------------------------------------------------- | |
| 93 | --Actions---------------------------------------------------------------------------------------------------------------- | |
| 94 | ------------------------------------------------------------------------------------------------------------------------- | |
| 95 | for t=1,b,1 do | |
| 96 | for k=1,4,1 do | |
| 97 | Mine() | |
| 98 | Next() | |
| 99 | end | |
| 100 | end |