SHOW:
|
|
- or go back to the newest paste.
1 | - | i=0 |
1 | + | |
2 | if redstone.getInput("left") then | |
3 | SpawnWither() | |
4 | turtle.down() | |
5 | turtle.down() | |
6 | sleep(10) | |
7 | turtle.up() | |
8 | turtle.up() | |
9 | else | |
10 | sleep(10) | |
11 | end | |
12 | if turtle.getFuelLevel()<10000 then | |
13 | print "Low Fuel" | |
14 | end | |
15 | end | |
16 | ||
17 | function SpawnWither() | |
18 | Forward(7) | |
19 | turtle.turnLeft() | |
20 | turtle.select(1) | |
21 | turtle.place() | |
22 | turtle.up() | |
23 | turtle.place() | |
24 | PlaceOnRight() | |
25 | PlaceOnLeft() | |
26 | turtle.up() | |
27 | turtle.select(2) | |
28 | PlaceOnRight() | |
29 | PlaceOnLeft() | |
30 | turtle.place() | |
31 | turtle.down() | |
32 | turtle.down() | |
33 | turtle.turnLeft() | |
34 | Forward(7) | |
35 | turtle.turnLeft() | |
36 | turtle.turnLeft() | |
37 | Pickup() | |
38 | end | |
39 | ||
40 | function Forward(i) | |
41 | while i>0 do | |
42 | turtle.forward() | |
43 | i=i-1 | |
44 | end | |
45 | end | |
46 | ||
47 | function PlaceOnLeft() | |
48 | turtle.turnLeft() | |
49 | turtle.forward() | |
50 | turtle.turnRight() | |
51 | turtle.place() | |
52 | turtle.turnRight() | |
53 | turtle.forward() | |
54 | turtle.turnLeft() | |
55 | end | |
56 | ||
57 | function PlaceOnRight() | |
58 | turtle.turnRight() | |
59 | turtle.forward() | |
60 | turtle.turnLeft() | |
61 | turtle.place() | |
62 | turtle.turnLeft() | |
63 | turtle.forward() | |
64 | turtle.turnRight() | |
65 | end | |
66 | ||
67 | function Pickup() | |
68 | redstone.setOutput("back",true) | |
69 | sleep(0.2) | |
70 | redstone.setOutput("back",false) | |
71 | sleep(120) | |
72 | Forward(7) | |
73 | turtle.turnLeft() | |
74 | turtle.select(3) | |
75 | turtle.place() | |
76 | turtle.sleep(0.5) | |
77 | turtle.dig() | |
78 | turtle.turnLeft() | |
79 | Forward(7) | |
80 | turtle.turnLeft() | |
81 | turtle.turnLeft() | |
82 | end |