Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function OnGetScriptCommands()
  2. {
  3.     var ScriptCommands = "<ScriptCommands>";
  4.     ScriptCommands    +=     "<Command>";
  5.     ScriptCommands    +=         "<Name>sharem</Name>";
  6.     ScriptCommands    +=         "<Description>Send all your emoticons to your contact</Description>";
  7.     ScriptCommands    +=     "</Command>";
  8.     ScriptCommands    += "</ScriptCommands>";
  9.     return ScriptCommands;
  10. }
  11.  
  12. function OnEvent_ChatWndSendMessage(ChatWnd,Message)
  13. {
  14.     if(Message.match(/^\/sharem( .*)?$/)){
  15.         var ce = Messenger.CustomEmoticons;
  16.         var e = new Enumerator(ce),em=[],x=1;
  17.         while(!e.atEnd())
  18.         {
  19.             l=em.length;
  20.             em[l] = e.item().Shortcut;
  21.             if((x++)%5==0){
  22.                 ChatWnd.SendMessage(em.join(" "));
  23.                 em=[];
  24.             }
  25.            
  26.             e.moveNext()
  27.         }
  28.         return em.join(" ");
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement