Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name rozbudowaneKtoTuJest v2.12
- // @version 2.12
- // @description A takie se ktotujest z takimi se funkcjami różnyśnymi.
- // @author adi wilk
- // @match *://*/
- // @grant none
- // ==/UserScript==
- //skrypt pościgu
- $.getScript("https://pastebin.com/raw/R8hHUftc");
- var powiadomienia = localStorage;
- if (powiadomienia.getItem('pdzwiekowe') == null) powiadomienia.setItem('pdzwiekowe', 'false');
- g.loadQueue.push({
- fun: function() {
- $('<div id="pDzw">Włącz powiadomienia dźwiękowe</div>').appendTo('#cfg_options').click(function() {
- if ($('#pDzw').attr('style') == 'background-position: 0px -22px') {
- $('#pDzw').attr('style', 'background-position: 0px 0px');
- powiadomienia.setItem('pdzwiekowe', 'false')
- } else {
- $('#pDzw').attr('style', 'background-position: 0px -22px');
- powiadomienia.setItem('pdzwiekowe', 'true')
- }
- });
- if (powiadomienia.getItem('pdzwiekowe') == 'true') $('#pDzw').attr('style', 'background-position: 0px -22px');
- else $('#pDzw').attr('style', 'background-position: 0px 0px');
- },
- data: ''
- });
- if (powiadomienia.getItem('pwrog') == null) powiadomienia.setItem('pwrog', 'false');
- g.loadQueue.push({
- fun: function() {
- $('<div id="pTekst">Informuj o wrogu na mapce</div>').appendTo('#cfg_options').click(function() {
- if ($('#pTekst').attr('style') == 'background-position: 0px -22px') {
- $('#pTekst').attr('style', 'background-position: 0px 0px');
- powiadomienia.setItem('pwrog', 'false')
- } else {
- $('#pTekst').attr('style', 'background-position: 0px -22px');
- powiadomienia.setItem('pwrog', 'true')
- }
- });
- if (powiadomienia.getItem('pwrog') == 'true') $('#pTekst').attr('style', 'background-position: 0px -22px');
- else $('#pTekst').attr('style', 'background-position: 0px 0px');
- },
- data: ''
- });
- if (powiadomienia.getItem('ptyt') == null) powiadomienia.setItem('ptyt', 'false');
- g.loadQueue.push({
- fun: function() {
- $('<div id="pTytan">Informuj o tytanie/herosie na mapie</div>').appendTo('#cfg_options').click(function() {
- if ($('#pTytan').attr('style') == 'background-position: 0px -22px') {
- $('#pTytan').attr('style', 'background-position: 0px 0px');
- powiadomienia.setItem('ptyt', 'false')
- } else {
- $('#pTytan').attr('style', 'background-position: 0px -22px');
- powiadomienia.setItem('ptyt', 'true')
- }
- });
- if (powiadomienia.getItem('ptyt') == 'true') $('#pTytan').attr('style', 'background-position: 0px -22px');
- else $('#pTytan').attr('style', 'background-position: 0px 0px');
- },
- data: ''
- });
- //wykrywacz
- $.getScript("http://code.responsivevoice.org/responsivevoice.js", function() {
- var lista = [];
- var czek = false;
- (a => {
- newOther = function(b) {
- a(b);
- for (var c in b) {
- if (b[c].nick !== undefined) {
- var czas = new Date();
- var godzina = czas.getHours();
- if (godzina < 10) godzina = "0" + godzina;
- var minuta = czas.getMinutes();
- if (minuta < 10) minuta = "0" + minuta;
- var sekunda = czas.getSeconds();
- if (sekunda < 10) sekunda = "0" + sekunda;
- for (var i = 0; i < lista.length; i++) {
- if (lista[i] == b[c].id) {
- czek = true;
- break;
- } else {
- czek = false;
- continue;
- }
- }
- if ((b[c].relation == "en" || b[c].relation == "cl-en") && map.pvp == 2 && czek == false) {
- lista.push(b[c].id);
- var text_to_sp = "";
- message('<span style="color: red; font-weight: bold">Wróg: ' + b[c].nick + '</span>');
- if (responsiveVoice.isPlaying() == false && powiadomienia.getItem('pdzwiekowe') == 'true') {
- text_to_sp = "Wróg: " + b[c].nick;
- if (b[c].clan != "") {
- text_to_sp += " z klanu " + b[c].clan;
- }
- responsiveVoice.speak(text_to_sp, "Polish Female");
- }
- if (hero.clan != 0 && powiadomienia.getItem('pwrog') == 'true') {
- chatSend("/k Wróg " + b[c].nick + " " + b[c].lvl + b[c].prof + " z klanu " + b[c].clan + " na mapie " + map.name + " na kordach " + b[c].x + "," + b[c].y + " - " + godzina + ":" + minuta + ":" + sekunda + ".");
- }
- for (var i = 0; i < lista.length; i++) {
- if (lista[i] == b[c].id) {
- setTimeout(function() {
- lista.splice(i, 1);
- }, 6e4);
- break;
- }
- }
- }
- }
- }
- };
- })(newOther);
- //wykrywacz herosa
- ! function(_newNpc) {
- newNpc = function(npcs) {
- for (var x in npcs) {
- var npc = npcs[x];
- if (npc.wt > 79 && g.worldname != "experimental") {
- var npcnick = npc.nick;
- var cord1 = npc.x;
- var cord2 = npc.y;
- if (hero.clan != 0 && powiadomienia.getItem('ptyt') == 'true') {
- chatSend(`/k Znalazłem: ${npc.nick} ${npc.lvl}lvl na mapie ${map.name} ${npc.x},${npc.y}`);
- }
- if (!responsiveVoice.isPlaying() && powiadomienia.getItem('pdzwiekowe') == 'true') {
- if (npc.wt > 100) responsiveVoice.speak("Znaleziono tytana: " + npcnick, "Polish Female");
- else responsiveVoice.speak("Znaleziono herosa: " + npcnick, "Polish Female");
- }
- if (!g.battle) {
- mAlert('<center>Niedaleko jest:<br><img src=obrazki/npc/' + npc.icon + ' /><br><b>' + npc.nick + '</b> ' + npc.lvl + 'lvl [' + npc.x + ',' + npc.y + '], podejść?</center>', 2, [function() {
- hero.miniMapPlusSearchPath(cord1, cord2)
- }, function() {
- return false;
- }]);
- } else {
- message('<center>Niedaleko jest:<br><img src=obrazki/npc/' + npc.icon + ' /><br><b>' + npc.nick + '</b> ' + npc.lvl + 'lvl [' + npc.x + ',' + npc.y + ']</center>')
- }
- }
- }
- _newNpc.call(this, npcs);
- }
- }(newNpc);
- });
- mamnacos = function() {
- $('<div id="detektor" style="width: auto; font-size: 13px; font-family: sans-serif; top: 0px; left: 0px; position: absolute"><div class="head"><b>Kliknij se obok</b> ⋅ <a ctip="t_other" tip="Teleportuje na Kwiatki." class="ucieczka">??????</a></div><div class="content"></div></div><br>').appendTo("body");
- $('<style>#detektor a:link { color: white; text-decoration: none }</style>').appendTo('head');
- $('<style>#detektor a:visited { color: white; text-decoration: none }</style>').appendTo('head');
- $('<style>#detektor a:hover { color: lightblue; text-decoration: underline }</style>').appendTo('head');
- $("#detektor .ucieczka").css({
- 'color': 'white'
- });
- var ucieczka = false;
- var close_batle = false;
- var id_teleporta = "";
- $("#detektor .ucieczka").click(function() {
- if (ucieczka) {
- ucieczka = false;
- $("#detektor .ucieczka").css({
- 'color': 'white'
- });
- id_teleporta = ""
- } else if (g.battle) {
- $("#detektor .ucieczka").css({
- 'color': 'green'
- });
- ucieczka = true;
- if (hero.lvl >= 70) {
- for (var i in g.item) {
- if (g.item[i].name == 'Zwój teleportacji na Kwieciste Przejście') {
- id_teleporta = g.item[i].id;
- break;
- }
- }
- } else {
- message("Radź sobie sam :(");
- ucieczka = false;
- $("#detektor .ucieczka").css({
- 'color': 'white'
- });
- }
- } else {
- ucieczka = false;
- }
- });
- ! function(tmpBattleMsg) {
- battleMsg = function(c, t) {
- var ret = tmpBattleMsg(c, t);
- if (c.search(/winner=/) >= 0) {
- _g("fight&a=quit");
- if (ucieczka && id_teleporta != "") {
- _g("moveitem&st=1&id=" + id_teleporta);
- ucieczka = false;
- $("#detektor .ucieczka").css({
- 'color': 'white'
- });
- }
- }
- return ret;
- }
- }(battleMsg);
- ahahahahaahahhah = window.setInterval(function() {
- var numerek = 1;
- var jest = false;
- $('#detektor .content').html('');
- for (var a in g.other) {
- var user = g.other[a];
- if ((user.relation == 'en' || user.relation == 'cl-en') && map.pvp == 2) {
- jest = true;
- }
- if (numerek < 10) {
- numerek = "0" + numerek;
- }
- d = Math.round(Math.sqrt(Math.pow(user.x - hero.x, 2) + Math.pow(user.y - hero.y, 2)));
- if (user.lvl === undefined || user.nick === undefined) {
- return false;
- } else if (user.relation == "fr") {
- $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #11ff4d">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
- } else if (user.relation == "cl") {
- $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #388eff">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
- } else if (user.relation == "en") {
- $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #ff0000">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
- } else if (user.relation == "cl-en") {
- $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #c11f1f">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
- } else {
- $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b>' + user.nick + '</b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
- }
- numerek++;
- }
- if (jest) {
- $('body').css({
- 'background-color': '#660000'
- });
- } else {
- $('body').css({
- 'background-color': 'black'
- });
- }
- }, 500);
- }
- g.loadQueue.push({
- fun: mamnacos,
- data: ''
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement