-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path[SC] online board.lsl
71 lines (62 loc) · 1.31 KB
/
[SC] online board.lsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
string online="36edbd51-d701-0887-1a2c-52cc45dc5ad2";
string offline="ec0c465f-6ccb-dec1-809b-ef0c3d122a11";
key user_key;
key blank = TEXTURE_BLANK;
string name;
string status;
intheger face =3;
default
{
state_entry()
{
llSetText("loading....", <1,0,0>, 1.0);
user_key =llGetOwner();
llRequestAgentData( user_key, DATA_NAME);
}
on_rez(integer start_param)
{
llResetScript();
}
changed(integer change)
{
if (change & CHANGED_OWNER)
{
llResetScript();
}
}
dataserver(key queryid, string data)
{
name = data;
state show;
}
}
state show
{
state_entry()
{
llSetText("", <1,0,0>, 1.0);
llSetTimerEvent(10);
}
timer()
{
llRequestAgentData( user_key, DATA_ONLINE);
}
on_rez(integer start_param)
{
llSetText("", <1,0,0>, 1.0);
llSetTexture(blank, ALL_SIDES);
}
dataserver(key queryid, string data)
{
if ( data == "1" )
{
status = " is online";
llSetTexture(online, face);
}
else if (data == "0")
{
status = " is offline";
llSetTexture(offline, face);
}
}
}