Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Ivona = {
- speak: function(msg) {
- var powiedz = new SpeechSynthesisUtterance(msg);
- powiedz.voiceURI = 'Google polski(pl-PL)';
- powiedz.lang = 'pl-PL';
- powiedz.pitch = 1.0;
- powiedz.volume = 1;
- speechSynthesis.speak(powiedz);
- },
- setTitle: function(tresc, delay) {
- document.title = tresc;
- setTimeout(function() {
- if (document.title == tresc) {
- document.title = 'Margonem MMORPG'
- }
- }, delay)
- },
- newOther: newOther,
- newOtherC: function(b) {
- for (var i in b) {
- var other = b[i];
- if (map.pvp != 0 && other.nick != undefined) {
- Ivona.speak(other.nick + " w pobliżu!");
- Ivona.setTitle(other.nick + " w pobliżu!", 5000);
- }
- }
- },
- newNpc: newNpc,
- newNpcC: function (b) {
- for (var i in b) {
- var npc = b[i];
- if (npc.wt > 19 && npc.wt < 30 && hero.clan > 0 && !npc.hasOwnProperty("fake")) {
- Ivona.speak("Zrespiła się E2");
- }
- }
- },
- lootItem: lootItem,
- lootItemC: function(i) {
- if (/legendary/.test(i.stat)) {
- Ivona.speak('Zdobyto przedmiot Legendarny');
- } else if (/heroic/.test(i.stat)) {
- Ivona.speak('Zdobyto przedmiot Heroiczny');
- }
- },
- mAlert: mAlert,
- mAlertC: function(a) {
- if (a.indexOf('Czy chcesz dołączyć do drużyny gracza') != -1) {
- Ivona.speak('Masz zaproszenie do drużyny');
- Ivona.setTitle("Masz zaproszenie do drużyny", 5000);
- }
- }
- };
- newNpc = function (b) {
- Ivona.newNpc(b);
- Ivona.newNpcC(b);
- };
- newOther = function(b) {
- Ivona.newOther(b);
- Ivona.newOtherC(b);
- };
- lootItem = function(i) {
- Ivona.lootItem(i);
- Ivona.lootItemC(i);
- };
- mAlert = function(a, c, d, b) {
- Ivona.mAlert(a, c, d, b);
- Ivona.mAlertC(a);
- };
- var fightAlertFlag = true;
- setInterval(function() {
- if (g.battle) {
- for (var x in g.battle.f) {
- if (g.party) {
- if (g.battle.f[x].name != hero.nick && !g.battle.f[x].npc && Object.keys(g.party).indexOf(x) == -1 && hero.hp > 2 && fightAlertFlag) {
- Ivona.speak('Walka drużynowa');
- fightAlertFlag = false;
- }
- } else {
- if (g.battle.f[x].name != hero.nick && !g.battle.f[x].npc && hero.hp > 2 && fightAlertFlag) {
- Ivona.speak('Masz walkę PvP');
- fightAlertFlag = false;
- }
- }
- }
- } else fightAlertFlag = true;
- }, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement