Advertisement
cyber_Ahn

text2voice_plugin_mod

Mar 30th, 2015
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string  SYSTEM_language ="en";
  2. string boot_msg = " System Started";
  3. integer chan = -26431;
  4. default
  5. {
  6.     state_entry()
  7.     {
  8.         llSetPrimMediaParams(1,[PRIM_MEDIA_CONTROLS,PRIM_MEDIA_CONTROLS_STANDARD,PRIM_MEDIA_HOME_URL,"http://translate.google.com/translate_tts?tl=en&q=greetings",PRIM_MEDIA_CURRENT_URL,"http://translate.google.com/translate_tts?tl=en&q=greetings",PRIM_MEDIA_AUTO_PLAY,TRUE]);
  9.         llListen(chan,"","","");
  10.         llSleep(3);
  11.         llSetPrimMediaParams(1,[PRIM_MEDIA_CONTROLS,PRIM_MEDIA_CONTROLS_STANDARD,PRIM_MEDIA_CURRENT_URL,"http://translate.google.com/translate_tts?ie=UTF-8&tl="+SYSTEM_language+"&q="+llEscapeURL((boot_msg+"Listen on chanel "+(string)chan)),PRIM_MEDIA_AUTO_PLAY,TRUE]);
  12.     }
  13.     on_rez(integer param)
  14.     {
  15.         llResetScript();
  16.     }
  17.     changed(integer what)
  18.     {
  19.         if (what & CHANGED_OWNER)
  20.         {
  21.             llResetScript();
  22.         }
  23.         if (what & CHANGED_INVENTORY)
  24.         {
  25.             llResetScript();
  26.         }
  27.     }
  28.     attach(key attached)
  29.     {
  30.         if (attached != NULL_KEY)
  31.         {
  32.             llResetScript();
  33.         }
  34.     }
  35.     listen(integer chanel, string name, key id, string message)
  36.     {
  37.         if(chanel == chan&&llGetOwnerKey(id)==llGetOwner())
  38.         {
  39.             list data = llParseString2List(message,["|"],["|"]);
  40.             llSetPrimMediaParams(1,[PRIM_MEDIA_CONTROLS,PRIM_MEDIA_CONTROLS_STANDARD,PRIM_MEDIA_CURRENT_URL,"http://translate.google.com/translate_tts?ie=UTF-8&tl="+llList2String(data,0)+"&q="+llEscapeURL(llList2String(data,1)),PRIM_MEDIA_AUTO_PLAY,TRUE]);
  41.         }
  42.     }
  43.     link_message(integer sender, integer num, string msg, key id)
  44.     {
  45.         if(num == chan)
  46.         {
  47.             list data = llParseString2List(msg,["|"],["|"]);
  48.             llSetPrimMediaParams(1,[PRIM_MEDIA_CONTROLS,PRIM_MEDIA_CONTROLS_STANDARD,PRIM_MEDIA_CURRENT_URL,"http://translate.google.com/translate_tts?ie=UTF-8&tl="+llList2String(data,0)+"&q="+llEscapeURL(llList2String(data,1)),PRIM_MEDIA_AUTO_PLAY,TRUE]);
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement