SHOW:
|
|
- or go back to the newest paste.
1 | tArgs = {...} | |
2 | if #tArgs ~= 3 then | |
3 | print("You must enter 3 Colors!") | |
4 | return | |
5 | end | |
6 | print("Startup Sequence") | |
7 | --Do Stuff | |
8 | ||
9 | function detect(direction) | |
10 | if direction == "fwd" then | |
11 | if turtle.detect() then | |
12 | turtle.dig() | |
13 | end | |
14 | elseif direction == "up" then | |
15 | if turtle.detectUp() then | |
16 | turtle.digUp() | |
17 | end | |
18 | end | |
19 | end | |
20 | ||
21 | while true do | |
22 | shell.run("refuel") | |
23 | turtle.turnRight() | |
24 | turtle.select(3) | |
25 | detect("fwd") | |
26 | turtle.place() | |
27 | detect("up") | |
28 | turtle.up() | |
29 | turtle.select(2) | |
30 | detect("fwd") | |
31 | turtle.place() | |
32 | p = peripheral.wrap("front") | |
33 | p.setColors(colors[tArgs[1]],colors[tArgs[2]],colors[tArgs[3]]) | |
34 | turtle.down() | |
35 | turtle.turnLeft() | |
36 | detect("fwd") | |
37 | turtle.forward() | |
38 | turtle.digDown() | |
39 | turtle.turnRight() | |
40 | turtle.select(4) | |
41 | detect("fwd") | |
42 | turtle.place() | |
43 | turtle.turnLeft() | |
44 | for i = 1,11 do | |
45 | detect("fwd") | |
46 | turtle.forward() | |
47 | turtle.digDown() | |
48 | end | |
49 | end |