Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ### Zegarek ###
- //Zegar
- var walnaleb;
- g.loadQueue.push({
- fun: function () {
- var d = new Date(); d.setTime(d.getTime() + 3600000 * 24 * 30);
- if (getCookie('panelik') == null) setCookie('panelik', '0px|0px', d);
- var settings = getCookie('panelik').split('|');
- //<div id="zegar"></div>
- $('<div id="megaPanel"><div style="width:33%;float:left; height:100%; border:1px solid white;" id="leftPanel"><div class="ktotujest" style="margin-bottom:3px;" id="ktotujest" ctip="t_npc" tip="KtoTuJest"><b tip="KtoTuJest" ctip="t_npc" onclick=\'$("#ktotujest_config").toggle();\'>KtoTuJest <span style="font-size:12px;color:white" id="allx">[a]</span> <span style="font-size:10px;color:green">[opcje]</span></b></div> <div style="font-size:11px;text-align:left;margin-left:10px;word-wrap: break-word; display: flex;line-height:0.8em;flex-flow: column wrap;column-count: 3;columns: 351px 2;-webkit-columns: 351px 2;height:150px;width:351px;column-gap: 15px; "id="ktotujest_lista"> </div></div> <div id="centerPanel" style="width:33%;float:left; font-size:11.5px; height:100%; border:1px solid white;"> <div style="font-size:16px; margin-top:5px"id="zegar"></div><br></div><div id="rightPanel" style="width:33%;float:left; height:100%; border:1px solid white;"><div class="ktotubyl" style="margin-bottom:3px;" id="ktotubyl" ctip="t_npc" tip="KtoTuByl"><b tip="KtoTuByl" ctip="t_npc" >KtoTuByl </b> <button id="ktotubyl_clean" style="font-size:10px;">wyczyść</button></div> <div style="font-size:11px;text-align:left;margin-left:10px;column-count: 3; overflow: hidden;display: flex;line-height:0.8em;flex-flow: column wrap;height:150px;width:351px;overflow:hidden;column-gap: 15px; "id="ktotubyl_lista"> </div></div></div>').css({ position: 'absolute', top: '' + settings[0] + '', left: '' + settings[1] + '', zIndex: 499, width: '1065px', height: '170px', margin: 'auto auto', backgroundColor: '#191919', backgroundRepeat: 'no-repeat', color: 'white', textAlign: 'center' }).draggable().appendTo('body');
- $('#megaPanel').bind("dragstop", function () {
- setCookie('panelik', $('#megaPanel').css('top') + '|' + $('#megaPanel').css('left'), d);
- });
- // $('<div ></div>').attr({ 'id':'noobynaleb', 'tip':'Auto atakowanie wrogów'}).css({ 'width': '50px','color':'red', 'background':'black'}).appendTo('#centerPanel')
- $("<button id='noobynaleb' tip='Auto atakowanie wrogów' style='margin-right:15px' ></button>").appendTo('#centerPanel')
- // ### klik ###
- function elo() { _g('chat&c=' + esc("/k Blokować zapy do grp, za trzymanie D podczas lotnięcia legi bonus 50% legendy, tylko D w GRP może atakować Goplanę.")); } $("<button id='elo'>klik</button>").appendTo('#centerPanel'); $("#elo").click(elo);
- $('<br>').appendTo('#centerPanel')
- document.getElementById('ktotubyl_clean').addEventListener("click", function () {
- content = [];
- ktotubyl_string = "";
- for (var a in g.other) {
- g.other[a].ontubyl = 0;
- }
- });
- document.getElementById('noobynaleb').addEventListener("click", function () {
- if (this.innerHTML == "off") {
- this.innerHTML = 'on'; message('Atakowanie wrogów włączone');
- this.style.color = 'green';
- setCookie('nooby-na-leb', 'true', d);
- } else {
- setCookie('nooby-na-leb', 'false', d);
- this.innerHTML = 'off'; message('Atakowanie wrogów wyłączone');
- this.style.color = 'red';
- }
- })
- if (getCookie('nooby-na-leb') == null) setCookie('nooby-na-leb', 'false', d);
- walnaleb = getCookie('nooby-na-leb');
- if (walnaleb == 'true') {
- document.getElementById('noobynaleb').innerHTML = 'on';
- document.getElementById('noobynaleb').style.color = 'green';
- } else {
- document.getElementById('noobynaleb').innerHTML = 'off';
- document.getElementById('noobynaleb').style.color = 'red';
- }
- $('<div/>')
- .append($('<span tip="automatyczne zamykanie walki">AFC</span>'))
- .append($('<input type="checkbox" tip="zamykanie on/off"/>')
- .attr('checked', isAFCrunning[0])
- .change(function () {
- isAFCrunning[0] = $(this).attr('checked');
- var data = new Date(); data.setTime(data.getTime() + 3600000 * 24 * 31);
- setCookie("isAFCrunning", isAFCrunning.join("|"), data);
- }))
- .appendTo('#centerPanel')
- setInterval(function () {
- $("#zegar").html(ut_time(unix_time()) + '<br> ' + ut_date(unix_time()));
- }, 1000);
- }, data: ''
- });
- // ### KtoTuJest ###
- /* KtoTuJest v2.6 by absflg */
- function ReadCookie(cookieName) {
- var theCookie = "" + document.cookie;
- var ind = theCookie.indexOf(cookieName);
- if (ind == -1 || cookieName == "") return "";
- var ind1 = theCookie.indexOf(';', ind);
- if (ind1 == -1) ind1 = theCookie.length;
- return unescape(theCookie.substring(ind + cookieName.length + 1, ind1));
- }
- function ktotujest_var() {
- this.left = 0;
- this.top = -1;
- this.clan = new Array();
- for (i = 1; i <= 4; i++) this.clan[i] = {
- nazwa: '',
- kolor: ''
- };
- this.fr = '#06ff00';
- this.en = '#FF0066';
- this.cl = '#00baff';
- this.op = 'red';
- tab = ReadCookie("ktotujest").split("|");
- if (isset(tab[2])) {
- this.left = parseInt(tab[0]);
- this.top = parseInt(tab[1]);
- if (isset(tab[10])) {
- for (i = 2, j = 1; i <= 9; i += 2, j++) this.clan[j] = {
- nazwa: tab[i],
- kolor: tab[i + 1]
- };
- }
- }
- if (isset(tab[13])) {
- this.fr = tab[10];
- this.en = tab[11];
- this.cl = tab[12];
- this.op = tab[13];
- }
- }
- ktotujest = new ktotujest_var();
- function ktotujest_saveCookie() {
- if ($('#ktotujest_config_x').val() == "") { } else {
- ktotujest.left = parseInt($('#ktotujest_config_x').val());
- }
- if ($('#ktotujest_config_y').val() == "") { } else {
- ktotujest.top = parseInt($('#ktotujest_config_y').val());
- }
- if ($('#ktotujest_config_fr').val() == "") { } else {
- ktotujest.fr = ($('#ktotujest_config_fr').val());
- }
- if ($('#ktotujest_config_en').val() == "") { } else {
- ktotujest.en = ($('#ktotujest_config_en').val());
- }
- if ($('#ktotujest_config_cl').val() == "") { } else {
- ktotujest.cl = ($('#ktotujest_config_cl').val());
- }
- if ($('#ktotujest_config_op').val() == "") { } else {
- ktotujest.op = ($('#ktotujest_config_op').val());
- }
- for (i = 1; i <= 4; i++) {
- ktotujest.clan[i].nazwa = $('#ktotujest_config_nazwa' + i).val();
- ktotujest.clan[i].kolor = $('#ktotujest_config_kolor' + i).val();
- }
- expiry = new Date(parseInt(new Date().getTime()) * 2);
- tab = '';
- tab += ktotujest.left + "|";
- tab += ktotujest.top + "|";
- for (i = 1; i <= 4; i++) {
- tab += escape(ktotujest.clan[i].nazwa) + "|";
- tab += escape(ktotujest.clan[i].kolor) + "|";
- }
- tab += escape(ktotujest.fr) + "|";
- tab += escape(ktotujest.en) + "|";
- tab += escape(ktotujest.cl) + "|";
- tab += escape(ktotujest.op) + "|";
- document.cookie = "ktotujest=" + tab + ";expires=" + expiry + ";";
- $(".ktotujest").animate({
- left: ktotujest.left,
- top: ktotujest.top
- }, 300);
- refresh_ktotujest();
- }
- perkun_side = function (l) {
- if (l.prof == 'w' || l.prof == 'p' || l.prof == 'h') return 1;
- return 2;
- };
- function refresh_ktotujest() {
- var ktotujest_string = ""; var onl = { frx: 0, klx: 0, nex: 0, enx: 0, allx: 0 };
- for (var a in g.other) {
- var b = ''; if (g.other[a].lvl <= hero.lvl + 10 && g.other[a].lvl >= hero.lvl - 2) b = ';color: yellow;"';
- ktotujest_string += "<span style=\"white-space: nowrap\" ";
- var clan = 0;
- for (i = 1; i <= 4; i++)
- for (var j in ktotujest.clan[i].nazwa.split(";"))
- if (g.other[a].clan == ktotujest.clan[i].nazwa.split(";")[j])
- if (g.other[a].clan) {
- ktotujest_string += "class='ktotujest_style" + i + "' ";
- clan = 1;
- }
- var prefix = '';
- var long_prefix = '';
- switch (g.other[a].relation) {
- case 'cl':
- if (!clan) ktotujest_string += "class='ktotujest_style_cl' ";
- prefix = '[K] ';
- long_prefix = '[Klanowicz] '; onl.klx++;
- break;
- case 'fr':
- if (!clan) ktotujest_string += "class='ktotujest_style_fr' ";
- prefix = '[P] ';
- long_prefix = '[Przyjaciel] '; onl.frx++;
- break;
- case 'en':
- if (!clan) ktotujest_string += "class='ktotujest_style_en' ";
- prefix = '[W] ';
- long_prefix = '[Wróg] '; onl.enx++;
- break;
- default: onl.nex++;
- }; onl.allx++; $('#allx').text('[' + onl.allx + ']');
- nick = g.other[a].nick;
- if (nick.length + prefix.length > 15) {
- nick = nick.substring(0, 13 - prefix.length) + "…";
- }
- if (onl.allx < 28) {
- ktotujest_string += "tip='" + long_prefix + g.other[a].nick + "' onclick='chatTo(\"" + g.other[a].nick + "\")'>" + prefix + nick + " (<b>" + g.other[a].lvl + g.other[a].prof + "</b>)</span><br />";
- }
- }
- $('#ktotujest_lista').html(ktotujest_string);
- for (i = 1; i <= 4; i++) $('.ktotujest_style' + i).css({
- color: ktotujest.clan[i].kolor
- });
- $('.ktotujest_style_cl').css({
- color: ktotujest.cl
- });
- $('.ktotujest_style_fr').css({
- color: ktotujest.fr
- });
- $('.ktotujest_style_en').css({
- color: ktotujest.en
- });
- $('.ktotujest_style_op').css({
- color: ktotujest.op
- });
- }
- $('<div id="ktotujest_config"><b tip="KtoTuJest " ctip="t_npc">KtoTuJest - Konfiguracja</b></div>').css({
- position: "absolute",
- left: 300,
- top: 15,
- border: "1px grey solid",
- color: "white",
- "background": 'black',
- "font-size": "12px",
- zIndex: 500
- }).appendTo("body").draggable().bind("mousedown", function (d) {
- d.stopPropagation()
- });
- $('#ktotujest_config').html('<center>KtoTuJest - Konfiguracja</center><br><br>');
- $('<b> Wróg: </b><input type="text" size=2 id="ktotujest_config_en" value="' + ktotujest.en + '" /><br>').appendTo('#ktotujest_config');
- $('<b> Przyjaciel: </b><input type="text" size=2 id="ktotujest_config_fr" value="' + ktotujest.fr + '" /><br>').appendTo('#ktotujest_config');
- $('<b> Klanowicz: </b><input type="text" size=2 id="ktotujest_config_cl" value="' + ktotujest.cl + '" /><br>').appendTo('#ktotujest_config');
- $('<b> <br><br><b>Ustawienia koloru klanów</b><br>Aby przypisać pod kolor kilka klanów - rozdziel <br>ich nazwy średnikiem (;) BEZ dodatkowych spacji.<br>').appendTo('#ktotujest_config');
- for (i = 1; i <= 4; i++) {
- $('<input type="text" tip="Nazwa klanu" size=35 id="ktotujest_config_nazwa' + i + '" value="' + ktotujest.clan[i].nazwa + '" /><br>Kolor: ').appendTo('#ktotujest_config');
- $('<b class="ktotujest_style' + i + '">Kolor:</b><input type="text" size=19 id="ktotujest_config_kolor' + i + '" value="' + ktotujest.clan[i].kolor + '" /><br>').appendTo('#ktotujest_config');
- }
- $('<br><input type="button" id="ktotujest_config_b" value="Zapisz" tip="Zapisz" />').appendTo('#ktotujest_config').click(function () {
- ktotujest_saveCookie();
- });
- $('<input type="button" id="ktotujest_config_close" value="Wyjdź" tip="Wyjdź" />').appendTo('#ktotujest_config').click(function () {
- $('#ktotujest_config').toggle();
- });
- ktj_interval = window.setInterval(function () {
- refresh_ktotubyl();
- refresh_ktotujest();
- }, 900);
- $('#ktotujest_config').toggle();
- for (i = 1; i <= 4; i++) $('.ktotujest_style' + i).css({
- color: ktotujest.clan[i].kolor
- });
- function ktotubyl_var() {
- this.left = 0;
- this.top = -1;
- this.clan = new Array();
- for (i = 1; i <= 4; i++) this.clan[i] = {
- nazwa: '',
- kolor: ''
- };
- this.fr = '#06ff00';
- this.en = '#FF0066';
- this.cl = '#00baff';
- this.op = 'red';
- }
- ktotubyl = new ktotubyl_var();
- var content = [];
- var ktotubyl_string = "";
- function refresh_ktotubyl() {
- var onl = { frx: 0, klx: 0, nex: 0, enx: 0, allx: 0 };
- for (var a in g.other) {
- var b = ''; if (g.other[a].lvl <= hero.lvl + 10 && g.other[a].lvl >= hero.lvl - 2) b = ';color: yellow;"';/*by Gothdo*/
- ktotubyl_string += "<span style=\"white-space: nowrap\" ";
- var clan = 0;
- for (i = 1; i <= 4; i++)
- for (var j in ktotujest.clan[i].nazwa.split(";"))
- if (g.other[a].clan == ktotujest.clan[i].nazwa.split(";")[j])
- if (g.other[a].clan) {
- ktotubyl_string += "class='ktotujest_style" + i + "' ";
- clan = 1;
- }
- var prefix = '';
- var long_prefix = '';
- switch (g.other[a].relation) {
- case 'cl':
- if (!clan) ktotubyl_string += "class='ktotujest_style_cl' ";
- prefix = '[K] ';
- long_prefix = '[Klanowicz] ';
- break;
- case 'fr':
- if (!clan) ktotubyl_string += "class='ktotujest_style_fr' ";
- prefix = '[P] ';
- long_prefix = '[Przyjaciel] ';
- break;
- case 'en':
- if (!clan) ktotubyl_string += "class='ktotujest_style_en' ";
- prefix = '[W] ';
- long_prefix = '[Wróg] ';
- break;
- default: onl.nex++;
- };
- nick = g.other[a].nick;
- if ((g.other[a].ontubyl == 0 || g.other[a].ontubyl == null) && content.length < 15) {
- if (nick.length + prefix.length > 15) {
- nick = nick.substring(0, 13 - prefix.length) + "…";
- }
- ktotubyl_string += "tip='" + long_prefix + g.other[a].nick + "' onclick='chatTo(\"" + g.other[a].nick + "\")'>" + prefix + nick + " (<b>" + g.other[a].lvl + g.other[a].prof + "</b>)</span><br />";
- content[content.length] = "a";
- g.other[a].ontubyl = 1;
- }
- }
- $('#ktotubyl_lista').html(ktotubyl_string);
- }
- // ### LootFilter ###
- //$('body').append($(document.createElement('style')).text("div.mainBox{width:150px;z-index:391;background:#222;border:3px double #A95;color:#FFD700;font-family:Verdana, Arial, sans-serif;font-size:11px;position:absolute;padding:3px 3px 4px;}div.mainBox_left,div.mainBox_right{height:23px;position:absolute;width:35px;}div.mainBox_left{background:url(/img/tip-cor.png) no-repeat 0 -69px;left:-6px;top:-6px;}div.mainBox_right{background:url(/img/tip-cor.png) no-repeat -35px -69px;bottom:-6px;right:-6px;}"));
- function LootFilter() {
- var __this = this;
- var filterInput = $(document.createElement('input')).css({ 'background-color': '#888', 'border': '1px solid #00ff00', 'padding': '1px', 'width': '40px', 'color': '#00ff00' }).change(function () { __this.saveSettings() });
- var autoQuitCheckbox = $(document.createElement('input')).attr('type', 'checkbox').attr('id', 'LFME_autoQuitCheckbox').change(function () { __this.saveSettings() });
- $('#centerPanel').append('<b>LootFilter:</b> <span>Powy\u017cej: </span>').append(filterInput);
- $('#centerPanel').append(autoQuitCheckbox).append('<label for="LFME_autoQuitCheckbox">Auto zamykanie</label>');
- var tmpLootItem = lootItem;
- var doubleSendBlock = false;
- this.saveSettings = function () {
- var settings = '|value:' + filterInput.val() + '|autoQuit:' + (autoQuitCheckbox.attr('checked') ? 1 : 0);
- var date = new Date(); date.setTime(date.getTime() + 3600000 * 24 * 30)
- setCookie('__LootFilterME', settings, date, false, false, false);
- }
- this.readSettings = function () {
- var settings = getCookie('__LootFilterME')
- if (settings) {
- settings = settings.split('|');
- for (i = 0; i < settings.length; i++) {
- var pair = settings[i].split(':');
- switch (pair[0]) {
- case 'value':
- filterInput.val(pair[1]); break;
- case 'autoQuit':
- if (parseInt(pair[1]) == 1) autoQuitCheckbox.attr('checked', 'checked'); break
- }
- }
- }
- }
- this.readSettings();
- lootItem = function (i) {
- tmpLootItem(i);
- var limit = parseInt(filterInput.val());
- if (isNaN(limit) || (i.pr >= limit) || (i.stat.search(/heroic|legendary|unique|gold|quest/) >= 0)) {
- setLoots((g.loots.init > 1 ? 2 : 0), i.id.toString());
- } else {
- setLoots(1, i.id.toString());
- }
- if (!doubleSendBlock && autoQuitCheckbox.attr('checked')) {
- doubleSendBlock = true;
- setTimeout(function () { sendLoots(1); doubleSendBlock = false }, 300);
- }
- }
- }
- g.loadQueue.push({ fun: function () { new LootFilter() }, data: '' });
- // ## Auto Atack Enemy ###
- //## AFC ###
- var isAFCrunning = getCookie('isAFCrunning');
- isAFCrunning = (isAFCrunning ? isAFCrunning : "true|true");
- isAFCrunning = isAFCrunning.split("|");
- isAFCrunning = (isAFCrunning.length == 2 ? isAFCrunning : [true, true]);
- for (i in isAFCrunning)
- isAFCrunning[i] = eval(isAFCrunning[i]);
- var tmpBattleMsg = battleMsg;
- battleMsg = function (c, t) {
- var ret = tmpBattleMsg(c, t);
- if ((isAFCrunning[0] || isAFCrunning[1]) && c.search(/winner=/) >= 0) {
- if (isAFCrunning[0])
- $("#battleclose").click();
- }
- return ret;
- }
- var newOther___M = newOther;
- newOther = function (b) {
- setInterval(function () {
- for (var i in b) {
- if ((b[i].relation == 'en' || b[i].relation == 'cl-en')) {
- if (((Math.abs(hero.x - b[i].x) <= 2) && (Math.abs(hero.y - b[i].y) <= 2) && (walnaleb == 'true') && (map.pvp == 3)&& (g.battle == false) )) {//
- _g("fight&a=attack&id=" + i);
- }
- }
- }
- }, 200)
- newOther___M(b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement