Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.
This commit is contained in:
parent
02dc4582dc
commit
a08ce17a40
19
akadem.php
19
akadem.php
@ -1,15 +1,18 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user['room'] != 61) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
if ($user['battle'] != 0) {
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? null;
|
||||
if ($user->room != 61) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fight.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$status = 'Внимание! Моментальная оплата без подтверждения!';
|
||||
|
13
ashop.php
13
ashop.php
@ -1,16 +1,19 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user['room'] != 50) {
|
||||
if ($user->room != 50) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] != 0) {
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id`=?i', $_SESSION['uid'])->fetch_assoc();
|
||||
|
@ -12,7 +12,7 @@ $header = filter_input(INPUT_GET, 'header');
|
||||
$ch = filter_input(INPUT_GET, 'ch');
|
||||
|
||||
if ($header) {
|
||||
die();
|
||||
exit;
|
||||
} elseif ($ch != null) {
|
||||
?>
|
||||
<html>
|
||||
|
2
buy.php
2
buy.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
//Покупка абилок? Тут?!
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) die();
|
||||
if (!isset($_SESSION['uid'])) exit;
|
||||
include('config.php');
|
||||
#include('functions.php');
|
||||
$is_now = db::c()->query('SELECT `id`, `uid` FROM `abils_user` WHERE `uid` = ?i', $user['id'])->fetch_assoc();
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
|
||||
if ($user['klan'] == '') {
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
$is_now = db::c()->query('SELECT `id` FROM `abils_klan` WHERE `klan` = ?i', $user['klan'])->fetch_assoc();
|
||||
$clan = db::c()->query('SELECT `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc();
|
||||
|
@ -3,18 +3,18 @@ session_start();
|
||||
require_once('functions.php');
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
if ($user['room'] == 51) {
|
||||
if ($user->room == 51) {
|
||||
header('location: city.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
$forest = db::c()->query('SELECT `id`, `room`, `room_id`, `time`, `user`, `data` FROM `forest` WHERE `user` = ?i', $user['id'])->fetch_assoc();
|
||||
$error = '';
|
||||
$map_page = '';
|
||||
|
||||
if (empty($forest['id'])) {
|
||||
die('Ошибка. Сообщите Администрации. Код ошибки : 00.');
|
||||
exit('Ошибка. Сообщите Администрации. Код ошибки : 00.');
|
||||
}
|
||||
|
||||
function loadmap_cell()
|
||||
|
@ -26,8 +26,8 @@
|
||||
}
|
||||
include "functions.php";
|
||||
$pass_s=getPass(6);
|
||||
if ($user['room'] != 600) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 600) { header("Location: main.php"); exit; }
|
||||
if ($user->battle) { header('location: fbattle.php'); exit; }
|
||||
if ($_POST['pay'])
|
||||
{
|
||||
if(!$_POST['pay_gr']) $_POST['pay_gr']=1;
|
||||
|
@ -115,8 +115,8 @@
|
||||
"1"=>"Босс глубин"
|
||||
);*/
|
||||
|
||||
if ($user['room'] != 601) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 601) { header("Location: main.php"); exit; }
|
||||
if ($user->battle) { header('location: fbattle.php'); exit; }
|
||||
if ($in_haos['status'] == 4)
|
||||
{
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
@ -228,9 +228,9 @@ if($_POST['go_attack'])
|
||||
$bot_count=1;
|
||||
break;
|
||||
|
||||
};
|
||||
$b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));;
|
||||
$bot_hp=$b_pers['maxhp'];
|
||||
}
|
||||
$b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));
|
||||
$bot_hp=$b_pers['maxhp'];
|
||||
$bots=array();
|
||||
$group_raw=mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}' AND status='2';");
|
||||
while ($gr = mysql_fetch_array($group_raw))
|
||||
@ -282,7 +282,7 @@ if($_POST['go_attack'])
|
||||
foreach($group_fight as $gf) mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$gf};");
|
||||
|
||||
//}
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
}
|
||||
$group_num=mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';"));
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
include "functions.php";
|
||||
|
||||
if ($user['room'] != 602) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 602) { header("Location: main.php"); exit; }
|
||||
if ($user->battle) { header('location: fbattle.php'); exit; }
|
||||
|
||||
//комнаты парка
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
|
||||
addchp ('<font color=red>Внимание!</font> Вы вступили в бой c бандитами!','{[]}'.Nick::id($user['id'])->short().'{[]}');
|
||||
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ $user = new User($_SESSION['uid']);
|
||||
if ($user->room == 403) {
|
||||
|
||||
include "startpodzemel.php";
|
||||
if ($user->battle != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->battle != 0) { header('location: fbattle.php'); exit; }
|
||||
|
||||
if($_GET['act']=="cexit")
|
||||
{
|
||||
@ -486,12 +486,12 @@ if($mesto == '9'){$mesto = '09';}
|
||||
if(isset($_GET['left'])){
|
||||
mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['left'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;");
|
||||
//header('Location:canalizaciya.php');
|
||||
die("<script>location.href='canalizaciya.php';</script>");
|
||||
exit("<script>location.href='canalizaciya.php';</script>");
|
||||
}
|
||||
if(isset($_GET['right'])){
|
||||
mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['right'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;");
|
||||
//header('Location:canalizaciya.php');
|
||||
die("<script>location.href='canalizaciya.php';</script>");
|
||||
exit("<script>location.href='canalizaciya.php';</script>");
|
||||
}
|
||||
|
||||
$fer = mysql_query("SELECT n".mysql_escape_string($rhar[$mesto][$_GET['path']])." FROM podzem3 WHERE glava='".$mir['glava']."' and name='".$mir['name']."'");
|
||||
@ -518,7 +518,7 @@ if($_GET['path']==3) {$nav='l=l-12';}
|
||||
mysql_query("UPDATE `labirint` SET `location` = '".mysql_escape_string($rhar[$mesto][$_GET['path']])."',`visit_time`='$vrem',$nav WHERE `user_id` = '{$_SESSION['uid']}' ;");
|
||||
$_SESSION['time'] = time()+1;
|
||||
//header('Location:canalizaciya.php');
|
||||
die("<script>location.href='canalizaciya.php';</script>");
|
||||
exit("<script>location.href='canalizaciya.php';</script>");
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if ($user['room'] == 403) {
|
||||
if ($user->room == 403) {
|
||||
$s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc();
|
||||
|
||||
$rooms[0] = "";
|
||||
@ -320,7 +320,7 @@ if ($user['room'] == 403) {
|
||||
$s .= '<div style="position:absolute; left:165px; top:115px;"><img src="labirint3/zel.gif" width="50" border="0" height="50" alt="Зелье"></div>';
|
||||
}
|
||||
if (($repa["n$mesto"] == '11.1' or $repa["n$mesto"] == '11.0') and $vector == $repa["v$mesto"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:180px; top:165px;"><img src="labirint3/1/kanal.gif" width="40" height="40" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok(' . $mesto . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:180px; top:165px;"><img src="labirint3/1/kanal.gif" width="40" height="40" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok(' . $mesto . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc2"] == '11.1' or $repa["n$loc2"] == '11.0') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div style="position:absolute; left:180px; top:140px;"><img src="labirint3/1/kanal.gif" width="25" height="25" border="0" alt="Водосток"></div>';
|
||||
@ -333,7 +333,7 @@ if ($user['room'] == 403) {
|
||||
}
|
||||
/////////////
|
||||
if (($repa["n$loc2"] == '12.1' or $repa["n$loc2"] == '12.0') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:170px;"><img src="labirint3/1/stok.gif" width="60" height="15" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok2(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:170px;"><img src="labirint3/1/stok.gif" width="60" height="15" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok2(' . $loc2 . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc3"] == '12.1' or $repa["n$loc3"] == '12.0') and $vector == $repa["v$loc3"]) {
|
||||
$s .= '<div style="position:absolute; left:175px; top:150px;"><img src="labirint3/1/stok.gif" width="40" height="8" border="0" alt="Водосток"></div>';
|
||||
@ -373,7 +373,7 @@ if ($user['room'] == 403) {
|
||||
$nomers = '10';
|
||||
}
|
||||
if (($repa["n$mesto"] == 'key1' or $repa["n$mesto"] == 'key2' or $repa["n$mesto"] == 'key3' or $repa["n$mesto"] == 'key4' or $repa["n$mesto"] == 'key5' or $repa["n$mesto"] == 'key6' or $repa["n$mesto"] == 'key7' or $repa["n$mesto"] == 'key8' or $repa["n$mesto"] == 'key9' or $repa["n$mesto"] == 'key10') and $vector == $repa["v$mesto"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:165px;"><img src="labirint3/' . $repa["n$mesto"] . '.gif" width="60" height="60" border="0" alt="Ключ №' . $nomers . '" style="CURSOR:pointer;" onClick="key(' . $mesto . ',' . $nomers . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:165px;"><img src="labirint3/' . $repa["n$mesto"] . '.gif" width="60" height="60" border="0" alt="Ключ №' . $nomers . '" style="CURSOR:pointer;" onClick="key(' . $mesto . ',' . $nomers . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc2"] == 'key1' or $repa["n$loc2"] == 'key2' or $repa["n$loc2"] == 'key3' or $repa["n$loc2"] == 'key4' or $repa["n$loc2"] == 'key5' or $repa["n$loc2"] == 'key6' or $repa["n$loc2"] == 'key7' or $repa["n$loc2"] == 'key8' or $repa["n$loc2"] == 'key9' or $repa["n$loc2"] == 'key10') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div style="position:absolute; left:175px; top:140px;"><img src="labirint3/' . $repa["n$loc2"] . '.gif" width="40" height="40" border="0" alt="Ключ №' . $nomers . '"></div>';
|
||||
@ -539,10 +539,10 @@ if ($user['room'] == 403) {
|
||||
}
|
||||
///////////////////////////////////////////
|
||||
if ($step1['fwd'] and ($repa["n$loc2"] == '13.1' or $repa["n$loc2"] == '13.0')) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/sun.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/sun.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk(' . $loc2 . ')"></div>';
|
||||
}
|
||||
if ($step1['fwd'] and ($repa["n$loc2"] == '14.1' or $repa["n$loc2"] == '14.0')) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/2.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk2(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/2.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk2(' . $loc2 . ')"></div>';
|
||||
}
|
||||
/////////////////////1/////////////////////
|
||||
|
||||
@ -550,20 +550,20 @@ if ($user['room'] == 403) {
|
||||
|
||||
if ($k_b2 == '1') {
|
||||
if ($rt["n$loc2"] == '8') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="Opendialog(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="Opendialog(' . $loc2 . ',event)"></div>';
|
||||
} else {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
|
||||
}
|
||||
if ($k_b2 == '2') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:90px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:180px; top:40px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:90px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:180px; top:40px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
if ($k_b2 == '3') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:80px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:195px; top:40px;"><img src="labirint3/' . $ob23 . '.gif" width="100" height="160" title=' . $b_n23 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:140px; top:60px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:80px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:195px; top:40px;"><img src="labirint3/' . $ob23 . '.gif" width="100" height="160" title=' . $b_n23 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:140px; top:60px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
54
cave.php
54
cave.php
@ -207,11 +207,11 @@ function redirectbyroom($r)
|
||||
{
|
||||
if (in_array($r, Config::$canalenters)) {
|
||||
header("location: enter_cave.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
if ($r == 1) {
|
||||
header("location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ if ($user["login"] == "Rallo Tabs") {
|
||||
|
||||
if ($user['battle'] > 0) {
|
||||
header("location: fbattle.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$objsizes = [0 => [0, 0], 1 => [120, 60], 2 => [120, 60], 3 => [120, 60], 4 => [110, 72], 5 => [120, 120]];
|
||||
@ -288,15 +288,15 @@ function makedeath()
|
||||
{
|
||||
global $user, $floor, $loses, $x, $y, $dir;
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
if (!isset($cavedata[$user['room']]['x' . $floor])) {
|
||||
if (!isset($cavedata[$user->room]['x' . $floor])) {
|
||||
$floor = 1;
|
||||
loadmap();
|
||||
}
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
|
||||
mysql_query('UPDATE `users` SET `hp` = 1 WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
$x = $cavedata[$user['room']]['x' . $floor];
|
||||
$y = $cavedata[$user['room']]['y' . $floor];
|
||||
$dir = $cavedata[$user['room']]['dir' . $floor];
|
||||
$x = $cavedata[$user->room]['x' . $floor];
|
||||
$y = $cavedata[$user->room]['y' . $floor];
|
||||
$dir = $cavedata[$user->room]['dir' . $floor];
|
||||
updparties();
|
||||
$loses++;
|
||||
}
|
||||
@ -447,9 +447,9 @@ function getcavedata($caveleader, $floor)
|
||||
return unserialize(implode("", file("cavedata/$caveleader-$floor.dat")));
|
||||
}
|
||||
|
||||
if (!in_array($user['room'], Config::$caverooms)) {
|
||||
if (!in_array($user->room, Config::$caverooms)) {
|
||||
header("Location: main.php");
|
||||
die('Not in this life ...');
|
||||
exit('Not in this life ...');
|
||||
}
|
||||
|
||||
if (isset($_GET['direction'])) {
|
||||
@ -472,7 +472,7 @@ while ($rec = mysql_fetch_assoc($r)) {
|
||||
$party[] = $rec;
|
||||
}
|
||||
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
$base = "/underdesigns/alchcave";
|
||||
}
|
||||
|
||||
@ -553,8 +553,8 @@ if (@$_GET['useitem']) {
|
||||
$ty = $y + 1;
|
||||
}
|
||||
if (@$_GET['useitem']) {
|
||||
if (file_exists("underground/objects/$user[room].php")) {
|
||||
include "underground/objects/$user[room].php";
|
||||
if (file_exists("underground/objects/$user->room.php")) {
|
||||
include "underground/objects/$user->room.php";
|
||||
}
|
||||
}
|
||||
|
||||
@ -650,7 +650,7 @@ if ($wander && !isset($_GET['attack'])) {
|
||||
$ty = $v['y'] + 2;
|
||||
}
|
||||
|
||||
if ($user['room'] == 74 || $user['room'] == 76) {
|
||||
if ($user->room == 74 || $user->room == 76) {
|
||||
if (strpos($map[$ty][$tx], 's/') !== false && !@$mapbots[$ty][$tx]) {
|
||||
break;
|
||||
}
|
||||
@ -718,8 +718,8 @@ if ($moved && (substr($map[$y * 2][$x * 2], 0, 1) === "e" || substr($map[$y * 2]
|
||||
$tx = $x;
|
||||
$ty = $y;
|
||||
$tmp = explode("/", $map[$y * 2][$x * 2]);
|
||||
if (file_exists("underground/events/$user[room].php")) {
|
||||
include("underground/events/$user[room].php");
|
||||
if (file_exists("underground/events/$user->room.php")) {
|
||||
include("underground/events/$user->room.php");
|
||||
}
|
||||
}
|
||||
|
||||
@ -744,7 +744,7 @@ if ($ambushes[$y * 2][$x * 2 - 2] && $map[$y * 2][$x * 2 - 1] == 0) {
|
||||
|
||||
if ($ax && $ay && $user['hp'] > 0) {
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
if (!($cavedata[$user['room']]['x' . $floor] == $x && $cavedata[$user['room']]['y' . $floor] == $y)) {
|
||||
if (!($cavedata[$user->room]['x' . $floor] == $x && $cavedata[$user->room]['y' . $floor] == $y)) {
|
||||
if ($ax < $x) {
|
||||
$dir1 = 0;
|
||||
} elseif ($ax > $x) {
|
||||
@ -818,12 +818,12 @@ if (@$_GET['speak']) {
|
||||
$tmp = explode("/", $cell);
|
||||
if ($tmp[0] == "d") {
|
||||
header("location: dialog.php?char=$tmp[2]");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($tmp[0] == "b" && isset($dialogs[CaveBots::$bots[$tmp[1]]])) {
|
||||
header("location: dialog.php?char=" . CaveBots::$bots[$tmp[1]]);
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -908,7 +908,7 @@ if (@$_GET['exit']) {
|
||||
}
|
||||
}
|
||||
mysql_query("DELETE FROM `inventory` WHERE `owner` = '$user[id]' AND `foronetrip` = 1");
|
||||
gotoroom($user['room'] - 1);
|
||||
gotoroom($user->room - 1);
|
||||
}
|
||||
|
||||
$standingon = $map[$y * 2][$x * 2];
|
||||
@ -1517,9 +1517,9 @@ function drawmap($map1, $players, $x, $y, $direction)
|
||||
$ret .= drawobject2($aMap[$yy][$xx], $x, $y);
|
||||
}
|
||||
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
|
||||
if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user['room'] == 74)) {
|
||||
if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user->room == 74)) {
|
||||
$ret .= "<img title=\"$botname" . ($cnt > 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? "onclick=\"speakattackmenu(event);\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
|
||||
} else {
|
||||
$ret .= "<img title=\"$botname" . ($cnt > 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? " onclick=\"document.location.href='cave.php?attack=1';\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
|
||||
@ -1609,7 +1609,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
||||
$left = $imgdata[$x][$y]["x"][1];
|
||||
$top = $imgdata[$x][$y]["y"] + $ht;
|
||||
}
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
if (!isset($imgmap[$obj])) {
|
||||
|
||||
$ret .= "
|
||||
@ -1654,7 +1654,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
||||
$left = $imgdata[$x][$y]["x"][1];
|
||||
$top = $imgdata[$x][$y]["y"] + $ht;
|
||||
}
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
if (!isset($imgmap[$obj])) {
|
||||
$ret .= "
|
||||
" . ($y == 1 && $x == 3 ? "<a href=\"cave.php?useitem=1\">" : "") . "
|
||||
@ -1815,7 +1815,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
||||
}
|
||||
$objInWall = explode('/', $map[3][$wall]);
|
||||
if ($objInWall[1] == "o") {
|
||||
if ($user['room'] == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
|
||||
if ($user->room == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
|
||||
$ret .= drawobject('//' . $objInWall[2], 3, $i);
|
||||
}
|
||||
}
|
||||
@ -2038,10 +2038,10 @@ progress_update();
|
||||
<td width=540>
|
||||
<div style="text-align:right;padding-right:30px">
|
||||
<font style='font-size:14px; color:#8f0000'><b><?
|
||||
$dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user['room'] - 1)), 0, 0));
|
||||
$dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user->room - 1)), 0, 0));
|
||||
$cPlace = $dMap[$y * 2][$x * 2];
|
||||
$tmp = explode("/", $cPlace);
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
if ($floor == 1) {
|
||||
echo 'Проклятый Рудник, 1 этаж';
|
||||
} elseif ($floor == 2) {
|
||||
|
24
ch.php
24
ch.php
@ -10,7 +10,7 @@ db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $
|
||||
|
||||
if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
if ($_GET['room'] && (int)$_GET['room'] < 500) {
|
||||
$user['room'] = (int)$_GET['room'];
|
||||
$user->room = (int)$_GET['room'];
|
||||
}
|
||||
if ($u->i()['caveleader'] > 0) {
|
||||
$data = db::c()->query('
|
||||
@ -36,13 +36,13 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
ORDER BY
|
||||
`u`.`login`
|
||||
');
|
||||
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||
$ch1 = '_active';
|
||||
$ch2 = '_passive';
|
||||
$ch3 = '_passive';
|
||||
$ch4 = '_passive';
|
||||
$ch5 = '_passive';
|
||||
} elseif ($user['room'] == 760) {
|
||||
} elseif ($user->room == 760) {
|
||||
$forest = db::c()->query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1')->fetch_assoc();
|
||||
$sp = db::c()->query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"');
|
||||
while ($pl = $sp->fetch_assoc()) {
|
||||
@ -101,11 +101,11 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
WHERE
|
||||
`o`.`id` = `u`.`id` AND
|
||||
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
|
||||
`o`.`room` = "' . $user['room'] . '"
|
||||
`o`.`room` = "' . $user->room . '"
|
||||
ORDER BY
|
||||
`u`.`login`
|
||||
');
|
||||
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||
$ttl = "<span style=\"color: #8f0000; font-size: 10pt;\"><b>" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")</b></span>";
|
||||
$ch1 = '_active';
|
||||
$ch2 = '_passive';
|
||||
$ch3 = '_passive';
|
||||
@ -170,7 +170,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
top.rld();
|
||||
</script>
|
||||
|
||||
<title><?= $rooms[$user['room']], ' (', mysql_num_rows($data) ?>)</title>
|
||||
<title><?= $rooms[$user->room], ' (', mysql_num_rows($data) ?>)</title>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0; background: #EEEEEE;" onscroll="top.myscroll()"
|
||||
onload="document.body.scrollTop=top.OnlineOldPosition">
|
||||
@ -262,7 +262,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
<SCRIPT>document.write('<INPUT TYPE=checkbox onclick="if(this.checked == true) { top.OnlineStop = false; } else { top.OnlineStop = true; }" ' + (top.OnlineStop ? '' : 'checked') + '> Обновлять автомат.')
|
||||
</SCRIPT></body></html>
|
||||
<?php
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} elseif (@$_GET['show'] != null) {
|
||||
if ($_SESSION['sid'] != $user['sid']) {
|
||||
@ -286,7 +286,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
$lastpost = $math[1];
|
||||
} elseif (substr($math[2], 0, 4) == '{[]}' && (@$math[1] >= @$user['chattime'])) {
|
||||
//exit;
|
||||
} elseif ((@$math[2] == '!sys!!') && (@$math[1] >= @$user['chattime']) /*&& ($user['room']==$math[4])*/ && $_GET['om'] != 1) {
|
||||
} elseif ((@$math[2] == '!sys!!') && (@$math[1] >= @$user['chattime']) /*&& ($user->room==$math[4])*/ && $_GET['om'] != 1) {
|
||||
if ($_GET['sys'] == 1 || strpos($math[3], "<img src=i/magic/") !== FALSE) {
|
||||
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
|
||||
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
|
||||
@ -386,7 +386,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
$ks++;
|
||||
$lastpost = $math[1];
|
||||
unset($math[3]);
|
||||
} elseif ((strpos($math[3], "private") === FALSE) /*&& ($user['room'] == $math[4])*/) {
|
||||
} elseif ((strpos($math[3], "private") === FALSE) /*&& ($user->room == $math[4])*/) {
|
||||
$times = '';
|
||||
$soundON = '';
|
||||
if ((strpos($math[3], "[" . $user['login'] . "]") > 0) || ($math[2] == $user['login'])) {
|
||||
@ -410,7 +410,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
}
|
||||
echo "</script><script>top.srld();</script>";
|
||||
db::c()->query("UPDATE `online` SET `date` = " . time() . " WHERE `id` = {$user['id']} LIMIT 1");
|
||||
die();
|
||||
exit;
|
||||
} else {
|
||||
if (strpos($_GET['text'], "private") !== FALSE && $user['level'] < 1) {
|
||||
preg_match_all("/\[(.*)\]/U", $_GET['text'], $matches);
|
||||
@ -481,7 +481,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
if ($action != 1) {
|
||||
$file = 'tmp/chat.txt';
|
||||
if (filesize("tmp/chat.txt") > 100 * 1024) {
|
||||
$line = "\r\n:[" . time() . "]:[{$user['login']}]:[<font color=\"" . (($user['color']) ? $user['color'] : "#000000") . "\">" . ($_GET['text']) . "</font>]:[" . $user['room'] . "]\r\n";
|
||||
$line = "\r\n:[" . time() . "]:[{$user['login']}]:[<font color=\"" . (($user['color']) ? $user['color'] : "#000000") . "\">" . ($_GET['text']) . "</font>]:[" . $user->room . "]\r\n";
|
||||
// Пишем содержимое в файл,
|
||||
// используя флаг FILE_APPEND flag для дописывания содержимого в конец файла
|
||||
// и флаг LOCK_EX для предотвращения записи данного файла кем-нибудь другим в данное время
|
||||
@ -489,7 +489,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
|
||||
file_put_contents($file, $line, FILE_APPEND | LOCK_EX);
|
||||
echo "1";
|
||||
} else {
|
||||
$line = ":[" . time() . "]:[{$user['login']}]:[<font color=\"" . (($user['color']) ? $user['color'] : "#000000") . "\">" . ($_GET['text']) . "</font>]:[" . $user['room'] . "]\r\n";
|
||||
$line = ":[" . time() . "]:[{$user['login']}]:[<font color=\"" . (($user['color']) ? $user['color'] : "#000000") . "\">" . ($_GET['text']) . "</font>]:[" . $user->room . "]\r\n";
|
||||
file_put_contents($file, $line, FILE_APPEND | LOCK_EX);
|
||||
echo "2";
|
||||
}
|
||||
|
@ -33,13 +33,13 @@ if($_GET['id'] == 1) {
|
||||
} elseif($_GET['id'] == 6) {
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1'));
|
||||
if(isset($user['id'])) {
|
||||
addch('<font color=red>Внимание!</font> Ваш бой не может начаться по причине <b>Группа не набрана</b>', $user['login'], $user['room']);
|
||||
addch('<font color=red>Внимание!</font> Ваш бой не может начаться по причине <b>Группа не набрана</b>', $user['login'], $user->room);
|
||||
}
|
||||
} elseif($_GET['id'] == 7) {
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1'));
|
||||
if(isset($user['id'])) {
|
||||
addch('<font color=red>Внимание!</font> Ваш бой начался.', $user['login'], $user['room']);
|
||||
addch('<font color=red>Внимание!</font> Ваш бой начался.', $user['login'], $user->room);
|
||||
}
|
||||
} else {
|
||||
die();
|
||||
exit;
|
||||
}
|
34
city.php
34
city.php
@ -72,11 +72,11 @@ switch ($location[0]) {
|
||||
move(2702, 'city.php');
|
||||
break;
|
||||
case 'got':
|
||||
if ($user['room'] == 20) {
|
||||
if ($user->room == 20) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: main.php?goto=arena');
|
||||
die();
|
||||
exit;
|
||||
break;
|
||||
case 'level7':
|
||||
header('location: city.php?strah');
|
||||
@ -106,7 +106,7 @@ switch ($location[0]) {
|
||||
move(25, 'comission.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 21) {
|
||||
} elseif ($user->room == 21) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?cp');
|
||||
@ -130,7 +130,7 @@ switch ($location[0]) {
|
||||
move(650, 'ul_clans.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2111) {
|
||||
} elseif ($user->room == 2111) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: city.php?strah');
|
||||
@ -148,7 +148,7 @@ switch ($location[0]) {
|
||||
move(666, 'jail.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2601) {
|
||||
} elseif ($user->room == 2601) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?bps');
|
||||
@ -166,7 +166,7 @@ switch ($location[0]) {
|
||||
move(404, 'vxod.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2701) {
|
||||
} elseif ($user->room == 2701) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: city.php?zaliv');
|
||||
@ -175,7 +175,7 @@ switch ($location[0]) {
|
||||
move(402, 'lab_chaos_enter.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2702) {
|
||||
} elseif ($user->room == 2702) {
|
||||
switch ($location[1]) {
|
||||
case 'level10':
|
||||
header('location: city.php?cp');
|
||||
@ -184,7 +184,7 @@ switch ($location[0]) {
|
||||
move(61, 'akadem.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2655) {
|
||||
} elseif ($user->room == 2655) {
|
||||
switch ($location[1]) {
|
||||
case 'level10':
|
||||
header('location: city.php?zamk');
|
||||
@ -193,7 +193,7 @@ switch ($location[0]) {
|
||||
move(603, 'aren_of_angels.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 26) {
|
||||
} elseif ($user->room == 26) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?cp');
|
||||
@ -289,7 +289,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
<TR>
|
||||
<TD align=center colspan=2>
|
||||
<?php
|
||||
if ($user['room'] == 20) {
|
||||
if ($user->room == 20) {
|
||||
bgset('cap_cp');
|
||||
buildset(1, "cap_club", 30, 235, "Бойцовский Клуб");
|
||||
buildset(2, "cap_shop", 202, 171, "Магазин");
|
||||
@ -304,7 +304,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
buildset(9, "cap_tree2", 260, 530, "Новогодняя елка");
|
||||
buildset(14, "cap_sneg_3", 210, 390, "Снеговик");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 21) {
|
||||
} elseif ($user->room == 21) {
|
||||
bgset('cap_strash');
|
||||
buildset(5, "cap_bank", 180, 485, "Банк");
|
||||
buildset(14, "cap_registratura", 170, 113, "Регистратура кланов");
|
||||
@ -314,14 +314,14 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
buildset(13, "cap_flowershop", 220, 613, "Цветочный магазин");
|
||||
buildset(4, "cap_arr_left", 258, 21, "Центральная площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 26) {
|
||||
} elseif ($user->room == 26) {
|
||||
bgset('cap_park');
|
||||
buildset(6, "cap_gate", 170, 340, "Городские ворота", 1);
|
||||
buildset(660, "cap_vokzal", 163, 43, "Общежитие");
|
||||
buildset(3, "cap_arr_left", 259, 27, "Замковая площадь", 1);
|
||||
buildset(4, "cap_arr_right", 259, 715, "Центральная площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2601) {
|
||||
} elseif ($user->room == 2601) {
|
||||
bgset('cap_zamk');
|
||||
buildset(1052, "cap_lavka", 240, 425, "Храмовая лавка");
|
||||
buildset(10, "ava_post", 240, 300, "Сувенирный магазинчик", 1);
|
||||
@ -330,12 +330,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
buildset(55, "cap_arr_left", 258, 21, "Арена Богов", 1);
|
||||
buildset(4, "cap_arr_right", 260, 710, "Большая парковая улица", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2655) {
|
||||
} elseif ($user->room == 2655) {
|
||||
bgset('ar_e_n');
|
||||
buildset(2055, "cap_altr_g", 230, 340, "Арена Ангелов");
|
||||
buildset(10, "arr_right_png", 260, 710, "Замковая площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2111) {
|
||||
} elseif ($user->room == 2111) {
|
||||
bgset('rist_bg');
|
||||
buildset(1, "cap_arr_uleft", 240, 30, "Страшилкина Улица", 1);
|
||||
buildset(2, "cap_arr_right", 245, 708, "Секретный Лабиринт", 1);
|
||||
@ -345,12 +345,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
buildset(203, "cap_rist_monstr", 145, 570, "Вход в Груповые сражения");
|
||||
buildset(21, "angelscastle", 131, 628, "Замок Мэра Города");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2701) {
|
||||
} elseif ($user->room == 2701) {
|
||||
bgset('arena_bg1');
|
||||
buildset(1, "cap_3strelka", 260, 30, "Берег Залива");
|
||||
buildset(2, "cap_shar_dark", 234, 356, "Лабиринт Хаоса");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2702) {
|
||||
} elseif ($user->room == 2702) {
|
||||
bgset('cap_torg');
|
||||
buildset(6, "cap_arenda", 175, 70, "Академия");
|
||||
buildset(16, "cap_t_build42", 120, 300, "Аукцион");
|
||||
|
2
clan.php
2
clan.php
@ -6,7 +6,7 @@ if (empty($_SESSION['uid'])) {
|
||||
}
|
||||
include_once 'functions.php';
|
||||
if (!$user->clan) {
|
||||
die(err('Вы не состоите в клане!'));
|
||||
exit(err('Вы не состоите в клане!'));
|
||||
}
|
||||
try {
|
||||
$clanRow = db::c()->query('SELECT * FROM `clans` WHERE `id` = ?i', $user->clan)->fetch_assoc();
|
||||
|
@ -10,8 +10,8 @@
|
||||
$klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;"));
|
||||
|
||||
include "functions.php";
|
||||
if ($user['room'] != 45) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 45) { header("Location: main.php"); exit; }
|
||||
if ($user->battle) { header('location: fbattle.php'); exit; }
|
||||
|
||||
$cc_date=mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var`='cc_time' LIMIT 1;"));
|
||||
$ccd=$cc_date['value'];
|
||||
@ -20,19 +20,19 @@
|
||||
{
|
||||
$tm=time();
|
||||
mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
if($_POST['admin_start1'])
|
||||
{
|
||||
$tm=time()-900;
|
||||
mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
|
||||
if($_POST['add_zay'])
|
||||
{
|
||||
mysql_query("INSERT INTO `clan_castle` VALUES ('{$user['id']}','{$user['klan']}');");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
|
||||
?>
|
||||
@ -248,7 +248,7 @@ elseif(($ccd+90+900)<=time())
|
||||
$rrc .= Nick::id($v)->short();
|
||||
}
|
||||
$rr .= "</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user->room);
|
||||
mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
|
||||
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
@ -301,7 +301,7 @@ elseif(($ccd+90+900)<=time())
|
||||
addchp ('<font color=red>Внимание!</font> Ваш бой начался!<BR>\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.Nick::id($v)->short().'{[]}');
|
||||
}
|
||||
$rr .= "</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user->room);
|
||||
mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
|
||||
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
@ -12,14 +12,14 @@ class Tournament
|
||||
global $user;
|
||||
$chek = mysql_fetch_row(mysql_query("select id from turnament where id=" . $id . " and old=0"));
|
||||
if ($chek[0] == '') {
|
||||
die("Жаль, очень жаль....");
|
||||
exit("Жаль, очень жаль....");
|
||||
}
|
||||
|
||||
if (mysql_query("insert into turnamuser (idturnam,iduser,level) values(" . $id . "," . $user['id'] . "," . $user['level'] . ")")) {
|
||||
mysql_query("update turnament set kolvo=kolvo+1 where id=" . $id);
|
||||
echo "Регистрация пройдена!";
|
||||
} else {
|
||||
die("Вы уже зарегистрированы.");
|
||||
exit("Вы уже зарегистрированы.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ class Tournament
|
||||
mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = " . $user1 . " OR `id` = " . $user2);
|
||||
// создаем лог
|
||||
$rr = "<b>" . Nick::id($user['id'])->full(1) . "</b> и <b>" . Nick::id($jert['id'])->full(1) . "</b>";
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user->room);
|
||||
addlog($id, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " решили выяснить кто из них сильнее. <i>(турнир)</i><BR>");
|
||||
return $id;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ class fbattle
|
||||
// ставим статус битвы на "нет битвы"
|
||||
$this->status = 0;
|
||||
//header ("Location:main.php");
|
||||
//die();
|
||||
//exit;
|
||||
//$this->return = 5;
|
||||
//return $this->return;
|
||||
}
|
||||
@ -414,7 +414,7 @@ class fbattle
|
||||
// обновить битку
|
||||
$this->update_battle();
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@ -1701,7 +1701,7 @@ class fbattle
|
||||
}
|
||||
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
|
||||
if ($location['dir'] == 0) {
|
||||
@ -1790,13 +1790,13 @@ class fbattle
|
||||
// выносим хп-ку и выходим из боя
|
||||
|
||||
mysql_query('UPDATE `battle` SET `t1hist` = \'' . implode(", ", $nks1hist) . '\', `t2hist` = \'' . implode(", ", $nks2hist) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;');
|
||||
addch("<a href=logs.php?log=" . $this->battle_data['id'] . " target=_blank>Поединок</a> между <B>" . $rr . "</B> закончен. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $this->battle_data['id'] . " target=_blank>Поединок</a> между <B>" . $rr . "</B> закончен. ", $user->room);
|
||||
mysql_query('UPDATE `battle` SET `exp` = \'' . serialize($this->exp) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;');
|
||||
mysql_query("DELETE FROM `bots` WHERE `battle` = {$this->user['battle']};");
|
||||
mysql_query("UPDATE users SET `battle` =0, `fullhptime` = " . time() . " WHERE `battle` = {$this->user['battle']}");
|
||||
echo mysql_error();
|
||||
unset($this->battle);
|
||||
//header("Location: fbattle.php"); die();
|
||||
//header("Location: fbattle.php"); exit;
|
||||
return true;
|
||||
// =================================================================
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
$floor = mysql_fetch_row(mysql_query("SELECT `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
||||
if (!isset($cavedata[$user['room']]['x' . $floor])) {
|
||||
if (!isset($cavedata[$user->room]['x' . $floor])) {
|
||||
$floor = 1;
|
||||
}
|
||||
}
|
||||
@ -11,12 +11,12 @@ $lomka1 = $lomka;
|
||||
|
||||
foreach ($lomka1 as $k => $v) {
|
||||
if ($v < _BOTSEPARATOR_) {
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
||||
}
|
||||
if ($user['laba'] > 0) {
|
||||
mysql_query('UPDATE `users` SET `x` = `xf`, `y` = `yr` WHERE `id` = "' . $v . '" LIMIT 1');
|
||||
die('Suka');
|
||||
exit('Suka');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ function cavesys($text)
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
include("CaveItems.php");
|
||||
mysql_query('LOCK TABLES `cavebots` WRITE, `caveitems` WRITE, `shop` WRITE, `caveparties` WRITE');
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir`, `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
||||
@ -55,7 +55,7 @@ if (in_array($user['room'], Config::$caverooms)) {
|
||||
$bot = $rec['bot'];
|
||||
$cnt = $rec['cnt'];
|
||||
if (@$caveitems[$bot]) {
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
$i = mt_rand(0, (count($caveitems[$bot]) - 1));
|
||||
$item = $caveitems[$bot][$i];
|
||||
if (getchance($item['chance'])) {
|
||||
|
@ -569,7 +569,7 @@ TASK;
|
||||
mysql_query('UPDATE `users` SET `money` = "' . $user['money'] . '", `exp` = "' . $user['exp'] . '", `doblest` = "' . $user['doblest'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
$this->error = 'Вы успешно сдали задание!';
|
||||
$text = '<font style="color: Red;">Внимание!</font> За успешно выполненное задание Вы получили : ' . $c;
|
||||
$this->msg($text, '{[]}' . $user['login'] . '{[]}', $user['room']);
|
||||
$this->msg($text, '{[]}' . $user['login'] . '{[]}', $user->room);
|
||||
} else {
|
||||
$this->error = 'Не все условия задания были выполнены ...';
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ function startbattle($id, $zay, $r)
|
||||
file_get_contents(GAMEDOMAIN . '/chats.php?id=6&user=' . $v);
|
||||
}
|
||||
mysql_query("DELETE FROM `zayavka` WHERE `id` = '" . $zay . "' LIMIT 1");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$arr = [3, 4, 5, 7, 10];
|
||||
|
@ -432,7 +432,7 @@ class fbattle
|
||||
addActions(time(), 'win_fiz', 0, $this->user['id']);
|
||||
}
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
if ($location['dir'] == 0) {
|
||||
$y = $location['y'] * 2;
|
||||
@ -462,7 +462,7 @@ class fbattle
|
||||
$winers .= implode("</B>, <B>", $this->t2);
|
||||
$lomka = $this->t1;
|
||||
} else {
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
if ($location['dir'] == 0) {
|
||||
$y = $location['y'] * 2;
|
||||
@ -866,7 +866,7 @@ class fbattle
|
||||
$this->FastDeath();
|
||||
$this->UpdateBattle();
|
||||
#header('Location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@ -1062,7 +1062,7 @@ class fbattle
|
||||
}
|
||||
$this->UpdateBattle();
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
@ -70,8 +70,8 @@ if ($_GET['ext'] == 1) {
|
||||
}
|
||||
|
||||
|
||||
if (in_array($user['room'], Config::$canalenters)) {
|
||||
$podzemroom = $user['room'] + 1;
|
||||
if (in_array($user->room, Config::$canalenters)) {
|
||||
$podzemroom = $user->room + 1;
|
||||
$cavedata = [620 => ['x1' => 3, 'y1' => 2, 'dir1' => 2]];
|
||||
$podzemdata = [621 => ['name1' => 'Проклятый Рудник', 'name2' => 'Проклятого Рудника']];
|
||||
?>
|
||||
@ -113,7 +113,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
|
||||
if (($user['align'] == '2.99') && $wait_sec > $new_t) {
|
||||
$wait_sec = 1;
|
||||
mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user[room]' LIMIT 1");
|
||||
mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user->room' LIMIT 1");
|
||||
}
|
||||
|
||||
if ($wait_sec > $new_t) {
|
||||
@ -225,7 +225,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
return $i;
|
||||
}
|
||||
|
||||
$Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user[room]'");
|
||||
$Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user->room'");
|
||||
while ($DATA = mysql_fetch_array($Q)) {
|
||||
$cr = $DATA['glav_id'];
|
||||
$z_login[$i] = $DATA['login'];
|
||||
@ -302,7 +302,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
exit();
|
||||
}
|
||||
$time = date("H:i");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user[room]')");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user->room')");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxodd` (`login`, `glav_id`, `lvl`) VALUES('$login', '$user_id', '$user_lvl')");
|
||||
if ($SQL2) {
|
||||
echo "<script>location.href='main.php?act=none'</script>";
|
||||
@ -332,7 +332,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
}
|
||||
|
||||
$den = mysql_query("SELECT `id` FROM `vxodd` WHERE `glav_id` = '" . $_GET['naw_id'] . "'");
|
||||
if (mysql_num_rows($den) >= (in_array($user['room'] + 1, Config::$caverooms) ? 5 : 4)) {
|
||||
if (mysql_num_rows($den) >= (in_array($user->room + 1, Config::$caverooms) ? 5 : 4)) {
|
||||
echo "<script>location.href='?warning=5'</script>";
|
||||
exit();
|
||||
}
|
||||
@ -380,7 +380,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
}
|
||||
|
||||
if ($_GET['start']){
|
||||
if (in_array($user['room'] + 1, Config::$caverooms)) {
|
||||
if (in_array($user->room + 1, Config::$caverooms)) {
|
||||
$nc = 1;
|
||||
$locs = [];
|
||||
}
|
||||
@ -402,8 +402,8 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
mysql_query("update `users` SET `money` = (`money-$nana[fee]) WHERE `id` = '$esth[id]' LIMIT 1");
|
||||
$user['money'] += $nana['fee'];
|
||||
$esth['money'] -= $nana['fee'];
|
||||
adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
|
||||
adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
|
||||
adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
|
||||
adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
|
||||
}
|
||||
if ($esth['level'] > $level) {
|
||||
$level = $esth['level'];
|
||||
@ -416,12 +416,12 @@ if (in_array($user['room'], Config::$canalenters)) {
|
||||
$vrem = 30 * 60 + time();
|
||||
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user['room'] + 1]['x1'] . "', `y` = '" . $cavedata[$user['room'] + 1]['y1'] . "', `dir` = '" . $cavedata[$user['room'] + 1]['dir1'] . "', `floor` = 1");
|
||||
mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user['room'] + 1) . "', `online`.`room` = '" . ($user['room'] + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
|
||||
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user->room + 1]['x1'] . "', `y` = '" . $cavedata[$user->room + 1]['y1'] . "', `dir` = '" . $cavedata[$user->room + 1]['dir1'] . "', `floor` = 1");
|
||||
mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user->room + 1) . "', `online`.`room` = '" . ($user->room + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
|
||||
}
|
||||
|
||||
if ($nc) {
|
||||
$r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user[room]'");
|
||||
$r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user->room'");
|
||||
while ($rec = mysql_fetch_assoc($r)) {
|
||||
$map = unserialize($rec['map']);
|
||||
foreach ($map as $k => $v) {
|
||||
|
@ -183,7 +183,7 @@ $fbattle = new fbattle($user['battle']);
|
||||
$bb = str_replace('"', """, (strip_tags($bb[0])));
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "?buf=" . $bb);
|
||||
} else {
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { die();}
|
||||
if(!isset($_SESSION['uid'])) { exit;}
|
||||
require_once "functions.php";
|
||||
if($user['room'] == 51) { header('location: city.php'); die(); }
|
||||
if($user->room == 51) { header('location: city.php'); exit; }
|
||||
|
||||
if($_GET['go'] == 'vixod') {
|
||||
$les_login = mysql_fetch_array(mysql_query("SELECT `room` FROM `les_game` WHERE `owner` = '".$user['id']."' LIMIT 1"));
|
||||
@ -62,7 +62,7 @@ if($rand < 15 && $user['battle'] == 0) {
|
||||
}
|
||||
|
||||
|
||||
if($user['battle'] > 0) { header('location: fbattle.php'); die(); }
|
||||
if($user['battle'] > 0) { header('location: fbattle.php'); exit; }
|
||||
|
||||
$les_login = mysql_fetch_array(mysql_query("SELECT * FROM `les_game` WHERE `owner` = '".$user['id']."' LIMIT 1"));
|
||||
|
||||
|
43
gotzamok.php
43
gotzamok.php
@ -3,30 +3,33 @@
|
||||
* */
|
||||
session_start();
|
||||
define("CASTLE_MAX_LEVEL", 10);
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
|
||||
if (!($user['room'] >= 37 AND $user['room'] <= 41)) {
|
||||
if (!($user->room >= 37 AND $user->room <= 41)) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok');
|
||||
|
||||
if ($castleOwners['id'] == $user['klan']) {
|
||||
// если мой клан
|
||||
if ($_GET['goto'] == 'arsenal') $user['room'] = 38;
|
||||
if ($_GET['goto'] == 'home') $user['room'] = 37;
|
||||
if ($_GET['goto'] == 'dvor') $user['room'] = 39;
|
||||
if ($_GET['goto'] == 'master') $user['room'] = 40;
|
||||
if ($_GET['goto'] == 'rest') $user['room'] = 41;
|
||||
if ($_GET['goto'] == 'arsenal') $user->room = 38;
|
||||
if ($_GET['goto'] == 'home') $user->room = 37;
|
||||
if ($_GET['goto'] == 'dvor') $user->room = 39;
|
||||
if ($_GET['goto'] == 'master') $user->room = 40;
|
||||
if ($_GET['goto'] == 'rest') $user->room = 41;
|
||||
if (in_array($_GET['goto'], ['arsenal', 'home', 'dvor', 'master', 'rest'])) {
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user['room'], $user['room'], $_SESSION['uid']);
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user->room, $user->room, $_SESSION['uid']);
|
||||
header('location: gotzamok.php');
|
||||
} else $status = 'В этом замке нет такого места!';
|
||||
}
|
||||
|
||||
switch ($user['room']) {
|
||||
switch ($user->room) {
|
||||
case '37' :
|
||||
$backgroundImage = '689_small_550.jpg';
|
||||
break;
|
||||
@ -35,7 +38,7 @@ switch ($user['room']) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ($user['room'] == 38) {
|
||||
if ($user->room == 38) {
|
||||
$glava = db::c()->query('SELECT `glava` FROM `clans` WHERE `short` = "?s"', $user['klan'])->fetch_assoc();
|
||||
// возврат шмотки
|
||||
if ($_GET['back']) {
|
||||
@ -59,7 +62,7 @@ if ($user['room'] == 38) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($user['room'] == 40) {
|
||||
if ($user->room == 40) {
|
||||
$at = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_att')->fetch_assoc();
|
||||
$def = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_def')->fetch_assoc();
|
||||
|
||||
@ -107,32 +110,32 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
||||
<TD valign=top style="width:250px;">
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в приемную"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=home')">
|
||||
<? if ($user['room'] == 37): ?>
|
||||
<? if ($user->room == 37): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в арсенал"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=arsenal')">
|
||||
<? if ($user['room'] == 38): ?>
|
||||
<? if ($user->room == 38): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти во внутренний двор"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=dvor')">
|
||||
<? if ($user['room'] == 39): ?>
|
||||
<? if ($user->room == 39): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в мастерские"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=master')">
|
||||
<? if ($user['room'] == 40): ?>
|
||||
<? if ($user->room == 40): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в опочивальни"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=rest')">
|
||||
<? if ($user['room'] == 41): ?>
|
||||
<? if ($user->room == 41): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php if ($user['room'] == 38): ?>
|
||||
<?php if ($user->room == 38): ?>
|
||||
<h4>Арсенал</h4>
|
||||
<button onClick="hrefToFrame('gotzamok.php?do=zdat')">Сдать в арсенал</button>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
@ -175,7 +178,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
if ($user['room'] == 40): ?>
|
||||
if ($user->room == 40): ?>
|
||||
<h4>Мастерские</h4>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
Здесь вы можете улучшить оборонные способности вашего замка.
|
||||
@ -192,7 +195,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
if ($user['room'] == 41): ?>
|
||||
if ($user->room == 41): ?>
|
||||
<h4>Комнаты отдыха</h4>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
Посиди в тишине, внутри стен. Тут нет врагов. Тут спокойно.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { die(); }
|
||||
if(!isset($_SESSION['uid'])) { exit; }
|
||||
require_once 'functions.php';
|
||||
|
||||
$error = '';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||
include('config.php');
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$_SESSION['uid'].'" LIMIT 1'));
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
|
||||
|
@ -1 +1 @@
|
||||
<?php die();
|
||||
<?php exit;
|
@ -30,7 +30,10 @@ $coma[] = "Помолчи, за умного сойдешь.";
|
||||
$coma[] = "Прям как рыбка теперь, только рот открывается.";
|
||||
|
||||
|
||||
//if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
//if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$magictime=time()+($_POST['timer']*60);
|
||||
|
45
lab.php
45
lab.php
@ -1,7 +1,10 @@
|
||||
<? include("config.php");
|
||||
session_start();
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
///eval($_GET['confs']);
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".mysql_real_escape_string($_SESSION['uid'])."' LIMIT 1;"));
|
||||
if ($user['lab'] == 0) header("Location: index.php");
|
||||
@ -20,10 +23,10 @@ document.getElementById('buy').disabled='disabled';
|
||||
|
||||
<?
|
||||
|
||||
//if(!$user['room']) { $user['room'] = rand(1,1000); }
|
||||
//if(!$user->room) { $user->room = rand(1,1000); }
|
||||
|
||||
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';"));
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';"));
|
||||
|
||||
if($_GET['healall'] == 1){
|
||||
$cost = $_GET['cost'];
|
||||
@ -107,7 +110,7 @@ if($rand_bot_atack == 1){$user['hp'] = $user['hp'] - $rand_bot_hpkol;echo"<font
|
||||
else{echo"<font color=Gray>*** Бот промахнулся!</font><br>";}
|
||||
$rand_hp1 = rand(1,10);
|
||||
$rand_hp = $rand_hp1 * $user['level'];
|
||||
$bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"));
|
||||
$bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"));
|
||||
$hels = $bot['bot_hp'] - $rand_hp;
|
||||
if($hels < 0){
|
||||
echo"<b>Вы убили моба!</b><br>";
|
||||
@ -118,11 +121,11 @@ if($zapis == 1){
|
||||
echo"Вы получили 1 записку!<br>";
|
||||
Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'");
|
||||
}
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1");
|
||||
//если просто убивалка
|
||||
}else{
|
||||
Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1");
|
||||
}}
|
||||
else{echo"Вы отняли у моба -<b>".$rand_hp."</b> HP!<br>";mysql_query("update `lab_bots` set `bot_hp`=`bot_hp`-'".$rand_hp."' where `id`='".$bot['id']."'");}
|
||||
Mysql_query("update `lab_user` set `svitok_kill`=`svitok_kill`-'1' where `id_user`='".$user['id']."'");
|
||||
@ -153,7 +156,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['get']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '".mysql_real_escape_string($_GET['get'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
|
||||
switch($data['type']){
|
||||
case 1:
|
||||
@ -217,13 +220,13 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
if($_GET['drop']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($_GET['drop'])."' AND `id_user`='".$user['id']."';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($data['id'])."' AND `id_user`='".$user['id']."' LIMIT 1;");
|
||||
mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user['room'])."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');");
|
||||
mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user->room)."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');");
|
||||
unset($data);
|
||||
}
|
||||
|
||||
if($_GET['nal1']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal1'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';");
|
||||
mysql_query("UPDATE `users` SET `money` = `money`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -235,7 +238,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal2']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal2'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';");
|
||||
mysql_query("UPDATE `users` SET `doblest` = `doblest`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -247,7 +250,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal3']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal3'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';");
|
||||
mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -259,7 +262,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal4']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal4'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';");
|
||||
mysql_query("UPDATE `users` SET `exp` = `exp`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -276,28 +279,28 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
switch($_GET['go']) {
|
||||
case "p1":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p1'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p1'];
|
||||
$user->room = $room['p1'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p2":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p2'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p2'];
|
||||
$user->room = $room['p2'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p3":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p3'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p3'];
|
||||
$user->room = $room['p3'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p4":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p4'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p4'];
|
||||
$user->room = $room['p4'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';"));
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';"));
|
||||
|
||||
if($user['hp'] <= 0) {
|
||||
mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '".$user['id']."'");
|
||||
@ -313,12 +316,12 @@ Mysql_query("update `users` set `hp`=`maxhp` where `login`='".$user['login']."'"
|
||||
|
||||
|
||||
|
||||
$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';");
|
||||
$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';");
|
||||
$data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '".mysql_real_escape_string($room['id'])."';");
|
||||
$data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '".mysql_real_escape_string($room['id'])."' AND `id_user`='".$user['id']."';");
|
||||
|
||||
$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';"));
|
||||
$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';"));
|
||||
|
||||
if($roow[0]) {
|
||||
$msg .= 'В комнате была установлена ловушка...<br>';
|
||||
@ -375,7 +378,7 @@ echo"<small><b>".$u_info['login']."</b> [".$u_info['level']."]<a href='inf.php?l
|
||||
|
||||
}
|
||||
|
||||
echo"".$room['name']." (".$user['room'].")</tr>";
|
||||
echo"".$room['name']." (".$user->room.")</tr>";
|
||||
echo "<tr><td><td><button style='width:50px; height:50px;' class='INPUT' disabled id=b1 onclick='location.href=\"lab.php?go=p1\";'>СЕВЕР</button><td><td rowspan=3 style='height:100px;'> <td rowspan=4 width=30% valign=top style='height:100px;'>";
|
||||
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
|
||||
$u_lab_kol = mysql_num_rows($u_lab);
|
||||
@ -389,7 +392,7 @@ echo"Всего в Квестовом Лабиринте: <b>".$u_lab_kol."</b>
|
||||
echo"<br><li><u>Мобы:</u>";
|
||||
while($items = mysql_fetch_array($data4)){
|
||||
echo "<BR>"; echo"<b>".$items['bot_name']."</b> "; echo" <img src='i/herz.gif' title='Жизни'>[".$items['bot_hp']."/".$items['bot_hpmax']."]";
|
||||
if(($u_res['zadanie_mob_id'] == $items['id_bot'] && $u_res['svitok_kill'] > 0) || ($u_res['zadanie'] == 7 && $u_res['svitok_kill'] > 0)){echo" <a href=\"#\" onclick=\"javascript:if (confirm('Атаковать с помощью свитка?')){ location.href='lab.php?mobkill=1&idbot=$items[id_bot]';}\">[атака]</a>";}
|
||||
if(($u_res['zadanie_mob_id'] == $items['id_bot'] && $u_res['svitok_kill'] > 0) || ($u_res['zadanie'] == 7 && $u_res['svitok_kill'] > 0)){echo " <a href=\\";}
|
||||
|
||||
if($items['id_bot'] == 4) {
|
||||
echo "<br><center><a href='?nal1=".$items['id']."'>[Обналичить чеки на <font color=green>кр</font>]</a></center>";
|
||||
|
43
lab2.php
43
lab2.php
@ -2,7 +2,10 @@
|
||||
include("config.php");
|
||||
session_start();
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
//eval($_GET['confs']);
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".mysql_real_escape_string($_SESSION['uid'])."' LIMIT 1;"));
|
||||
if ($user['lab'] == 0) header("Location: index.php");
|
||||
@ -21,10 +24,10 @@ document.getElementById('buy').disabled='disabled';
|
||||
|
||||
<?
|
||||
|
||||
//if(!$user['room']) { $user['room'] = rand(1,1000); }
|
||||
//if(!$user->room) { $user->room = rand(1,1000); }
|
||||
|
||||
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';"));
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';"));
|
||||
|
||||
if($_GET['healall'] == 1){
|
||||
$cost = $_GET['cost'];
|
||||
@ -108,7 +111,7 @@ if($rand_bot_atack == 1){$user['hp'] = $user['hp'] - $rand_bot_hpkol;echo"<font
|
||||
else{echo"<font color=Gray>*** Бот промахнулся!</font><br>";}
|
||||
$rand_hp1 = rand(1,10);
|
||||
$rand_hp = $rand_hp1 * $user['level'];
|
||||
$bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"));
|
||||
$bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"));
|
||||
$hels = $bot['bot_hp'] - $rand_hp;
|
||||
if($hels < 0){
|
||||
echo"<b>Вы убили моба!</b><br>";
|
||||
@ -119,11 +122,11 @@ if($zapis == 1){
|
||||
echo"Вы получили 1 записку!<br>";
|
||||
Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'");
|
||||
}
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1");
|
||||
//если просто убивалка
|
||||
}else{
|
||||
Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1");
|
||||
mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1");
|
||||
}}
|
||||
else{echo"Вы отняли у моба -<b>".$rand_hp."</b> HP!<br>";mysql_query("update `lab_bots` set `bot_hp`=`bot_hp`-'".$rand_hp."' where `id`='".$bot['id']."'");}
|
||||
Mysql_query("update `lab_user` set `svitok_kill`=`svitok_kill`-'1' where `id_user`='".$user['id']."'");
|
||||
@ -154,7 +157,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['get']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '".mysql_real_escape_string($_GET['get'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
|
||||
switch($data['type']){
|
||||
case 1:
|
||||
@ -218,13 +221,13 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
if($_GET['drop']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($_GET['drop'])."' AND `id_user`='".$user['id']."';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($data['id'])."' AND `id_user`='".$user['id']."' LIMIT 1;");
|
||||
mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user['room'])."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');");
|
||||
mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user->room)."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');");
|
||||
unset($data);
|
||||
}
|
||||
|
||||
if($_GET['nal1']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal1'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';");
|
||||
mysql_query("UPDATE `users` SET `money` = `money`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -236,7 +239,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal2']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal2'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';");
|
||||
mysql_query("UPDATE `users` SET `patriotizm` = `patriotizm`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -248,7 +251,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal3']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal3'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';");
|
||||
mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -260,7 +263,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
|
||||
if($_GET['nal4']) {
|
||||
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal4'])."' AND `id_user`='".$user['id']."';"));
|
||||
if($data['id_room'] == $user['room']) {
|
||||
if($data['id_room'] == $user->room) {
|
||||
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';"));
|
||||
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';");
|
||||
mysql_query("UPDATE `users` SET `exp` = `exp`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
@ -277,28 +280,28 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id
|
||||
switch($_GET['go']) {
|
||||
case "p1":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p1'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p1'];
|
||||
$user->room = $room['p1'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p2":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p2'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p2'];
|
||||
$user->room = $room['p2'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p3":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p3'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p3'];
|
||||
$user->room = $room['p3'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
case "p4":
|
||||
mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p4'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$user['room'] = $room['p4'];
|
||||
$user->room = $room['p4'];
|
||||
$_SESSION['time'] = time();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';"));
|
||||
$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';"));
|
||||
|
||||
if($user['hp'] <= 0) {
|
||||
mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '".$user['id']."'");
|
||||
@ -314,12 +317,12 @@ Mysql_query("update `users` set `hp`=`maxhp` where `login`='".$user['login']."'"
|
||||
|
||||
|
||||
|
||||
$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';");
|
||||
$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';");
|
||||
$data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."';");
|
||||
$data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '".mysql_real_escape_string($room['id'])."';");
|
||||
$data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '".mysql_real_escape_string($room['id'])."' AND `id_user`='".$user['id']."';");
|
||||
|
||||
$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';"));
|
||||
$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';"));
|
||||
|
||||
if($roow[0]) {
|
||||
$msg .= 'В комнате была установлена ловушка...<br>';
|
||||
@ -376,7 +379,7 @@ echo"<small><b>".$u_info['login']."</b> [".$u_info['level']."]<a href='inf.php?l
|
||||
|
||||
}
|
||||
|
||||
echo"".$room['name']." (".$user['room'].")</tr>";
|
||||
echo"".$room['name']." (".$user->room.")</tr>";
|
||||
echo "<tr><td><td><button style='width:50px; height:50px;' class='INPUT' disabled id=b1 onclick='location.href=\"lab.php?go=p1\";'>СЕВЕР</button><td><td rowspan=3 style='height:100px;'> <td rowspan=4 width=30% valign=top style='height:100px;'>";
|
||||
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
|
||||
$u_lab_kol = mysql_num_rows($u_lab);
|
||||
|
@ -7,7 +7,7 @@ include("functions.php");
|
||||
header("Cache-Control: no-cache");
|
||||
$errkom = '';
|
||||
|
||||
if($user['room'] == 1051) {
|
||||
if($user->room == 1051) {
|
||||
$aligns = array(2.99);
|
||||
mysql_query('DELETE FROM `laba_zv` WHERE `time` < "'.(time()-1*60*60).'"');
|
||||
$var = mysql_fetch_array(mysql_query('SELECT `id`, `vals` FROM `actions` WHERE `vals` > "'.time().'" AND `uid` = "'.$user['id'].'" AND `vars` = "go_labirint" LIMIT 1'));
|
||||
|
10
labirint.php
10
labirint.php
@ -11,7 +11,7 @@ if(isset($q2['id'])) {
|
||||
$q1 = mysql_fetch_array(mysql_query('SELECT * FROM `qst` WHERE `id` = "'.$q2['qid'].'" LIMIT 1'));
|
||||
}
|
||||
if($user['battle'] > '0'){
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
|
||||
$vipUsers = array(
|
||||
@ -44,7 +44,7 @@ function money_add($sum) {
|
||||
mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($user['room'] == 1052) {
|
||||
if($user->room == 1052) {
|
||||
if($user['id'] == 10022) {
|
||||
$lab = mysql_fetch_array(mysql_query('SELECT * FROM `laba_now` WHERE `id` = "'.$user['laba'].'" LIMIT 1'));
|
||||
$map = mysql_fetch_array(mysql_query('SELECT `id`,`data`,`update` FROM `laba_map` WHERE `id` = "'.$user['laba'].'" LIMIT 1'));
|
||||
@ -211,7 +211,7 @@ if($user['room'] == 1052) {
|
||||
$bot_ids = rtrim($bot_ids, ';');
|
||||
$where = rtrim($where, ' OR');
|
||||
|
||||
if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { die('Error #2'); }
|
||||
if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { exit('Error #2'); }
|
||||
|
||||
$id = mysql_insert_id();
|
||||
$bts = explode(';', $bot_ids);
|
||||
@ -230,7 +230,7 @@ if($user['room'] == 1052) {
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".$nicks."</b>";
|
||||
}
|
||||
|
||||
if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); }
|
||||
if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { exit('Error #1'.$who); }
|
||||
mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE `id`= {$user['id']} LIMIT 1");
|
||||
addlog($id, "Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу.<BR>");
|
||||
} else {
|
||||
@ -250,7 +250,7 @@ if($user['room'] == 1052) {
|
||||
mysql_query("UPDATE `users` SET `battle` = '".$bd['id']."', `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1");
|
||||
header("Location: fbattle.php");
|
||||
}
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} elseif($mitm['type'] == 1) {
|
||||
if($mitm['use'] == 0) {
|
||||
|
@ -6,8 +6,8 @@
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
include "functions.php";
|
||||
|
||||
if ($user['room'] != 53) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 53) { header("Location: main.php"); exit; }
|
||||
if ($user->battle) { header('location: fbattle.php'); exit; }
|
||||
?>
|
||||
<HTML><HEAD>
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
|
@ -6,7 +6,7 @@ $int=101;
|
||||
|
||||
if ($user['battle'] > 0) {echo "Не в бою...";}
|
||||
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Сила нейтралитета"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(1,100) < $int) {
|
||||
|
||||
|
@ -36,7 +36,7 @@ if ($user['battle'] > 0) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] ==603 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -95,7 +95,7 @@ if ($user['battle'] > 0) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -105,7 +105,7 @@ if ($user['battle'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -158,7 +158,7 @@ if ($user['battle'] > 0) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -166,7 +166,7 @@ if ($user['battle'] > 0) {
|
||||
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif($user['room'] != $us['room']) {
|
||||
} elseif($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -82,7 +82,7 @@ if($vip['bloodattack'] <= 0) {
|
||||
$ttt = 1;
|
||||
}
|
||||
|
||||
addch("<b>".$los."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>.", $user['room']);
|
||||
addch("<b>".$los."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>.", $user->room);
|
||||
if($user['invis'] == 1) { $lod = '<i><b>невидимка</b></i>'; } else { $lod = Nick::id($user['id'])->short(); }
|
||||
addlog($jert['battle'], '<span class=date>'.date("H:i").'</span> '.$lod.' вмешался в поединок!<BR>');
|
||||
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
|
||||
@ -121,7 +121,7 @@ if($vip['bloodattack'] <= 0) {
|
||||
$ld = Nick::id($user['id'])->full(1);
|
||||
$lds = Nick::id($user['id'])->short();
|
||||
$rr = "<b>".$ld."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <b>".$lds."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался.", $user['room']);
|
||||
addch("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <b>".$lds."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался.", $user->room);
|
||||
addlog($id, "Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location: fbattle.php");
|
||||
|
@ -39,7 +39,7 @@ elseif (!$us['online']) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
|
||||
echo "Чтите честь братьев.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -106,7 +106,7 @@ elseif (!$us['online']) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -116,7 +116,7 @@ elseif (!$us['online']) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -169,7 +169,7 @@ elseif (!$us['online']) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
@ -179,7 +179,7 @@ elseif (!$us['online']) {
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
//header("Location:fbattle.php");
|
||||
$skipper=1;
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -61,7 +61,7 @@ if ($user['battle'] > 0) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -71,7 +71,7 @@ if ($user['battle'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ if ($user['battle'] > 0) {
|
||||
echo "Персонаж под защитой от нападений ...";
|
||||
} elseif ($owntravma['id'] && !$us['battle']) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['level'] < 1) {
|
||||
echo "Новички находятся под защитой Мироздателя!";
|
||||
@ -81,7 +81,7 @@ if ($user['battle'] > 0) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user['room']);
|
||||
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -91,7 +91,7 @@ if ($user['battle'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0 WHERE `id`= " . $user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
} else {
|
||||
// начинаем бой
|
||||
//$bet=1;
|
||||
@ -146,7 +146,7 @@ if ($user['battle'] > 0) {
|
||||
|
||||
|
||||
$rr = "<b>" . Nick::id($user['id'])->full(1) . "</b> и <b>" . Nick::id($jert['id'])->full(1) . "</b>";
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -154,7 +154,7 @@ if ($user['battle'] > 0) {
|
||||
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -39,7 +39,7 @@ elseif (!$us['online']) {
|
||||
echo "Персонаж под защитой от нападений ...";
|
||||
} elseif ($owntravma['id'] && !$us['battle']) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -133,7 +133,7 @@ elseif (!$us['online']) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -142,7 +142,7 @@ elseif (!$us['online']) {
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -39,7 +39,7 @@ if ($user['battle'] > 0) {
|
||||
echo "Вы ожидаете поединка...";
|
||||
} elseif ($owntravma['id'] && !$us['battle']) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -133,7 +133,7 @@ if ($user['battle'] > 0) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -142,7 +142,7 @@ if ($user['battle'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -39,7 +39,7 @@ elseif (!$us['online']) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
|
||||
echo "Чтите честь братьев.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -106,7 +106,7 @@ elseif (!$us['online']) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -116,7 +116,7 @@ elseif (!$us['online']) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -169,7 +169,7 @@ elseif (!$us['online']) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
@ -178,7 +178,7 @@ elseif (!$us['online']) {
|
||||
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -1,11 +1,14 @@
|
||||
<?php
|
||||
// magic выход из боя
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
$raid_t=mysql_fetch_array(mysql_query("SELECT * FROM variables WHERE var='raid_on_status' LIMIT 1;"));
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
} elseif ($user['room']==600 || $user['room']==601 || $user['room']==602 || $us['room'] == 43 || $us['room'] == 45) {
|
||||
} elseif ($user->room==600 || $user->room==601 || $user->room==602 || $us['room'] == 43 || $us['room'] == 45) {
|
||||
echo "В этой локации выход из боя запрещен!";
|
||||
} elseif ($user['battle']==$raid_t['value']) {
|
||||
echo "Вы защищаете весь город, а не только себя. Победа или смерть!";
|
||||
|
@ -24,7 +24,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
|
||||
} elseif ($us['align']!=3) {
|
||||
echo "Персонаж не с темной склонностью!";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -78,7 +78,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
} else {
|
||||
$ttt = 2;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -88,7 +88,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
//header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
$skipper=1;
|
||||
}
|
||||
else
|
||||
@ -142,7 +142,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -150,7 +150,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -2,7 +2,10 @@
|
||||
// magic идентификацыя
|
||||
//if (rand(1,2)==1) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
$target=$_POST['target'];
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
$magictime=time()+259200;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
if ($user['room'] == 20) {
|
||||
if ($user->room == 20) {
|
||||
//нападение
|
||||
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
|
||||
@ -18,7 +18,7 @@ if ($user['room'] == 20) {
|
||||
echo "Вы ожидаете поединка...";
|
||||
} elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['level'] < 3) {
|
||||
echo "Нельзя напасть на персонажа ниже 3 уровня! Даже ночью, даже на Центральной площади...";
|
||||
@ -61,7 +61,7 @@ if ($user['room'] == 20) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user['room']);
|
||||
addch("<b>" . Nick::id($user['id'])->short() . "</b> вмешался в <a href=logs.php?log=" . $id . " target=_blank>поединок »»</a>. ", $user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -71,7 +71,7 @@ if ($user['room'] == 20) {
|
||||
mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0,`hit`=0,`parry`=0,`krit`=0,`counter`=0,`hp2`=0 WHERE `id`= " . $user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
} else {
|
||||
// начинаем бой
|
||||
//$bet=1;
|
||||
@ -125,7 +125,7 @@ if ($user['room'] == 20) {
|
||||
|
||||
|
||||
$rr = "<b>" . Nick::id($user['id'])->full(1) . "</b> и <b>" . Nick::id($jert['id'])->full(1) . "</b>";
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
|
||||
@ -144,7 +144,7 @@ if ($user['room'] == 20) {
|
||||
fwrite($btfl, '{[=' . $user['id'] . '=]}');
|
||||
fclose($btfl);
|
||||
}
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo 'Мазохист?...';
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
// magic идентификацыя
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -51,7 +51,7 @@ elseif (!$us['online']) {
|
||||
echo "Вы ожидаете поединка...";
|
||||
} elseif ($owntravma['id'] && !$us['battle']) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -106,7 +106,7 @@ elseif (!$us['online']) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -116,7 +116,7 @@ elseif (!$us['online']) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -169,7 +169,7 @@ elseif (!$us['online']) {
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
|
||||
@ -177,7 +177,7 @@ elseif (!$us['online']) {
|
||||
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра
|
||||
$coma[] = "Помолчи, за умного сойдешь. ";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$target= mysql_real_escape_string($_POST['target']);
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;"));
|
||||
|
@ -2,7 +2,10 @@
|
||||
// magic идентификацыя
|
||||
//if (rand(1,2)==1) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`block` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
$target=$_POST['target'];
|
||||
|
@ -2,7 +2,7 @@
|
||||
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;"));
|
||||
$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '55' ;"));
|
||||
$effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '201' LIMIT 1;"));
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; };
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; }
|
||||
if ($user['intel'] >= 15) {
|
||||
$int=$magic['chanse'] + ($user['intel'] - 15)*3;
|
||||
if ($int>98){$int=99;}
|
||||
@ -13,7 +13,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
|
||||
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
|
||||
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
|
||||
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от Оружия"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(1,100) < $int) {
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;"));
|
||||
$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '56' ;"));
|
||||
$effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '202' LIMIT 1;"));
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; };
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; }
|
||||
if ($user['intel'] >= 15) {
|
||||
$int=$magic['chanse'] + ($user['intel'] - 15)*3;
|
||||
if ($int>98){$int=99;}
|
||||
@ -14,7 +14,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
|
||||
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
|
||||
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
|
||||
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Сокрушение"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(1,100) < $int) {
|
||||
|
||||
|
@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра
|
||||
$coma[] = "Помолчи, за умного сойдешь. ";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$target = mysql_real_escape_string($_POST['target']);
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;"));
|
||||
|
@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра
|
||||
$coma[] = "Помолчи, за умного сойдешь. ";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$target= mysql_real_escape_string($_POST['target']);
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;"));
|
||||
|
@ -5,7 +5,10 @@ if ($user['battle'] > 0) {
|
||||
} elseif (rand(1,100)!=1) {
|
||||
undressall($user['id']);
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
if($user['sila']>3){
|
||||
mysql_query("UPDATE `users` SET `stats`=`stats`+1,`sila` = `sila`-1 WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;");
|
||||
}
|
||||
|
@ -6,7 +6,10 @@ $coma[] = "Бойтесь, нарушители!";
|
||||
$coma[] = "Наша служба и опасна, и трудна!";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$target=$_POST['target'];
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
|
@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
|
||||
echo "Чтите честь братьев.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -121,7 +121,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -182,7 +182,7 @@ $outok=1;
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
|
||||
@ -192,7 +192,7 @@ $outok=1;
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
|
||||
echo "Чтите честь братьев.";
|
||||
} elseif ($user['room'] != $us['room']) {
|
||||
} elseif ($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
} else {
|
||||
$ttt = 1;
|
||||
}
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user['room']);
|
||||
addch ("<b>".Nick::id($user['id'])->short()."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>. ",$user->room);
|
||||
|
||||
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\'<span class=date>'.date("H:i").'</span> '.nick::id($user['id'])->short().' вмешался в поединок!<BR>\') WHERE `id` = '.$jert['battle'].'');
|
||||
|
||||
@ -121,7 +121,7 @@ elseif ($user['zayavka'] > 0) {
|
||||
mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']);
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -182,7 +182,7 @@ $outok=1;
|
||||
|
||||
|
||||
$rr = "<b>".Nick::id($user['id'])->full(1)."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user['room']);
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <B><b>".Nick::id($user['id'])->short()."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался. ",$user->room);
|
||||
|
||||
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>');");
|
||||
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
@ -192,7 +192,7 @@ $outok=1;
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
$outok=1;
|
||||
header("Location:fbattle.php");
|
||||
//die("<script>location.href='fbattle.php';</script>");
|
||||
//exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
} else {
|
||||
echo '<font color=red>Мазохист?...</font>';
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] == 0) {
|
||||
echo "Это боевая магия...";
|
||||
|
@ -12,7 +12,7 @@ else {$int=0;}
|
||||
if ($user['battle'] > 0) {echo "РќРµ РІ Р±РѕСЋ...";}
|
||||
elseif ($user['level'] < 0) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
|
||||
elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Рликсир Р±СЂРѕРЅРё +5"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(0,100) < $int) {
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
if ($user['battle'] > 0) {echo "РќРµ РІ Р±РѕСЋ...";}
|
||||
elseif ($user['level'] < 0) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
|
||||
elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Рликсир СѓСЂРѕРЅР° +3"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(0,100) < $int) {
|
||||
|
||||
|
@ -7,7 +7,7 @@ $int=101;
|
||||
|
||||
if ($user['battle'] > 0) {echo "Не в бою...";}
|
||||
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от кулачного нападения"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(1,100) < $int) {
|
||||
|
||||
|
@ -23,7 +23,10 @@ $coma[] = "Мда…. Надеюсь это не смертельно. ";
|
||||
$coma[] = "Хвала Меру Города!";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$magictime=time()+($_POST['timer']*60*1440);
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
|
@ -2,7 +2,10 @@
|
||||
// magic идентификацыя
|
||||
//if (rand(1,2)==1) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
$target=$_POST['target'];
|
||||
|
@ -13,7 +13,10 @@ if ($user['battle'] > 0) {
|
||||
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = '{$target}' AND `needident` = 1 LIMIT 1;"));
|
||||
if (mysql_query("UPDATE `inventory` SET `needident` = 0 WHERE `id` = {$dress['id']} LIMIT 1;")) {
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
//запрещенная для встройки магия
|
||||
$forbidden=array("1","2","3","7","6","8","18","19","20","21","22","43","46","47","48","55","56","58","74","75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90",
|
||||
"91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106",
|
||||
|
@ -21,7 +21,7 @@ $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `
|
||||
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;"));
|
||||
$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '22' ;"));
|
||||
$effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '203' LIMIT 1;"));
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; };
|
||||
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; }
|
||||
|
||||
if ($user['intel'] >= 15) {
|
||||
$int=$magic['chanse'] + ($user['intel'] - 15)*3;
|
||||
@ -33,7 +33,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
|
||||
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
|
||||
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
|
||||
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Удача"; }
|
||||
elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
|
||||
elseif (!$us['online']) {echo "Персонаж не в игре!";}
|
||||
elseif (rand(1,100) < $int) {
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
if ($user['battle']==0) {
|
||||
echo'Нельзя использовать вне боя';
|
||||
|
@ -5,7 +5,8 @@
|
||||
$coma[] = "Я и не вспомню как его зовут... ";
|
||||
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
|
||||
$magictime=time()+($_POST['timer']*60*1440);
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
|
@ -2,7 +2,10 @@
|
||||
// magic идентификацыя
|
||||
//if (rand(1,2)==1) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
$target=$_POST['target'];
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
||||
$target = $_POST['target'];
|
||||
|
@ -25,7 +25,7 @@ if($vip['pers_attack'] <= 0) {
|
||||
echo "Персонаж тяжело травмирован...";
|
||||
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
|
||||
echo "Чтите честь ваших сокланов.";
|
||||
} elseif($user['room'] != $us['room']) {
|
||||
} elseif($user->room != $us['room']) {
|
||||
echo "Персонаж в другой комнате!";
|
||||
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
|
||||
echo "Нападения в этой локации запрещены!";
|
||||
@ -76,7 +76,7 @@ if($vip['pers_attack'] <= 0) {
|
||||
$ttt = 1;
|
||||
}
|
||||
|
||||
addch("<b>".$los."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>.", $user['room']);
|
||||
addch("<b>".$los."</b> вмешался в <a href=logs.php?log=".$id." target=_blank>поединок »»</a>.", $user->room);
|
||||
if($user['invis'] == 1) { $lod = '<i><b>невидимка</b></i>'; } else { $lod = Nick::id($user['id'])->short(); }
|
||||
addlog($jert['battle'], '<span class=date>'.date("H:i").'</span> '.$lod.' вмешался в поединок!<BR>');
|
||||
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
|
||||
@ -115,7 +115,7 @@ if($vip['pers_attack'] <= 0) {
|
||||
$ld = Nick::id($user['id'])->full(1);
|
||||
$lds = Nick::id($user['id'])->short();
|
||||
$rr = "<b>".$ld."</b> и <b>".Nick::id($jert['id'])->full(1)."</b>";
|
||||
addch("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <b>".$lds."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался.", $user['room']);
|
||||
addch("<a href=logs.php?log=".$id." target=_blank>Бой</a> между <b>".$lds."</b> и <b>".Nick::id($jert['id'])->short()."</b> начался.", $user->room);
|
||||
addlog($id, "Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
|
||||
header("Location: fbattle.php");
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
$effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$_SESSION['uid']}' and `type` = '51' LIMIT 1;"));
|
||||
|
||||
if ($effect['time']) {echo "Персонаж уже пьян"; }
|
||||
|
@ -4,7 +4,10 @@ if ($user['battle'] > 0) {
|
||||
echo "Не в бою...";
|
||||
} elseif (rand(1,100)!=1) {
|
||||
//undressall($user['id']);
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
global $rooms;
|
||||
$rs = mysql_query("SELECT * FROM `users` WHERE `in_tower` = 1 ORDER by `room` DESC;");
|
||||
while($r = mysql_fetch_array($rs)) {
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +1' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +11' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +2' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +3' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +4' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +5' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +1' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -11,7 +11,10 @@ if ($user['battle'] > 0) {
|
||||
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +11' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +2' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +3' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +4' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -11,7 +11,10 @@ if ($user['battle'] > 0) {
|
||||
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +5' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
@ -10,7 +10,10 @@ if ($user['battle'] > 0) {
|
||||
else {$int=0;}
|
||||
if (rand(1,100) < $int) {
|
||||
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;"));
|
||||
$svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +1' AND `owner` = '{$user['id']}' LIMIT 1;"));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user