Advertisement
cyber_Ahn

tgn_server_api_inworld

Mar 30th, 2015
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string your_key = "24456546352";
  2. key reqid;
  3. key url_request;
  4. string id_http;
  5. send(string key_,string actions,string var)
  6. {
  7.     reqid = llHTTPRequest("http://cyber.caworks-sl.de/API/api.php?key="+key_+"&action="+actions+"&var="+llEscapeURL(var), [], "");
  8. }
  9. send_obj(string key_,string actions,string var,string chan,string obid)
  10. {
  11.     reqid = llHTTPRequest("http://cyber.caworks-sl.de/API/api.php?key="+key_+"&action="+actions+"&var="+llEscapeURL(var)+"&chan="+chan+"&obid="+obid, [], "");
  12. }
  13. integer x;
  14. abfrage()
  15. {
  16.     x++;
  17.     if(x == 1)
  18.     {
  19.         // search avatar key
  20.         send(your_key,"n2k","cyber Ahn");
  21.     }
  22.     if(x == 2)
  23.     {
  24.         //search sim texture
  25.         send(your_key,"simmap","Lychee Island");
  26.     }
  27.     if(x == 3)
  28.     {
  29.         // search gate data example form 5 points
  30.         send(your_key,"gatesearch","5 points");
  31.     }
  32.     if(x == 4)
  33.     {
  34.         // submit message to other object
  35.         send_obj(your_key,"comm","your message","1",id_http);
  36.     }
  37. }
  38. default
  39. {
  40.     state_entry()
  41.     {
  42.         llOpenRemoteDataChannel();
  43.     }
  44.     touch_start(integer total_number)
  45.     {
  46.         x=0;
  47.         abfrage();
  48.     }
  49.     http_response(key id, integer status, list meta, string body)
  50.     {
  51.         if ( id == reqid )
  52.         {
  53.             llSay(0,body);
  54.             abfrage();
  55.         }
  56.     }
  57.     remote_data(integer type, key channel, key message_id, string sender, integer ival, string sval)
  58.     {
  59.         if (type == REMOTE_DATA_CHANNEL)
  60.         {
  61.             id_http = channel;
  62.             llOwnerSay( "http_uuid = "+ id_http);
  63.         }
  64.         if (type == REMOTE_DATA_REQUEST)
  65.         {
  66.             llSay(0,"Message = "+sval+" and Channel = "+(string)ival);
  67.         }
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement