SHOW:
|
|
- or go back to the newest paste.
1 | - | rednet.open("right") |
1 | + | c=peripheral.wrap("right") |
2 | while true do | |
3 | - | x,y,z=rednet.receive() |
3 | + | e,player,y = os.pullEvent("chat") |
4 | print(player..y) | |
5 | if player=="ecco7777" then | |
6 | if y=="Forward" then | |
7 | turtle.forward() | |
8 | end | |
9 | ||
10 | if y=="Back" then | |
11 | turtle.back() | |
12 | end | |
13 | ||
14 | if y=="Left" then | |
15 | turtle.turnLeft() | |
16 | end | |
17 | ||
18 | if y=="Right" then | |
19 | turtle.turnRight() | |
20 | end | |
21 | ||
22 | if y=="Up" then | |
23 | turtle.up() | |
24 | end | |
25 | ||
26 | if y=="Down" then | |
27 | turtle.down() | |
28 | end | |
29 | ||
30 | if y=="Dig" then | |
31 | turtle.dig() | |
32 | end | |
33 | ||
34 | if y=="Place" then | |
35 | turtle.place() | |
36 | end | |
37 | ||
38 | if y=="Shutdown" then | |
39 | if peripheral.getType("front")=="computer" or peripheral.getType("front")=="turtle" then | |
40 | c=peripheral.wrap("front") | |
41 | c.shutdown() | |
42 | end | |
43 | end | |
44 | ||
45 | if y=="Slot1" then | |
46 | turtle.select(1) | |
47 | end | |
48 | if y=="Slot2" then | |
49 | turtle.select(2) | |
50 | end | |
51 | if y=="Slot3" then | |
52 | turtle.select(3) | |
53 | end | |
54 | if y=="Slot4" then | |
55 | turtle.select(4) | |
56 | end | |
57 | if y=="Slot5" then | |
58 | turtle.select(5) | |
59 | end | |
60 | if y=="Slot6" then | |
61 | turtle.select(6) | |
62 | end | |
63 | if y=="Slot7" then | |
64 | turtle.select(7) | |
65 | end | |
66 | if y=="Slot8" then | |
67 | turtle.select(8) | |
68 | end | |
69 | if y=="Slot9" then | |
70 | turtle.select(9) | |
71 | end | |
72 | ||
73 | if y=="Redstone" then | |
74 | rs.setOutput("front",true) | |
75 | sleep(0.5) | |
76 | rs.setOutput("front",false) | |
77 | end | |
78 | ||
79 | - | end |
79 | + | |
80 | end | |
81 | end |