iradap

dzwiek pvp i wiadomosc na klan

Dec 13th, 2018
4,315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. $.getScript('http://code.responsivevoice.org/responsivevoice.js');
  2.  
  3. (function(_fight){
  4.     fight = function(h)
  5.     {
  6.         var sendMessage = false;
  7.         var myTeam = [], oppTeam = [];
  8.  
  9.         if(isset(h.init) && !g.dead && hero.clan)
  10.         {
  11.             for(i in h.w)
  12.             {
  13.                 if(h.w[i].team == 2)
  14.                 {
  15.                     if(h.w[i].name == hero.nick)
  16.                         sendMessage = true;
  17.  
  18.                     myTeam.push(`${h.w[i].name} (${h.w[i].lvl}${h.w[i].prof})`);
  19.                 }
  20.                 else
  21.                     oppTeam.push(`${h.w[i].name} (${h.w[i].lvl}${h.w[i].prof})`);
  22.  
  23.                 if(h.w[i].npc == 1)// || !hero.clan)
  24.                     sendMessage = false;
  25.             }
  26.  
  27.             if(sendMessage)
  28.             {
  29.                var info = `Rozpoczęła się walka na mapie ${map.name} pomiędzy ${oppTeam.join(', ')} a ${myTeam.join(', ')}.`;
  30.                chatSend(`/g ${info}`);
  31.  
  32.                 if(!responsiveVoice.isPlaying())
  33.                 {
  34.                     responsiveVoice.speak(`UWAGA: ${info}`, 'Google UK English Female');
  35.                 }
  36.             }
  37.         }
  38.  
  39.         _fight.apply(this, arguments);
  40.     };
  41. })(fight);
Add Comment
Please, Sign In to add comment