SHOW:
|
|
- or go back to the newest paste.
1 | - | rednet.open("right") |
1 | + | modemSide = "right" |
2 | - | m = peripheral.wrap("left") |
2 | + | nexusComputerID = 7 |
3 | monitorSide = "left" --can be set to nil | |
4 | ||
5 | - | sendID,mess,dist=rednet.receive() |
5 | + | rednet.open(modemSide) |
6 | - | print(mess) |
6 | + | if monitorSide == nil then |
7 | - | if sendID == 7 then |
7 | + | m = term |
8 | - | print("Opening portal #"..mess) |
8 | + | else |
9 | - | local i = tonumber(mess) |
9 | + | m = peripheral.wrap(monitorSide) |
10 | - | turtle.select(i) |
10 | + | end |
11 | - | turtle.drop() |
11 | + | |
12 | - | for i=5,1,-1 do |
12 | + | |
13 | - | m.clear() |
13 | + | sendID,mess,dist=rednet.receive() |
14 | - | m.setCursorPos(1,1) |
14 | + | print(mess) |
15 | - | m.write("Go!") |
15 | + | if sendID == nexusComputerID then |
16 | - | m.setCursorPos(2,2) |
16 | + | print("Opening portal #"..mess) |
17 | - | m.setTextScale(2) |
17 | + | local i = tonumber(mess) |
18 | - | m.write(tostring(i)) |
18 | + | turtle.select(i) |
19 | - | sleep(1) |
19 | + | turtle.drop() |
20 | - | end |
20 | + | for i=5,1,-1 do |
21 | - | m.clear() |
21 | + | m.clear() |
22 | - | turtle.suck() |
22 | + | m.setCursorPos(1,1) |
23 | - | end |
23 | + | m.write("Go!") |
24 | m.setCursorPos(2,2) | |
25 | m.setTextScale(2) | |
26 | m.write(tostring(i)) | |
27 | sleep(1) | |
28 | end | |
29 | m.clear() | |
30 | turtle.suck() | |
31 | end | |
32 | end |