Advertisement
LxWing

IvonaLegit

Jul 31st, 2018
1,650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Ivona = {
  2.     speak: function(msg) {
  3.         var powiedz = new SpeechSynthesisUtterance(msg);
  4.         powiedz.voiceURI = 'Google polski(pl-PL)';
  5.         powiedz.lang = 'pl-PL';
  6.         powiedz.pitch = 1.0;
  7.         powiedz.volume = 1;
  8.         speechSynthesis.speak(powiedz);
  9.     },
  10.     setTitle: function(tresc, delay) {
  11.         document.title = tresc;
  12.         setTimeout(function() {
  13.             if (document.title == tresc) {
  14.                 document.title = 'Margonem MMORPG'
  15.             }
  16.         }, delay)
  17.     },
  18.     newOther: newOther,
  19.     newOtherC: function(b) {
  20.         for (var i in b) {
  21.             var other = b[i];
  22.             if (map.pvp != 0 && other.nick != undefined) {
  23.                 Ivona.speak(other.nick + " w pobliżu!");
  24.                 Ivona.setTitle(other.nick + " w pobliżu!", 5000);
  25.             }
  26.         }
  27.     },
  28.     newNpc: newNpc,
  29.     newNpcC: function (b) {
  30.         for (var i in b) {
  31.             var npc = b[i];
  32.             if (npc.wt > 19 && npc.wt < 30 && hero.clan > 0 && !npc.hasOwnProperty("fake")) {
  33.                 Ivona.speak("Zrespiła się E2");
  34.             }
  35.         }
  36.     },
  37.     lootItem: lootItem,
  38.     lootItemC: function(i) {
  39.         if (/legendary/.test(i.stat)) {
  40.             Ivona.speak('Zdobyto przedmiot Legendarny');
  41.         } else if (/heroic/.test(i.stat)) {
  42.             Ivona.speak('Zdobyto przedmiot Heroiczny');
  43.         }
  44.     },
  45.     mAlert: mAlert,
  46.     mAlertC: function(a) {
  47.         if (a.indexOf('Czy chcesz dołączyć do drużyny gracza') != -1) {
  48.             Ivona.speak('Masz zaproszenie do drużyny');
  49.             Ivona.setTitle("Masz zaproszenie do drużyny", 5000);
  50.         }
  51.     }
  52. };
  53. newNpc = function (b) {
  54.     Ivona.newNpc(b);
  55.     Ivona.newNpcC(b);
  56. };
  57. newOther = function(b) {
  58.     Ivona.newOther(b);
  59.     Ivona.newOtherC(b);
  60. };
  61. lootItem = function(i) {
  62.     Ivona.lootItem(i);
  63.     Ivona.lootItemC(i);
  64. };
  65. mAlert = function(a, c, d, b) {
  66.     Ivona.mAlert(a, c, d, b);
  67.     Ivona.mAlertC(a);
  68. };
  69.  
  70.       var fightAlertFlag = true;
  71.       setInterval(function() {
  72.         if (g.battle) {
  73.           for (var x in g.battle.f) {
  74.             if (g.party) {
  75.               if (g.battle.f[x].name != hero.nick && !g.battle.f[x].npc && Object.keys(g.party).indexOf(x) == -1 && hero.hp > 2 && fightAlertFlag) {
  76.                 Ivona.speak('Walka drużynowa');
  77.                 fightAlertFlag = false;
  78.               }
  79.             } else {
  80.               if (g.battle.f[x].name != hero.nick && !g.battle.f[x].npc && hero.hp > 2 && fightAlertFlag) {
  81.                 Ivona.speak('Masz walkę PvP');
  82.                 fightAlertFlag = false;
  83.               }
  84.             }
  85.           }
  86.         } else fightAlertFlag = true;
  87.       }, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement