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