array(20, 0, 502, 505, 0), "502" => array(15, 0, 0, 0, 501), "503" => array(15, 0, 0, 507, 0), "504" => array(15, 0, 0, 508, 0), "505" => array(20, 501, 0, 510, 0), "506" => array(15, 0, 507, 511, 0), "507" => array(15, 503, 508, 0, 506), "508" => array(25, 504, 0, 513, 507), "509" => array(20, 0, 0, 515, 0), "510" => array(20, 505, 511, 0, 0), "511" => array(20, 506, 0, 0, 510), "512" => array(30, 0, 513, 519, 0), "513" => array(25, 508, 514, 0, 512), "514" => array(20, 0, 0, 0, 513), "515" => array(20, 509, 0, 522, 0), "516" => array(25, 0, 517, 523, 0), "517" => array(25, 0, 518, 0, 516), "518" => array(35, 0, 519, 525, 517), "519" => array(35, 512, 520, 526, 518), "520" => array(35, 0, 521, 0, 519), "521" => array(15, 0, 0, 528, 0), "522" => array(20, 515, 0, 529, 0), "523" => array(15, 516, 0, 530, 0), "524" => array(20, 0, 525, 531, 0), "525" => array(35, 518, 526, 532, 524), "526" => array(40, 519, 527, 533, 525), "527" => array(35, 0, 0, 0, 526), "528" => array(15, 521, 529,535, 0), "529" => array(20, 522, 0, 0, 528), "530" => array(20, 523, 531, 537, 0), "531" => array(35, 524, 0, 538, 530), "532" => array(20, 525, 533, 539, 0), "533" => array(20, 526, 534, 540, 532), "534" => array(15, 0, 0, 0, 533), "535" => array(20, 528, 0, 541, 0), "536" => array(20, 0, 537, 0, 535), "537" => array(35, 530, 0, 543, 536), "538" => array(20, 531, 0, 544, 0), "539" => array(20, 532, 0, 545, 0), "540" => array(15, 533, 0, 546, 0), "541" => array(20, 535, 542, 547, 0), "542" => array(15, 0, 543, 0, 541), "543" => array(40, 537, 0, 549, 542), "544" => array(40, 538, 545, 550, 543), "545" => array(40, 539, 0, 551, 544), "546" => array(15, 540, 0, 552, 0), "547" => array(20, 541, 548, 553, 0), "548" => array(20, 0, 549, 0, 547), "549" => array(35, 543, 550, 0, 548), "550" => array(40, 544, 551, 554, 549), "551" => array(40, 545, 0, 555, 550), "552" => array(15, 546, 0, 556, 0), "553" => array(20, 547, 0, 557, 0), "554" => array(20, 550, 555, 0, 0), "555" => array(35, 551, 0, 0, 554), "556" => array(15, 552, 0, 559, 0), "557" => array(15, 553, 0, 0, 0), "558" => array(20, 0, 559, 0, 0), "559" => array(20, 556, 560, 0, 558), "560" => array(20, 0, 0, 0, 559) ); mysql_query("LOCK TABLES `bots` WRITE, `deztow_stavka` WRITE, `users` WRITE, `deztow_items` WRITE, `inventory` WRITE, `battle` WRITE, `logs` WRITE, `deztow_turnir` WRITE, `effects` WRITE,`shop` WRITE, `online` WRITE, `deztow_gamers_inv` WRITE, `deztow_realchars` WRITE, `deztow_eff` WRITE, `variables` WRITE, `ashop` WRITE"); $ls = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 1 AND `in_tower` = 1")); $kol_pl = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 0 AND `in_tower` = 1")); $tur_data = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE")); if($_GET['give']) { $obj = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_items` WHERE `id` = '".mysql_real_escape_string($_GET['give'])."' AND `room` = '".$user['room']."' LIMIT 1")); if($obj) { if($_SESSION['timei']-time() <= 0) { $_SESSION['timei'] = (time()+3); if($tur_data['art'] == 0){ $dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '".$obj['iteam_id']."' LIMIT 1")); } else { $dress = mysql_fetch_array(mysql_query("SELECT * FROM `ashop` WHERE `id` = '".$obj['iteam_id']."' LIMIT 1")); } if(isset($dress['id'])) { mysql_query("INSERT INTO `inventory` (`bs`, `prototype`, `owner`, `name`, `type`, `massa`, `cost`, `img`, `maxdur`, `isrep`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `needident`, `nsila`, `nlovk`, `ninta`, `nintel`, `nmudra`, `nvinos`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `bron1`, `bron2`, `bron3`, `bron4`, `maxu`, `minu`, `magic`, `nlevel`, `nalign`, `dategoden`, `goden`, `otdel`, `koll`) VALUES ('1', '{$dress['id']}', '{$user['id']}', '{$dress['name']}', '{$dress['type']}', '{$dress['massa']}', '{$dress['cost']}', '{$dress['img']}', '{$dress['maxdur']}', '{$dress['isrep']}', '{$dress['gsila']}', '{$dress['glovk']}', '{$dress['ginta']}', '{$dress['gintel']}', '{$dress['ghp']}', '{$dress['gnoj']}', '{$dress['gtopor']}', '{$dress['gdubina']}', '{$dress['gmech']}', '{$dress['gfire']}', '{$dress['gwater']}', '{$dress['gair']}', '{$dress['gearth']}', '{$dress['glight']}', '{$dress['ggray']}', '{$dress['gdark']}', '{$dress['needident']}', '{$dress['nsila']}', '{$dress['nlovk']}', '{$dress['ninta']}', '{$dress['nintel']}', '{$dress['nmudra']}', '{$dress['nvinos']}', '{$dress['nnoj']}', '{$dress['ntopor']}', '{$dress['ndubina']}', '{$dress['nmech']}', '{$dress['nfire']}', '{$dress['nwater']}', '{$dress['nair']}', '{$dress['nearth']}', '{$dress['nlight']}', '{$dress['ngray']}', '{$dress['ndark']}', '{$dress['mfkrit']}', '{$dress['mfakrit']}', '{$dress['mfuvorot']}', '{$dress['mfauvorot']}', '{$dress['bron1']}', '{$dress['bron3']}', '{$dress['bron2']}', '{$dress['bron4']}', '{$dress['maxu']}', '{$dress['minu']}', '{$dress['magic']}', '{$dress['nlevel']}', '{$dress['nalign']}', '".(($dress['goden'])?($dress['goden']*24*60*60+time()):"")."', '{$dress['goden']}', '{$dress['razdel']}', '{$dress['koll']}')"); mysql_query("DELETE FROM `deztow_items` WHERE `id` = '".mysql_real_escape_string($_GET['give'])."' AND `room` = '".$user['room']."' LIMIT 1"); } else { echo 'Предмет не найден. Сообщите Администрации данный код #'.$obj['iteam_id'].'#'; } } else { echo "Вы сможете поднять вещь через ".($_SESSION['timei']-time())." секунд..."; } } else { echo "Кто-то был быстрее..."; } } if($_POST['attack']) { $jert = mysql_fetch_array(mysql_query("SELECT `id`, `login`, `room`, `battle`, `hp` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['attack'])."' LIMIT 1")); if($jert['room'] == $user['room'] && $jert['id'] != $user['id']) { if($jert['id'] == 233 || $jert['id'] == 234 || $jert['id'] == 235) { $arha = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `prototype` = "'.$jert['id'].'" LIMIT 1')); if(isset($arha['id'])) { $jert['battle'] = $arha['battle']; $jert['id'] = $arha['id']; } else { $jert['battle'] = 0; $jert['id'] = $jert['id']; } $bot = 1; } if($jert['battle'] > 0) { $bd = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `id` = "'.$jert['battle'].'" LIMIT 1')); $battle = unserialize($bd['teams']); $ak = array_keys($battle[$jert['id']]); $battle[$user['id']] = $battle[$ak[0]]; foreach($battle[$user['id']] as $k => $v) { $battle[$k][$user['id']] = array(0, 0, time()); $battle[$user['id']][$k] = array(0, 0, time()); } $t1 = explode(";", $bd['t1']); if(in_array($jert['id'], $t1)) { $ttt = 2; $ttt2 = 1; } else { $ttt = 1; $ttt2 = 2; } addch("".nick::id($user['id'])->short()." вмешался в поединок »».", $user['room']); addlog($jert['battle'], ''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
'); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `to'.$ttt.'` = \''.time().'\', `to'.$ttt2.'` = \''.(time()-1).'\' WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); mysql_query("UPDATE `users` SET `battle` = '".$jert['battle']."', `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1"); mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($user['id'])->full(1)." вмешался в поединок против ".nick::id($jert['id'])->full(1)." »»
".'\') WHERE `active` = TRUE LIMIT 1'); header("Location: fbattle.php"); } else { if($bot) { mysql_query("INSERT INTO `bots` (`name`, `prototype`, `battle`, `hp`) values ('".$jert['login']."', '".$jert['id']."', '', '".$jert['hp']."')"); $jert['id'] = mysql_insert_id(); } $teams = array(); $teams[$user['id']][$jert['id']] = array(0, 0, time()); $teams[$jert['id']][$user['id']] = array(0, 0, time()); $sv = array(1, 2, 3, 4, 5); mysql_query("INSERT INTO `battle` (`coment`, `teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `blood`) VALUES ('', '".serialize($teams)."', '".$sv[rand(0, 3)]."', '10', '0', '".$user['id']."', '".$jert['id']."', '".time()."', '".time()."', '1')"); $id = mysql_insert_id(); if($bot) { mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } else { mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = {$jert['id']} LIMIT 1"); } $rr = "".nick::id($user['id'])->full(1)." и ".nick::id($jert['id'])->full(1).""; addch("".nick::id($user['id'])->short()." , применив магию нападения, внезапно напал на ".nick::id($jert['id'])->short().".", $user['room']); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE (`id` = {$user['id']} OR `id` = {$jert['id']})"); mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($user['id'])->full(1)." напал на ".nick::id($jert['id'])->full(1)." завязался бой »»
".'\') WHERE `active` = TRUE LIMIT 1'); header("Location: fbattle.php"); } } else { echo 'Жертва ускользнула из комнаты...'; } } $_GET['path'] = (int)$_GET['path']; if($rhar[$user['room']][$_GET['path']] > 0 && $_GET['path'] < 5 && $_GET['path'] > 0 && ($_SESSION['time'] <= time())) { $rr = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `type` = 10 AND `owner` = {$user['id']} LIMIT 1")); if(!isset($rr['id'])) { $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '".$user['room']."' AND `in_tower` = 1"); while($u = mysql_fetch_array($list)) { if($u['id'] != $user['id']) { addchp('Внимание! '.$user['login'].' отправился в '.$rooms[$rhar[$user['room']][$_GET['path']]].'.', '{[]}'.$u['login'].'{[]}'); } } $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '".$rhar[$user['room']][$_GET['path']]."' AND `in_tower` = 1"); while($u = mysql_fetch_array($list)) { addchp('Внимание! '.$user['login'].' вошел в комнату.', '{[]}'.$u['login'].'{[]}'); } mysql_query("UPDATE `users`, `online` SET `users`.`room` = '".$rhar[$user['room']][$_GET['path']]."', `online`.`room` = '".$rhar[$user['room']][$_GET['path']]."' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$user['id']}'"); $_SESSION['time'] = (time()+$rhar[$rhar[$user['room']][$_GET['path']]][0]); header('Location: towerin.php'); } else { err('Вы парализованы и не можете двигаться...'); } } $list = mysql_query("SELECT * FROM `users` WHERE `in_tower` = 1 AND `battle` = 0"); while($u = mysql_fetch_array($list)) { if($u['hp'] <= 0) { undressall($u['id']); $rep = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '".$u['id']."' AND `bs` = 1"); while($r = mysql_fetch_array($rep)) { mysql_query("INSERT `deztow_items` (`iteam_id`, `name`, `img`, `room`) VALUES ('".$r['prototype']."', '".$r['name']."', '".$r['img']."', '".$u['room']."')"); } mysql_query("DELETE FROM `inventory` WHERE `owner` = '".$u['id']."' AND `bs` = 1"); $tec = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_realchars` WHERE `owner` = '{$u['id']}' LIMIT 1")); if(isset($tec['id'])) { mysql_query("DELETE FROM `deztow_realchars` WHERE `owner` = '{$u['id']}'"); $u = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$u['id']}' LIMIT 1")); mysql_query("UPDATE `users` SET `sila` = '".$tec['sila']."', `lovk` = '".$tec['lovk']."', `inta` = '".$tec['inta']."', `vinos` = '".$tec['vinos']."', `intel` = '".$tec['intel']."', `stats` = '".$tec['stats']."', `nextup` = '".$tec['nextup']."', `level` = '".$tec['level']."', `hp` = '".($tec['vinos']*6)."', `maxhp` = '".($tec['vinos']*6)."', `align` = '".$tec['align']."', `noj` = '".$tec['noj']."', `mec` = '".$tec['mec']."', `topor` = '".$tec['topor']."', `dubina` = '".$tec['dubina']."', `mlight` = '".$tec['mlight']."', `mgray` = '".$tec['mgray']."', `mdark` = '".$tec['mdark']."', `master` = '".$tec['master']."' WHERE `id` = '".$u['id']."' LIMIT 1"); } $eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$u['id']."' AND (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14 OR `type` = 2 OR `type` = 3)")); mysql_query("DELETE FROM `effects` WHERE `owner` = '".$u['id']."' AND `type` != 11 AND `type` != 12 AND `type` != 13 AND `type` != 14 AND `type` != 2 AND `type` != 3"); if($tec[0]) { mysql_query("UPDATE `users` SET `sila` = `sila`-'".$eff['sila']."', `lovk` = `lovk`-'".$eff['lovk']."', `inta` = `inta`-'".$eff['inta']."' WHERE `id` = '".$eff['owner']."' LIMIT 1"); } get_out($u['id']); mysql_query("UPDATE `users` SET `in_tower` = 0, `room` = '31' WHERE `id` = '".$u['id']."'"); mysql_query("UPDATE `online` SET `room` = '31' WHERE `id` = '".$u['id']."'"); mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." ".nick::id($u['id'])->full(1)." повержен и выбывает из турнира
".'\') WHERE `active` = TRUE LIMIT 1'); addchp('Внимание! Вы выбыли из турнира Башни Смерти.', '{[]}'.$u['login'].'{[]}'); header('Location: tower.php'); } } if(($kol_pl+$ls) < 2 && ($tur_data['start_time']+60) <= time()) { $tur = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE LIMIT 1")); undressall($user['id']); $rep = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '".$user['id']."' AND `bs` = 1"); while($r = mysql_fetch_array($rep)) { mysql_query("INSERT `deztow_items` (`iteam_id`, `name`, `img`, `room`) VALUES ('".$r['prototype']."', '".$r['name']."', '".$r['img']."', '".$user['room']."');"); } mysql_query("DELETE FROM `inventory` WHERE `owner` = '".$user['id']."' AND `bs` = 1"); $tec = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_realchars` WHERE `owner` = '{$user['id']}'")); if(isset($tec['id'])) { mysql_query("DELETE FROM `deztow_realchars` WHERE `owner` = '{$user['id']}'"); $u = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$user['id']}' LIMIT 1")); mysql_query("UPDATE `users` SET `sila` = '".$tec['sila']."', `lovk` = '".$tec['lovk']."', `inta` = '".$tec['inta']."', `vinos` = '".$tec['vinos']."', `intel` = '".$tec['intel']."', `stats` = '".$tec['stats']."', `nextup` = '".$tec['nextup']."', `level` = '".$tec['level']."', `align` = '".$tec['align']."', `hp` = '".($tec['vinos']*6)."', `maxhp` = '".($tec['vinos']*6)."', `noj` = '".$tec['noj']."', `mec` = '".$tec['mec']."', `topor` = '".$tec['topor']."', `dubina` = '".$tec['dubina']."', `mlight` = '".$tec['mlight']."', `mgray` = '".$tec['mgray']."', `mdark` = '".$tec['mdark']."', `master` = '".$tec['master']."' WHERE `id` = '".$user['id']."' LIMIT 1"); } mysql_query("DELETE FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` != 11 AND `type` != 12 AND `type` != 13 AND `type` != 14 AND `type` != 2 AND `type` != 3"); get_out($user['id']); mysql_query("UPDATE `users` SET `money` = (`money`+'".$tur['coin']."'), `in_tower` = 0, `room` = 31 WHERE `id` = '".$user['id']."' LIMIT 1"); mysql_query("UPDATE `online` SET `room` = 31 WHERE `id` = '".$user['id']."' LIMIT 1"); mysql_query('UPDATE `deztow_turnir` SET `winner` = \''.$user['id'].'\', `winnerlog` = \''.nick::id($user['id'])->full(1).'\', `endtime` = \''.time().'\', `active` = FALSE, `log` = CONCAT(`log`,\''."".date("d.m.y H:i")." Турнир завершен. Победитель : ".nick::id($user['id'])->full(1)." Приз : ".$tur['coin']." кр.
".'\') WHERE `active` = TRUE LIMIT 1'); addchp('Внимание! Поздравляем! Вы победитель турнира Башни смерти! Получаете '.$tur['coin'].' кр.', '{[]}'.$user['login'].'{[]}'); AddChatSystem('Внимание! Битва в Башне Смерти завершена. Победитель : '.$user['login'].' ['.$user['level'].']'); if($tur['art'] == 1) { $bs_art = 0; } else { $bs_art = 0; } #1 mysql_query('UPDATE `variables` SET `value` = "'.(time()+60*60*1).'", `bs_art` = "'.$bs_art.'" WHERE `var` = "startbs" LIMIT 1'); mysql_query("TRUNCATE TABLE `deztow_stavka`"); mysql_query("TRUNCATE TABLE `deztow_gamers_inv`"); mysql_query("TRUNCATE TABLE `deztow_items`"); mysql_query("TRUNCATE TABLE `deztow_trap`"); header('Location: tower.php'); } mysql_query("UNLOCK TABLES"); if($user['hp'] <= 0) { header('Location: tower.php'); die(); } ?>
    Напасть на...
0) { echo '

В комнате разбросаны вещи:

'; } while($it = mysql_fetch_array($its)) { echo ' Подобрать предмет \'',$it['name'],'\''; } ?>
href="?rnd=0.817371946556865&path=4">nmousemove="fastshow2('');" onmouseout="hideshow();" />
href="?rnd=0.817371946556865&path=1">onmousemove="fastshow2('');" onmouseout="hideshow();" />
href="?rnd=0.817371946556865&path=3">onmousemove="fastshow2('');" onmouseout="hideshow();" />
href="?rnd=0.817371946556865&path=2">onmousemove="fastshow2('');" onmouseout="hideshow();" />

Всего живых участников на данный момент : ".$kol_pl." + ".$ls.""; ?>
...