Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.getScript('http://code.responsivevoice.org/responsivevoice.js');
- (function(_fight){
- fight = function(h)
- {
- var sendMessage = false;
- var myTeam = [], oppTeam = [];
- if(isset(h.init) && !g.dead && hero.clan)
- {
- for(i in h.w)
- {
- if(h.w[i].team == 2)
- {
- if(h.w[i].name == hero.nick)
- sendMessage = true;
- myTeam.push(`${h.w[i].name} (${h.w[i].lvl}${h.w[i].prof})`);
- }
- else
- oppTeam.push(`${h.w[i].name} (${h.w[i].lvl}${h.w[i].prof})`);
- if(h.w[i].npc == 1)// || !hero.clan)
- sendMessage = false;
- }
- if(sendMessage)
- {
- var info = `Rozpoczęła się walka na mapie ${map.name} pomiędzy ${oppTeam.join(', ')} a ${myTeam.join(', ')}.`;
- chatSend(`/g ${info}`);
- if(!responsiveVoice.isPlaying())
- {
- responsiveVoice.speak(`UWAGA: ${info}`, 'Google UK English Female');
- }
- }
- }
- _fight.apply(this, arguments);
- };
- })(fight);
Add Comment
Please, Sign In to add comment