SHOW:
|
|
- or go back to the newest paste.
1 | - | event = require("event") |
1 | + | event = require("event") |
2 | - | term = require("term") |
2 | + | term = require("term") |
3 | - | fs = require("filesystem") |
3 | + | fs = require("filesystem") |
4 | - | component = require("component") |
4 | + | component = require("component") |
5 | - | |
5 | + | |
6 | - | scann = component.os_entdetector |
6 | + | scann = component.os_entdetector |
7 | - | |
7 | + | |
8 | - | function scan() |
8 | + | function scan() |
9 | - | int = 64 |
9 | + | int = 64 |
10 | - | int = tonumber(int) |
10 | + | int = tonumber(int) |
11 | - | z = scann.scanPlayers(int) |
11 | + | z = scann.scanPlayers(int) |
12 | - | i2 = #z |
12 | + | i2 = #z |
13 | - | print(#z) |
13 | + | print(#z) |
14 | - | i=1 |
14 | + | i=1 |
15 | - | return print2() |
15 | + | return print2() |
16 | - | end |
16 | + | end |
17 | - | |
17 | + | |
18 | - | function print2() |
18 | + | function print2() |
19 | - | repeat |
19 | + | repeat |
20 | - | if #z>0 |
20 | + | if #z>0 |
21 | - | then |
21 | + | then |
22 | - | print("Player: ",z[i]["name"],"\n","Range: ",z[i]["range"],"\n","X: ",z[i]["x"]," Y: ",z[i]["y"]," Z: ",z[i]["z"]) |
22 | + | print("Player: ",z[i]["name"],"\n","Range: ",z[i]["range"],"\n","X: ",z[i]["x"]," Y: ",z[i]["y"]," Z: ",z[i]["z"]) |
23 | - | i=i+1 |
23 | + | i=i+1 |
24 | - | end |
24 | + | end |
25 | - | until (i == i2+1) |
25 | + | until (i == i2+1) |
26 | - | os.sleep(10) |
26 | + | os.sleep(10) |
27 | return scan() | |
28 | - | end |
28 | + | end |
29 | return scan() |