SHOW:
|
|
- or go back to the newest paste.
| 1 | - | rednet.open("right")
|
| 1 | + | rednet.open("<side>") --Replace side with the side the modem is on, for turtles it is the right
|
| 2 | - | while true do |
| 2 | + | while true do --Loops the following code |
| 3 | - | local a, b, c = rednet.receive() |
| 3 | + | local a, b, c = rednet.receive() |
| 4 | - | local d, e, f = rednet.receive() |
| 4 | + | local d, e, f = rednet.receive() |
| 5 | - | local g, h, i = rednet.receive() |
| 5 | + | local g, h, i = rednet.receive() |
| 6 | - | print(b,e,h) |
| 6 | + | print(b, e, h) |
| 7 | - | if (e == ".") and (h == ".") then |
| 7 | + | if (e == ".") and (h == ".") then --makes a . equal no argument |
| 8 | - | shell.run(b) |
| 8 | + | shell.run(b) |
| 9 | end | |
| 10 | if (e ~= ".") and (h == ".") then | |
| 11 | shell.run(b,e) | |
| 12 | end | |
| 13 | if (e ~= ".") and (h ~= ".") then | |
| 14 | shell.run(b,e,h) | |
| 15 | end | |
| 16 | end |