2023-08-28 11:23:41 +00:00
const sml = [ "p001" , 18 , 18 , "p002" , 15 , 15 , "p003" , 22 , 15 , "p004" , 15 , 15 , "p005" , 20 , 20 , "p006" , 31 , 28 , "p007" , 15 , 15 ,
2022-06-06 21:30:34 +00:00
"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 ,
2023-08-28 11:23:41 +00:00
"p121" , 32 , 26 , "p122" , 40 , 25 , "p123" , 37 , 22 , "p124" , 40 , 36 , "p125" , 38 , 33 , "p126" , 23 , 23 , "p127" , 33 , 24 , "p128" , 30 , 20 ] ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
let cb _id = 1 ,
cb _date = { } ,
cb _rdate = { } ,
cb _ndate = { } ,
cb _select = 1 ,
ed _select = - 1 ,
cb _conf = { 1 : '100000001110' , 2 : '200010100001' , 3 : '211101010001' } ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
let petsel = '' ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
function winframe ( id , title , w , h , url ) {
win . add ( ` ${ id } winframe ` , ` ${ title } ` , '' , { 'd' : ` <iframe width=" ${ w } " height=" ${ h } " frameborder="0" src=" ${ url } "></iframe> ` } , 0 , 1 , '' ) ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
}
function petbuy ( ) {
const r = ` <img onclick="petbuySet(1);" id="apet1" title="Кот. Добавляет владельцу ловкость" style="cursor:pointer;padding:3px;" src="//img.new-combats.tech/i/items/summon_pet_cat.gif">
2023-03-31 18:30:14 +00:00
< img onclick = "petbuySet(2);" id = "apet2" title = "Сова. Добавляет владельцу интуицию" style = "cursor:pointer;padding:3px;" src = "//img.new-combats.tech/i/items/summon_pet_owl.gif" >
< img onclick = "petbuySet(3);" id = "apet3" title = "Светляк. Добавляет владельцу мощность магии" style = "cursor:pointer;padding:3px;" src = "//img.new-combats.tech/i/items/summon_pet_wisp.gif" >
< img onclick = "petbuySet(4);" id = "apet4" title = "Чертяка. Добавляет владельцу силу" style = "cursor:pointer;padding:3px;" src = "//img.new-combats.tech/i/items/summon_pet_demon.gif" >
< img onclick = "petbuySet(6);" id = "apet6" title = "Свин. Добавляет владельцу защиту" style = "cursor:pointer;padding:3px;" src = "//img.new-combats.tech/i/items/summon_pet_pig.gif" >
< img onclick = "petbuySet(5);" id = "apet5" title = "Пёс. Добавляет владельцу Н Р " style = "cursor:pointer;padding:3px;" src = "//img.new-combats.tech/i/items/summon_pet_dog.gif" >
2023-06-11 11:50:52 +00:00
` ;
petsel = 0 ;
win . add ( 'buypet' ,
'Призвать зверя <i>(цена: 50 кр.))</i> ' ,
` <div style="text-align: center;">Введите кличку и выберите зверя<br>
< input style = "font-size:12px;margin:5px;width:234px;padding:2px;" type = "text" id = "petbuylogin" > < br > < div style = "padding:5px;" > $ { r } < / d i v > < / d i v > ` ,
{
'a1' : ` petbuyAct( $ ( \' #petbuylogin \' ).val(), \' \' ) ` ,
'usewin' : '$(\'#petbuylogin\').focus()' ,
'd' : ''
} ,
2 ,
1 ,
'min-width:290px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
function petbuyAct ( data ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , 'main.php?newanimal&pet=' + petsel + '&petname=' + data ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
function petbuySet ( id ) {
2023-06-11 11:50:52 +00:00
let i = 1 ;
2022-06-06 21:30:34 +00:00
while ( i <= 7 ) {
petbutSetCss ( i ++ , "3px" , "0" )
}
petbutSetCss ( id , "0" , "3px solid #7788ff" )
petsel = id ;
}
2023-06-11 11:50:52 +00:00
function petbutSetCss ( count , padding , border ) {
2022-06-06 21:30:34 +00:00
$ ( ` #apet ${ count } ` ) . css ( {
'padding' : padding ,
'border' : border
} ) ;
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 1
function eda ( id , name , price , vvv ) {
2023-01-10 16:29:32 +00:00
win . add ( 'animaleda1' , ` Покормить " ${ name } " ` , ` <center>Введите количество еды:<br><i>(цена 1 ед. = ${ price } кр.)</i></center> ` , {
2023-06-11 11:50:52 +00:00
'a1' : ` edaGo( ${ ( 0 + id ) } , $ ( \' #edaanimal1vvv \' ).val()) ` ,
2022-06-06 21:30:34 +00:00
'usewin' : '' ,
'd' : ` <center><input style="width:96%; margin:5px;" id="edaanimal1vvv" class="inpt2" type="text" value=" ${ vvv } "></center> `
} , 3 , 1 , 'min-width:300px;' ) ;
}
2023-06-11 11:50:52 +00:00
// 2
2022-06-06 21:30:34 +00:00
function edaGo ( id , val ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?newanimal&eda= ${ id } &vvv= ${ val } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 3
2023-06-11 11:50:52 +00:00
function anrename ( id , name ) {
win . add ( 'animaleda2' , ` Изменить кличку " ${ name } " ` , '<center>Введите новую кличку:<br><i>(цена 30 кр.)</i></center>' , {
'a1' : ` anrenameGo( ${ ( 0 + id ) } , $ ( \' #edaanimal2vvv \' ).val()) ` ,
'usewin' : '' ,
'd' : '<center><input style="width:96%; margin:5px;" id="edaanimal2vvv" class="inpt2" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4
function anrenameGo ( id , val ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?newanimal&rename= ${ id } &vvv= ${ val } ` ) ;
2022-06-06 21:30:34 +00:00
}
// 6
function captchatext1 ( val , act ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` ${ act } &cptch1= ${ val } ` ) ;
2022-06-06 21:30:34 +00:00
}
// 7
function leaderFight ( ) {
2023-06-11 11:50:52 +00:00
win . add ( 'leaderFightNew1' , 'Передать флаг ' , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
'a1' : 'leaderFx($(\'#leaderFightgroup1\').val())' ,
'usewin' : 'chat.inObj = $(\'#leaderFightgroup1\');$(\'#leaderFightgroup1\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="leaderFightgroup1" class="inpt2" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
chat . inObj = $ ( '#leaderFightgroup1' ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
// оптимизация с вызовом
2022-06-06 21:30:34 +00:00
function leaderFx ( login ) {
top . frames [ 'main' ] . leader _login = login ;
top . frames [ 'main' ] . leader _type = 1 ;
top . frames [ 'main' ] . reflesh ( ) ;
}
function leaderFight2 ( ) {
2023-06-11 11:50:52 +00:00
win . add ( 'leaderFightNew2' , 'Убить ' , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
'a1' : 'leaderFx2($(\'#leaderFightgroup2\').val())' ,
'usewin' : 'chat.inObj = $(\'#leaderFightgroup2\');$(\'#leaderFightgroup2\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="leaderFightgroup2" class="inpt2" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
chat . inObj = $ ( '#leaderFightgroup2' ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
// оптимизация с вызовом
2022-06-06 21:30:34 +00:00
function leaderFx2 ( login ) {
top . frames [ 'main' ] . leader _login = login ;
top . frames [ 'main' ] . leader _type = 2 ;
top . frames [ 'main' ] . reflesh ( ) ;
}
2023-01-10 16:29:32 +00:00
// оптимизация в цикле 8
2022-06-06 21:30:34 +00:00
function intransferNew ( id , login ) {
win . add (
` intransfer ${ id } New ` ,
2023-01-10 16:29:32 +00:00
'Приглашение на обмен ' ,
` <center style="padding-top:10px;">Персонаж <b> ${ login } </b> предлагает вам совершить обмен. Вы согласны?<br><br></center> ` , {
2023-06-11 11:50:52 +00:00
'a1' : 'frames[\'main\'].location.href=\'/main.php?transfer=1&rnd=1\';' ,
'a2' : 'frames[\'main\'].location.href=\'/main.php?transfer=1&exit_transfer=1&rnd=1\';' ,
'a3' : 'frames[\'main\'].location.href=\'/main.php?transfer=1&exit_transfer=1&rnd=1\';'
2022-06-06 21:30:34 +00:00
} , 2 , 1 , 'min-width:300px;'
) ;
}
2023-01-10 16:29:32 +00:00
// оптимизация в цикле 9
2022-06-06 21:30:34 +00:00
function inclanNew ( id , align , clan _img , name , login ) {
win . add (
` inclan ${ id } New ` ,
2023-01-10 16:29:32 +00:00
` Приглашение вступить в клан " ${ name } " ` ,
2023-03-31 18:30:14 +00:00
` <center><br><img src="//img.new-combats.tech/i/align/align ${ align } .gif"><img src="//img.new-combats.tech/i/clan/ ${ clan _img } .gif"><b> ${ login } </b> предлагает вам вступить в клан <span style="display:inline-block"><img src="//img.new-combats.tech/i/align/align ${ align } .gif"> <b> ${ name } </b></span>. Вы согласны?<br><br></center> ` , {
2023-06-11 11:50:52 +00:00
'a1' : ` inclanNewsave( ${ id } ,1); ` ,
'a2' : ` inclanNewsave( ${ id } ,2); ` ,
'a3' : ` inclanNewsave( ${ id } ,2); `
2022-06-06 21:30:34 +00:00
} , 2 , 1 , 'min-width:300px;'
) ;
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 10
function inclanNewsave ( id , val ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` /main.php?newclan= ${ id } &newclan_val= ${ val } ` ) ;
2022-06-06 21:30:34 +00:00
}
//
2023-06-11 11:50:52 +00:00
function savePriems ( ) {
win . add ( 'saveComplPriem' , 'Запомнить набор приемов ' , '<center>Запомнить набор приемов, для быстрого переключения.Введите название набора:<br></center>' , {
'a1' : 'addSavedPriems($(\'#addSavedPriems\').val());' ,
'usewin' : '$(\'#addSavedPriems\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="addSavedPriems" class="inpt2" maxlength="30" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
// 12
function addSavedPriems ( val ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?skills=1&rz=4&savePriems= ${ val } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
function atackTower ( ) {
win . add ( 'towerAttakWin' , 'Напасть на персонажа ' , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
'a1' : 'atackTowergo($(\'#towerAttakTxt\').val());' ,
'usewin' : 'chat.inObj = $(\'#towerAttakTxt\');$(\'#towerAttakTxt\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="towerAttakTxt" class="inpt2" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
chat . inObj = $ ( '#towerAttakTxt' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 13
function atackTowergo ( val ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?attack= ${ val } ` ) ;
2022-06-06 21:30:34 +00:00
}
function anren ( ) {
2023-06-11 11:50:52 +00:00
win . add ( 'neAnimName' , 'Выберите кличку ' , '<center>Введите одно слово:<br><small>(Н е более десяти символов)</small><br></center>' , {
'a1' : 'anrenSave($(\'#addSavedAnmName\').val());' ,
'usewin' : '$(\'#addSavedAnmName\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="addSavedAnmName" class="inpt2" maxlength="10" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 14
function anrenSave ( name ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?pet=1&anml_login= ${ name } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 15
2023-06-11 11:50:52 +00:00
/ * *
* @ param { number } id
* @ param { string } name
* @ param { string } main
* @ param { string } indata
* /
function add _cb ( id , name , main , indata = '' ) {
const cb = document . getElementById ( 'chat_menu' ) ;
const ch = document . getElementById ( 'canals' ) ;
if ( ! cb ) {
return ;
}
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
cb _date [ cb _id ] = id ;
cb _rdate [ id ] = cb _id ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
if ( cb _ndate [ name ] !== undefined ) {
let j = 1 ,
name2 = '' ;
while ( j !== - 1 ) {
name2 = ` ${ name } ( ${ j } ) ` ;
console . log ( name2 )
if ( cb _ndate [ name2 ] === undefined ) {
name = name2 ;
j -= 2 ; // ту т1
}
j ++ ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
}
cb _ndate [ name ] = cb _id ;
let unright = '' ,
unleft = '' ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
function unLeft ( count ) {
return unleft = ` <tr><td style="width: 9px;"><div id="ldb ${ count } " class="zbtn1l"></div></td> ` ;
}
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
if ( cb _id === 1 ) {
unright = ` <td style="width: 9px;"><div id="rdb ${ cb _id } " class="zbtn1r"></div></td> ` ;
unLeft ( cb _id ) ;
} else {
unLeft ( cb _id ) ;
document . getElementById ( ` ldb ${ cb _id - 1 } ` ) . className = 'zbtn1r2' ;
}
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
let cd _wdw = [ 0 , 30 , 70 , 25 , 150 , 25 , 70 ] ;
let cd _stl = [ '' , '' , '' , '' , '' , '' , '' ] ;
if ( ! cd _wdw [ id ] ) cd _wdw = '' ;
else cd _wdw = ` width: ${ cd _wdw [ id ] } px ` ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
cb . innerHTML = ` <div id="cb ${ cb _id } " style="float:left; postition:static; cursor:default;" unselectable="on" onselectstart="return false;" oncontextmenu="return false;" onclick="open_cb( ${ cb _id } ,null);">
< div id = "confcb${cb_id}" class = "configcb" style = "display:none;" > < / d i v >
< table border = "0" id = "usbtn${cb_id}" onMouseDown = "open_cb(${cb_id});" cellspacing = "0" cellpadding = "0" >
$ { unleft } < td class = "zbtn1c" id = "cdb${cb_id}" >
< div style = "font-size:11px;${cd_wdw};text-align:center;" id = "blueText${cb_id}" class = "${cd_stl[id]}" > $ { name } < / d i v >
2023-08-16 00:05:22 +00:00
< / t d > $ { u n r i g h t } < / t r > < / t a b l e > < / d i v > $ { $ ( " # c h a t _ m e n u " ) . h t m l ( ) } ` ;
2023-06-11 11:50:52 +00:00
if ( ! $ ( ` #canal ${ id } ` ) . html ( ) ) {
ch . innerHTML = ` <div id="canal ${ id } " style="display:none;"> ${ indata } </div> ` ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
cb _id ++ ;
open _cb ( cb _select , null ) ;
2022-06-06 21:30:34 +00:00
}
function create _radio ( id , act , clss ) {
2023-06-11 11:50:52 +00:00
return ` <div class="crop"><img onclick=" ${ act } ; return false;" id="cr_rach_ ${ id } " src="//img.new-combats.tech/i/misc/radio.gif" radio_check="1" class="radio_gl ${ clss } "></div> ` ;
2022-06-06 21:30:34 +00:00
}
// 1
function create _check ( id , act , clss ) {
2023-06-11 11:50:52 +00:00
return ` <div class="crop2"><img onclick=" ${ act } ; return false;" id="cr_rach_ ${ id } " src="//img.new-combats.tech/i/misc/check.gif" radio_check="2" class="check_gl ${ clss } "></div> ` ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
var slcbrc = [ 0 , 0 , 1 , 0 , 0 ] ;
2022-06-06 21:30:34 +00:00
// 2
function cb _radio _click _b ( el , id ) {
if ( $ ( el ) . attr ( 'radio_check' ) == 1 ) {
2023-06-11 11:50:52 +00:00
if ( $ ( el ) . attr ( 'class' ) === 'radio_gloff' ) {
2022-06-06 21:30:34 +00:00
return cr _workWithClass ( el , 'radio_gloff' , 'radio_glon' , id , 1 )
2023-06-11 11:50:52 +00:00
}
2022-06-06 21:30:34 +00:00
return cr _workWithClass ( el , 'radio_glon' , 'radio_gloff' , id , 0 )
} else if ( $ ( el ) . attr ( 'radio_check' ) == 2 ) {
2023-06-11 11:50:52 +00:00
if ( $ ( el ) . attr ( 'class' ) === 'check_gloff' ) {
return cr _workWithClass ( el , 'check_gloff' , 'check_glon' , id , 1 )
}
2022-06-06 21:30:34 +00:00
return cr _workWithClass ( el , 'check_glon' , 'check_gloff' , id , 0 )
}
}
2023-06-11 11:50:52 +00:00
function cr _workWithClass ( element , classRemove , classAdd , id , count ) {
2022-06-06 21:30:34 +00:00
$ ( element ) . removeClass ( classRemove ) ;
$ ( element ) . addClass ( classAdd ) ;
2023-06-11 11:50:52 +00:00
slcbrc [ id ] = count ;
2022-06-06 21:30:34 +00:00
}
// 3
2023-06-11 11:50:52 +00:00
function cb _radio _click ( el , id ) {
let cb _sm = true ;
if ( id === 1 ) {
if ( slcbrc [ 1 ] === 0 ) {
if ( slcbrc [ 2 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc2' ) , 2 ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
if ( slcbrc [ 3 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc3' ) , 3 ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
} else return cb _sm = false ;
} else if ( id === 2 ) {
if ( slcbrc [ 2 ] === 0 ) {
if ( slcbrc [ 1 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc1' ) , 1 ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
} else return cb _sm = false ;
} else if ( id === 3 ) {
if ( slcbrc [ 3 ] === 0 ) {
if ( slcbrc [ 1 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc1' ) , 1 ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
if ( slcbrc [ 2 ] === 0 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc2' ) , 2 ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
if ( slcbrc [ 4 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc4' ) , 4 ) ;
2022-06-06 21:30:34 +00:00
}
}
2023-06-11 11:50:52 +00:00
} else if ( id === 4 ) {
if ( slcbrc [ 4 ] === 0 ) {
if ( slcbrc [ 3 ] === 1 ) {
cb _radio _click _b ( $ ( '#cr_rach_rc3' ) , 3 ) ;
2022-06-06 21:30:34 +00:00
}
}
}
2023-06-11 11:50:52 +00:00
cb _radio _click _b ( el , id ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
var fasthtmlarr = [ 0 , [ ] , [ ] ] ;
2022-06-06 21:30:34 +00:00
var fastpanelopen = 0 ;
// 4)
function addfastpanel ( id , name , type , price , price2 , madein , img , itemid , iznosnow , iznosmax , otdel , mbodet , mbused , norefl ) {
if ( fasthtmlarr [ 0 ] >= 10 ) {
2023-01-10 16:29:32 +00:00
return alert ( 'В с е слоты под быстрый доступ заполнены!' ) ;
2022-06-06 21:30:34 +00:00
} else {
2023-06-11 11:50:52 +00:00
if ( fasthtmlarr [ 2 ] [ id ] === undefined ) {
2022-06-06 21:30:34 +00:00
fasthtmlarr [ 0 ] ++ ;
var i = 0 ;
var iid = 0 ;
while ( i <= 10 ) {
2023-06-11 11:50:52 +00:00
if ( fasthtmlarr [ 1 ] [ i ] === undefined && iid === 0 ) {
2022-06-06 21:30:34 +00:00
iid = i ;
}
i ++ ;
}
2023-06-11 11:50:52 +00:00
fasthtmlarr [ 1 ] [ iid ] = [ id , name , type , price , price2 , madein , img , itemid , iznosnow , iznosmax , otdel , mbodet , mbused ] ;
2022-06-06 21:30:34 +00:00
fasthtmlarr [ 2 ] [ id ] = true ;
2023-06-11 11:50:52 +00:00
if ( fastpanelopen === 1 ) {
2023-01-10 16:29:32 +00:00
//Обновляем окно
2022-06-06 21:30:34 +00:00
fastpanelopen = 0 ;
win . closew ( 'fastpanel' ) ;
}
if ( norefl == 0 ) return fastpanelsave ( ) ;
2023-06-11 11:50:52 +00:00
}
2023-01-10 16:29:32 +00:00
return alert ( 'Данный предмет уже выставлен в слот!' ) ;
2022-06-06 21:30:34 +00:00
}
}
// 5
function intvalor ( mixed _var , base ) {
2023-06-13 00:44:13 +00:00
let tmp ;
2022-06-06 21:30:34 +00:00
if ( typeof ( mixed _var ) == 'string' ) {
tmp = parseInt ( mixed _var ) ;
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
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 ( ) {
2023-06-11 11:50:52 +00:00
//окно быстрого доступа
if ( fastpanelopen === 0 ) {
fastpanelopen = 1 ;
var fasthtml = '' ;
var i = 1 ;
while ( i <= 10 ) {
var slot = '' ;
var clss = '' ;
if ( fasthtmlarr [ 1 ] [ i ] !== undefined ) {
var titlemini = ` <b> ${ fasthtmlarr [ 1 ] [ i ] [ 1 ] } </b><br> ` ;
if ( fasthtmlarr [ 1 ] [ i ] [ 3 ] > 0 ) {
titlemini += ` <br>Цена: ${ fasthtmlarr [ 1 ] [ i ] [ 3 ] } кр. ` ;
}
if ( fasthtmlarr [ 1 ] [ i ] [ 4 ] > 0 ) {
titlemini += ` <br>Цена: ${ fasthtmlarr [ 1 ] [ i ] [ 4 ] } екр. ` ;
}
if ( fasthtmlarr [ 1 ] [ i ] [ 9 ] > 0 ) {
titlemini += ` <br>Долговечность: ${ intvalor ( fasthtmlarr [ 1 ] [ i ] [ 8 ] ) } / ${ intvalor ( fasthtmlarr [ 1 ] [ i ] [ 9 ] ) } ` ;
}
if ( fasthtmlarr [ 1 ] [ i ] [ 5 ] !== '' ) {
titlemini += ` <br>Сделано в ${ fasthtmlarr [ 1 ] [ i ] [ 5 ] } ` ;
}
slot = ` <img style="max-width:41px;height:26px;" src=" ${ c . img2 } /i/items/ ${ fasthtmlarr [ 1 ] [ i ] [ 6 ] } "> ` ;
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 = ` <img title="Пустой слот" src=" ${ c . img2 } /slot.gif"> ` ;
clss = 'filter: alpha(opacity=30);opacity:0.30;-moz-opacity:0.30;-khtml-opacity:0.30;' ;
}
fasthtml += ` <div align="center" style="width:41px;height:26px;margin-top:1px;margin-right:1px;display:inline-block;border-right:solid 1px #333;border-bottom:solid 1px #333;border-left:solid 1px #EEE;border-top:solid 1px #EEE; ${ clss } "> ${ slot } </div> ` ;
i ++ ;
}
win . add ( 'fastpanel' , 'Панель быстрого доступа ' , ` <center><div style="padding:5px;"> ${ fasthtml } </div></center></center> ` , {
'closewin' : 'fastpanelopen=0;' ,
'd' : ''
} , 1 , 1 , 'min-width:230px;' ) ;
} else {
fastpanelopen = 0 ;
win . closew ( 'fastpanel' ) ;
}
}
function fastpanelused ( i , e ) {
const mnmnmn = [ ] ;
let mni = 0 ;
if ( fasthtmlarr [ 1 ] [ i ] [ 12 ] === 1 ) {
mnmnmn [ mni ] = [ ` top.frames[ \' main \' ].location.href= \' ${ c . https } /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= \' ${ c . https } /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 ) ;
2022-06-06 21:30:34 +00:00
}
function fastpanelusedDelete ( i ) {
2023-06-11 11:50:52 +00:00
delete fasthtmlarr [ 2 ] [ fasthtmlarr [ 1 ] [ i ] [ 0 ] ] ;
delete fasthtmlarr [ 1 ] [ i ] ;
fasthtmlarr [ 0 ] -- ;
if ( fastpanelopen === 1 ) {
//Обновляем окно
fastpanelopen = 0 ;
win . closew ( 'fastpanel' ) ;
fastpanel ( ) ;
}
fastpanelsave ( ) ;
2022-06-06 21:30:34 +00:00
}
function fastpanelsave ( ) {
2023-06-11 11:50:52 +00:00
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 } ) ;
//
2022-06-06 21:30:34 +00:00
}
// 4.1
function cb _getBtl ( ) {
2023-06-13 00:44:13 +00:00
return ` <br>
2022-06-06 21:30:34 +00:00
< table style = "padding-left:5px;" width = "300" border = "0" cellpadding = "0" cellspacing = "0" >
< tr >
2023-06-13 00:44:13 +00:00
< td align = "left" onclick = "cb_radio_click($('#cr_rach_rc1'),1)" > $ { create _radio ( 'rc1' , '' , 'off' ) } < / t d >
< td onclick = "cb_radio_click($('#cr_rach_rc1'),1)" > Упрощенный бой < / t d >
2022-06-06 21:30:34 +00:00
< / t r >
< tr >
2023-06-13 00:44:13 +00:00
< td align = "left" width = "20" height = "20" onclick = "cb_radio_click($('#cr_rach_rc2'),2)" > $ { create _radio ( 'rc2' , '' , 'on' ) } < / t d >
2023-06-11 11:50:52 +00:00
< td onclick = "cb_radio_click($(\'#cr_rach_rc2\'),2)" > Стандартный бой < / t d >
2022-06-06 21:30:34 +00:00
< / t r >
< tr >
< td > & nbsp ; < / t d >
2023-06-13 00:44:13 +00:00
< td height = "20" onclick = "cb_radio_click($('#cr_rach_rc3'),3)" > $ { create _check ( 'rc3' , '' , 'off' ) } & nbsp ; Удар при выставлении хода < / t d >
2022-06-06 21:30:34 +00:00
< / t r >
< tr >
2023-06-13 00:44:13 +00:00
< td align = "left" onclick = "cb_radio_click($('#cr_rach_rc4'),4)" > $ { create _check ( 'rc4' , '' , 'off' ) } < / t d >
< td onclick = "cb_radio_click($('#cr_rach_rc4'),4)" height = "20" > Н е сбрасывать выбор < / t d >
2022-06-06 21:30:34 +00:00
< / t r >
< / t a b l e > ` ;
}
// 4.2
2023-06-11 11:50:52 +00:00
let cb _status _now = 0 ;
/ * *
* @ param { number } id
* /
2022-06-06 21:30:34 +00:00
function cb _status ( id ) {
//top.open_cb(cb_rdate[5],null);
2023-06-11 11:50:52 +00:00
if ( window . des !== 1 ) {
return ;
}
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
if ( ( top . frames [ 'main' ] . locitems !== 0 || ( top . frames [ 'main' ] . locitems === undefined && $ ( '#canal1' ) . html ( ) ) ) && id < 2 ) id += 2 ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
if ( id === cb _status _now ) {
return ;
}
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
var chat _btlConfig = cb _getBtl ( ) ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
function out _of _battleTop ( count , canalTrue ) {
if ( canalTrue ) $ ( "#canal3" ) . html ( '' ) ;
add _cb ( 4 , 'Системные сообщения' , 'ch4' , '<br>' ) ; // все (4)
add _cb ( 5 , 'Чат' , 'ch5' , '<br>' ) ; // все (4)
open _cb ( cb _rdate [ count ] , null ) ; // все (4)
cb _status _now = id ; // все
}
if ( id === 1 || id === 2 || id === 3 || id === 4 ) {
open _clear _cb ( ) ;
$ ( "#chat_menu" ) . html ( '' ) ;
cb _id = 1 ;
cb _date = { } ;
cb _rdate = { } ;
cb _ndate = { } ;
cb _select = 1 ;
ed _select = - 1 ;
cb _conf = { 1 : '100000001110' , 2 : '200010100001' , 3 : '211101010001' } ;
}
if ( id === 1 ) {
//чат
return out _of _battleTop ( 5 , true )
} else if ( id === 2 ) {
// боевая система
add _cb ( 2 , 'Настройки' , 'ch2' , chat _btlConfig ) ;
add _cb ( 3 , 'Лог' , 'ch3' , '<br><div id="battle_logg"></div>' ) ;
add _cb ( 7 , 'Мой Лог' , 'ch7' , '<br><div id="battle_mlogg"></div>' ) ;
return out _of _battleTop ( 3 , false )
} else if ( id === 3 ) {
//чат + предмет
return out _of _battleTop ( 5 , true )
} else if ( id === 4 ) {
// боевая система + предмет
add _cb ( 3 , 'Лог' , 'ch3' , '<br><div id="battle_logg"></div>' ) ;
return out _of _battleTop ( 3 , false )
2022-06-06 21:30:34 +00:00
}
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.3
function cb _statusTest ( ) {
2023-06-11 11:50:52 +00:00
if ( window . des !== 1 ) {
return ;
}
if ( top . frames [ 'main' ] !== undefined ) {
if ( top . frames [ 'main' ] . battle !== undefined ) {
if ( top . frames [ 'main' ] . battle > 0 ) return cb _status ( 2 ) ;
2022-06-06 21:30:34 +00:00
return cb _status ( 1 ) ;
}
2023-06-11 11:50:52 +00:00
return cb _status ( 1 ) ;
2022-06-06 21:30:34 +00:00
}
}
2023-06-11 11:50:52 +00:00
var cb _timer = setInterval ( 'cb_statusTest()' , 25 ) ;
2022-06-06 21:30:34 +00:00
// 4.4
function falseBlue ( id ) {
$ ( ` #blueText ${ id } ` ) . css ( { 'color' : '' } ) ;
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.5
2023-06-11 11:50:52 +00:00
/ * *
* @ param { number } id
* /
2022-06-06 21:30:34 +00:00
function blueTextSee ( id ) {
2023-06-11 11:50:52 +00:00
let color = id === 6 ? 'red' : 'blue' ;
if ( cb _select !== cb _rdate [ id ] && ( id === 4 || id === 5 || id === 6 ) ) {
return $ ( ` #blueText ${ cb _rdate [ id ] } ` ) . css ( { 'color' : color } ) ;
2022-06-06 21:30:34 +00:00
}
}
//[0][1][2][3][4][5][6][7][8][9]
/ *
2023-01-10 16:29:32 +00:00
0 - движение , 1 - вверх , 2 - вниз , 3 - без действия
1 - общий чат
2 - приватный чат
3 - система ( личная )
4 - система ( общая )
5 - клан
6 - клан ( система )
7 - межгород
8 - лог боя
9 - лог боя ( личный )
10 - автоочистка чата ( после боя )
11 - автоочистка чата ( хранить только видимые сообщения )
2022-06-06 21:30:34 +00:00
* /
// 4.6
2023-06-11 11:50:52 +00:00
function open _clear _work ( symbId , count , className ) {
2023-08-16 00:05:22 +00:00
if ( top . document . getElementById ( ` ${ symbId } db ${ count } ` ) != null ) {
top . document . getElementById ( ` ${ symbId } db ${ count } ` ) . className = className ;
}
if ( top . document . getElementById ( ` canal ${ cb _date [ count ] } ` ) != null ) {
top . document . getElementById ( ` canal ${ cb _date [ count ] } ` ) . style . display = 'none' ;
}
2022-06-06 21:30:34 +00:00
}
function open _clear _cb ( ) {
2023-06-11 11:50:52 +00:00
let i = 1 ;
while ( i !== - 1 ) {
if ( top . document . getElementById ( ` cb ${ i } ` ) ) {
2022-06-06 21:30:34 +00:00
open _clear _work ( "c" , i , "zbtn1c" )
2023-06-11 11:50:52 +00:00
if ( i === 1 ) {
2022-06-06 21:30:34 +00:00
open _clear _work ( "r" , i , "zbtn1r" )
}
2023-06-11 11:50:52 +00:00
if ( i === cb _id - 1 ) {
2022-06-06 21:30:34 +00:00
open _clear _work ( "l" , i , "zbtn1l" )
}
if ( i >= 1 && i < cb _id - 1 ) {
open _clear _work ( "l" , i , "zbtn1r2" )
}
} else {
i = - 2 ;
}
i ++ ;
}
}
2023-06-11 11:50:52 +00:00
function open _cb _work ( select ) {
const ed = top . document . getElementById ( ` blueText ${ select } ` ) ;
const edv = top . document . getElementById ( ` edit_name ${ select } ` ) ;
2022-06-06 21:30:34 +00:00
ed . innerHTML = edv . value ;
ed _select = - 1 ;
}
// 4.7
function open _cb ( id , ed ) {
//
if ( ed == null ) {
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` blueText ${ ed _select } ` ) && id !== ed _select ) {
2022-06-06 21:30:34 +00:00
opern _cfg ( ed _select , 2 ) ;
open _cb _work ( ed _select )
}
2023-06-11 11:50:52 +00:00
open _clear _cb ( ) ;
if ( top . document . getElementById ( ` cb ${ id } ` ) ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` cdb ${ id } ` ) . className = 'zbtn2c' ;
2023-06-11 11:50:52 +00:00
if ( id === 1 ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` rdb ${ id } ` ) . className = 'zbtn2r' ;
}
2023-06-11 11:50:52 +00:00
if ( id === cb _id - 1 ) {
if ( top . document . getElementById ( ` ldb ${ id } ` ) ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` ldb ${ id } ` ) . className = 'zbtn2l' ;
}
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` ldb ${ ( id - 1 ) } ` ) ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` ldb ${ ( id - 1 ) } ` ) . className = 'zbtn2r2' ;
}
}
if ( id >= 1 && id < cb _id - 1 ) {
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` ldb ${ id } ` ) ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` ldb ${ id } ` ) . className = 'zbtn2r3' ;
}
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` ldb ${ ( id - 1 ) } ` ) ) {
2022-06-06 21:30:34 +00:00
top . document . getElementById ( ` ldb ${ ( id - 1 ) } ` ) . className = 'zbtn2r2' ;
}
}
2023-08-16 00:05:22 +00:00
if ( top . document . getElementById ( ` canal ${ cb _date [ id ] } ` ) != null ) {
top . document . getElementById ( ` canal ${ cb _date [ id ] } ` ) . style . display = '' ;
}
2022-06-06 21:30:34 +00:00
cb _select = id ;
}
2023-06-11 11:50:52 +00:00
falseBlue ( cb _select ) ;
if ( cb _date [ cb _select ] === 5 || cb _date [ cb _select ] === 4 ) {
2022-06-06 21:30:34 +00:00
$ ( '#chat_list' ) . scrollTop ( $ ( '#chat_list' ) [ 0 ] . scrollHeight ) ;
} else {
$ ( '#chat_list' ) . scrollTop ( 0 ) ;
}
2023-06-11 11:50:52 +00:00
} else if ( ed _select === - 1 ) {
2022-06-06 21:30:34 +00:00
opern _cfg ( ed _select , 2 ) ;
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` blueText ${ id } ` ) ) {
let ed = top . document . getElementById ( ` blueText ${ id } ` ) ;
ed . innerHTML = ` <table border="0" width="120" cellspacing="0" cellpadding="0"><tr><td><input style="height:9px; width:100px; line-height:9px;" value=" ${ ed . innerHTML } " name="edit_name ${ id } " id="edit_name ${ id } " /></td><td><a style="height:10px; line-height:10px;" title="Настройки вкладки" href="javascript:void(0);" onClick="opern_cfg( ${ id } ,1);return false;"><img width="10" height="10" src="setmen.jpg" style="display:block;" /></a></td></tr></table> ` ;
2022-06-06 21:30:34 +00:00
ed _select = id ;
}
} else {
opern _cfg ( ed _select , 2 ) ;
2023-06-11 11:50:52 +00:00
if ( top . document . getElementById ( ` blueText ${ ed _select } ` ) ) {
2022-06-06 21:30:34 +00:00
open _cb _work ( ed _select )
}
}
}
function rmve ( id ) {
$ ( id ) . remove ( ) ;
}
2023-06-11 11:50:52 +00:00
// 4.8
function buyShopNow ( id , url , itm = 'неизвестный предмет' , money = 0 , prc = '' ) {
const i = top . frames [ 'main' ] . document . getElementById ( ` shpcolvo ${ id } ` ) ;
if ( i ) {
2022-06-06 21:30:34 +00:00
url += ` &x= ${ i . value } ` ;
if ( i . value > 1 ) {
2023-01-10 16:29:32 +00:00
itm += ` (x ${ i . value } ) ` ; // тут
money *= i . value ; // тут
2022-06-06 21:30:34 +00:00
}
}
2023-01-10 16:29:32 +00:00
if ( confirm ( ` Вы хотите купить " ${ itm } " за ${ ( money ) } ${ prc } ` ) ) {
2022-06-06 21:30:34 +00:00
top . frames [ 'main' ] . location = url ;
}
}
// 4.9
function payPlus ( id ) {
2023-06-11 11:50:52 +00:00
const i = top . frames [ 'main' ] . document . getElementById ( ` shopPlus ${ id } ` ) ;
if ( i ) {
const i2 = top . frames [ 'main' ] . document . getElementById ( ` shopPlus ${ lshp } ` ) ;
if ( i2 && i2 . innerHTML !== '' ) i2 . innerHTML = '' ;
2023-01-10 16:29:32 +00:00
i . innerHTML = ` Кол-во: <input id="shpcolvo ${ id } " value="1" size="4" maxlength="3" type="text" /><br> ` ;
2023-06-11 11:50:52 +00:00
lshp = id ;
2022-06-06 21:30:34 +00:00
}
}
function getUrl ( f , s ) {
top . frames [ 'main' ] . location = s ;
}
// 4.10
var game = {
2023-01-10 16:29:32 +00:00
sort1 : function ( i , ii ) { // По возрастанию
2022-06-06 21:30:34 +00:00
if ( i > ii ) return 1 ;
else return - 1 ;
} ,
2023-01-10 16:29:32 +00:00
sort2 : function ( i , ii ) { // По убыванию
2022-06-06 21:30:34 +00:00
if ( i > ii ) return - 1 ;
else return 1 ;
} ,
testCity : function ( v ) {
2023-06-13 00:44:13 +00:00
return v === 'abandonedplain' ? 'dungeon' : v ;
2022-06-06 21:30:34 +00:00
}
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.12
2023-06-11 11:50:52 +00:00
function grava ( id , name , money , date ) {
win . add ( ` idgrav ${ id } ` , ` Выгравировать надпись за ${ money } кр. ` , ` <center style="padding:5px;">Текст: <input style="width:220px;" value="" type="text" id="txtgrav ${ id } " name="txtgrav ${ id } "></center> ` , { 'a1' : ` gravas( ${ id } ); ` } , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.13
function un _grava ( id , name , money , date ) {
2023-06-11 11:50:52 +00:00
win . add ( ` idgrav ${ id } ` , ` Изменить надпись за ${ money } кр. ` , ` <center style="padding:5px;">Текст: <input style="width:220px;" value="" type="text" id="txtgrav ${ id } " name="txtgrav ${ id } "></center> ` , { 'a1' : ` un_gravas( ${ id } ); ` } , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.14
function gravas ( id ) {
2023-06-11 11:50:52 +00:00
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?r=2&grav_text= ${ $ ( ` #txtgrav ${ id } ` ) . val ( ) } &grav= ${ id } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.15
function un _gravas ( id ) {
2023-06-11 11:50:52 +00:00
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?r=2&grav_text= ${ $ ( ` #txtgrav ${ id } ` ) . val ( ) } &un_grav= ${ id } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/*Розыгрыш предмета*/
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.17
2023-06-13 00:44:13 +00:00
function fartgame ( id , img , name , x ) {
2023-06-11 11:50:52 +00:00
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-13 00:44:13 +00:00
win . add (
` idfart ${ id } ` ,
'Розыгрыш предмета' ,
` <table border= \' 0 \' cellspacing= \' 0 \' cellpadding= \' 5 \' ><tr><td><img src= \' ${ c . img2 } /i/items/ ${ img } \' ></td><td align= \' left \' >Принять участие в розыгрыше предмета "<b> ${ name } </b>" ?</td></tr></table> ` ,
{
'a1' : ` fartok( ${ id } ); ` ,
'a2' : ` fartcancel( ${ id } ); ` ,
'n' : ''
} , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.18
function fartok ( id ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?itm_luck= ${ id } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.19
function fartcancel ( id ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php?itm_unluck= ${ id } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2023-01-10 16:29:32 +00:00
/* Разделить предметы? */
2023-06-11 11:50:52 +00:00
function unstack ( id , img , name , x , date , r , fdfdf ) {
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
win . add ( ` iunstack ${ id } ` , 'Разделить предмет?' , date , {
'a1' : ` unstackAction( ${ id } , ${ r } ); ` , 'n' : ` <small>
< label style = "font-size:10px;" for = "chiunstack${id}" > Количество : < / l a b e l > < i n p u t s i z e = " 4 " t y p e = " t e x t " v a l u e = " 1 " s t y l e = " f o n t - s i z e : 1 0 p x ; b a c k g r o u n d : # e e e ; " n a m e = " c h i u n s t a c k $ { i d } " i d = " c h i u n s t a c k $ { i d } " > < / s m a l l > `
} , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.20
function unstackAction ( id , r ) {
2023-06-11 11:50:52 +00:00
let inv1 = '' ;
2022-06-06 21:30:34 +00:00
if ( $ ( ` #chiunstack ${ id } ` ) . val ( ) > 0 ) {
inv1 += ` unstackCount= ${ $ ( ` #chiunstack ${ id } ` ) . val ( ) } & ` ;
}
2023-06-11 11:50:52 +00:00
if ( r !== 0 ) inv1 += ` inv&otdel= ${ r } & ` ;
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` main.php? ${ inv1 } unstack= ${ id } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2023-01-10 16:29:32 +00:00
/* Выкинуть предмет */
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.21
2023-06-11 11:50:52 +00:00
function drop ( id , img , name , x , date , r , fdfdf ) {
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
win . add ( ` idrop ${ id } ` , 'Выбросить предмет?' , date , {
'a1' : ` del( ${ id } , ${ r } ); ` ,
'n' : ` <small><input type="checkbox" name="chidrop ${ id } " id="chidrop ${ id } "> <label for="chidrop ${ id } ">В с е предметы данного вида</label></small> `
} , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
// 4.22
function del ( id , r ) {
2023-06-11 11:50:52 +00:00
let inv1 = '' ;
2023-06-13 00:44:13 +00:00
if ( $ ( ` #chidrop ${ id } ` ) . attr ( 'checked' ) ) {
2022-06-06 21:30:34 +00:00
inv1 += 'deleteall7=1&' ;
}
2023-06-11 11:50:52 +00:00
if ( r !== 0 ) inv1 += ` inv&otdel= ${ r } & ` ;
getUrl ( 'main' , ` main.php? ${ inv1 } delete= ${ id } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Использование предмета */
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.23
2023-06-11 11:50:52 +00:00
function useiteminv ( id , img , name , x , date , r , inv ) {
if ( id <= 0 ) {
return ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
if ( inv === 0 ) {
r = 0 ;
}
win . add ( ` iuse ${ id } ` , 'Подтверждение' , date , { 'a1' : ` useitminv( ${ id } , ${ r } ); ` } , 2 , 1 , 'width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
// 4.24
function useitminv ( id , r ) {
2023-06-11 11:50:52 +00:00
let inv1 = '' ;
if ( r !== 0 ) inv1 = ` inv&otdel= ${ r } & ` ;
getUrl ( 'main' , ` main.php? ${ inv1 } use_pid= ${ id } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Использовать предмет в поединке */
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
// 4.25
function useMagicBattle ( name , id , img , type , type _use , text , team ) {
let onEnLogin ;
if ( type _use === 1 ) {
onEnLogin = team === 1 ? c . login : '' ;
2023-06-13 00:44:13 +00:00
win . add (
` iusemg ${ id } ` ,
` Используем " ${ name } " ` ,
'<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' ,
{
'a1' : ` useMagicGoGoBattle(' ${ id } '); ` ,
'usewin' : ` chat.inObj = $ ('#useMagicLoginBtl ${ id } '); $ ('#useMagicLoginBtl ${ id } ').focus() ` ,
'd' : ` <center><input style="width:96%; margin:5px;" id="useMagicLoginBtl ${ id } " class="inpt2" type="text" value=" ${ onEnLogin } "></center> `
} ,
3 ,
1 ,
'min-width:300px;'
) ;
2023-06-11 11:50:52 +00:00
chat . inObj = $ ( ` #useMagicLoginBtl ${ id } ` ) ;
} else if ( type _use === 2 ) {
2023-06-13 00:44:13 +00:00
let txxt = ` <table width='100%' border='0' cellspacing='0' cellpadding='0'>
< tr >
< td width = '80' valign = 'middle' >
< div align = 'center' >
< img src = '${c.img2}/i/eff/${img}' >
< / d i v >
< / t d >
< td valign = 'middle' align = 'left' >
& quot ; < b > $ { name } < / b > & q u o t ; < b r > И с п о л ь з о в а т ь с е й ч а с ?
< / t d >
< / t r >
< / t a b l e > ` ;
win . add (
` iusemg ${ id } ` ,
` Используем " ${ name } " ` ,
txxt ,
{
'a1' : ` useMagicGoGoBattle(' ${ id } ' `
} ,
2 ,
1 ,
'width:300px;'
) ;
2022-06-06 21:30:34 +00:00
}
}
// 4.26
2023-06-13 00:44:13 +00:00
function useMagicGoGoBattle ( id ) {
2024-05-10 11:32:06 +00:00
top . frames [ 'main' ] . useitem ( id , $ ( ` #useMagicLoginBtl ${ id } ` ) . val ( ) ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Использовать предмет на */
2022-06-06 21:30:34 +00:00
2023-06-11 11:50:52 +00:00
// 4.27
function useMagic ( name , id , img , type , urlUse ) {
win . add ( ` iusemg ${ id } ` , ` Используем " ${ name } " ` , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
'a1' : ` useMagicGoGo( \' ${ urlUse } \' , \' ${ id } \' ); ` ,
'usewin' : ` chat.inObj = $ ( \' #useMagicLogin ${ id } \' ); $ ( \' #useMagicLogin ${ id } \' ).focus() ` ,
'd' : ` <center><input style="width:96%; margin:5px;" id="useMagicLogin ${ id } " class="inpt2" type="text" value=" ${ c . login } "></center> `
} , 3 , 1 , 'min-width:300px;' ) ;
chat . inObj = $ ( ` #useMagicLogin ${ id } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.28
function useMagicGoGo ( url , id ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` ${ url } &login= ${ $ ( ` #useMagicLogin ${ id } ` ) . val ( ) } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Использовать предмет на предмет */
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.29
2023-06-11 11:50:52 +00:00
function useRune ( id , name , img , urlUse ) {
win . add ( ` iuseRN ${ id } ` , ` Используем " ${ name } " ` , '<center>Укажите название предмета:<br><small>(предмет должен находится в инвентаре)</small></center>' , {
'a1' : ` useRuneGoGo( \' ${ urlUse } \' , \' ${ id } \' ); ` ,
'usewin' : ` $ ( \' #useRubeItem ${ id } \' ).focus() ` ,
'd' : ` <center><input style="width:96%; margin:5px;" id="useRubeItem ${ id } " class="inpt2" type="text" value=""></center> `
} , 3 , 1 , 'min-width:300px;' ) ;
2022-06-06 21:30:34 +00:00
}
// 4.30
function useRuneGoGo ( url , id ) {
2023-06-11 11:50:52 +00:00
getUrl ( 'main' , ` ${ url } &item_rune= ${ $ ( ` #useRubeItem ${ id } ` ) . val ( ) } &sd4= ${ sd4key } ` ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Используем смену */
2022-06-06 21:30:34 +00:00
function smena1 ( ) {
2023-06-11 11:50:52 +00:00
win . add ( 'smena1_enemy' , 'Смена противника ' , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
'a1' : 'smena2($(\'#useSmena1_enemy\').val())' ,
'usewin' : 'chat.inObj = $(\'#useSmena1_enemy\');$(\'#useSmena1_enemy\').focus()' ,
'd' : '<center><input style="width:96%; margin:5px;" id="useSmena1_enemy" class="inpt2" type="text" value=""></center>'
} , 3 , 1 , 'min-width:300px;' ) ;
chat . inObj = $ ( '#useSmena1_enemy' ) ;
2022-06-06 21:30:34 +00:00
}
function smena2 ( login ) {
top . frames [ 'main' ] . smena _login = login ;
top . frames [ 'main' ] . reflesh ( ) ;
}
2023-01-10 16:29:32 +00:00
/* Использовать прием на */
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.31
function priemOnUser ( pr , id , nm , onInUser , img ) {
2023-06-11 11:50:52 +00:00
let styleWin = 1 ;
if ( img . substring ( 4 , 7 ) === 'air' ) {
2022-06-06 21:30:34 +00:00
styleWin = 3 ;
2023-06-11 11:50:52 +00:00
} else if ( img . substring ( 4 , 9 ) === 'water' ) {
2022-06-06 21:30:34 +00:00
styleWin = 4 ;
2023-06-11 11:50:52 +00:00
} else if ( img . substring ( 4 , 9 ) === 'earth' ) {
2022-06-06 21:30:34 +00:00
styleWin = 5 ;
2023-06-11 11:50:52 +00:00
} else if ( img . substring ( 4 , 8 ) === 'fire' ) {
2022-06-06 21:30:34 +00:00
styleWin = 2 ;
}
2023-01-10 16:29:32 +00:00
win . add ( ` iusepr ${ pr } ` , ` Используем " ${ nm } " ` , '<center>Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></center>' , {
2023-06-11 11:50:52 +00:00
'a1' : ` usePriemNow( \' ${ pr } \' ); ` ,
'usewin' : ` chat.inObj = $ ( \' #usePriemLogin ${ pr } \' ); $ ( \' #usePriemLogin ${ pr } \' ).focus() ` ,
2024-05-10 13:57:27 +00:00
'd' : ` <center><input style="width:96%; margin:5px;" id="usePriemLogin ${ pr } " class="inpt2" type="text" onKeyPress="if (event.keyCode==13) { usePriemNow( \' ${ pr } \' );win.closew( \' iusepr ${ pr } \' ); } " value=" ${ onInUser } "></center> `
2023-06-11 11:50:52 +00:00
} , 3 , styleWin , 'min-width:300px;' ) ;
chat . inObj = $ ( ` #usePriemLogin ${ pr } ` ) ;
2022-06-06 21:30:34 +00:00
$ ( ` #usePriemLogin ${ pr } ` ) . focus ( ) ;
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
// 4.32
function usePriemNow ( id ) {
top . frames [ 'main' ] . use _on _pers = $ ( ` #usePriemLogin ${ id } ` ) . val ( ) ;
2024-05-10 11:32:06 +00:00
top . frames [ 'main' ] . usepriem ( id ) ;
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
var datas = '' ;
function qn _win _cls ( ) {
$ ( '#qsst' ) . html ( '' ) ;
2023-06-11 11:50:52 +00:00
$ ( '#qsst' ) . css ( 'display' , 'none' ) ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Поединки */
2022-06-06 21:30:34 +00:00
function goSit ( dd ) {
2023-06-11 11:50:52 +00:00
let bcl = [ ] ;
bcl [ 1 ] = 0 ;
bcl [ 2 ] = 1 ;
bcl [ 3 ] = 0 ;
bcl [ 4 ] = 0 ;
if ( top . frames [ 'main' ] ) {
if ( top . frames [ 'main' ] . document . getElementById ( 'auto_battle' ) ) {
2022-06-06 21:30:34 +00:00
top . frames [ 'main' ] . document . getElementById ( 'auto_battle' ) . value = bcl [ 3 ] ;
}
2023-06-11 11:50:52 +00:00
if ( top . frames [ 'main' ] . document . getElementById ( 'save_zones' ) ) {
2022-06-06 21:30:34 +00:00
top . frames [ 'main' ] . document . getElementById ( 'save_zones' ) . value = bcl [ 4 ] ;
}
2023-06-11 11:50:52 +00:00
if ( top . frames [ 'main' ] . document . getElementById ( 'fast_battle' ) ) {
2022-06-06 21:30:34 +00:00
top . frames [ 'main' ] . document . getElementById ( 'fast_battle' ) . value = bcl [ 1 ] ;
}
}
}
function btlclearlog ( ) {
2023-06-11 11:50:52 +00:00
$ ( top . document . getElementById ( 'battle_logg' ) ) . html ( '' ) ;
$ ( top . document . getElementById ( 'battle_mlogg' ) ) . html ( '' ) ; //Тут новый лог
2022-06-06 21:30:34 +00:00
}
2023-06-11 11:50:52 +00:00
2022-06-06 21:30:34 +00:00
function r _page ( a ) {
top . frames [ 'main' ] . location . reload ( ) ;
}
2023-06-11 11:50:52 +00:00
const key _actions = [ '' , '' , 1 ] ;
2022-06-06 21:30:34 +00:00
$ ( document ) . ready ( function ( ) {
$ ( '#globalMain' ) . click ( function ( ) {
2023-06-11 11:50:52 +00:00
win . addaction ( 2 , 0 ) ;
2022-06-06 21:30:34 +00:00
} ) ;
$ ( document ) . keypress ( function ( e ) {
2023-06-11 11:50:52 +00:00
if ( key _actions [ 2 ] === 1 ) {
if ( e . keyCode === 13 && key _actions [ 0 ] !== '' ) {
2023-01-10 16:29:32 +00:00
//нажата клавиша enter
2023-06-11 11:50:52 +00:00
eval ( key _actions [ 0 ] ) ;
2022-06-06 21:30:34 +00:00
}
}
} ) ;
} ) ;
// 4.32
2023-06-11 11:50:52 +00:00
function qn _slk ( ) {
2023-06-13 00:44:13 +00:00
if ( ! qst _sml ) {
2023-06-11 11:50:52 +00:00
return ;
}
$ ( '#qsst' ) . fadeIn ( 'fast' ) ;
$ ( '#mini_qsst' ) . fadeOut ( 'fast' ) ;
$ ( '#mini_qsst' ) . html ( '' ) ;
qst _sml = '' ;
}
function opern _cfg ( id , v ) {
if ( top . document . getElementById ( "confcb" + id ) ) {
const cm = top . document . getElementById ( "confcb" + id ) ;
let display = window . getComputedStyle ( cm ) . getPropertyValue ( 'display' )
if ( ! display || v === 2 ) {
$ ( '#confcb' + id ) . html ( '' ) ;
window . getComputedStyle ( cm ) . setProperty ( 'display' , 'none' )
} else {
$ ( '#confcb' + id )
. html ( '<small><div class="configcbdiv"><span style="float:left;cursor:help;" title="Направление прокрутки чата">Движение:</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Сообщения адресованные Вам">Общий чат:</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Приватные сообщения адресованные Вам">Приват:</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Системные сообщения (общие)">System (1):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Системные сообщения (личные)">System (2):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Чат клана (если Вы состоите в одном из кланов)">Клан чат:</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Системные сообщения клана (если Вы состоите в одном из кланов)">System (3):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Междугороднии сообщения">Мужгород:</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Общий лог боя">Лог боя (1):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Личный лог боя (показываются только Ваши действия)">Лог боя (2):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Автоматически очищать чат после боя">Очистка (1):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;cursor:help;" title="Автоматически удалять сообщения которые пропадают из "поля зрения"">Очистка (2):</span><span style="float:right;">none</span></div>' +
'<div class="configcbdiv"><span style="float:left;"><hr>[+] [+] [+]</span></div></small>' ) ;
cm . style . display = '' ;
}
}
2022-06-06 21:30:34 +00:00
}