(9 дек 2015, 22:55) (
0/
0)
[
0]
DarkMs,
Есть предположение что это оно.. но увы не могу понять где именно.. не вижу просто из-а гкода:
<?
mysql_query('UPDATE `users` SET `online` = "'.time().'",
`ip` = "'.$_SERVER['REMOTE_ADDR'].'",
`ua` = "'.$_SERVER['HTTP_USER_AGENT'].'",
`self` = "'.$_SERVER['REQUEST_URI'].'" WHERE `id` = "'.$user['id'].'"');
$_time = 1;
if($user['last_update'] < (time() - $_time)){
mysql_query('UPDATE `users` SET `last_update` = "'.time().'" WHERE `id` = "'.$user['id'].'"');
}
if((time() - $user['last_update']) > $_time) {
mysql_query('UPDATE `users` SET `last_update` = "'.time().'" WHERE `id` = "'.$user['id'].'"');
if($user['self'] != '/coliseum.php') {
$hp = $user['vit'] * 2;
if($user['hp'] < $hp) {
$_hp = (((time() - $user['last_update']) / $_time) - 1 );
if($_hp > $hp) {
$_hp = $hp - $user['hp'];
}
mysql_query('UPDATE `users` SET `hp` = "'.($user['hp'] + $_hp ).'" WHERE `id` = "'.$user['id'].'"');
}
if($user['mp'] < $user['mana']) {
$_mp = (((time() - $user['last_update']) / $_time) - 1 );
if($_mp > $user['mana']) {
$_mp = $user['mana'] - $user['mp'];
}
mysql_query('UPDATE `users` SET `mp` = "'.($user['mp'] +$_mp ).'" WHERE `id` = "'.$user['id'].'"');
}
}
}
if($user['last_update'] - $user['duel_last_update'] > (60 * 30)) {
mysql_query('UPDATE `users` SET `duel_last_update` = "'.($user['duel_last_update'] + (60 * 30)).'",
`duel_fights` = "'.($user['duel_fights'] + (($user['duel_fights'] < 11) ? 1:0)).'",
`duel_changes` = "'.($user['duel_changes'] + (($user['duel_changes'] < 11) ? 1:0)).'" WHERE `id` = "'.$user['id'].'"');
}
if($user['hp'] > $user['vit'] * 2) {
mysql_query('UPDATE `users` SET `hp` = "'.($user['vit'] * 2).'" WHERE `id` = "'.$user['id'].'"');
}
if($user['hp'] < 0) {
mysql_query('UPDATE `users` SET `hp` = "0" WHERE `id` = "'.$user['id'].'"');
}
if($user['mp'] > $user['mana']) {
mysql_query('UPDATE `users` SET `mp` = "'.$user['mana'].'" WHERE `id` = "'.$user['id'].'"');
}
if($user['mp'] < 0) {
mysql_query('UPDATE `users` SET `mp` = "0" WHERE `id` = "'.$user['id'].'"');
}
?>
(9 дек 2015, 22:52) (
0/
0)
[
0]
Какая часть кода отвечает за регенерацию маны и хп в этом какащище и где он находится?