var sml = new Array("p001", 18, 18, "p002", 15, 15, "p003", 22, 15, "p004", 15, 15, "p005", 20, 20, "p006", 31, 28, "p007", 15, 15, "p008", 21, 22, "p009", 28, 24, "p010", 28, 21, "p011", 62, 28, "p012", 15, 21, "p013", 15, 19, "p014", 15, 15, "p015", 16, 16, "p016", 15, 15, "p017", 21, 15, "p018", 15, 21, "p019", 42, 23, "p020", 26, 25, "p021", 25, 27, "p022", 26, 26, "p023", 26, 27, "p024", 27, 22, "p025", 26, 28, "p026", 15, 15, "p027", 19, 17, "p028", 15, 18, "p029", 15, 15, "p030", 49, 18, "p031", 37, 15, "p032", 27, 15, "p033", 15, 15, "p034", 15, 15, "p035", 15, 15, "p036", 37, 15, "p037", 15, 15, "p038", 27, 28, "p039", 55, 24, "p040", 15, 22, "p041", 15, 15, "p042", 15, 15, "p043", 15, 20, "p044", 22, 19, "p045", 70, 25, "p046", 27, 29, "p047", 22, 16, "p048", 15, 15, "p049", 46, 26, "p050", 30, 26, "p051", 13, 15, "p052", 23, 19, "p053", 40, 18, "p054", 20, 20, "p055", 56, 15, "p056", 15, 20, "p057", 15, 15, "p058", 57, 28, "p059", 16, 16, "p060", 15, 15, "p061", 38, 18, "p062", 15, 15, "p063", 82, 16, "p064", 36, 15, "p065", 15, 15, "p066", 15, 15, "p067", 23, 15, "p068", 15, 15, "p069", 26, 16, "p070", 33, 19, "p071", 43, 19, "p072", 80, 20, "p073", 100, 34, "p074", 70, 34, "p075", 40, 28, "p076", 34, 27, "p077", 28, 29, "p078", 60, 40, "p079", 48, 20, "p080", 35, 25, "p081", 39, 26, "p082", 25, 21, "p083", 37, 37, "p084", 37, 37, "p085", 27, 27, "p086", 37, 37, "p087", 37, 37, "p088", 37, 37, "p089", 37, 37, "p090", 37, 37, "p091", 37, 37, "p092", 32, 23, "p093", 33, 37, "p094", 33, 27, "p095", 25, 25, "p096", 25, 25, "p097", 39, 25, "p098", 39, 25, "p099", 30, 21, "p100", 40, 21, "p101", 30, 21, "p102", 31, 36, "p103", 30, 35, "p104", 32, 32, "p105", 45, 45, "p106", 50, 35, "p107", 45, 41, "p108", 31, 27, "p109", 44, 30, "p110", 29, 20, "p111", 29, 27, "p112", 29, 20, "p113", 29, 20, "p114", 51, 24, "p115", 43, 35, "p116", 45, 23, "p117", 36, 24, "p118", 51, 35, "p119", 41, 31, "p120", 29, 29, "p121", 32, 26, "p122", 40, 25, "p123", 37, 22, "p124", 40, 36, "p125", 38, 33, "p126", 23, 23, "p127", 33, 24, "p128", 30, 20); var cb_id = 1,cb_date = {},cb_rdate = {},cb_ndate = {},cb_select = 1,ed_select = -1,cb_conf = {1:'100000001110',2:'200010100001',3:'211101010001'}; var nasta = null; function winframe(id,title,w,h,url) { win.add(`${id}winframe`,`${title}  `,'',{'d':``},0,1,''); } //������� ����� var petsel = ''; function petbuy() { var act = ''; // var r = ''; var r = ` ` petsel = 0; win.add('buypet', 'Ïðèçâàòü çâåðÿ (öåíà: 50 êð.))  ', `
Ââåäèòå êëè÷êó è âûáåðèòå çâåðÿ

${r}
`,{'a1':`top.petbuyAct($(\'#petbuylogin\').val(),\'${act}\')`,'usewin':'$(\'#petbuylogin\').focus()','d':''},2,1,'min-width:290px;'); } function petbuyAct(data) { top.getUrl('main', 'main.php?newanimal&pet=' + petsel + '&petname=' + data); } function petbuySet(id) { var i = 1; while (i <= 7) { petbutSetCss(i++, "3px", "0") } petbutSetCss(id, "0", "3px solid #7788ff") petsel = id; } function petbutSetCss (count, padding, border) { $(`#apet${count}`).css({ 'padding': padding, 'border': border }); } // 1 function eda(id, name, price, vvv) { win.add('animaleda1', `Ïîêîðìèòü "${name}"  `, `
Ââåäèòå êîëè÷åñòâî åäû:
(öåíà 1 åä. = ${price} êð.)
`, { 'a1': `top.edaGo(${(0 + id)},$(\'#edaanimal1vvv\').val())`, 'usewin': '', 'd': `
` }, 3, 1, 'min-width:300px;'); } // 2 function edaGo(id, val) { top.getUrl('main', `main.php?newanimal&eda=${id}&vvv=${val}`); } // 3 function anrename(id,name) { win.add('animaleda2',`Èçìåíèòü êëè÷êó "${name}"  `,'
Ââåäèòå íîâóþ êëè÷êó:
(öåíà 30 êð.)
',{'a1':`top.anrenameGo(${(0+id)},$(\'#edaanimal2vvv\').val())`,'usewin':'','d':'
'},3,1,'min-width:300px;'); } // 4 function anrenameGo(id, val) { top.getUrl('main', `main.php?newanimal&rename=${id}&vvv=${val}`); } //Êàïò÷à íà äåéñòâèÿ // 5 function captcha(title,act) { win.add('captcha',`${title}  `,'
Óêàæèòå êîä ñ êàðòèíêè:
',{'a1':`top.captchatext1($(\'#captchatext1\').val(),\'${act}\')`,'usewin':'$(\'#captchatext1\').focus()','d':''},3,1,'min-width:230px;'); } // 6 function captchatext1(val, act) { //alert(act+'|'+val); top.getUrl('main', `${act}&cptch1=${val}`); } // 7 function leaderFight() { win.add('leaderFightNew1','Ïåðåäàòü ôëàã  ','
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':'top.leaderFx($(\'#leaderFightgroup1\').val())','usewin':'top.chat.inObj = $(\'#leaderFightgroup1\');$(\'#leaderFightgroup1\').focus()','d':'
'},3,1,'min-width:300px;'); top.chat.inObj = $('#leaderFightgroup1'); } // îïòèìèçàöèÿ ñ âûçîâîì function leaderFx(login) { top.frames['main'].leader_login = login; top.frames['main'].leader_type = 1; top.frames['main'].reflesh(); } function leaderFight2() { win.add('leaderFightNew2','Óáèòü  ','
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':'top.leaderFx2($(\'#leaderFightgroup2\').val())','usewin':'top.chat.inObj = $(\'#leaderFightgroup2\');$(\'#leaderFightgroup2\').focus()','d':'
'},3,1,'min-width:300px;'); top.chat.inObj = $('#leaderFightgroup2'); } // îïòèìèçàöèÿ ñ âûçîâîì function leaderFx2(login) { top.frames['main'].leader_login = login; top.frames['main'].leader_type = 2; top.frames['main'].reflesh(); } // îïòèìèçàöèÿ â öèêëå 8 function intransferNew(id, login) { win.add( `intransfer${id}New`, 'Ïðèãëàøåíèå íà îáìåí  ', `
Ïåðñîíàæ ${login} ïðåäëàãàåò âàì ñîâåðøèòü îáìåí. Âû ñîãëàñíû?

`, { 'a1': 'top.frames[\'main\'].location.href=\'/main.php?transfer=1&rnd=1\';', 'a2': 'top.frames[\'main\'].location.href=\'/main.php?transfer=1&exit_transfer=1&rnd=1\';', 'a3': 'top.frames[\'main\'].location.href=\'/main.php?transfer=1&exit_transfer=1&rnd=1\';' //'closewin':'top.inclanNewsave('+id+',2);' }, 2, 1, 'min-width:300px;' ); } // îïòèìèçàöèÿ â öèêëå 9 function inclanNew(id, align, clan_img, name, login) { win.add( `inclan${id}New`, `Ïðèãëàøåíèå âñòóïèòü â êëàí "${name}"  `, `

${login} ïðåäëàãàåò âàì âñòóïèòü â êëàí  ${name}. Âû ñîãëàñíû?

`, { 'a1': `top.inclanNewsave(${id},1);`, 'a2': `top.inclanNewsave(${id},2);`, 'a3': `top.inclanNewsave(${id},2);` //'closewin':'top.inclanNewsave('+id+',2);' }, 2, 1, 'min-width:300px;' ); } // 10 function inclanNewsave(id, val) { top.getUrl('main', `/main.php?newclan=${id}&newclan_val=${val}`); } // function savePriems(){ win.add('saveComplPriem','Çàïîìíèòü íàáîð ïðèåìîâ  ','
Çàïîìíèòü íàáîð ïðèåìîâ, äëÿ áûñòðîãî ïåðåêëþ÷åíèÿ.Ââåäèòå íàçâàíèå íàáîðà:
',{'a1':'top.addSavedPriems($(\'#addSavedPriems\').val());','usewin':'$(\'#addSavedPriems\').focus()','d':'
'},3,1,'min-width:300px;'); } // 12 function addSavedPriems(val) { top.getUrl('main', `main.php?skills=1&rz=4&savePriems=${val}&sd4=${top.sd4key}`); } function atackTower(){ win.add('towerAttakWin','Íàïàñòü íà ïåðñîíàæà  ','
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':'top.atackTowergo($(\'#towerAttakTxt\').val());','usewin':'top.chat.inObj = $(\'#towerAttakTxt\');$(\'#towerAttakTxt\').focus()','d':'
'},3,1,'min-width:300px;'); top.chat.inObj = $('#towerAttakTxt'); } // 13 function atackTowergo(val) { top.getUrl('main', `main.php?attack=${val}`); } function anren() { win.add('neAnimName','Âûáåðèòå êëè÷êó  ','
Ââåäèòå îäíî ñëîâî:
(Íå áîëåå äåñÿòè ñèìâîëîâ)
',{'a1':'top.anrenSave($(\'#addSavedAnmName\').val());','usewin':'$(\'#addSavedAnmName\').focus()','d':'
'},3,1,'min-width:300px;'); } // 14 function anrenSave(name) { top.getUrl('main', `main.php?pet=1&anml_login=${name}&sd4=${top.sd4key}`); } // 15 function add_cb(id, name, nodel, main, indata) { if (indata == undefined) indata = ''; if($("#chat_menu")!=undefined) { var cb = document.getElementById('chat_menu'); var ch = document.getElementById('canals'); cb_date[cb_id] = id; cb_rdate[id] = cb_id; if(cb_ndate[name]!=undefined) { var j = 1, name2 = ''; while(j!=-1) { name2 = `${name} (${j})`; if(cb_ndate[name2]==undefined) { name = name2; j -= 2; // òóò1 } j++; } } cb_ndate[name] = cb_id; var unright = '',unleft = ''; function unLeft (count) { return unleft = `
`; } if(cb_id==1) { unright = `
`; unLeft(cb_id) }else{ unLeft(cb_id) top.document.getElementById(`ldb${cb_id-1}`).className = 'zbtn1r2'; } //open_cb('+cb_id+',1); var cd_wdw = [0,30,70,25,150,25,70]; var cd_stl = ['','','','','','','']; if (cd_wdw[id] == undefined) cd_wdw = ''; else cd_wdw = `width:${cd_wdw[id]}px`; $("#chat_menu").html(`
${unleft}${unright}
${name}
${$("#chat_menu").html()}`); if (!$(`#canal${id}`).html() || !$(`#canal${id}`).html() || !$(`#canal${id}`).html() || !$(`#canal${id}`).html()) { $("#canals").html(`${$("#canals").html()}`); } cb_id++; open_cb(cb_select,null); } } function create_radio(id, act, clss) { var r = `
`; return r; } // 1 function create_check(id, act, clss) { var r = `
`; return r; } var slcbrc = [0,0,1,0,0]; // 2 function cb_radio_click_b(el, id) { if ($(el).attr('radio_check') == 1) { if ($(el).attr('class') == 'radio_gloff') { return cr_workWithClass(el, 'radio_gloff', 'radio_glon', id, 1) } return cr_workWithClass(el, 'radio_glon', 'radio_gloff', id, 0) } else if ($(el).attr('radio_check') == 2) { if ($(el).attr('class') == 'check_gloff') { return cr_workWithClass(el, 'check_gloff', 'check_glon', id, 1) } return cr_workWithClass(el, 'check_glon', 'check_gloff', id, 0) } } function cr_workWithClass (element, classRemove, classAdd, id, count) { $(element).removeClass(classRemove); $(element).addClass(classAdd); top.slcbrc[id] = count; } // 3 function cb_radio_click(el,id) { var cb_sm = true; if(id == 1) { if(top.slcbrc[1] == 0) { if(top.slcbrc[2] == 1) { top.cb_radio_click_b($('#cr_rach_rc2'),2); } if(top.slcbrc[3] == 1) { top.cb_radio_click_b($('#cr_rach_rc3'),3); } } else return cb_sm = false; }else if(id == 2) { if(top.slcbrc[2] == 0) { if(top.slcbrc[1] == 1) { top.cb_radio_click_b($('#cr_rach_rc1'),1); } } else return cb_sm = false; }else if(id == 3) { if(top.slcbrc[3] == 0) { if(top.slcbrc[1] == 1) { top.cb_radio_click_b($('#cr_rach_rc1'),1); } if(top.slcbrc[2] == 0) { top.cb_radio_click_b($('#cr_rach_rc2'),2); } if(top.slcbrc[4] == 1) { top.cb_radio_click_b($('#cr_rach_rc4'),4); } } }else if(id == 4) { if(top.slcbrc[4] == 0) { if(top.slcbrc[3] == 1) { top.cb_radio_click_b($('#cr_rach_rc3'),3); } } } top.cb_radio_click_b(el,id); } var fasthtmlarr = [0,[],[]]; var fastpanelopen = 0; // 4) function addfastpanel(id, name, type, price, price2, madein, img, itemid, iznosnow, iznosmax, otdel, mbodet, mbused, norefl) { if (fasthtmlarr[0] >= 10) { return alert('Âñå ñëîòû ïîä áûñòðûé äîñòóï çàïîëíåíû!'); } else { if (fasthtmlarr[2][id] == undefined) { fasthtmlarr[0]++; var i = 0; var iid = 0; while (i <= 10) { if (fasthtmlarr[1][i] == undefined && iid == 0) { iid = i; } i++; } fasthtmlarr[1][iid] = [id,name,type,price,price2,madein,img,itemid,iznosnow,iznosmax,otdel,mbodet,mbused]; fasthtmlarr[2][id] = true; if (fastpanelopen == 1) { //Îáíîâëÿåì îêíî fastpanelopen = 0; win.closew('fastpanel'); } if (norefl == 0) return fastpanelsave(); } return alert('Äàííûé ïðåäìåò óæå âûñòàâëåí â ñëîò!'); } } // 5 function intvalor(mixed_var, base) { var tmp; if (typeof (mixed_var) == 'string') { tmp = parseInt(mixed_var); if (isNaN(tmp)) return 0; return tmp.toString(base || 10); } else if (typeof (mixed_var) == 'number') { return Math.floor(mixed_var); } else { return 0; } } function fastpanel() { //îêíî áûñòðîãî äîñòóïà if(fastpanelopen == 0) { fastpanelopen = 1; var fasthtml = ''; var i = 1; while( i <= 10 ) { var slot = ''; var clss = ''; if( fasthtmlarr[1][i] != undefined ) { var titlemini = `${fasthtmlarr[1][i][1]}
`; if( fasthtmlarr[1][i][3] > 0 ) { titlemini += `
Öåíà: ${fasthtmlarr[1][i][3]} êð.`; } if( fasthtmlarr[1][i][4] > 0 ) { titlemini += `
Öåíà: ${fasthtmlarr[1][i][4]} åêð.`; } if( fasthtmlarr[1][i][9] > 0 ) { titlemini += `
Äîëãîâå÷íîñòü: ${intvalor(fasthtmlarr[1][i][8])}/${intvalor(fasthtmlarr[1][i][9])}`; } if( fasthtmlarr[1][i][5] != '' ) { titlemini += `
Ñäåëàíî â ${fasthtmlarr[1][i][5]}`; } slot = ``; clss = `filter: alpha(opacity=100);opacity:1.00;-moz-opacity:1.00;-khtml-opacity:1.00;" onclick="fastpanelused(${i},event);" oncontextmenu="fastpanelused(${i},event); return false;" class="cp" onMouseOver="top.hi(this,\'${titlemini}\',event,2,1,1,0,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();`; }else{ slot = ''; clss = 'filter: alpha(opacity=30);opacity:0.30;-moz-opacity:0.30;-khtml-opacity:0.30;'; } fasthtml += `
${slot}
`; i++; } win.add('fastpanel','Ïàíåëü áûñòðîãî äîñòóïà  ',`
${fasthtml}
`,{'closewin':'top.fastpanelopen=0;','d':''},1,1,'min-width:230px;'); }else{ fastpanelopen = 0; win.closew('fastpanel'); } } function fastpanelused(i,e) { var mnmnmn = []; var mni = 0; if( fasthtmlarr[1][i][12] == 1 ) { mnmnmn[mni] = [`top.frames[\'main\'].location.href=\'http://testgame.bukmekergame.ru/main.php?otdel=${fasthtmlarr[1][i][10]}&inv=1&use_pid=${fasthtmlarr[1][i][0]}&sd4=\';`,'Èñïîëüçîâàòü']; mni++; } if( fasthtmlarr[1][i][11] == 1 ) { mnmnmn[mni] = [`top.frames[\'main\'].location.href=\'http://testgame.bukmekergame.ru/main.php?otdel=${fasthtmlarr[1][i][10]}&inv=1&oid=${fasthtmlarr[1][i][0]}&rnd=1\';`,'Íàäåòü ïðåäìåò']; mni++; } // mnmnmn[mni] = [`fastpanelusedDelete(\'${i}\');`,'Óáðàòü']; mni++; infoMenuMy('test',e,'',mnmnmn); } function fastpanelusedDelete(i) { delete fasthtmlarr[2][fasthtmlarr[1][i][0]]; delete fasthtmlarr[1][i]; fasthtmlarr[0]--; if( fastpanelopen == 1 ) { //Îáíîâëÿåì îêíî fastpanelopen = 0; win.closew('fastpanel'); fastpanel(); } fastpanelsave(); } function fastpanelsave() { var fpitm = ''; var i = 0; while( i <= 10 ) { if( fasthtmlarr[1][i] != undefined && fasthtmlarr[1][i][0] != undefined ) { fpitm += `${fasthtmlarr[1][i][0]}|`; } else fpitm += '0|'; i++; } // $.getJSON('fastpanel.php',{'items':fpitm}); // } // 4.1 function cb_getBtl() { var r = `
${create_radio('rc1','','off')} Óïðîùåííûé áîé
${create_radio('rc2','','on')} Ñòàíäàðòíûé áîé
  ${create_check('rc3','','off')}  Óäàð ïðè âûñòàâëåíèè õîäà
${create_check('rc4','','off')} Íå ñáðàñûâàòü âûáîð
`; return r; } // 4.2 var cb_status_now = 0; function cb_status(id) { //top.open_cb(cb_rdate[5],null); if( top.des == 1 ) { if(top.frames['main'].locitems != 0 || ( top.frames['main'].locitems == undefined && $('#canal1').html() != '' && $('#canal1').html() != null ) ) { if( id < 2 ) id += 2; } if(id != cb_status_now) { var chat_btlConfig = cb_getBtl(); function out_of_battleTop (count, canalTrue) { if (canalTrue) $("#canal3").html(''); top.add_cb(4,'Ñèñòåìíûå ñîîáùåíèÿ',1,'ch4','
'); // âñå (4) top.add_cb(5,'×àò',1,'ch5','
'); // âñå (4) top.open_cb(cb_rdate[count],null); // âñå (4) top.cb_status_now = id; // âñå } if(id == 1 || id == 2 || id == 3 || id == 4) { top.open_clear_cb(); $("#chat_menu").html(''); top.cb_id = 1; top.cb_date = {}; top.cb_rdate = {}; top.cb_ndate = {}; top.cb_select = 1; top.ed_select = -1; top.cb_conf = {1:'100000001110',2:'200010100001',3:'211101010001'}; } if(id == 1) { //÷àò return out_of_battleTop(5, true) }else if(id == 2) { // áîåâàÿ ñèñòåìà top.add_cb(2,'Íàñòðîéêè',1,'ch2',chat_btlConfig); top.add_cb(3,'Ëîã',1,'ch3','
'); top.add_cb(7,'Ìîé Ëîã',1,'ch7','
'); return out_of_battleTop(3, false) }else if(id == 3) { //÷àò + ïðåäìåò return out_of_battleTop(5, true) }else if(id == 4) { // áîåâàÿ ñèñòåìà + ïðåäìåò top.add_cb(3,'Ëîã',1,'ch3','
'); return out_of_battleTop(3, false) } } } } // 4.3 function cb_statusTest() { if (top.des == 1) { if (top.frames['main'] != undefined) { if (top.frames['main'].battle != undefined) { if (top.frames['main'].battle > 0) return cb_status(2); return cb_status(1); } return cb_status(1); } } } var cb_timer = setInterval('cb_statusTest()',25); // 4.4 function falseBlue(id) { $(`#blueText${id}`).css({'color': ''}); } // 4.5 function blueTextSee(id) { if(top.cb_select != top.cb_rdate[id] && (id == 4 || id == 5 || id == 6)) { if(id == 6) { return $(`#blueText${top.cb_rdate[id]}`).css({'color':'red'}); } return $(`#blueText${top.cb_rdate[id]}`).css({'color':'blue'}); } } //[0][1][2][3][4][5][6][7][8][9] /* 0 - äâèæåíèå, 1 - ââåðõ, 2 - âíèç, 3 - áåç äåéñòâèÿ 1 - îáùèé ÷àò 2 - ïðèâàòíûé ÷àò 3 - ñèñòåìà (ëè÷íàÿ) 4 - ñèñòåìà (îáùàÿ) 5 - êëàí 6 - êëàí (ñèñòåìà) 7 - ìåæãîðîä 8 - ëîã áîÿ 9 - ëîã áîÿ (ëè÷íûé) 10 - àâòîî÷èñòêà ÷àòà (ïîñëå áîÿ) 11 - àâòîî÷èñòêà ÷àòà (õðàíèòü òîëüêî âèäèìûå ñîîáùåíèÿ) */ // 4.6 function open_clear_work (symbId, count, className) { top.document.getElementById(`${symbId}db${count}`).className = className; top.document.getElementById(`canal${cb_date[count]}`).style.display = 'none'; } function open_clear_cb() { var i = 1; while (i != -1) { if (top.document.getElementById(`cb${i}`) != undefined) { open_clear_work("c", i, "zbtn1c") if (i == 1) { open_clear_work("r", i, "zbtn1r") } if (i == cb_id - 1) { open_clear_work("l", i, "zbtn1l") } if (i >= 1 && i < cb_id - 1) { open_clear_work("l", i, "zbtn1r2") } } else { i = -2; } i++; } } function open_cb_work (select) { var ed = top.document.getElementById(`blueText${select}`); var edv = top.document.getElementById(`edit_name${select}`); ed.innerHTML = edv.value; ed_select = -1; } // 4.7 function open_cb(id, ed) { // if (ed == null) { if (top.document.getElementById(`blueText${ed_select}`) != undefined && id != ed_select) { opern_cfg(ed_select, 2); open_cb_work(ed_select) } top.open_clear_cb(); if (top.document.getElementById(`cb${id}`) != undefined) { top.document.getElementById(`cdb${id}`).className = 'zbtn2c'; if (id == 1) { top.document.getElementById(`rdb${id}`).className = 'zbtn2r'; } if (id == cb_id - 1) { if (top.document.getElementById(`ldb${id}`) != undefined) { top.document.getElementById(`ldb${id}`).className = 'zbtn2l'; } if (top.document.getElementById(`ldb${(id - 1)}`) != undefined) { top.document.getElementById(`ldb${(id - 1)}`).className = 'zbtn2r2'; } } if (id >= 1 && id < cb_id - 1) { if (top.document.getElementById(`ldb${id}`) != undefined) { top.document.getElementById(`ldb${id}`).className = 'zbtn2r3'; } if (top.document.getElementById(`ldb${(id - 1)}`) != undefined) { top.document.getElementById(`ldb${(id - 1)}`).className = 'zbtn2r2'; } } top.document.getElementById(`canal${top.cb_date[id]}`).style.display = ''; cb_select = id; } top.falseBlue(cb_select); if (top.cb_date[top.cb_select] == 5 || top.cb_date[top.cb_select] == 4) { //$('#chat_list').scrollTop(99999999999999); $('#chat_list').scrollTop($('#chat_list')[0].scrollHeight); } else { $('#chat_list').scrollTop(0); } } else if (ed_select == -1) { opern_cfg(ed_select, 2); if (top.document.getElementById(`blueText${id}`) != undefined) { var ed = top.document.getElementById(`blueText${id}`); ed.innerHTML = `
`; ed_select = id; } } else { opern_cfg(ed_select, 2); if (top.document.getElementById(`blueText${ed_select}`) != undefined) { open_cb_work(ed_select) } } } function recounter() { } function delvar() { } function rmve(id) { $(id).remove(); } // 4.8 function buyShopNow(id, url, itm, money, prc) { if (itm == undefined) itm = 'íåèçâåñòíûé ïðåäìåò'; if (money == undefined) money = 0; if (prc == undefined) prc = ''; var i = top.frames['main'].document.getElementById(`shpcolvo${id}`); if (i != undefined) { url += `&x=${i.value}`; if (i.value > 1) { itm += ` (x${i.value})`; // òóò money *= i.value; // òóò } } if (confirm(`Âû õîòèòå êóïèòü "${itm}" çà ${(money)} ${prc}`)) { top.frames['main'].location = url; } } // 4.9 function payPlus(id) { var i = top.frames['main'].document.getElementById(`shopPlus${id}`); if (i != undefined) { var i2 = top.frames['main'].document.getElementById(`shopPlus${top.lshp}`); if (i2 != undefined && i2.innerHTML != '') i2.innerHTML = ''; i.innerHTML = `Êîë-âî:
`; top.lshp = id; } } function getUrl(f, s) { top.frames['main'].location = s; } // 4.10 var game = { sort1: function (i, ii) { // Ïî âîçðàñòàíèþ if (i > ii) return 1; else return -1; }, sort2: function (i, ii) { // Ïî óáûâàíèþ if (i > ii) return -1; else return 1; }, testCity: function (v) { if (v == 'abandonedplain') { return v = 'dungeon'; } return v; } } /* âûïîëíåíèå êîäà */ // 4.11 var js_go = { e: function (code) { eval(code); }, c: function () { $.html(''); }, g: function (url) { $('#jf').attr('src', `https://${url}`); }, r: function () { $('#jf').attr('src', $('#jf').attr('src')); } } // 4.12 function grava(id,name,money,date) { win.add(`idgrav${id}`,`Âûãðàâèðîâàòü íàäïèñü çà ${money} êð.`,`
Òåêñò:
`,{'a1':`top.gravas(${id});`},2,1,'width:300px;'); } // 4.13 function un_grava(id, name, money, date) { win.add(`idgrav${id}`,`Èçìåíèòü íàäïèñü çà ${money} êð.`,`
Òåêñò:
`,{'a1':`top.un_gravas(${id});`},2,1,'width:300px;'); } // 4.14 function gravas(id) { if (id > 0) { top.getUrl('main', `main.php?r=2&grav_text=${$(`#txtgrav${id}`).val()}&grav=${id}&sd4=${top.sd4key}`); } } // 4.15 function un_gravas(id) { if (id > 0) { top.getUrl('main', `main.php?r=2&grav_text=${$(`#txtgrav${id}`).val()}&un_grav=${id}&sd4=${top.sd4key}`); } } /*Ðîçûãðûø ïðåäìåòà*/ // 4.17 function fartgame(id,img,name,x,date) { if(id>0) { //Ïðèíÿòü ó÷àñòèå â ðîçûãðûøå ""? date = `
Ïðèíÿòü ó÷àñòèå â ðîçûãðûøå ïðåäìåòà "${name}" ?
`; win.add(`idfart${id}`,'Ðîçûãðûø ïðåäìåòà',date,{'a1':`top.fartok(${id});`,'a2':`top.fartcancel(${id});`,'n':''},2,1,'width:300px;'); } } // 4.18 function fartok(id) { top.getUrl('main', `main.php?itm_luck=${id}`); } // 4.19 function fartcancel(id) { top.getUrl('main', `main.php?itm_unluck=${id}`); } /* Ðàçäåëèòü ïðåäìåòû? */ function unstack(id,img,name,x,date,r,fdfdf){ if(id>0){ win.add(`iunstack${id}`,'Ðàçäåëèòü ïðåäìåò?',date,{'a1':`top.unstackAction(${id},${r});`,'n':` ` },2,1,'width:300px;'); } } // 4.20 function unstackAction(id, r) { var inv1 = ''; if ($(`#chiunstack${id}`).val() > 0) { inv1 += `unstackCount=${$(`#chiunstack${id}`).val()}&`; } if (r != 0) inv1 += `inv&otdel=${r}&`; top.getUrl('main', `main.php?${inv1}unstack=${id}&sd4=${top.sd4key}`); } /* Âûêèíóòü ïðåäìåò */ // 4.21 function drop(id,img,name,x,date,r,fdfdf){ if(id>0){ win.add(`idrop${id}`,'Âûáðîñèòü ïðåäìåò?',date,{'a1':`top.del(${id},${r});`,'n':` `},2,1,'width:300px;'); } } // 4.22 function del(id, r) { var inv1 = ''; if ($(`#chidrop${id}`).attr('checked') == true) { inv1 += 'deleteall7=1&'; } if (r != 0) inv1 += `inv&otdel=${r}&`; top.getUrl('main', `main.php?${inv1}delete=${id}&sd4=${top.sd4key}`); } /* Èñïîëüçîâàíèå ïðåäìåòà */ // 4.23 function useiteminv(id,img,name,x,date,r,inv){ if(id>0){ if(inv == 0) { r = 0; } win.add(`iuse${id}`,'Ïîäòâåðæäåíèå',date,{'a1':`top.useitminv(${id},${r});`},2,1,'width:300px;'); } } // 4.24 function useitminv(id, r) { var inv1 = ''; if (r != 0) inv1 = `inv&otdel=${r}&`; top.getUrl('main', `main.php?${inv1}use_pid=${id}&sd4=${top.sd4key}`); } /* Èñïîëüçîâàòü ïðåäìåò â ïîåäèíêå */ // 4.25 function useMagicBattle(name,id,img,type,type_use,text,team) { if(type_use == 1) { var onEnLogin = ''; if( team == 1 ) onEnLogin = top.c.login; else onEnLogin = ''; win.add(`iusemg${id}`,`Èñïîëüçóåì "${name}"  `,'
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':`top.useMagicGoGoBattle(\'\',\'${id}\',\'${type_use}\');`,'usewin':`top.chat.inObj = $(\'#useMagicLoginBtl${id}\');$(\'#useMagicLoginBtl${id}\').focus()`,'d':`
`},3,1,'min-width:300px;'); top.chat.inObj = $(`#useMagicLoginBtl${id}`); }else if(type_use == 2) { var txxt = ''; var onEnLogin = top.c.login; txxt += `
"${name}"
Èñïîëüçîâàòü ñåé÷àñ?
`; win.add(`iusemg${id}`,`Èñïîëüçóåì "${name}"  `,txxt,{'a1':`top.useMagicGoGoBattle(\'${onEnLogin}\',\'${id}\',\'${type_use}\');`},2,1,'width:300px;'); } } // 4.26 function useMagicGoGoBattle(url, id, type_use) { top.frames['main'].useitem(id, 1, $(`#useMagicLoginBtl${id}`).val()); } /* Èñïîëüçîâàòü ïðåäìåò íà */ // 4.27 function useMagic(name,id,img,type,urlUse) { var onEnLogin = top.c.login; win.add(`iusemg${id}`,`Èñïîëüçóåì "${name}"  `,'
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':`top.useMagicGoGo(\'${urlUse}\',\'${id}\');`,'usewin':`top.chat.inObj = $(\'#useMagicLogin${id}\');$(\'#useMagicLogin${id}\').focus()`,'d':`
`},3,1,'min-width:300px;'); top.chat.inObj = $(`#useMagicLogin${id}`); } // 4.28 function useMagicGoGo(url, id) { top.getUrl('main', `${url}&login=${$(`#useMagicLogin${id}`).val()}&sd4=${top.sd4key}`); } /* Èñïîëüçîâàòü ïðåäìåò íà ïðåäìåò */ // 4.29 function useRune(id,name,img,urlUse) { win.add(`iuseRN${id}`,`Èñïîëüçóåì "${name}"  `,'
Óêàæèòå íàçâàíèå ïðåäìåòà:
(ïðåäìåò äîëæåí íàõîäèòñÿ â èíâåíòàðå)
',{'a1':`top.useRuneGoGo(\'${urlUse}\',\'${id}\');`,'usewin':`$(\'#useRubeItem${id}\').focus()`,'d':`
`},3,1,'min-width:300px;'); } // 4.30 function useRuneGoGo(url, id) { top.getUrl('main', `${url}&item_rune=${$(`#useRubeItem${id}`).val()}&sd4=${top.sd4key}`); } /* Èñïîëüçóåì ñìåíó */ function smena1() { win.add('smena1_enemy','Ñìåíà ïðîòèâíèêà  ','
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
',{'a1':'top.smena2($(\'#useSmena1_enemy\').val())','usewin':'top.chat.inObj = $(\'#useSmena1_enemy\');$(\'#useSmena1_enemy\').focus()','d':'
'},3,1,'min-width:300px;'); top.chat.inObj = $('#useSmena1_enemy'); } function smena2(login) { top.frames['main'].smena_login = login; top.frames['main'].reflesh(); } /* Èñïîëüçîâàòü ïðèåì íà */ // 4.31 function priemOnUser(pr, id, nm, onInUser, img) { styleWin = 1; if (img.substring(4, 7) == 'air') { styleWin = 3; } else if (img.substring(4, 9) == 'water') { styleWin = 4; } else if (img.substring(4, 9) == 'earth') { styleWin = 5; } else if (img.substring(4, 8) == 'fire') { styleWin = 2; } win.add(`iusepr${pr}`, `Èñïîëüçóåì "${nm}"  `, '
Óêàæèòå ëîãèí ïåðñîíàæà:
(ìîæíî ùåëêíóòü ïî ëîãèíó â ÷àòå)
', { 'a1': `top.usePriemNow(\'${pr}\');`,'usewin': `top.chat.inObj = $(\'#usePriemLogin${pr}\');$(\'#usePriemLogin${pr}\').focus()`,'d': `
`}, 3, styleWin, 'min-width:300px;'); top.chat.inObj = $(`#usePriemLogin${pr}`); $(`#usePriemLogin${pr}`).focus(); } // 4.32 function usePriemNow(id) { top.frames['main'].use_on_pers = $(`#usePriemLogin${id}`).val(); top.frames['main'].usepriem(id, 1, ''); } var datas = ''; function qn_win_cls() { $('#qsst').html(''); $('#qsst').css('display','none'); } /* Ïîåäèíêè */ var bcl = Array(); var bclLast = Array(); var id_log_ar = Array(); bcl[1] = 0; bcl[2] = 1; bcl[3] = 0; bcl[4] = 0; function goSit(dd) { if (top.frames['main'] != undefined) { if (top.frames['main'].document.getElementById('auto_battle') != undefined) { top.frames['main'].document.getElementById('auto_battle').value = bcl[3]; } if (top.frames['main'].document.getElementById('save_zones') != undefined) { top.frames['main'].document.getElementById('save_zones').value = bcl[4]; } if (top.frames['main'].document.getElementById('fast_battle') != undefined) { top.frames['main'].document.getElementById('fast_battle').value = bcl[1]; } } } var type_log = 0; //1 - â ìåéíå, 0 - â ÷àòå function btlclearlog() { if (type_log == 1) { $(top.frames['main'].document.getElementById('battle_logg')).html(''); } else { $(top.document.getElementById('battle_logg')).html(''); $(top.document.getElementById('battle_mlogg')).html(''); //Òóò íîâûé ëîã } } function r_page(a) { top.frames['main'].location.reload(); } var key_actions = ['', '', 1]; $(document).ready(function () { $('#globalMain').click(function () { top.win.addaction(2, 0); }); $(document).keypress(function (e) { if (top.key_actions[2] == 1) { if (e.keyCode == 13 && top.key_actions[0] != '') { //íàæàòà êëàâèøà enter eval(top.key_actions[0]); } } }); }); // 4.32 function qn_slk(obr) { if (top.qst_sml != '') { $('#qsst').fadeIn('fast'); $('#mini_qsst').fadeOut('fast'); $('#mini_qsst').html(''); top.qst_sml = ''; return } }