Advertisement
cyber_Ahn

name2key_SL_inworld

Mar 30th, 2015
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string NAME;integer wert_send;
  2. integer wert_input;
  3. key gChannel;
  4. string data_send;
  5. string data_input;
  6. string data_out;
  7. send()
  8. {
  9.     data_send = NAME;
  10.     wert_send = 1;
  11.     data_out = "nval=" + data_send + "&ival="+ (string)wert_send+ "&cval="+(string)gChannel;
  12.     llHTTPRequest("http://cyber.caworks-sl.de/name2key/n2k.php",[HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],data_out);
  13.  
  14. }
  15. default
  16. {
  17.     state_entry()
  18.     {
  19.         llListen(101, "", "", "");
  20.         llOpenRemoteDataChannel();
  21.     }
  22.     link_message(integer sender, integer num, string msg, key id)
  23.     {
  24.         if(num == 101)
  25.         {
  26.             NAME = msg;
  27.             send();
  28.         }
  29.     }
  30.     listen(integer c, string n, key id, string message)
  31.     {
  32.         NAME = message;
  33.         send();
  34.     }
  35.     remote_data(integer type, key channel, key message_id, string sender, integer ival, string sval)
  36.     {
  37.         if (type == REMOTE_DATA_CHANNEL)
  38.         {
  39.             gChannel = channel;
  40.         }
  41.         if (type == REMOTE_DATA_REQUEST)
  42.         {
  43.             wert_input = ival;
  44.             data_input = sval;
  45.             if(wert_input == 2)
  46.             {
  47.                 llSay(0,NAME+": "+data_input);
  48.             }
  49.         }
  50.     }
  51.     on_rez (integer parms)
  52.     {
  53.         llResetScript();
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement