SHOW:
|
|
- or go back to the newest paste.
1 | --Beat Farming (or other seed based crops (I think) | |
2 | --slot 1: beat seeds | |
3 | --slot 2: bone meal | |
4 | --slot 3: carrot | |
5 | --slot 4: wheat seeds | |
6 | --slot 5: poatoes | |
7 | ||
8 | while true do | |
9 | --look down | |
10 | success, data = turtle.inspectDown() | |
11 | if success and string.find(data.name,"beet") then | |
12 | while data.state.age < 3 do | |
13 | turtle.select(2) | |
14 | if turtle.getItemCount(2) > 1 then | |
15 | turtle.placeDown() | |
16 | end | |
17 | sleep(1) | |
18 | success, data = turtle.inspectDown() | |
19 | end | |
20 | turtle.select(1) | |
21 | turtle.digDown() | |
22 | turtle.placeDown() | |
23 | elseif success and string.find(data.name,"carrot") then | |
24 | while data.state.age < 7 do | |
25 | turtle.select(2) | |
26 | if turtle.getItemCount(2) > 1 then | |
27 | turtle.placeDown() | |
28 | end | |
29 | sleep(1) | |
30 | success, data = turtle.inspectDown() | |
31 | end | |
32 | turtle.select(3) | |
33 | turtle.digDown() | |
34 | turtle.placeDown() | |
35 | elseif success and string.find(data.name,"wheat") then | |
36 | while data.state.age < 7 do | |
37 | turtle.select(2) | |
38 | if turtle.getItemCount(2) > 1 then | |
39 | turtle.placeDown() | |
40 | end | |
41 | sleep(1) | |
42 | success, data = turtle.inspectDown() | |
43 | end | |
44 | turtle.select(4) | |
45 | turtle.digDown() | |
46 | if turtle.getItemCount() > 1 then | |
47 | turtle.placeDown() | |
48 | end | |
49 | elseif success and string.find(data.name,"potato") then | |
50 | while data.state.age < 7 do | |
51 | turtle.select(2) | |
52 | if turtle.getItemCount(2) > 1 then | |
53 | turtle.placeDown() | |
54 | end | |
55 | sleep(1) | |
56 | success, data = turtle.inspectDown() | |
57 | end | |
58 | turtle.select(5) | |
59 | - | for s=5,16,1 do |
59 | + | |
60 | if turtle.getItemCount() > 1 then | |
61 | turtle.placeDown() | |
62 | end | |
63 | else | |
64 | --must be something else or broken land. plant something | |
65 | turtle.select(4) | |
66 | turtle.digDown() | |
67 | turtle.placeDown() | |
68 | end | |
69 | --now check forward | |
70 | success_forward,data_forward = turtle.inspect() | |
71 | if success_forward then | |
72 | --we've hit a corner | |
73 | print("We've hit a corner.") | |
74 | turtle.select(2) | |
75 | turtle.suckUp(64-turtle.getItemCount(2)) | |
76 | if string.find(data_forward.name,"chest") then | |
77 | for s=6,16,1 do | |
78 | turtle.select(s) | |
79 | turtle.drop() | |
80 | end | |
81 | turtle.turnLeft() | |
82 | elseif string.find(data_forward.name,"jack") then | |
83 | turtle.turnLeft() | |
84 | elseif string.find(data_forward.name,"pump") then | |
85 | turtle.turnRight() | |
86 | end | |
87 | end | |
88 | turtle.forward() | |
89 | sleep(4) | |
90 | end |