SHOW:
|
|
- or go back to the newest paste.
1 | rednet.open("right") | |
2 | function farm() | |
3 | local even = false | |
4 | for k = 1,52 do | |
5 | for i = 1,58 do | |
6 | turtle.dig() | |
7 | turtle.suck() | |
8 | - | end |
8 | + | |
9 | end | |
10 | empty() | |
11 | ||
12 | if even== false then | |
13 | turtle.turnRight() | |
14 | turtle.dig() | |
15 | turtle.forward() | |
16 | turtle.turnRight() | |
17 | even = true | |
18 | else if even == true then | |
19 | turtle.turnLeft() | |
20 | turtle.dig() | |
21 | - | end |
21 | + | |
22 | turtle.turnLeft() | |
23 | even = false | |
24 | end | |
25 | empty() | |
26 | end | |
27 | end | |
28 | end | |
29 | function goHome() | |
30 | turtle.turnRight() | |
31 | for i= 1,50 do | |
32 | turtle.forward() | |
33 | end | |
34 | turtle.turnRight() | |
35 | end | |
36 | ||
37 | function empty() | |
38 | turtle.select(1) | |
39 | if turtle.compareUp()== true then | |
40 | for x=2,16 do | |
41 | - | write("What would you like me to do? ") |
41 | + | |
42 | turtle.dropUp() | |
43 | - | msg = read() |
43 | + | |
44 | end | |
45 | ||
46 | senderId, msg = rednet.receive() | |
47 | ||
48 | if msg == "farm" then | |
49 | farm() | |
50 | goHome() | |
51 | end |