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