game/modules_data/btl_.php

1143 lines
77 KiB
PHP
Raw Normal View History

2022-12-19 18:26:14 +00:00
<?php
2022-06-06 21:30:34 +00:00
2023-11-02 13:57:39 +00:00
use Core\Config;
use Core\Db;
2022-06-06 21:30:34 +00:00
2023-11-02 13:57:39 +00:00
/** @var User $u */
if (!defined('GAME')) {
2022-12-19 18:26:14 +00:00
die();
2022-06-06 21:30:34 +00:00
}
include('jx/battle/log_text.php');
2022-12-19 18:26:14 +00:00
if (isset($btl_last['id']) && $u->info['battle'] == 0) {
$u->info['battle'] = $btl_last['battle'];
2022-06-06 21:30:34 +00:00
}
2022-12-19 18:26:14 +00:00
if ($u->info['battle'] == 0 || isset($_GET['bend'])) {
die('<script>top.frames[\'main\'].location = "main.php";</script>');
2022-06-06 21:30:34 +00:00
}
$thisBattle = Battle::get($u->info['battle']);
2023-11-02 13:57:39 +00:00
$allprice = Db::getValue('select sum(price1) from battle_users where battle = ?', [$u->info['battle']]);
2022-06-06 21:30:34 +00:00
2023-11-02 13:57:39 +00:00
function finish(User $u): void
{
if (!isset($_GET['finish'])) {
return;
2022-12-19 18:26:14 +00:00
}
2023-11-02 13:57:39 +00:00
Db::sql("update stats set battle_text = '', last_b = 0 where id = ?, $u->info['id'");
Db::sql('update battle_users set finish = 1 where uid = ?', [$u->info['id']]);
header('location: main.php');
die();
}
function convert($from, $to, $var)
{
if (is_array($var)) {
$new = [];
foreach ($var as $key => $val) {
$new[convert($from, $to, $key)] = convert($from, $to, $val);
}
$var = $new;
} else {
if (is_string($var)) {
$var = iconv($from, $to, $var);
}
}
return $var;
}
function normJsonStr($str)
{
return preg_replace_callback(
'/\\\u([a-f0-9]{4})/i',
function ($m) {
return chr(hexdec($m[1]) - 1072 + 224);
},
$str
);
2022-06-06 21:30:34 +00:00
}
2022-12-19 18:26:14 +00:00
$allprice = Battle::getType($allprice, $thisBattle['smert'] == 1);
2023-11-02 13:57:39 +00:00
2022-06-06 21:30:34 +00:00
?>
2023-11-02 13:57:39 +00:00
<script src="/js/jquery.js"></script>
<link href="/btl_1.css" rel="stylesheet">
<script>
var server_fight = "";
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
function maginfo(z, p, m, obj) {
2023-11-02 13:57:39 +00:00
let r = '';
2022-12-19 18:26:14 +00:00
r += '<b>' + $(obj).attr('magelogin') + '</b><br><br>';
2023-01-10 16:29:32 +00:00
r += 'Мощь: ' + m + ', ';
r += 'Защита: ' + z + ', ';
r += 'Подавление: ' + p + '';
2022-12-19 18:26:14 +00:00
return r;
}
<?php
if (isset($btl_last['id']) && ($u->info['battle'] == 0 || $u->info['battle'] == $btl_last['battle'])) {
echo 'var battleFinishData = "' . $u->info['battle_text'] . '";';
2023-11-02 13:57:39 +00:00
finish($u);
2022-12-19 18:26:14 +00:00
} else {
echo 'var battleFinishData = -1;';
}
?>
var noErTmr;
var smnpty = <?= (int)$u->info['smena'] ?>;
2022-12-19 18:26:14 +00:00
setInterval('top.c.noEr = 0;', 1000);
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
function mbsum(event) {
if (document.getElementById('back_menu_down').style.display != 'none') {
setTimeout("document.getElementById('back_menu_down').click()", 1000);
}
if ((event.keyCode == 13 || event.keyCode == 70) && top.c.noEr == 0) {
if (document.getElementById('mainpanel').style.display == 'none') {
reflesht();
} else {
if (document.getElementById('go_btn').disabled) {
} else {
atackt();
top.c.noEr = 1;
clearTimeout(top.c.noErTmr);
top.c.noErTmr = setTimeout('top.c.noEr = 0;', 1000);
document.getElementById('go_btn').setAttribute("class", "buttons inpBtl btnnew");
}
}
}
//space
if (event.keyCode == 32 && top.c.noEr == 0) {
document.getElementById('reflesh_btn').setAttribute("class", "buttons btnnew btnnew2");
document.getElementById('reflesh_btn').setAttribute("onclick", "");
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
if (document.getElementById('reflesh_btn').disabled) {
} else {
reflesht();
top.c.noEr = 1;
clearTimeout(top.c.noErTmr);
top.c.noErTmr = setTimeout('top.c.noEr = 0;', 2000);
}
}
if (event.keyCode == 49) {
change_radioKeys(1, false);
}
if (event.keyCode == 50) {
change_radioKeys(2, false);
}
if (event.keyCode == 51) {
change_radioKeys(3, false);
}
if (event.keyCode == 52) {
change_radioKeys(4, false);
}
if (event.keyCode == 53) {
change_radioKeys(5, false);
}
if (event.keyCode == 48) {
change_radioKeys(0, false);
}
}
$(document.body).bind('keyup', function (event) {
mbsum(event);
});
function shpb() {
$(document).find('div.pimg').unbind('mouseover');
$(document).find('div.pimg').unbind('mouseout');
$(document).find('div.pimg').unbind('mousedown');
$(document).find('div.pimg').bind('mouseover', function () {
top.hi(this, $(this).attr('stt'), event, 0, 1, 1, 1, 'stt');
});
$(document).find('div.pimg').bind('mouseout', function () {
top.hic();
});
$(document).find('div.pimg').bind('mousedown', function () {
top.hic();
});
var test = $(document).find('div.pimg');
var i = 0;
while (i != -1) {
if (test[i] != undefined) {
// 1.1
if ($(test[i]).attr('pog') > 1 && $(test[i]).attr('stl') == 0) {
$(test[i]).attr('stl', 1);
$(test[i]).html(`<span class="sp1">${$(test[i]).attr('pog')}</span><span class="sp4">${$(test[i]).attr('pog')}</span><span class="sp3">${$(test[i]).attr('pog')}</span><span class="sp2">${$(test[i]).attr('pog')}</span><div>${$(test[i]).attr('pog')}</div>${$(test[i]).html()}`);
} else if ($(test[i]).attr('col') > 1 && $(test[i]).attr('stl') == 0) {
// 1.2
$(test[i]).attr('stl', 1);
$(test[i]).html(`<span class="sp1">x${$(test[i]).attr('col')}</span><span class="sp4">x${$(test[i]).attr('col')}</span><span class="sp3">x${$(test[i]).attr('col')}</span><span class="sp2">x${$(test[i]).attr('col')}</span><div>x${$(test[i]).attr('col')}</div>${$(test[i]).html()}`);
}
} else i = -2;
i++;
}
}
2022-06-06 21:30:34 +00:00
</script>
<div style="background-color:#e8e8e8">
2023-11-02 13:57:39 +00:00
<script src="/js/btl_info.js"></script>
2022-12-19 18:26:14 +00:00
<script>
$.ajaxSetup({cache: false});
$(window).error(function () {
return true;
});
</script>
<script src="//img.new-combats.tech/js/jx/jquery.form.js" type="text/javascript"></script>
2023-11-02 13:57:39 +00:00
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
2022-12-19 18:26:14 +00:00
<script type="text/javascript">
2023-03-31 16:54:33 +00:00
var login = '<?= $u->info['login']; ?>';
var za = <?= (int)$u->stats['zona']; ?>;
var zb = <?= (int)$u->stats['zonb']; ?>;
2023-03-31 16:54:33 +00:00
var level = <?= $u->info['level']; ?>;
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
function replaceAll(find, replace, str) {
return str.replace(new RegExp(find, 'g'), replace);
}
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
function explode(delimiter, string) {
var emptyArray = {0: ''};
if (arguments.length != 2
|| typeof arguments[0] == 'undefined'
|| typeof arguments[1] == 'undefined') {
return null;
}
if (delimiter == ''
|| delimiter == false
|| delimiter == null) {
2022-12-19 18:26:14 +00:00
return false;
}
if (typeof delimiter == 'function'
|| typeof delimiter == 'object'
|| typeof string == 'function'
|| typeof string == 'object') {
return emptyArray;
}
if (delimiter == true) {
2022-12-19 18:26:14 +00:00
delimiter = '1';
}
return string.toString().split(delimiter.toString());
}
var log_text = <?= normJsonStr(json_encode($log_text)); ?>;
2022-12-19 18:26:14 +00:00
var youlogin = "<?=$u->info['login']?>";
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
function looklogrep(text, vars) {
var vars = explode('||', vars);
var forYou = '';
var data = {};
var i = 0;
var j = {};
while (i != -1) {
if (vars[i]) {
2022-12-19 18:26:14 +00:00
j = explode('=', vars[i]);
data[j[0]] = j[1];
} else {
i = -2;
}
i++;
}
// 1.3
text = replaceAll('{tm1}', `<span class="date ${forYou}">${data['time1']}</span>`, text);
text = replaceAll('{u1}', `<span onClick="chat.addto(\'${data['login1']}\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'${data['login1']}\',event,\'chat\'); return false;" class="CSSteam${data['t1']}">${data['login1']}</span>`, text);
text = replaceAll('{u2}', `<span onClick="chat.addto(\'${data['login2']}\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'${data['login2']}\',event,\'chat\'); return false;" class="CSSteam${data['t2']}">${data['login2']}</span>`, text);
2022-12-19 18:26:14 +00:00
text = replaceAll('^^^^', '=', text);
text = replaceAll('{pr}', `<b>${data['prm']}</b>`, text);
var test_zb1 = [0, 0, 0, 0, 0, 0];
var test_zb2 = [0, 0, 0, 0, 0, 0];
i = 1;
j = data['bl2'];
while (i <= data['zb2']) {
test_zb1[j] = 1;
j++;
if (j > 5) {
j = 1;
}
i++;
}
i = 1;
while (i <= 5) {
j = 1;
rej = '';
while (j <= 5) {
zab = '';
if (i == j) {
zab += '1'; //a
} else {
zab += '0'; //a
}
if (test_zb1[j] == 1) {
zab += '1'; //b
} else {
zab += '0'; //b
}
rej += `<img src="//img.new-combats.tech/i/zones/${data['t2']}/${data['t1']}${zab}.gif">`;
2022-12-19 18:26:14 +00:00
j++;
}
text = replaceAll(`{zn2_${i++}}`, rej, text);
// i++;
}
i = 1;
while (i <= 21) {
2023-01-10 16:29:32 +00:00
//замена R - игрок 1
if (log_text[data['s1']]) {
if (log_text[data['s1']][i]) {
2022-12-19 18:26:14 +00:00
r = log_text[data['s1']][i];
k = 0;
while (k != -1) {
if (r[k]) {
2022-12-19 18:26:14 +00:00
text = replaceAll(`{1x${i}x${k}}`, '' + r[k] + '', text);
} else {
k = -2;
}
k++;
}
}
}
2023-01-10 16:29:32 +00:00
//замена R - игрок 2
if (log_text[data['s2']]) {
if (log_text[data['s2']][i]) {
2022-12-19 18:26:14 +00:00
r = log_text[data['s2']][i];
k = 0;
while (k != -1) {
if (r[k]) {
2022-12-19 18:26:14 +00:00
text = replaceAll(`{2x${i}x${k}}`, '' + r[k] + '', text);
} else {
k = -2;
}
k++;
}
}
}
i++;
}
2023-01-10 16:29:32 +00:00
//Повторная замена
text = replaceAll('{u1}', `<span onClick="chat.addto(\'${data['login1']}\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'${data['login1']}\',event,\'chat\'); return false;" class="CSSteam${data['t1']}">${data['login1']}</span>`, text);
text = replaceAll('{u2}', `<span onClick="chat.addto(\'${data['login2']}\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'${data['login2']}\',event,\'chat\'); return false;" class="CSSteam${data['t2']}">${data['login2']}</span>`, text);
2022-12-19 18:26:14 +00:00
if (data['prm']) {
2022-12-19 18:26:14 +00:00
data['prm'] = replaceAll("rvnO", "=", data['prm']);
}
text = replaceAll('{pr}', `<b>${data['prm']}</b>`, text);
text = replaceAll('^^^^', '=', text);
text = replaceAll('==', '', text);
if ((data['login1'] == youlogin || data['login2'] == youlogin) && youlogin != '') {
text = replaceAll('{fru}', ' date2 ', text);
} else {
text = replaceAll('{fru}', '', text);
}
return text;
}
</script>
2023-11-02 13:57:39 +00:00
<script src="/js/btl_mini.js"></script>
2022-12-19 18:26:14 +00:00
<div id="hint4" class="ahint"></div>
<style>
html, body {
background-color: #e8e8e8;
}
</style>
<div align="center" onMouseDown="top.hic();" onMouseOut="top.hic();">
<table width="100%" bgcolor="#e8e8e8" border="0" cellspacing="0" cellpadding="1">
2022-06-06 21:30:34 +00:00
<tr>
2022-12-19 18:26:14 +00:00
<td valign="top" width="260">
<div id="player1">
2022-06-06 21:30:34 +00:00
</div>
2022-12-19 18:26:14 +00:00
<div align="right"></div>
</td>
<td valign="top">
<div align="center">
<table width="100%" height="15" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="top">
<div id="player1_login" style="float:left;"></div>
</td>
<td align="center"><h5><?php
if ($thisBattle['type'] == 99) {
echo str_replace(' ', '&nbsp;', $allprice[3]);
} else {
echo str_replace(' ', '&nbsp;', $allprice[2]);
}
?></h5></td>
<td width="50%" valign="top">
<div id="player2_login" style="float:right;"></div>
</td>
</tr>
</table>
<table border="0" align="center" style="margin-top:-15px;" cellpadding="0" cellspacing="3">
<tr>
<td height="20">
<div id="ref2" name="ref2"></div>
<div id="ref" name="ref"></div>
</td>
</tr>
<tr>
<td>
<div id="error" style="display:none;"></div>
2022-12-19 18:26:14 +00:00
<div id="pers_magic" align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
<td><img title="Пустой слот заклятия" alt=""
src="//img.new-combats.tech/i/items/w/w101.gif"/></td>
2022-12-19 18:26:14 +00:00
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
<table border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="center">
<div id="ndfksdw">
<table width="100%" id="mainpanel222" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td bgcolor="#A7A7A7">
2023-01-10 16:29:32 +00:00
<div align="center"><strong>Атака</strong></div>
2022-12-19 18:26:14 +00:00
</td>
<td width="20" bgcolor="#A7A7A7">
<div align="center" style="color:#A7A7A7;">-</div>
</td>
<td bgcolor="#A7A7A7">
2023-01-10 16:29:32 +00:00
<div align="center"><strong>Защита</strong></div>
2022-12-19 18:26:14 +00:00
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="1"
cellspacing="2" id="mainpanel">
<tr>
<td>
<div id="zatack1_1" class="crop"><a
onclick="change_radio(1,1,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_1_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack2_1" class="crop"><a
onclick="change_radio(2,1,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_2_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack3_1" class="crop"><a
onclick="change_radio(3,1,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_3_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack4_1" class="crop"><a
onclick="change_radio(4,1,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_4_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack5_1" class="crop"><a
onclick="change_radio(5,1,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_5_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="select_atack(1,1);" style="cursor:default;"
2023-01-10 16:29:32 +00:00
align="left">удар в голову
2022-12-19 18:26:14 +00:00
</td>
<td width="3" style="cursor:default;" onclick="select_atack(1,1);">&nbsp;
2022-12-19 18:26:14 +00:00
</td>
<td>
<div id="zblock1_1" class="crop"><a
onclick="change_radio(1,1,'block',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="block_1_1"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="change_radio(1,1,'block');"
style="cursor:default;" align="left">
2023-01-10 16:29:32 +00:00
<div id="txtb1_1">&nbsp;блок головы</div>
<div id="txtb1_2">&nbsp;блок головы и груди</div>
<div id="txtb1_3">&nbsp;блок головы, груди и живота
2022-12-19 18:26:14 +00:00
</div>
</td>
</tr>
<tr>
<td>
<div id="zatack1_2" class="crop"><a
onclick="change_radio(1,2,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_1_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack2_2" class="crop"><a
onclick="change_radio(2,2,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_2_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack3_2" class="crop"><a
onclick="change_radio(3,2,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_3_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack4_2" class="crop"><a
onclick="change_radio(4,2,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_4_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack5_2" class="crop"><a
onclick="change_radio(5,2,'atack',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="atack_5_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="select_atack(2,1);" style="cursor:default;"
2023-01-10 16:29:32 +00:00
align="left">удар в грудь
2022-12-19 18:26:14 +00:00
</td>
<td onclick="select_atack(2,1);" style="cursor:default;">
&nbsp;
</td>
<td>
<div id="zblock1_2" class="crop"><a
onclick="change_radio(1,2,'block',0);return false;"
href="#"><img style="display:block;" alt=""
2022-12-19 18:26:14 +00:00
id="block_1_2"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="change_radio(1,2,'block');"
style="cursor:default;" align="left">
2023-01-10 16:29:32 +00:00
<div id="txtb2_1">&nbsp;блок груди</div>
<div id="txtb2_2">&nbsp;блок груди и живота</div>
<div id="txtb2_3">&nbsp;блок груди, живота и пояса</div>
2022-12-19 18:26:14 +00:00
</td>
</tr>
<tr>
<td>
<div id="zatack1_3" class="crop"><a
onclick="change_radio(1,3,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_1_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack2_3" class="crop"><a
onclick="change_radio(2,3,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_2_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack3_3" class="crop"><a
onclick="change_radio(3,3,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_3_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack4_3" class="crop"><a
onclick="change_radio(4,3,'atack',0);return false;"
href="#"><img id="atack_4_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack5_3" class="crop"><a
onclick="change_radio(5,3,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_5_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="select_atack(3,1);" style="cursor:default;"
2023-01-10 16:29:32 +00:00
align="left">удар в живот
2022-12-19 18:26:14 +00:00
</td>
<td onclick="select_atack(3,1);" style="cursor:default;">
&nbsp;
</td>
<td>
<div id="zblock1_3" class="crop"><a
onclick="change_radio(1,3,'block',0);return false;"
href="#"><img style="display:block;"
id="block_1_3"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="change_radio(1,3,'block');"
style="cursor:default;" align="left">
2023-01-10 16:29:32 +00:00
<div id="txtb3_1">&nbsp;блок живота</div>
<div id="txtb3_2">&nbsp;блок живота и пояса</div>
<div id="txtb3_3">&nbsp;блок живота, пояса и ног</div>
2022-12-19 18:26:14 +00:00
</td>
</tr>
<tr>
<td>
<div id="zatack1_4" class="crop"><a
onclick="change_radio(1,4,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_1_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack2_4" class="crop"><a
onclick="change_radio(2,4,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_2_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack3_4" class="crop"><a
onclick="change_radio(3,4,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_3_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack4_4" class="crop"><a
onclick="change_radio(4,4,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_4_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack5_4" class="crop"><a
onclick="change_radio(5,4,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_5_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="select_atack(4,1);" style="cursor:default;"
2023-01-10 16:29:32 +00:00
align="left">удар в пояс(пах)
2022-12-19 18:26:14 +00:00
</td>
<td onclick="select_atack(4,1);" style="cursor:default;">
&nbsp;
</td>
<td>
<div id="zblock1_4" class="crop"><a
onclick="change_radio(1,4,'block',0);return false;"
href="#"><img style="display:block;"
id="block_1_4"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="change_radio(1,4,'block');"
style="cursor:default;" align="left">
2023-01-10 16:29:32 +00:00
<div id="txtb4_1">&nbsp;блок пояса</div>
<div id="txtb4_2">&nbsp;блок пояса и ног</div>
<div id="txtb4_3">&nbsp;блок пояса, ног и головы</div>
2022-12-19 18:26:14 +00:00
</td>
</tr>
<tr>
<td>
<div id="zatack1_5" class="crop"><a
onclick="change_radio(1,5,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_1_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack2_5" class="crop"><a
onclick="change_radio(2,5,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_2_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack3_5" class="crop"><a
onclick="change_radio(3,5,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_3_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack4_5" class="crop"><a
onclick="change_radio(4,5,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_4_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td>
<div id="zatack5_5" class="crop"><a
onclick="change_radio(5,5,'atack',0);return false;"
href="#"><img style="display:block;"
id="atack_5_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="select_atack(5,1);" style="cursor:default;"
2023-01-10 16:29:32 +00:00
align="left">удар по ногам
2022-12-19 18:26:14 +00:00
</td>
<td onclick="select_atack(5,1);" style="cursor:default;">
&nbsp;
</td>
<td>
<div id="zblock1_5" class="crop"><a
onclick="change_radio(1,5,'block',0);return false;"
href="#"><img style="display:block;"
id="block_1_5"
class="radio_off"
src="//img.new-combats.tech/i/misc/radio.gif"
2022-12-19 18:26:14 +00:00
width="36" height="18"/></a>
</div>
</td>
<td onclick="change_radio(1,5,'block');"
style="cursor:default;" align="left">
2023-01-10 16:29:32 +00:00
<div id="txtb5_1">&nbsp;блок ног</div>
<div id="txtb5_2">&nbsp;блок ног и головы</div>
<div id="txtb5_3">&nbsp;блок ног, головы и груди</div>
2022-12-19 18:26:14 +00:00
</td>
</tr>
</table>
</div>
<div id="ref_menu_down" align="center">
<table width="100%" border="0" style="background-color:#f2f0f0;"
align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5">&nbsp;</td>
2023-01-10 16:29:32 +00:00
<td width="20" title="Случайный удар"
2022-12-19 18:26:14 +00:00
onclick="top.cb_radio_click($('#cr_rach_rc3'),3);">
<script>top.slcbrc[3] = 1;
if (top.slcbrc[3] == 0) {
document.write(top.create_check('rc3', '', 'off'));
} else {
document.write(top.create_check('rc3', '', 'on'));
}</script>
</td>
2023-01-10 16:29:32 +00:00
<td width="20" title="Не сбрасывать выбор зон атаки\блока"
2022-12-19 18:26:14 +00:00
onclick="top.cb_radio_click($('#cr_rach_rc4'),4);">
<script>if (top.slcbrc[4] == 0) {
document.write(top.create_check('rc4', '', 'off'));
} else {
document.write(top.create_check('rc4', '', 'on'));
}</script>
</td>
<td width="20">&nbsp;</td>
<td align="center">
<input name="fast_battle" id="fast_battle"
type="hidden"/>
<input name="auto_battle" id="auto_battle"
type="hidden"/>
<button name="go_btn"
type="button"
id="go_btn"
2022-12-19 18:26:14 +00:00
style="cursor:pointer;"
class="buttons inpBtl btnnew"
onclick=""
disabled="disabled">
Вперёд!!!
2022-12-19 18:26:14 +00:00
</button>
<button name="reflesh_btn" onClick="" type="button"
id="reflesh_btn"
style="cursor:pointer;display:none;"
2023-01-10 16:29:32 +00:00
class="buttons inpBtl btnnew" title="Обновить"
disabled="disabled">Обновить
2022-12-19 18:26:14 +00:00
</button>
<button name="back_menu_down"
onClick="top.frames['main'].location='main.php?finish=<?php
echo microtime(); ?>';" type="button"
id="back_menu_down"
style="cursor:pointer;display:none;"
2023-01-10 16:29:32 +00:00
class="buttons inpBtl btnnew" title="Вернуться">
Вернуться
2022-12-19 18:26:14 +00:00
</button>
<input name="save_zones" id="save_zones" type="hidden"/>
</td>
<td width="20"><img <?php
if ($u->info['lider'] != $u->info['battle']) { ?>style="display:none;cursor:pointer;"
<?php
}else{ ?>style="cursor:pointer;"<?php
} ?> onclick="top.leaderFight();" id="btn_down_img3"
style="cursor:pointer;"
2023-01-10 16:29:32 +00:00
title="Передать флаг"
src="//img.new-combats.tech/i/ico_change_leader1.gif"
2022-12-19 18:26:14 +00:00
width="16" height="19"/></td>
<td width="40">
<div align="right"><img onclick="top.smena1();"
id="btn_down_img2"
style="cursor:pointer;"
2023-01-10 16:29:32 +00:00
title="Смена противника (3)"
src="//img.new-combats.tech/i/ico_change.gif"
2022-12-19 18:26:14 +00:00
width="16"
height="19"/>&nbsp;<img
src="//img.new-combats.tech/i/ico_refresh.gif"
2022-12-19 18:26:14 +00:00
name="btn_down_img1" width="16" height="19"
id="btn_down_img1" style="cursor:pointer;"
2023-01-10 16:29:32 +00:00
title="Обновить" onclick="reflesht();"/>
2022-12-19 18:26:14 +00:00
</div>
</td>
</tr>
<tr>
<td height="1"></td>
<td height="1"></td>
<td height="1"></td>
<td height="1"></td>
2023-11-02 13:57:39 +00:00
<td height="1">
<img style="display:block" src="<?= Config::img() ?>/1x1.gif" width="200" height="1"/></td>
2022-12-19 18:26:14 +00:00
<td height="1"></td>
<td height="1"></td>
<td height="1"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="mainpanel2" style="height:128px; display:none;" align="center"></td>
</tr>
<tr>
<td>
<div style="padding-top:0px;padding-bottom:10px;" align="center">
<table <?php
if ($u->info['level'] < 2) {
echo ' style="display:none;" ';
} ?> border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
2023-01-10 16:29:32 +00:00
<span title="Нанесенный удар"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img onclick="startHintPriemsBattle()" width="8" height="8"
src="//img.new-combats.tech/i/micro/hit.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac1">
2023-03-31 16:54:33 +00:00
<?= 0 + $u->info['tactic1']; ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Критический удар"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="8" height="8"
src="//img.new-combats.tech/i/micro/krit.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac2">
2023-03-31 16:54:33 +00:00
<?= 0 + $u->info['tactic2']; ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Проведенный контрудар"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="8" height="8"
src="//img.new-combats.tech/i/micro/counter.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac3">
2023-03-31 16:54:33 +00:00
<?= 0 + $u->info['tactic3']; ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Успешный блок"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="8" height="8"
src="//img.new-combats.tech/i/micro/block.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac4">
2023-03-31 16:54:33 +00:00
<?= 0 + $u->info['tactic4']; ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Успешное парирование"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="8" height="8"
src="//img.new-combats.tech/i/micro/parry.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac5">
2023-03-31 16:54:33 +00:00
<?= 0 + $u->info['tactic5']; ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Нанесенный урон"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="8" height="8"
src="//img.new-combats.tech/i/micro/hp.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac6">
2023-03-31 16:54:33 +00:00
<?= 0 + floor($u->info['tactic6']); ?>
2022-12-19 18:26:14 +00:00
</font>
</span>
</td>
<td>
2023-01-10 16:29:32 +00:00
<span title="Уровень духа"
2022-12-19 18:26:14 +00:00
style="margin-right:11px; font-size:9px;">
<img width="7" height="8"
src="//img.new-combats.tech/i/micro/spirit.gif"/>
2022-12-19 18:26:14 +00:00
<font id="tac7">
<?php
if ($u->info['tactic7'] < 0) {
$u->info['tactic7'] = 0;
}
echo 0 + $u->info['tactic7'];
?>
</font>
</span>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table border="0" align="center" style="margin-top:-10px;" cellpadding="0" cellspacing="1">
<tr align="center">
<td>
<div id="priems" style="width:440px;"></div>
</td>
</tr>
<tr>
<td>
<div style="display:none;" id="pers_priem" align="center"></div>
</td>
</tr>
</table>
<hr style="border-color:#333;"/>
</div>
</td>
<td valign="top" width="260" align="right">
<div id="player2">
<div align="left"></div>
2022-06-06 21:30:34 +00:00
</div>
2022-12-19 18:26:14 +00:00
</td>
2022-06-06 21:30:34 +00:00
</tr>
2022-12-19 18:26:14 +00:00
</table>
<div id="allTeams0" align="center"><font id="teams"></font></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
2022-06-06 21:30:34 +00:00
<tr>
2022-12-19 18:26:14 +00:00
<td width="260" valign="top">&nbsp;</td>
<td valign="top">
<hr/>
<div align="center">
2023-11-02 13:57:39 +00:00
<b style="color: green;">На данный момент вами нанесено урона: </b><b class="private">&nbsp;<span
2022-12-19 18:26:14 +00:00
id="nabito"><?php
echo floor($u->info['battle_yron']); ?></span> HP&nbsp;</b><b
style="color:blue">.</b><br/>
<span style="display:">
2023-01-10 16:29:32 +00:00
<small style="display:none">(Опыт: +<b><span id="expmaybe"><?php
echo floor($u->info['battle_exp']); ?></span> ед.</b>, Без учета процентов)</small>
2022-12-19 18:26:14 +00:00
</span>
</div>
<hr/>
</td>
<td width="260" valign="top">
<div align="right"><a href="/logs.php?log=<?php
2023-01-10 16:29:32 +00:00
echo $u->info['battle']; ?>" target="blank_">Лог боя »»</a><br/>
(Бой идет с таймаутом <strong id="timer_out">NaN</strong> мин.)
2022-12-19 18:26:14 +00:00
</div>
</td>
2022-06-06 21:30:34 +00:00
</tr>
2022-12-19 18:26:14 +00:00
</table>
<div class="st1222" id="volna"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
2022-06-06 21:30:34 +00:00
<tr>
2022-12-19 18:26:14 +00:00
<td width="260">&nbsp;</td>
<td>
<div style="font-size:12px;" id="battle_logg" align="left"></div>
2023-01-10 16:29:32 +00:00
<div align="left">Полную версию лога боя смотрите <a
href="/logs.php?log=<?php
2023-01-10 16:29:32 +00:00
echo $u->info['battle']; ?>" target="blank_">здесь »»</a></div>
2022-12-19 18:26:14 +00:00
<br/></td>
<td width="260">&nbsp;</td>
2022-06-06 21:30:34 +00:00
</tr>
2022-12-19 18:26:14 +00:00
</table>
</div>
<!-- <script type="text/javascript" src="js/chat-engine.js"></script> -->
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
<script>// файл батл мини js и этот тесно связаны, то что имеем в батл мини должны по логике иметь и здесь, но я не понимаю конечно прикола,ну мб потому что я тупой
function atackt() {
// Вызывается при нажатии кнопки Вперёд! в бою.
// Делаем кнопку серой и убираем с неё функцию.
2022-12-19 18:26:14 +00:00
document.getElementById('go_btn').setAttribute("class", "buttons btnnew btnnew2");
document.getElementById('go_btn').setAttribute("onclick", "");
document.getElementById('go_btn').setAttribute("disabled", "disabled");
// Бьём?
2022-12-19 18:26:14 +00:00
atack();
// Вызываем таймер серости.
2022-12-19 18:26:14 +00:00
timedCount();
}
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
function reflesht() { // в душе не ебу что это№2
// console.log("зашел в саму функцию") высвечивается дважды при нажатии на кнопках
2022-12-19 18:26:14 +00:00
document.getElementById('reflesh_btn').setAttribute("class", "buttons btnnew btnnew2");
document.getElementById('reflesh_btn').setAttribute("onclick", "");
document.getElementById('reflesh_btn').setAttribute("disabled", "disabled");
document.getElementById('btn_down_img1').setAttribute("onclick", "");
document.getElementById('btn_down_img1').setAttribute("disabled", "disabled");
reflesh(true);
timedCount();
}
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
var cgo = 250;
var tgo;
var timer_is_on = 0;
2023-01-10 16:29:32 +00:00
timedCount(); //это тот момент когда кнопка серая
2022-12-19 18:26:14 +00:00
function timedCount() { //reflesh_btn
document.getElementById('go_btn').setAttribute("class", "buttons btnnew btnnew2");
document.getElementById('go_btn').setAttribute("onclick", "");
2023-01-10 16:29:32 +00:00
document.getElementById("go_btn").innerHTML = 'Ждем!!!';// + cgo;
2022-12-19 18:26:14 +00:00
document.getElementById('go_btn').setAttribute("disabled", "disabled");
document.getElementById('reflesh_btn').setAttribute("class", "buttons btnnew btnnew2");
document.getElementById('reflesh_btn').setAttribute("onclick", "");
document.getElementById('reflesh_btn').setAttribute("disabled", "disabled");
2023-01-10 16:29:32 +00:00
document.getElementById("reflesh_btn").innerHTML = 'Ждём!!!';// + cgo;
2022-12-19 18:26:14 +00:00
document.getElementById('btn_down_img1').setAttribute("onclick", "");
document.getElementById('btn_down_img1').setAttribute("disabled", "disabled");
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
if (cgo > 0) {
tgo = setTimeout(timedCount, 100);
cgo = cgo - 10;
} else {
clearTimeout(tgo);
timer_is_on = 0;
2023-01-10 16:29:32 +00:00
cgo = 100; // доступная атака
2022-12-19 18:26:14 +00:00
2023-01-10 16:29:32 +00:00
document.getElementById("go_btn").innerHTML = 'Вперёд!!!';
2022-12-19 18:26:14 +00:00
document.getElementById('go_btn').removeAttribute("disabled");
document.getElementById('go_btn').setAttribute("onclick", "atackt();");
2023-01-10 16:29:32 +00:00
document.getElementById("reflesh_btn").innerHTML = 'Обновить';
// ВОТ ТУТ REMOVE
2022-12-19 18:26:14 +00:00
document.getElementById('reflesh_btn').removeAttribute("disabled");
document.getElementById('reflesh_btn').setAttribute("onclick", "reflesht();");
document.getElementById('btn_down_img1').setAttribute("onclick", "reflesht();");
document.getElementById('btn_down_img1').removeAttribute("disabled");
}
}
startCountdown();
genZoneAtack();
genZoneBlock();
refleshPoints();
</script>
<?php
$priem = new Priems();
$btl = new Battle();
include('jx/battle/refresh1.php'); ?>
</div>