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