Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string url;
- key av;
- key obj;
- string http_request_id ;
- getURL() {
- url = osGetGridLoginURI();
- list tmp = llParseString2List(url, ":", "");
- url = llList2String(tmp,0) + llList2String(tmp, 1);
- }
- adjust(string data) {
- http_request_id = llHTTPRequest(url + data, [HTTP_METHOD, "GET", HTTP_MIMETYPE, "text/plain;charset=utf-8"], "");
- }
- default
- {
- on_rez(integer p) { llResetScript(); }
- state_entry() {
- obj = llGetKey();
- }
- touch_start(integer p) {
- av = llDetectedKey(0);
- //exercise,health,hunger,hydration,hygene,NAME or ITEM ID
- adjust(llList2String(llGetObjectDetails(obj,[OBJECT_DESC]),0));
- }
- http_response(key request_id, integer status, list metadata, string body)
- {
- if (request_id == http_request_id && status == 200)
- {
- llInstantMessage(av, body);
- }
- }
- changed(integer p) { if (p & CHANGED_OWNER) llResetScript(); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement