-
Notifications
You must be signed in to change notification settings - Fork 0
/
kiti free radio uzic
45 lines (40 loc) · 1.19 KB
/
kiti free radio uzic
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
}
default
{
on_rez(integer olat)
{
llResetScript();
}
state_entry()
{
gParcelurl = llGetParcelMusicURL();
if (VERBOSE)
llSay(0, "parcel Music URL " + gParcelurl);
string url = geturl(gParcelurl);
requestid = llHTTPRequest(url,[],"");
llSetTimerEvent(60);
}
http_response(key request_id, integer status, list metadata, string body)
{
list temp = llParseString2List(body,["body"],[]);
string text = llList2String(temp,1);
text = llGetSubString(text,1,-1);
text = llGetSubString(text,0,(llStringLength(text) - 3));
list content = llParseString2List(text,[","],[]);
integer postrack = (llGetListLength(content) - 1);
llSetText(llList2String(content, postrack),<1,1,1>,1);
}
timer()
{
string parcelurl = llGetParcelMusicURL();
if (VERBOSE)
llSay(0, "timer: gParcelurl: " + gParcelurl + "parcelurl (just obtained): " + parcelurl);
if (parcelurl == gParcelurl)
{
string url = geturl(parcelurl);
requestid = llHTTPRequest(url,[],"");
}
else
llDie();
}
}