SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function movetotree() |
| 1 | + | |
| 2 | ||
| 3 | function forwardtest() | |
| 4 | while true do | |
| 5 | if not turtle.forward() then | |
| 6 | turtle.back() | |
| 7 | - | function othermove() |
| 7 | + | |
| 8 | end | |
| 9 | end | |
| 10 | end | |
| 11 | ||
| 12 | function aircheck() | |
| 13 | for z=1,8 do | |
| 14 | turtle.down() | |
| 15 | end | |
| 16 | end | |
| 17 | ||
| 18 | function forwardturn() | |
| 19 | while true do | |
| 20 | if not turtle.forward() then | |
| 21 | turtle.turnLeft() | |
| 22 | break | |
| 23 | end | |
| 24 | end | |
| 25 | end | |
| 26 | ||
| 27 | function drop() | |
| 28 | turtle.select(16) | |
| 29 | turtle.digDown() | |
| 30 | for d=1,14 do | |
| 31 | turtle.select(d) | |
| 32 | turtle.dropDown() | |
| 33 | end | |
| 34 | turtle.select(16) | |
| 35 | turtle.placeDown() | |
| 36 | end | |
| 37 | ||
| 38 | function cut() | |
| 39 | turtle.dig() | |
| 40 | turtle.forward() | |
| 41 | - | function movetodrop() |
| 41 | + | |
| 42 | - | for g=1,7 do |
| 42 | + | |
| 43 | turtle.up() | |
| 44 | else if not turtle.down() then | |
| 45 | turtle.turnLeft() | |
| 46 | break | |
| 47 | end | |
| 48 | end | |
| 49 | - | refuel2() |
| 49 | + | |
| 50 | end | |
| 51 | ||
| 52 | function movetodrop16trees() | |
| 53 | - | function refuel2() |
| 53 | + | for g=1,6 do |
| 54 | turtle.back() | |
| 55 | end | |
| 56 | end | |
| 57 | ||
| 58 | function check4trees() | |
| 59 | if turtle.getFuelLevel()<175 then | |
| 60 | refuel() | |
| 61 | end | |
| 62 | end | |
| 63 | ||
| 64 | function check16trees() | |
| 65 | if turtle.getFuelLevel()<600 then | |
| 66 | refuel() | |
| 67 | end | |
| 68 | end | |
| 69 | ||
| 70 | - | function saplings() |
| 70 | + | |
| 71 | turtle.select(16) | |
| 72 | turtle.turnRight() | |
| 73 | turtle.turnRight() | |
| 74 | turtle.suck() | |
| 75 | turtle.refuel(64) | |
| 76 | turtle.select(1) | |
| 77 | turtle.turnLeft() | |
| 78 | turtle.turnLeft() | |
| 79 | end | |
| 80 | ||
| 81 | function plant() | |
| 82 | turtle.select(14) | |
| 83 | turtle.place() | |
| 84 | turtle.select(1) | |
| 85 | end | |
| 86 | ||
| 87 | function getsaplings() | |
| 88 | turtle.select(14) | |
| 89 | turtle.turnRight() | |
| 90 | turtle.suck() | |
| 91 | turtle.select(1) | |
| 92 | turtle.turnLeft() | |
| 93 | end | |
| 94 | ||
| 95 | function getbonemeal() | |
| 96 | turtle.select(15) | |
| 97 | turtle.up() | |
| 98 | turtle.turnRight() | |
| 99 | turtle.suck() | |
| 100 | turtle.select(1) | |
| 101 | turtle.turnLeft() | |
| 102 | turtle.down() | |
| 103 | end | |
| 104 | ||
| 105 | function bonemeal() | |
| 106 | turtle.select(15) | |
| 107 | turtle.place() | |
| 108 | turtle.place() | |
| 109 | turtle.place() | |
| 110 | turtle.place() | |
| 111 | turtle.select(1) | |
| 112 | end | |
| 113 | ||
| 114 | ||
| 115 | while true do | |
| 116 | refuel() | |
| 117 | saplings() | |
| 118 | getbonemeal() | |
| 119 | turtle.forward() | |
| 120 | plant() | |
| 121 | bonemeal() | |
| 122 | cut() | |
| 123 | othermove() | |
| 124 | turtle.turnRight() | |
| 125 | turtle.back() | |
| 126 | plant() | |
| 127 | bonemeal() | |
| 128 | cut() | |
| 129 | othermove() | |
| 130 | othermove() | |
| 131 | turtle.turnRight() | |
| 132 | turtle.back() | |
| 133 | plant() | |
| 134 | bonemeal() | |
| 135 | cut() | |
| 136 | othermove() | |
| 137 | turtle.forward() | |
| 138 | turtle.forward() | |
| 139 | plant() | |
| 140 | bonemeal() | |
| 141 | cut() | |
| 142 | othermove() | |
| 143 | othermove() | |
| 144 | drop() | |
| 145 | turtle.up() | |
| 146 | turtle.turnRight() | |
| 147 | turtle.select(15) | |
| 148 | turtle.drop() | |
| 149 | turtle.turnLeft() | |
| 150 | turtle.down() | |
| 151 | sleep(130) | |
| 152 | end |