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