This commit is contained in:
Ivor Barhansky 2022-06-07 00:30:34 +03:00
commit 5f4b2cbf77
1784 changed files with 327645 additions and 0 deletions

129
.htaccess Normal file
View File

@ -0,0 +1,129 @@
DefaultLanguage ru
AddDefaultCharset windows-1251
<IfModule mod_php5.c>
php_value session.use_trans_sid 0
php_value register_globals 1
<Directory "/usr/local/bin/php">
php_admin_value open_basedir none
</Directory>
</IfModule>
<IfModule mod_rewrite.c>
#Options +FollowSymLinks -MultiViews
Options -Indexes
Options -MultiViews
RewriteEngine On
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule (.+) https://new-combats.com/proxy/
#RewriteCond %{HTTP_HOST} ^new-combats\.ru [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://new-combats.com/$1 [R,L]
#RewriteCond %{HTTP_HOST} ^demonscity\.ru [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://new-combats.com/$1 [R,L]
#RewriteCond %{HTTP_HOST} ^new-combats\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://new-combats.com/$1 [R,L]
RewriteBase /
RewriteCond %{ENV:REDIRECT} !^yes$
RewriteRule ruletka.pl ruletka.php [L]
RewriteRule bandit.pl bandit.php [L]
RewriteRule blackjack.pl blackjack.php [L]
RewriteRule casino/SWFP.pl casino/SWFP.php [L]
RewriteCond %{ENV:REDIRECT} !^yes$
RewriteRule ^r([0-9]+)/?$ /register.php?ref=$1 [L]
RewriteRule ^adminion/([a-zA-Z0-9]+)/?$ /adminion/index.php?mod=$1 [L]
RewriteRule ^adminion/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ /adminion/index.php?mod=$1 [L]
RewriteRule ^adminion/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ /adminion/index.php?mod=$1 [L]
RewriteRule ^settings/?$ /settings.php [L]
RewriteRule ^info/(.*)/?$ /inf.php?$1 [L]
RewriteRule ^rating_pers/?$ /reting_pers.php [L]
RewriteRule ^rating_pers/(.*)/?$ /reting_pers.php?$1 [L]
RewriteRule ^rating_clans/?$ /reting_clans.php [L]
RewriteRule ^rating_clans/(.*)/?$ /reting_clans.php?$1 [L]
#RewriteRule ^support/(.*)/?$ /support/index.php?$1 [L]
#RewriteRule ^support/?$ /support/index.php [L]
RewriteRule ^clan/(.*)/?$ /clans_inf.php?$1 [L]
RewriteRule ^clan/?$ /clans_inf.php [L]
RewriteRule ^ruins/(.*)/?$ /ruins.php?$1 [L]
RewriteRule ^ruins/?$ /ruins.php [L]
RewriteRule ^exp/(.*)/?$ /exp.php?$1 [L]
RewriteRule ^exp/?$ /exp.php [L]
#
#
RewriteRule ^news/(.*)/?$ /n/$1 [R=301,L]
RewriteRule ^news/?$ /n [R=301,L]
RewriteRule ^n/(.*)/?$ /news_script/index.php?$1 [L]
RewriteRule ^n/?$ /news_script/index.php [L]
#
#
#RewriteRule ^news/(.*)/?$ /news_script/index.php?$1 [L]
#RewriteRule ^news/?$ /news_script/index.php [L]
RewriteRule ^forum/(.*)/?$ /forum_script/index.php?$1 [L]
RewriteRule ^forum/?$ /forum_script/index.php [L]
RewriteRule ^shadow/(.*)/?$ /obraz.php?$1 [L]
RewriteRule ^shadow/?$ /obraz.php [L]
RewriteRule ^dress/(.*)/?$ /dress.php?$1 [L]
RewriteRule ^dress/?$ /dress.php [L]
RewriteRule ^monitoring/(.*)/?$ /hmonitor.php?$1 [L]
RewriteRule ^monitoring/?$ /hmonitor.php [L]
RewriteRule ^rating/(.*)/?$ /rating_script/index.php?$1 [L]
RewriteRule ^rating/?$ /rating_script/index.php [L]
RewriteRule ^item/(.*)/?$ /items_info.php?$1 [L]
RewriteRule ^item/?$ /items_info.php [L]
RewriteRule ^repass/?$ /repass.php [L]
#
#
#
#
RewriteRule ^mail/(.*)/?$ /mailconf.php?$1 [L]
RewriteRule ^register/?$ /register.php [L]
#RewriteRule ^register1/?$ /register1.php [L]
RewriteRule ^reg/?$ /register.php [L]
RewriteRule ^enter/?$ /enter.php [L]
RewriteRule ^bk/?$ /buttons.php [L]
RewriteRule ^mobile/?$ /main_mobile.php [L]
RewriteRule ^btl([0-9]+)/?$ /jx/battle/refresh$1.php [L]
RewriteRule ^/n/?$ /news_script/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Order Allow,Deny
Allow from all

1
.user.ini Normal file
View File

@ -0,0 +1 @@
open_basedir=/home/newcom1/public_html/:/usr/local/lib/php/:/tmp

26
404.html Normal file
View File

@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>404</title>
<style>
body{
background-color:#444;
font-size:14px;
}
h3{
font-size:60px;
color:#eee;
text-align:center;
padding-top:30px;
font-weight:normal;
}
</style>
</head>
<body>
<h3>404, the file you requested does not exist!</h3>
</body>
</html>

240
AI.php Normal file
View File

@ -0,0 +1,240 @@
<?php
/*
ßäðî äëÿ îáðàáîòêè äàííûõ.
Îáðàáîòêà ïîåäèíêîâ, îáðàáîòêà çàÿâîê, îáðàáîòêà áîòîâ, îáðàáîòêà ïåùåð, îáðàáîòêà òóðíèðîâ, îáðàáîòêà âðåìåííûõ ãåíåðàöèé
*/
if(isset($_GET['m1'])) {
define('GAME',true);
setlocale(LC_CTYPE ,"ru_RU.CP1251");
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
$sp = mysql_query('SELECT * FROM `users_recombats` WHERE `email` != "" ORDER BY `name` DESC LIMIT 7000');
while( $pl = mysql_fetch_array($sp) ) {
echo "<br>".$pl['email'];
}
}elseif(isset($_GET['bk1'])) {
define('GAME',true);
setlocale(LC_CTYPE ,"ru_RU.CP1251");
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
$ins = 'Âåùè ÁÊ-1:<hr>';
$sp = mysql_query('SELECT * FROM `items_main` WHERE `geni` = 1');
while( $pl = mysql_fetch_array($sp) ) {
$po = mysql_fetch_array(mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = "'.$pl['id'].'" LIMIT 1'));
$po = $u->lookStats($po['data']);
if(!isset($po['add_minAtack']) && isset($po['sv_minAtack'])) {
$po['add_minAtack'] = $po['sv_minAtack'];
$po['add_maxAtack'] = $po['sv_maxAtack'];
}
$ins .= 'INSERT INTO `items_main` (
`id`, `name`, `img`, `art`, `type`, `inslot`, `use_magic`, `price`, `price2`, `iznosMAXi`, `massa`, `tr_level`, `tr_s1`, `tr_s2`, `tr_s3`, `tr_s4`, `tr_s5`, `tr_s6`, `add_s1`, `add_s2`, `add_s3`, `add_s4`, `add_s5`, `add_s6`, `add_hp`, `add_mp`, `add_m1`, `add_m2`, `add_m3`, `add_m4`, `add_b1`, `add_b2`, `add_b3`, `add_b4`, `add_attack_min`, `add_attack_max`
,`tr_a1`,`tr_a2`,`tr_a3`,`tr_a4`,`tr_mg1`,`tr_mg2`,`tr_mg3`,`tr_mg4`,`tr_mg5`,`tr_mg6`,`tr_mg7`
,`add_a1`,`add_a2`,`add_a3`,`add_a4`,`add_mg1`,`add_mg2`,`add_mg3`,`add_mg4`,`add_mg5`,`add_mg6`,`add_mg7`
) VALUES ';
$ins .= '(
NULL,
"'.$pl['name'].'",
"'.$pl['img'].'",
"'.( 0 + round( $po['art'] ) ).'",
"'.$pl['type'].'",
"'.$pl['inslot'].'",
"",
"'.$pl['price1'].'",
"'.$pl['price2'].'",
"'.$pl['iznosMAXi'].'",
"'.$pl['massa'].'",
"'.( 0 + round( $po['tr_lvl'] ) ).'",
"'.( 0 + round( $po['tr_s1'] ) ).'",
"'.( 0 + round( $po['tr_s2'] ) ).'",
"'.( 0 + round( $po['tr_s3'] ) ).'",
"'.( 0 + round( $po['tr_s4'] ) ).'",
"'.( 0 + round( $po['tr_s5'] ) ).'",
"'.( 0 + round( $po['tr_s6'] ) ).'",
"'.( 0 + round( $po['add_s1'] ) ).'",
"'.( 0 + round( $po['add_s2'] ) ).'",
"'.( 0 + round( $po['add_s3'] ) ).'",
"'.( 0 + round( $po['add_s4'] ) ).'",
"'.( 0 + round( $po['add_s5'] ) ).'",
"'.( 0 + round( $po['add_s6'] ) ).'",
"'.( 0 + round( $po['add_hpAll'] ) ).'",
"'.( 0 + round( $po['add_mpAll'] ) ).'",
"'.( 0 + round( $po['add_m1'] ) ).'",
"'.( 0 + round( $po['add_m2'] ) ).'",
"'.( 0 + round( $po['add_m3'] ) ).'",
"'.( 0 + round( $po['add_m4'] ) ).'",
"'.( 0 + round( $po['add_mib1'] ) ).'",
"'.( 0 + round( $po['add_mib2'] ) ).'",
"'.( 0 + round( $po['add_mib3'] ) ).'",
"'.( 0 + round( $po['add_mib4'] ) ).'",
"'.( 0 + round( $po['add_minAtack'] ) ).'",
"'.( 0 + round( $po['add_maxAtack'] ) ).'",
"'.( 0 + round( $po['tr_a1'] ) ).'",
"'.( 0 + round( $po['tr_a2'] ) ).'",
"'.( 0 + round( $po['tr_a3'] ) ).'",
"'.( 0 + round( $po['tr_a4'] ) ).'",
"'.( 0 + round( $po['tr_mg1'] ) ).'",
"'.( 0 + round( $po['tr_mg2'] ) ).'",
"'.( 0 + round( $po['tr_mg3'] ) ).'",
"'.( 0 + round( $po['tr_mg4'] ) ).'",
"'.( 0 + round( $po['tr_mg5'] ) ).'",
"'.( 0 + round( $po['tr_mg6'] ) ).'",
"'.( 0 + round( $po['tr_mg7'] ) ).'",
"'.( 0 + round( $po['add_a1'] ) ).'",
"'.( 0 + round( $po['add_a2'] ) ).'",
"'.( 0 + round( $po['add_a3'] ) ).'",
"'.( 0 + round( $po['add_a4'] ) ).'",
"'.( 0 + round( $po['add_mg1'] ) ).'",
"'.( 0 + round( $po['add_mg2'] ) ).'",
"'.( 0 + round( $po['add_mg3'] ) ).'",
"'.( 0 + round( $po['add_mg4'] ) ).'",
"'.( 0 + round( $po['add_mg5'] ) ).'",
"'.( 0 + round( $po['add_mg6'] ) ).'",
"'.( 0 + round( $po['add_mg7'] ) ).'"
);';
$ins .= "\n".'<br>';
}
echo $ins;
die();
}
if( isset($_GET['test'])) {
$i = 3;
function yrn($sila) {
$r = 0;
$level = $_GET['test'];
$r = 2 + $level + $sila - round($sila / 5);
return $r;
}
while( $i <= 100 ) {
echo '<div';
if( $i == 8 || $i == 13 || $i == 18 || $i == 23 ) {
echo ' style="background-color:green;color:#fff;"';
}elseif( $i == 7 || $i == 12 || $i == 17 || $i == 22 ) {
echo ' style="background-color:grey;color:#fff;"';
}
echo '>&nbsp;';
echo $i.' = '.yrn($i).'';
echo '</div>';
$i++;
}
die();
}
function getIP() {
if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP'];
return $_SERVER['REMOTE_ADDR'];
}
if(isset($_GET['robot'])) {
}elseif(getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP() != '31.131.116.166') {
if( !isset($_GET['test'])) {
die(getIP().'<br>'.$_SERVER['SERVER_ADDR']);
}
}
define('GAME',true);
setlocale(LC_CTYPE ,"ru_RU.CP1251");
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
include('_incl_data/class/bot.priem.php');
include('_incl_data/class/bot.logic.php');
function e($t) {
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (Êðèòè÷åñêàÿ îøèáêà): <b>'.mysql_real_escape_string($t).'</b>","capitalcity","LEL","6","1","-1")');
}
$count = array(
0,
0,
0,
0,
0,
0
);
function inuser_go_btl($id) {
if(isset($id['id'])) {
file_get_contents('https://new-combats.com/jx/battle/refresh.php?uid='.$id['id'].'&cron_core='.md5($id['id'].'_brfCOreW@!_'.$id['pass']).'&pass='.$id['pass']);
}
}
$sp = mysql_query('SELECT `u`.* , `s`.* FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `u`.`pass` = "botforpeople" ORDER BY `s`.`nextAct` ASC LIMIT 200');
$btltest = array();
while($pl = mysql_fetch_array($sp)) {
$i++;
if( $pl['zv'] == 0 && ($pl['battle'] == 0 || !isset($btltest[$pl['battle']]) || $btltest[$pl['battle']] < 10)) {
$btltest[$pl['battle']]++;
if( $pl['timereg'] == 0 ) {
mysql_query('UPDATE `users` SET `timereg` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
if( $pl['bot'] == 0 ) {
mysql_query('UPDATE `stats` SET `bot` = "2" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
botLogic::start( $pl['id'] );
}else{
if( $pl['zv'] > 0 ) {
botLogic::start( $pl['id'] );
}
if( $pl['timereg'] == 0 ) {
mysql_query('UPDATE `users` SET `timereg` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
if( $pl['bot'] == 0 ) {
mysql_query('UPDATE `stats` SET `bot` = "2" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
mysql_query('UPDATE `stats` SET `nextAct` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
echo '*';
}
echo '+';
echo '['.$pl['login'].'] -> Äåéñòâèå: '.$pl['ipreg'].' , îæèäàåì: '.($pl['timeMain']-time()).' ñåê., çàÿâêà: '.$pl['zv'].', ïîåäèíîê: '.$pl['battle'].'';
echo '<hr>';
}
?>

6
Array Normal file
View File

@ -0,0 +1,6 @@
# Netscape HTTP Cookie File
# https://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
new-combats.com FALSE / FALSE 0 PHPSESSID vt7d2f0tttjoneil7bqsc7org0
new-combats.com FALSE /jx/battle/ FALSE 1517571089 btl 0

1
_incl_data/.htaccess Normal file
View File

@ -0,0 +1 @@
deny from all

108
_incl_data/__config.php Normal file
View File

@ -0,0 +1,108 @@
<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 'Off');
setlocale(LC_CTYPE, "ru_RU.CP1251");
date_default_timezone_set('Europe/Moscow');
$c = [
'ver' => '1.8.3.7'
];
/* Конфигурации игры */
$c['name'] = 'Бойцовский Клуб';
$c['title'] = '«' . $c['name'] . '» - Бесплатная,браузерная онлайн игра'; //Название игры
$c['title2'] = ' - Бесплатная, онлайн игра посвященная сражениям и магии!';
$c['title3'] = $c['name'];
$c['keys'] = $c['name'] . ', combats.com, ' . $c['name'] . ' игра, ' . $c['name'] . ' играть, игра ' . $c['name'] . ', старый ' . $c['name'] . ', ' . $c['name'] . ' онлайн игра, ' . $c['name'] . ' браузерная игра, играть в ' . $c['name'] . ', игра бк, бк игра, старый бк, играть в бк, бк онлайн игра, новый бк, Легендарный ' . $c['name'] . ', легендарный бк, combats, комбатс, combats ru, combats com, OldBK, oldbk ru, oldbk com, олдбк, old bk, олд бк, mycombats, rebk, recombats, oldcombats, obk2'; //Ключевые слова META
$c['desc'] = '«' . $c['name'] . это бесплатная увлекательная браузерная онлайн игра 2004-2009г, в которой сконцентрировано все самое лучшее от современных онлайн игр. В этой браузерной игре заложены самые интересные традиции всем известной онлайн игры под названием «' . $c['name'] . ' 2004-2009», которая, кстати, стала первооткрывателем всех браузерных игр.'; //Описание META
//Сервера
$c['host'] = 'new-combats.com';
$c['forum'] = 'forum.' . $c['host'];
$c['img'] = 'img' . $c['host'];
$c['thiscity'] = 'capitalcity';
$c['capitalcity'] = $c['host'];
$c['abandonedplain'] = $c['host'];
$c['exit'] = '<script>top.location="https://' . $c['host'] . '/";</script><noscript><meta http-equiv="refresh" content="0; URL=https://' . $c['host'] . '/"></noscript>';
//Валюта
$c['curency_name'] = 'RUB';
$c['curency_value'] = 36;
//Бот клон
$c['bot_level'] = 0; // до какого лвл бот (включительно)
$c['propsk_die'] = 0; //Смерть при пропуске ходов, 0 - выкл. , >= 1 - количество пропусков до смерти при нападении
//Скупка
$c['exp'] = 0; //бонус опыта
$c['shop_type1'] = 100; //в гос НЕ ТРОГАТЬ
$c['shop_type2'] = 90; //в березку НЕ ТРОГАТЬ
$c['shop_all'] = 0; //Скупка на все! , 0 - сделать для отключения скупки.
$c['shop_all_type1'] = 100; //Скупка только с госе! , 0 - сделать для отключения скупки.
$c['shop_all_type2'] = 100; //Скупка только с березки! , 0 - сделать для отключения скупки.
//
$c['nosanich'] = true; //Странички Саныча не выпадают - true , выпадают - false
$c['zuby'] = false; //зубы
$c['limitedexp'] = false; //лимит опыта
$c['infinity5level'] = false; //вечные 5 уровни
$c['expstop'] = 2999999; //9; //Опыт на котором останавливаемся 11 149999999
$c['expstopu'] = 499999999; //Опыт на котором останавливаемся
$c['noobgade'] = false; //нуб квест (пещера)
$c['bonusonline'] = true; //бонус за онлайн
$c['bonusonline_kof'] = 1; //коэфицент кр за лвл
$c['level_ransfer'] = 8; //С какого уровня разрешены передачи
$c['znahar'] = true; //бесплатный знахарь
$c['nolevel'] = false; //лимитирование уровней
$c['noitembuy'] = false; //Не требует ресурсы для покупки
$c['effz'] = 0; //Скольким секундам равен заряд
$c['money_haot'] = true; //кр за хаоты
$c['money_haot_proc'] = 0.10; //сколько процентов от фулла выдает в награду
$c['crtoecr'] = 500; //Курс обмена кр на екр (если 0, то выключено)
$c['ecrtocr'] = 200; //Курс обмена екр на кр
$c['bonuslevel'] = true; //Бонус уровня
$c['bonussocial'] = false; //Бонус социальный
$c['exp_limit_many'] = false; //Лимит опыта, если более 5 боев, то 0 опыта даст
$c['exp_mega'] = false; //Повышенный лимит опыта
$c['exp_mega_val'] = [
0 => 1000,
1 => 1000,
2 => 1000,
3 => 1000,
4 => 1000,
5 => 1000,
6 => 1000,
7 => 1500,
8 => 0,
9 => 0,
10 => 0,
11 => 0,
12 => 0,
13 => 0,
14 => 0,
15 => 0,
16 => 0,
17 => 0,
18 => 0,
19 => 0,
20 => 0,
21 => 0
]; //Повышенный лимит опыта
$c['w'] = date('w');
$c['m'] = date('m');
$code = '1';
$c['securetime'] = 0; //Время последнего возможного взлома персов (подбор пароля по базам данных других игр)
$c['copyright'] = 'Copyright © ' . date('Y') . ' « Новый Бойцовский Клуб »';
if (isset($_GET['version'])) {
die('Version: ' . $c['ver']);
}
/** Турниры. Выбив проигравшего. */
require_once 'class/Insallah/Core/Db.php';
require_once 'class/Insallah/Tournament/Tournament.php';
require_once 'class/Insallah/Tournament/TournamentModel.php';
(new \Insallah\Tournament())->kick_user(\Insallah\TournamentModel::getLooser());
/** * */

View File

@ -0,0 +1,152 @@
<?php
namespace Insallah;
use Exception;
use PDO;
use PDOException;
use PDOStatement;
class Db
{
/**
* Íàñòðîéêè ïîäêëþ÷åíèÿ
* Ëó÷øå âûíîñèòü â êîíôèã
* self::DB_HOST -> Config::DB_HOST
*/
const DB_HOST = '127.0.0.1'; // localhost
const DB_USER = 'newcom1_abk';
const DB_PASSWORD = '4nWYsIM[c?}P';
const DB_NAME = 'newcom1_abk';
const CHARSET = 'cp1251';
const DB_PREFIX = '';
/**
* @var PDO
*/
static private $db;
/**
* @var null
*/
protected static $instance = null;
/**
* DB constructor.
* @throws Exception
*/
public function __construct(){
if (self::$instance === null){
try {
self::$db = new PDO(
'mysql:host='.self::DB_HOST.';dbname='.self::DB_NAME,
self::DB_USER,
self::DB_PASSWORD,
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES ".self::CHARSET
]
);
} catch (PDOException $e) {
throw new Exception ($e->getMessage());
}
}
return self::$instance;
}
/**
* @param $stmt
* @return PDOStatement
*/
public static function query($stmt) {
return self::$db->query($stmt);
}
/**
* @param $stmt
* @return PDOStatement
*/
public static function prepare($stmt) {
return self::$db->prepare($stmt);
}
/**
* @param $query
* @return int
*/
static public function exec($query) {
return self::$db->exec($query);
}
/**
* @return string
*/
static public function lastInsertId() {
return self::$db->lastInsertId();
}
/**
* @param $query
* @param array $args
* @return PDOStatement
* @throws Exception
*/
public static function run($query, $args = []) {
try{
if (!$args) {
return self::query($query);
}
$stmt = self::prepare($query);
$stmt->execute($args);
return $stmt;
} catch (PDOException $e) {
throw new Exception($e->getMessage());
}
}
/**
* @param $query
* @param array $args
* @return mixed
*/
public static function getRow($query, $args = []) {
return self::run($query, $args)->fetch();
}
/**
* @param $query
* @param array $args
* @return array
*/
public static function getRows($query, $args = []) {
return self::run($query, $args)->fetchAll();
}
/**
* @param $query
* @param array $args
* @return mixed
*/
public static function getValue($query, $args = []) {
$result = self::getRow($query, $args);
if (!empty($result)) {
$result = array_shift($result);
}
return $result;
}
/**
* @param $query
* @param array $args
* @return array
*/
public static function getColumn($query, $args = []) {
return self::run($query, $args)->fetchAll(PDO::FETCH_COLUMN);
}
public static function sql($query, $args = [])
{
self::run($query, $args);
}
}

View File

@ -0,0 +1,112 @@
<?php
/** todo
* В каком-то месте проверять по крону не протух ли турнир!
*/
namespace Insallah;
class Tournament
{
/**
* Проверяем может ли игрок учавствовать в турнире и либо присоединяем его, либо обламываем.
*
* @param int $user_id
*
* @return void
*/
public function join($user_id)
{
/** Возвращает level, или 0 если провалены проверки. */
$userLevel = TournamentModel::getUserLevel($user_id);
if ($userLevel === 0) {
return;
}
$mq = TournamentModel::getWaitingMembersQuantity($userLevel);
if (empty($mq)) {
TournamentModel::createTournament($userLevel);
}
TournamentModel::joinTournament($user_id, $userLevel);
/** На третьем участнике пишем уведомление в чат. */
if ($mq === 2) {
TournamentModel::sysMessage("Внимание! Идёт набор бойцов на турнир " . $userLevel . " уровня! Поспешите!");
}
/** На двенадцатом участнике начинаем турнир. */
if ($mq === 11) {
TournamentModel::startTournament($userLevel);
$this->check_members($userLevel);
}
}
/**
* Проверяем есть ли ещё участники турнира. Если есть, отправляем драться. Если остался последний - значит он
* победитель.
* todo Обработать ничью!
*
* @param int $tournament_id
*
* @return void
*/
private function check_members($tournament_id)
{
$active_fighters = TournamentModel::getFreeFighters($tournament_id);
if (count($active_fighters) > 1) {
$this->start_battle($active_fighters);
} else {
TournamentModel::removeFighter($active_fighters[0]); // выбиваем победителя
$this->victory($tournament_id);
}
}
/**
* Получаем пары бойцов и начинаем их поединки.
*
* @param array $fighters_list
*
* @return void
*/
private function start_battle(array $fighters_list)
{
$teams = TournamentModel::getFightersTeams($fighters_list);
foreach ($teams as $team) {
if (count($team) === 2) {
TournamentModel::startBattle($team[0], $team[1]);
}
}
}
/**
* Вызывается при проигрыше боя или при уходе в оффлайн.
*
* @param int $user_id
*
* @return void
*/
public function kick_user($user_id)
{
if (empty($user_id)) {
return;
}
TournamentModel::removeFighter($user_id);
$this->check_members(TournamentModel::getTournamentIdByUserId($user_id)); //перезапуск выбора противника для поединка
}
/**
* Награждаем победителей турнира, чистим базу.
*
* @param int $tournament_id
*
* @return void
*/
private function victory($tournament_id)
{
$winners = TournamentModel::getWinners($tournament_id);
TournamentModel::destroyTournament($tournament_id);
TournamentModel::givePrizeItems($winners[1], 25);
TournamentModel::givePrizeItems($winners[2], 10);
TournamentModel::givePrizeItems($winners[3], 5);
}
}

View File

@ -0,0 +1,285 @@
<?php
namespace Insallah;
class TournamentModel
{
/**
* проверка уровня, стоимости эквипа, прочие проверки, что персонаж свободен
* таймер ожидания 30 минут
*
* @param int $uid
*
* @return int
*/
public static function getUserLevel($uid)
{
$db = new Db;
$level = $db::getValue('select level from users where id = ? and level between 8 and 12 and battle = 0', [$uid]);
if (!$level) {
return 0;
}
$ekr_total = $db::getValue('select sum(2price) from items_users where inOdet > 0 and uid = ?', [$uid]);
$exp = $db::getValue('select exp from stats where id = ?', [$uid]);
// Вот правда не знаю проканает или нет.
if ($ekr_total > ($level - 7) * 150 || $exp < 250000) {
return 0;
}
return $level;
}
/**
* Считаем сколько игроков ждут в заявке на турнир.
*
* @param int $tid
*
* @return int
*/
public static function getWaitingMembersQuantity($tid)
{
$db = new Db();
return $db::getValue('select count(*) from tournaments_users where tid = ?', [$tid]);
}
/**
* Создание нового турнира.
*
* @param int $tid
*
* @return void
*/
public static function createTournament($tid)
{
$db = new Db();
$db::sql('insert into tournaments (tid) values (?)', [$tid]);
}
/**
* Игрок присоединяется к турниру и телепортируется в турнирную комнату.
*
* @param int $uid
* @param int $tid
*
* @return void
*/
public static function joinTournament($uid, $tid)
{
/** Кастомные комнаты 25008 - 25012. */
$room_id = 25000 + $tid;
$db = new Db();
$db::sql('insert into tournaments_users (tid, uid) values (?, ?)', [$tid, $uid]);
self::teleport($uid, $room_id);
}
/**
* Старт турнира.
*
* @param int $tid
*
* @return void
*/
public static function startTournament($tid)
{
$db = new Db();
$db::sql('update tournaments set start_time = -1 where tid = ?', [$tid]);
}
/**
* Чистим базы от прошедшего турнира.
*
* @param int $tid
*
* @return void
*/
public static function destroyTournament($tid)
{
$db = new Db();
//Убедиться что в базе настроен foreign_keys и последует автоочистка tournaments_users !!!
$db::sql('delete from tournaments where tid = ?', [$tid]);
}
/**
* Получаем список бойцов и бьём их на пары. Возвращаем списки пар + 1 последний без пары если есть.
*
* @param array $fighters_list
*
* @return array
*/
public static function getFightersTeams(array $fighters_list)
{
$db = new Db();
return array_chunk($db::getRows('select id from users where battle = 0 and id in (?)', [implode(', ', $fighters_list)]), 2);
}
/**
* Выбираем живых бойцов не сражающихся в данный момент.
*
* @param int $tid
*
* @return array
*/
public static function getFreeFighters($tid)
{
$db = new Db();
return $db::getRows('select uid from tournaments_users where tid = ? and death_time = 0 order by rand()', [$tid]);
}
/**
* Выбираем победителей. Смещаем массив, чтобы возврат шёл с единицы.
*
* @param int $tid
*
* @return array
*/
public static function getWinners($tid)
{
$db = new Db();
$arr = [];
array_unshift($arr, '');
unset($arr[0]);
$winners = $db::getRows('select uid from tournaments_users where tid = ? order by death_time desc limit 3', [$tid]);
foreach ($winners as $winner) {
$arr[] = $winner['uid'];
}
return $arr;
}
/**
* Пробуем выкусить проигравшего в последней турнирной битве и удалить эту самую битву во избежание.
* @return mixed
*/
public static function getLooser()
{
$query = '
select uid, battle
from
battle_users,
(select id, team_win
from battle
where
team_win > 0 and
typeBattle = 25000
order by time_over desc
limit 1) as last_battle
where
battle_users.battle = last_battle.id and
battle_users.team != last_battle.team_win';
$db = new Db;
$row = $db::getRow($query);
$db::sql('delete from battle where id = ?', [$row['battle']]);
return $row['uid'];
}
/**
* Выбывший из турнира покидает комнату и получает время смерти.
*
* @param int $uid
*
* @return void
*/
public static function removeFighter($uid)
{
$db = new Db();
$db::sql('update tournaments_users set death_time = unix_timestamp() where uid = ?', [$uid]);
self::teleport($uid, 9);
}
/**
* Узнаём id турнира по id игрока.
* todo Проверить, возможно можно обращаться к уровню игрока.
*
* @param int $uid
*
* @return mixed
*/
public static function getTournamentIdByUserId($uid)
{
$db = new Db();
return $db::getValue('select tid from tournaments_users where uid = ?', [$uid]);
}
/**
* Попробуем стартонуть поединок.
* 25000 - Уникальный id поединка под турниры.
* noinc - запрет на вмешательство
* invis - невидимый бой
*
* @param int $uid1
* @param int $uid2
*
* @return void
*/
public static function startBattle($uid1, $uid2)
{
$db = new Db();
$db::exec('insert into battle (city, time_start, timeout, type, invis, noinc, travmChance, typeBattle)
values (\'capitalcity\', unix_timestamp(), 60, 0, 1, 1, 0, 25000)');
$db::sql('update stats set team = 1, hpNow = hpAll, mpNow = mpAll where id = ?', [$uid1]);
$db::sql('update stats set team = 2, hpNow = hpAll, mpNow = mpAll where id = ?', [$uid2]);
$db::sql('update users set battle = ? where id in (?, ?)', [$db::lastInsertId(), $uid1, $uid2]);
}
/**
* Узнаём логин персонажа по его id.
*
* @param int $uid
*
* @return mixed
*/
public static function uidToLogin($uid)
{
$db = new Db();
return $db::getValue('select login from users where id = ?', [$uid]);
}
/**
* Телепорт по комнатам.
*
* @param int $uid
* @param int $room_id
*
* @return void
*/
private static function teleport($uid, $room_id)
{
$db = new Db();
$db::sql('update users set room = ? where id = ?', [$room_id, $uid]);
}
/**
* Нет проверок $message потому что оно всегда задаётся в коде и игрок на него не влияет.
*
* @param string $city
* @param string $message
*
* @return void
*/
public static function sysMessage($message, $city = 'capitalcity')
{
$db = new Db();
$db::sql('insert into chat (city, room, time, type, text, new, da) values (?, 0, unix_timestamp(), 6, ?, 1, 1)', [$city, $message]);
}
/**
* Генерирует множественный запрос сразу на $quantity однотипных предметов в инвентарь пользователя $uid.
*
* @param int $uid
* @param int $quantity
*
* @return void
*/
public static function givePrizeItems($uid, $quantity)
{
$query = 'insert into items_users (item_id, uid, data, iznosMAX, lastUPD, time_create)
values (4754, :uid, :data, 1, unix_timestamp(), unix_timestamp())';
$args = [
'uid' => $uid,
'data' => 'nosale=1|musor=1|sudba=' . self::uidToLogin($uid) . '|lvl=8|tr_s1=0|tr_s2=0|tr_s3=0|tr_s4=0'
];
$db = new Db();
$stmt = $db::prepare($query);
for ($i = 0; $i < $quantity; $i++) {
$stmt->execute($args);
}
}
}

10710
_incl_data/class/__battle.php Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,189 @@
<?
if(!defined('GAME'))
{
die();
}
class Chat {
var $smilesWorld = array(
'laugh' => array(0 => 'смеется',1 => 'посмеялся над [*%l*]'),
'fingal' => array(0 => 'трет фингал',1 => 'щупает фингал у [*%l*]'),
'eek' => array(0 => 'ошарашен',1 => 'ошарашен действиями [*%l*]'),
'smoke' => array(0 => 'закуривает',1 => 'предлагает [*%l*] пойти покурить'),
'hi' => array(0 => 'приветствует всех вокруг',1 => 'приветствует [*%l*]'),
'bye' => array(0 => 'прощается со всеми и уходит',1 => 'прощается с [*%l*]'),
'king' => array(0 => 'коронует себя :-)',1 => 'объявляет [*%l*] своим королем!'),
'king2' => array(0 => 'коронует себя :-)',1 => 'объявляет [*%l*] своей королевой!'),
'boks2' => array(0 => 'вызывает всех на поединок',1 => 'предлагает [*%l*] дружеский матч'),
'boks' => array(0 => 'обещает побить любого, кто примет вызов!',1 => 'намекает [*%l*] на поединок'),
'gent' => array(0 => 'предлагает считать себя благородным сэром',1 => 'считает [*%l*] джельтельменом'),
'lady' => array(0 => 'предлагает считать себя благородной леди',1 => 'считает, что [*%l*] настоящая Леди'),
'tongue' => array(0 => 'показывает окружающим язык',1 => 'показывает язык [*%l*]'),
'smil' => array(0 => 'болтает без умолку',1 => 'считает, что [*%l*] говорит откровенную ерунду!'),
'ponder' => array(0 => 'кое-что усиленно обдумывает',1 => 'обещает обмозговать предложение [*%l*]'),
'bow' => array(0 => 'сохраняя достоинство, кивает окружающим',1 => 'сохраняя достоинство кивает [*%l*]'),
'angel' => array(0 => 'считает себя Ангелом',1 => 'считает [*%l*] своим Ангелом'),
'angel2' => array(0 => 'грезит об Ангелах',1 => 'думает что [*%l*] Ангел'),
'hello' => array(0 => 'желает здравствовать окружающим',1 => 'желает здравствовать [*%l*]'),
'dont' => array(0 => 'рекомендует окружающим не делать этого',1 => 'рекомендует [*%l*] не делать этого'),
'idea' => array(0 => 'озарен свежей идеей!',1 => 'предлагает [*%l*] обсудить пару идей'),
'mol' => array(0 => 'преклоняется перед окружающими',1 => 'преклоняется перед [*%l*]'),
'super' => array(0 => 'считает, что мир хорош, все дамы - Леди, а Солнце - шар дающий свет!',1 => 'фанатеет от [*%l*]'),
'beer' => array(0 => 'вспоминает про припрятаный в заначке эликсир...',1 => 'готов поделиться с [*%l*] припрятанным эликсиром!'),
'drink' => array(0 => 'считает, что пора пить различные эликсиры',1 => 'предлагает [*%l*] пойти пропустить по стаканчику эликсира'),
'baby' => array(0 => 'изображает малыша',1 => ' считает, что [*%l*] еще мал и неопытен для обоснованной критики'),
'tongue2' => array(0 => ' показывает всяким врединам язык',1 => 'показывает [*%l*] язык, проявляя недовольство'),
'sword' => array(0 => 'готов сразиться в честном поединке',1 => 'вызывает [*%l*] на честный поединок!'),
'agree' => array(0 => 'пожимает руку собеседникам',1 => 'пожимает руку [*%l*]'),
'loveya' => array(0 => 'преисполнен чувства любви',1 => 'преисполнен чувства любви к [*%l*]'),
'kiss' => array(0 => 'целует всех',1 => 'целует [*%l*]'),
'kiss2' => array(0 => 'хочет нежно поцеловать кого-то...',1 => 'нежно целует [*%l*]'),
'kiss3' => array(0 => 'кое-кого целует...',1 => 'нежно целует [*%l*]'),
'kiss4' => array(0 => 'кое-кого целует...',1 => 'хочет уединиться с [*%l*] и целоваться...'),
'rose' => array(0 => 'хочет кому-то подарить розу, но стесняется...',1 => 'дарит [*%l*] ароматную розу...'),
'love' => array(0 => 'думает только о любви...',1 => 'думает, что [loginfrom] + [*%l*]= любовь!'),
'love2' => array(0 => 'мечтает о свадьбе...',1 => 'мечтает о свадьбе с [*%l*]'),
'confused' => array(0 => 'в недоумении...',1 => 'недоумевает от [*%l*]'),
'yes' => array(0 => 'кивает в знак согласия',1 => 'кивает [*%l*] в знак согласия'),
'no' => array(0 => 'мотает головой в знак протеста',1 => 'мотает головой [*%l*] в знак протеста'),
'shuffle' => array(0 => 'в смущении от таких обстоятельств',1 => 'в смущении от [*%l*]'),
'nono' => array(0 => 'выражает категорическое несогласие!',1 => 'выражает категорическое несогласение с [*%l*]'),
'maniac' => array(0 => 'знает точно наперед - сегодня кто-нибудь умрет...',1 => 'считает, что [*%l*] пора бы уже стать жертвой маньяка...'),
'privet' => array(0 => 'почтительно приветствует окружающих',1 => 'почтительно приветствует [*%l*]'),
'ok' => array(0 => 'считает, что это замечательная идея',1 => 'считает, что [*%l*] движется в правильном направлении'),
'ninja' => array(0 => 'угрожает окружающим тайным мастерством!',1 => 'угрожает [*%l*] мастерством древних'),
'pif' => array(0 => 'ищет подходящую мишень',1 => 'думает, что сложно промахнуться по [*%l*]'),
'smash' => array(0 => 'собирается крушить и ломать',1 => 'хочет сломать пару-тройку костей у [*%l*]'),
'alien' => array(0 => 'считает, что мир захватили мутанты!',1 => ' считает, что [*%l*] еще тот мутант!'),
'pirate' => array(0 => 'подумывает, кого бы ограбить!...',1 => 'считает, что лучшей жертвы чем [*%l*], не найти!'),
'gun' => array(0 => 'хочет повысить кое-кому уровень железа в организме... :gun:',1 => 'считает, что у [*%l*] маловато железа в организме! :gun:'),
'trup' => array(0 => 'падает замертво',1 => 'считает, что [*%l*], живет слишком долго, и пора бы это исправить!'),
'mdr' => array(0 => 'считает, что у него есть отличный способ решения разногласий... :mdr:',1 => 'предлагает [*%l*] культурно отдохнуть :mdr:'),
'sneeze' => array(0 => 'громко чихает',1 => 'чихает на [*%l*], обрызгивая его слюнями с ног до головы!'),
'mad' => array(0 => 'просто в бешенстве!!!',1 => 'в бешенстве от [*%l*]!!!'),
'friday' => array(0 => 'культурно отдыхает...',1 => 'предлагает [*%l*] культурно отдохнуть'),
'cry' => array(0 => 'безудержно рыдает',1 => 'рыдает на плече у [*%l*]'),
'grust' => array(0 => 'грустит...',1 => 'грустит о [*%l*]'),
'rupor' => array(0 => 'пытается докричаться до окружающих',1 => 'пытается докричаться до [*%l*]'),
'fie' => array(0 => 'умоляет: НЕТ, только не ЭТО!!!',1 => 'умоляет [*%l*] о пощаде!'),
'nnn' => array(0 => 'ничего не видит, не слышит, и никому не скажет...',1 => 'ничего не видел, не слышал и не помнит о [*%l*]'),
'row' => array(0 => 'находится в бешенстве и ищет с кем бы пообщаться...',1 => 'собирается выяснить отношения с [*%l*]'),
'red' => array(0 => 'смущаясь краснеет...',1 => 'краснеет от [*%l*]'),
'lick' => array(0 => 'облизнулся, в предвкушении',1 => 'облизывается при виде [*%l*]'),
'help' => array(0 => 'нуждается в срочной помощи!',1 => 'просит помощи у [*%l*]'),
'wink' => array(0 => 'подмигивает окружающим',1 => 'подмигивает [*%l*]'),
'jeer' => array(0 => 'посмеивается над ситуацией...',1 => 'посмеивается над [*%l*]'),
'tease' => array(0 => 'дразнится',1 => 'дразнит [*%l*]'),
'nunu' => array(0 => 'недоволен окружающими...',1 => 'недоволен [*%l*]'),
'inv' => array(0 => 'хочет найти свои зубы...',1 => 'жалуется [*%l*] на трудности жизни инвалида...'),
'duel' => array(0 => 'собирается проткнуть кое-кого...',1 => 'вызывает [*%l*] на дуэль!'),
'susel' => array(0 => 'Напевая: &quot;эээххх ухнеееемм, да ещеее ууухнеем..&quot; высматривает в толпе подходящий пондер...',1 => 'предлагает [*%l*] отхватить прямо по пондеру!'),
'nun' => array(0 => 'угрожает окружающим палочками для риса',1 => 'показывает [*%l*] как надо пользоваться палочками для риса'),
'kruger' => array(0 => 'ненавязчиво объясняет окружающим кого тут надо бояться :kruger:',1 => 'демонстрирует [*%l*] нестриженные когти'),
'flowers' => array(0 => 'учится выхватывать букет Ромашек-21 из-за спины одним движением',1 => 'целует [*%l*] и дарит букет ромашек'),
'horse' => array(0 => 'патрулирует границы Бойцовского Клуба',1 => 'предлагает [*%l*] порубать всех врагов в капусту! :horse:'),
'hug' => array(0 => 'готов обнять всех в комнате!',1 => 'крепко обнимает [*%l*]'),
'str' => array(0 => 'в ужасе покрывается ледяным потом!',1 => 'в ужасе прячется от [*%l*]'),
'alch' => array(0 => 'напоминает окружающим о вечных ценностях :alch:',1 => 'предлагает [*%l*] приобщиться к вечным ценностям :alch:'),
'pal' => array(0 => ' напоминает, что из под робы выпирает крест, а не что-то там! :-)',1 => 'требует от [*%l*] предъявить документы в развернутом виде!'),
'mag' => array(0 => 'читает заклинания. Вслух. По слогам.',1 => 'произносит страшное колдунство на [*%l*]'),
'sniper' => array(0 => 'изображает из себя Вильгельма Теля',1 => 'предлагает [*%l*] поиграть в Вильгельма Теля'),
'fuck' => array(0 => 'повторяет позы камасутры',1 => 'предлагает [*%l*] повторить позы камасутры вместе'),
'rotate' => array(0 => 'катается от смеха по полу',1 => 'катается по полу от смеха над [*%l*]')
);
public function expworld($txt,$vl)
{
$words = explode(' ',$txt); $j = 0; $i = -1;
while($i < count($words))
{
$i++;
if(isset($words[$i]))
{
if(strlen($words[$i]) > $vl){ $words[$i] = substr($words[$i],0,$vl).' '.substr($words[$i],$vl); $i = 0; $j++; $txt = implode(' ', $words); $words = explode(' ',$txt); }
}
}
$txt = implode(' ',$words);
return $txt;
}
public function str_count($str,$col)
{
if (strlen($str) > $col)
{
$str = substr($str,0,$col);
}
return ($str);
}
public function smileText($text,$tol,$room,$city)
{
$retxt = ''; $j = 0;
$txt = str_replace('/','&frasl;',$text).' ';
if(preg_match("/&frasl;(.*?) /", $txt, $retxt))
{
if(isset($this->smilesWorld[$retxt[1]]))
{
if($tol == '')
{
$tol = str_replace('&frasl;'.$retxt[1].' ','',$txt);
$tol = trim($tol,' ');
}
if($tol == '')
{
$txt = ''.$this->smilesWorld[$retxt[1]][0].'';
}else{
$mbl = mysql_fetch_array(mysql_query('SELECT `online`,`id`,`login`,`room`,`city` FROM `users` WHERE `room`="'.$room.'" AND `online` > '.(time()-520).' AND `city` = "'.$city.'" AND `login`="'.mysql_real_escape_string($tol).'" LIMIT 1'));
if(isset($mbl['id']))
{
$txt = ''.$this->smilesWorld[$retxt[1]][1].'';
$txt = str_replace('[*%l*]','[login:'.$tol.']',$txt);
}else{
$txt = 'USER IS FALSE';
}
}
$j = 1;
}
}
if($j == 1)
{
$text = $txt;
}else{
$text = false;
}
return $text;
}
public function send($color,$room,$city,$from,$to,$text,$time,$type,$toChat,$spam,$sound,$new = 0)
{
//mysql_query('LOCK TABLES chat WRITE');
mysql_query("INSERT INTO `chat` (`new`,`sound`,`color`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`spam`) VALUES ('".$new."','".$sound."','".$color."','".$city."','".$room."','".$from."','".$to."','".$text."','".$time."','".$type."','".$toChat."','".$spam."')");
//mysql_query('UNLOCK TABLES');
$msg_id = mysql_insert_id();
return $msg_id;
}
public function jsmsg($id,$time,$to,$from,$type,$ch,$e,$see,$js = 0,$cl = '#000000',$typeTime = NULL)
{
$tm = date('H:i',$time);
if($typeTime==1)
{
$tm = date('d.m.Y H:i',$time);
}
$rt = 'top.addMessage(\''.$id.'\',\''.$tm.'\',\''.$to.' \',\''.$from.'\',\''.$type.'\',\''.$ch.'\'," '.$e.' ",\''.$see.'\',\''.$cl.'\');';
if($js==1)
{
$rt = '<script>'.$rt.'</script>';
}
return $rt;
}
}
$chat = new Chat();
?>

View File

@ -0,0 +1,28 @@
<?php
if(!defined('GAME'))
{
die();
}
if( function_exists('date_default_timezone_set') ) {
date_default_timezone_set('Europe/Moscow');
}
$dbgo = mysql_pconnect('localhost','newcom1_abk','4nWYsIM[c?}P');
mysql_select_db('newcom1_abk',$dbgo);
mysql_query('SET NAMES cp1251');
if(!function_exists('GetRealIp')) {
function GetRealIpTest(){
if (!empty($_SERVER['HTTP_CLIENT_IP']))
return $_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
return $_SERVER['HTTP_X_FORWARDED_FOR'];
return $_SERVER['REMOTE_ADDR'];
}
$ipban = GetRealIpTest();
}else{
$ipban = GetRealIp();
}
$pdo = new PDO('mysql:host=localhost;dbname=newcom1_abk', 'newcom1_abk', '4nWYsIM[c?}P');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,294 @@
<?
if(!defined('GAME'))
{
die();
}
class Filter {
//
public $spamtxt = 'acreshoperu|club|ly|gd|click|do|mibb|ml|us|cc|ee|gl|vc|bit|cutt|ow|is|ali|Utka|utka|su|Droplr|Bc|mirbk|worldofcombats|shambalru|oldcombats|oldbk2|oldbk|sebkru|oldbknet|welcombats|mycombats|vipbk|goldbk|recombats|legbkcom|febkru|skycombats|cambats|zagadnet|su0ru|suru|kgam|vkcc|acreshoperu|xaasu|googl|warcombatscom|skycombatsru|mycombatsnet|mycombatsru |worldcombatsru|oldcombats|fcitysu|isgd|ebby|greatcombatsru|greatcombats| uáto |cestparla|vbk2com|petitlienfr|scurtime|7pcguma| uto|yyyyt|÷î÷ðô|úcc|warcombatsxcom|wqdnl|qpsru|yahsru|ur1ca|gua|Lyrlfi|ally|hikg|haasu|mubkdoam|karues|0ll0ru|combatszcom|s0eru|bitdo|Clckru|uto|óáèðàåìçâåçäî÷êè|rkssu|ryru|mtgco|tynee|silverbkcom|hlru|h4lru|úcc|pfinkstenucoznet|5fsru|x0by|bkwarcom|realfight|rcombatsru|bcvc|toly|1likru|nnbb|urlinua|combatsz|cuttus|lly|zipvn|qrurlcc|seosprint|8bkz|kombatfight|warbk|owly|rebk|izipus|wonderlands|oldsbk|hecsu|combatslink|combatz|totc|alnoworld|bkz|bkxo|anberbk|sbkru|myêîìáàòñ|pysme|<>Š2<C5A0>“ |urlidru|legcombats|realcombats|ñáêðó|wbtlink|Kombatsfighitru |combatsclubru|legendbattles|darkarmada|obk2com|Cruelbknet|vbk2com|mirozdatel|gggg|rcombats|oldmains|bitly|obkcom|sbk2ru|goodbk|allbk|lastbk|îëäêîìáàòñ|crazycombats|linkac|s3sso|owly|cruelbk|likebk|isgd|fightbk|vbkcom|ëåãáêêîì|vgd|hardfight|my-combats|my-combatc|mbk|goo|bkwar|anti|ws|s3s|bakubk|idealbk|bespridel|perbk|adminbk|online|cf|artovik|probk|twar|oyy|krbk|habk|timebk|sbi|s b i|eea|sokbk|inbk|refbk|administratorbk|perfektbk|darkbk|dark|s3s|bk20|analogbk|monstrbk|bk2005|legendabk|awOev|cruelcity|tlgr|vntr|supbk|azhon0p|cu|tn|af|svel|kwn|krati|ohh|gHjq|Narlands|ogw|lur|lmy|idz|hop|eee|bestbk|pixl|ssylka|THEBESTBK|f34r|exelendbk|9tl|9tk|qil|adminbk|2t9|sportbk|NjQ0|net|jq|bishky|getl|ixz|nvm|prok|5char|tdl|pick|jj|FORM|zik|biz|sns|snsh|pnut|Ventus-terra|pb8|short|legendabk|prnt|utf|coombats|Silver|Premium|Account|tiny|êîìáàòñ|ñóï|orDåNŠ|nbk|orden|acreshoperu|shambalru|oldcombats|oldbk2|oldbk|sebkru|oldbknet|welcombats|mycombats|vipbk|goldbk|recombats|legbkcom|febkru|skycombats|COOMBATS|cambats|zagadnet|.ru|.net|.tk|.ucoz|www|.ua|.tv|.info|.org|.su|.ñó|.êîì|.èíôî|. ru|. com|. net|. tk|. ucoz|. ua|. tv|. info|. org|. su|. ñó|. êîì|. èíôî|realdeal|ïîèñêå|ãóãë|ïîèñêîâèê|kortr|MIBBK|vip|Îðäåí|Îpäåí|neverwords|xcombat|world|death|legendbattles|plu|dbe|kombatz|over|âorläcombt|dek|ci8|ðô|ÐÔ|ÁÊ2|êîïèðóéòå|';
public $abuse = array(
"ëîõ","ìóäàê","ãàíäîí","ïèäàðàñ","÷ìî","õóé","õóéíÿ","õóéíè","øëþõà","ïàñêóäà","áëÿ",'áëÿòü','áëÿäü',
'åáëàí','øàëàâà','åáàë','åáàòü','äðî÷èòü'
,'óåáèùå', 'õ ó é', 'ñóêà', 'ïèçäà', 'õóéëî', 'ïèäàð', 'õóéëî', 'ïèçäþê', 'áëÿäèíà', 'ïèçäåö', 'àõóåòü', 'åáó'
);
//
public function str_count($str,$col)
{
if (strlen($str) > $col)
{
$str = substr($str,0,$col);
}
return ($str);
}
//
//Ñìàéëèêè
public $sm = array("laugh"=>1,"fingal"=>1,"eek"=>1,"smoke"=>1,"hi"=>1,"bye"=>1,"king"=>1,"king2"=>1,"boks2"=>1,"boks"=>1,"gent"=>1,"lady"=>1,"tongue"=>1,"smil"=>1,"rotate"=>1,"ponder"=>1,"bow"=>1,"angel"=>1,"angel2"=>1,"hello"=>1,"dont"=>1,"idea"=>1,"mol"=>1,"super"=>1,"beer"=>1,"drink"=>1,"baby"=>1,"tongue2"=>1,"sword"=>1,"agree"=>1,"loveya"=>1,"kiss"=>1,"kiss2"=>1,"kiss3"=>1,"kiss4"=>1,"rose"=>1,"love"=>1,"love2"=>1,"confused"=>1,"yes"=>1,"no"=>1,"shuffle"=>1,"nono"=>1,"maniac"=>1,"privet"=>1,"ok"=>1,"ninja"=>1,"pif"=>1,"smash"=>1,"alien"=>1,"pirate"=>1,"gun"=>1,"trup"=>1,"mdr"=>1,"sneeze"=>1,"mad"=>1,"friday"=>1,"cry"=>1,"grust"=>1,"rupor"=>1,"fie"=>1,"nnn"=>1,"row"=>1,"red"=>1,"lick"=>1,"help"=>1,"wink"=>1,"jeer"=>1,"tease"=>1,"nunu"=>1,"inv"=>1,"duel"=>1,"susel"=>1,"nun"=>1,"kruger"=>1,"flowers"=>1,"horse"=>1,"hug"=>1,"str"=>1,"alch"=>1,"pal"=>1,"mag"=>1,"sniper"=>1,"vamp"=>1,"doc"=>1,"doc2"=>1,"sharp"=>1,"naem"=>1,"naem2"=>1,"naem3"=>1,"invis"=>1,"chtoza"=>1,"beggar"=>1,"sorry"=>1,"sorry2"=>1,
"creator"=>1,"grace"=>1,"dustman"=>1,"carreat"=>1,"lordhaos"=>1,"ura"=>1,"elix"=>1,"dedmoroz"=>1,"snegur"=>1,"showng"=>1,"superng"=>1,"podz"=>1,"sten"=>1,"devil"=>1,"cat"=>1,"owl"=>1,"lightfly"=>1,"snowfight"=>1,"rocket"=>1,"ball"=>1,"smile"=>1,"fuck"=>1);
public function e($t) {
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("#'.date('d.m.Y').' %'.date('H:i:s').': <b>'.mysql_real_escape_string($t).'</b>","capitalcity","Èãðîìèð","6","1","-1")');
}
public function setOnline($online,$uid,$afk)
{
$add = 0;
if(time()-$online>=1)
{
if(time()-$online < 60) {
$add += time()-$online;
}else{
$add += 60;
}
}
//$this->e('test');
$afk = 0;
if($add>0)
{
$on = mysql_fetch_array(mysql_query('SELECT * FROM `online` WHERE `uid` = "'.$uid.'" LIMIT 1'));
if(isset($on['id']))
{
$mt = 0;
$lst = time();
if(date('d',$on['lastUp'])!=date('d',$lst))
{
$on['time_today'] = $add;
}else{
$on['time_today'] += $add;
}
$add = $on['time_all']+$add;
$afkNow = 0;
$afkAll = 0;
if($afk==1)
{
$mt = time();
}
mysql_query('UPDATE `online` SET `mainTime` = "'.$mt.'",`time_today` = "'.$on['time_today'].'",`lastUp` = "'.$lst.'",`time_all` = "'.$add.'" WHERE `id` = "'.$on['id'].'" LIMIT 1');
}
}
}
public function mystr($string)
{
$str = strtolower($string);
if(strtolower('S')!='s')
{
$ru = 'ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÐÏÑÒÓÔÕÖ×ØÙÚÜÛÝÞß';
$ru2 = 'àáâãäå¸æçèéêëìíîðïñòóôõö÷øùúüûýþÿ';
$en = 'QWERTYUIOPASDFGHJKLZXCVBNM';
$en2 = 'qwertyuiopasdfghjklzxcvbnm';
$i = 0;
while($i<33)
{
if(isset($ru[$i]))
{
$str = strtr($str,$ru[$i],$ru2[$i]);
}
if(isset($en[$i]))
{
$str = strtr($str,$en[$i],$en2[$i]);
}
$i++;
}
}
return $str;
}
public function reverse_i($str)
{
/*$newstr = '';
for ($i=1; $i<=strlen($str); $i++)
{
$newstr .= substr($str, -$i, 1);
} */
$newstr = $str;
return $newstr;
}
public function antimat($txt) {
global $u;
$txt = ' '.$txt.' ';
//$vc = iconv( 'windows-1251' , 'UTF-8' , 'ÂÖ');
/*if( $u->info['admin'] > 0 ) {
$i = 0;
while( $i < count( $this->abuse ) ) {
$txt = iconv( 'windows-1251' , 'UTF-8' , $txt );
//
$word = $this->abuse[$i];
$word = iconv( 'windows-1251' , 'UTF-8' , $word);
//
$txt = str_replace(' #'.$word.'#is '," <i><f c=".$word." />&lt;".$vc."&gt;</i> ",$txt);
$txt = iconv( 'UTF-8' , 'windows-1251' , $txt );
$i++;
}
}else{*/
$i = 0;
while( $i < count( $this->abuse ) ) {
$txt = str_ireplace(' '.$this->abuse[$i].' ',' <i><f c='.$this->abuse[$i].' />&lt;ÂÖ&gt;</i> ',$txt);
$i++;
}
//}
return $txt;
}
public function spamFiltr($txt)
{
$txt = str_replace('¸','å',$txt);
$nospam = 0;
$txt = str_replace('&gt;','',$txt);
$txt = str_replace('&lt;','',$txt);
$txt = str_replace('&quot;','',$txt);
$txt = $this->mystr($txt);
$i = 0;
$j = 0;
while($i <= count($this->sm))
{
if(isset($this->sm[$i]))
{
$txt = preg_replace('/:'.$this->sm[$i].':/',"",$txt);
}
$i++;
}
/* ôèëüòð */
//$spam = $this->spamtxt;
$spam = mysql_fetch_array(mysql_query('SELECT * FROM `spam_word` WHERE `id` = 1 LIMIT 1'));
$spam = $spam['data'];
//
$testEN = preg_replace('/[^a-z]*/i', '', $txt);
$testEN = preg_replace('/[^A-Z]*/i', '', $txt);
$testEN2 = $txt;
$testEN2 = str_replace('&quot;','',$testEN2);
$testEN2 = str_replace('&nbsp;','',$testEN2);
$testEN2 = str_replace('à','a',$testEN2);
$testEN2 = str_replace('á','b',$testEN2);
$testEN2 = str_replace('ñ','c',$testEN2);
$testEN2 = str_replace('â','b',$testEN2);
$testEN2 = str_replace('å','e',$testEN2);
$testEN2 = str_replace('ò','t',$testEN2);
$testEN2 = str_replace('î','o',$testEN2);
$testEN2 = str_replace('ð','p',$testEN2);
$testEN2 = str_replace('ì','m',$testEN2);
$testEN2 = str_replace('í','h',$testEN2);
$testEN2 = str_replace('ó','y',$testEN2);
$testEN2 = str_replace('ê','k',$testEN2);
$testEN2 = str_replace('è','u',$testEN2);
$testEN2 = str_replace('õ','x',$testEN2);
$testEN2 = str_replace('ÿ','9',$testEN2);
$testEN2 = str_replace('()','o',$testEN2);
$testEN2 = str_replace('0','o',$testEN2);
$testEN2 = preg_replace('/[^a-z]*/i', '', $testEN2);
$testEN2 = preg_replace('/[^A-Z]*/i', '', $testEN2);
$testRU = preg_replace('/[^à-ÿ]*/i', '', $txt);
$testRU = preg_replace('/[^À-ß]*/i', '', $txt);
$testRU2 = $txt;
$testRU2 = str_replace('a','à',$testRU2);
$testRU2 = str_replace('b','á',$testRU2);
$testRU2 = str_replace('c','ñ',$testRU2);
$testRU2 = str_replace('b','â',$testRU2);
$testRU2 = str_replace('e','å',$testRU2);
$testRU2 = str_replace('t','ò',$testRU2);
$testRU2 = str_replace('o','î',$testRU2);
$testRU2 = str_replace('p','ð',$testRU2);
$testRU2 = str_replace('m','ì',$testRU2);
$testRU2 = str_replace('h','í',$testRU2);
$testRU2 = str_replace('y','ó',$testRU2);
$testRU2 = str_replace('k','ê',$testRU2);
$testRU2 = str_replace('x','õ',$testRU2);
$testRU2 = str_replace('u','è',$testRU2);
$testRU2 = str_replace('()','î',$testRU2);
$testRU2 = str_replace('0','î',$testRU2);
$testRU2 = preg_replace('/[^à-ÿ]*/i', ' ', $testRU2);
$testRU2 = preg_replace('/[^À-ß]*/i', ' ', $testRU2);
$i = 0; $spe = explode('|',$spam);
while($i<=count($spe))
{
if(isset($spe[$i]) && $spe[$i]!='' && $spe[$i] != 'new-combats.com')
{
if( stristr($testEN,$spe[$i]) == true ) {
$nospam .= '%'.$spe[$i];
}elseif( stristr($testRU,$spe[$i]) == true ) {
$nospam .= '%'.$spe[$i];
}
/*if(preg_match("/".($spe[$i])."/i",($testEN)))
{
$nospam .= '%'.$spe[$i];
}elseif(preg_match("/".($spe[$i])."/i",($testRU)))
{
$nospam .= '%'.$spe[$i];
}*//*elseif(preg_match("/".($spe[$i])."/i",($testRU2)))
{
$nospam .= '%'.$spe[$i];
}elseif(preg_match("/".($spe[$i])."/i",($testEN2)))
{
$nospam .= '%'.$spe[$i];
}*/
}
$i++;
}
return $nospam;
}
public function getSmiles($txt,$lg)
{
global $c,$u;
$i = 0;
$j = 0;
$txt = ' '.$txt;
$h = explode(':',$txt);
$user_sm = array();
if($lg!=false)
{
$k = 0;
$ke = explode(',',$u->info['add_smiles']);
while($k<count($ke))
{
if(isset($ke[$k]) && $ke[$k]!='')
{
$user_sm[$ke[$k]] = 1;
}
$k++;
}
}
while($i <= count($this->sm))
{
if(isset($h[$i]))
{
if(isset($this->sm[$h[$i]]) || isset($user_sm[$h[$i]]))
{
if($j<3)
{
$clk = 'onClick=\"top.addSm(\''.$h[$i].'\');\" style=\"cursor:pointer;\"';
if(isset($user_sm[$h[$i]]))
{
$clk = 'title=\"Èìåííîé ñìàéëèê\"';
}
$h[$i] = '*not_dbl_ponts*<img '.$clk.' src=\"https://img.new-combats.com/i/smile/'.$h[$i].'.gif\">*not_dbl_ponts*';
$j++;
}
}
}
$i++;
}
$txt = implode($h,':');
$txt = str_replace(':*not_dbl_ponts*','',$txt);
$txt = str_replace('*not_dbl_ponts*:','',$txt);
$txt = str_replace('*not_dbl_ponts*','',$txt);
$txt = trim($txt,' ');
return $txt;
}
public function __clone()
{
trigger_error('Äóáëèðîâàíèå íå äîïóñêàåòñÿ.', E_USER_ERROR);
}
}
$filter = new Filter();
?>

2491
_incl_data/class/__magic.php Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1115
_incl_data/class/__quest.php Normal file

File diff suppressed because it is too large Load Diff

405
_incl_data/class/__reg.php Normal file
View File

@ -0,0 +1,405 @@
<?
if(!defined('GAME'))
{
die('/index.php');
}
function GetRealIp()
{
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
define('IP',GetRealIp());
if($_SERVER['HTTP_REFERER'] == 'https://new-combats.com/' && $_COOKIE['acomb1'] != '2') {
setcookie('acomb1','1',time()+60*60*24*3);
}
/*
if(IP != '') {
die('Ðåãèñòðàöèÿ âðåìåííî îòêëþ÷åíà. Èäåò âîññòàíîâëåíèå ïåðñîíàæåé.');
}
*/
class register
{
public function testLogin($v)
{
}
public function en_ru($txt)
{
$g = false;
$en = preg_match("/^(([0-9a-zA-Z _-])+)$/i", $txt);
$ru = preg_match("/^(([0-9à-ÿÀ-ß _-])+)$/i", $txt);
if(($ru && $en) || (!$ru && !$en))
{
$g = true;
}
return $g;
}
public function testStep()
{
global $c,$reg,$error,$filter,$chat,$reg_d,$noup,$youip;
$stp = 1;
if(isset($_POST['step']) && isset($reg['id']))
{
$upd = '';
$lr = mysql_fetch_array(mysql_query('SELECT `id`,`ipreg` FROM `users` WHERE `cityreg`="capitalcity" AND `timereg`>"'.(time()-60*60*1).'" AND `ipreg` = "'.mysql_real_escape_string(IP).'" LIMIT 1'));
if(isset($_COOKIE['reg_capitalcity']) || (int)$_COOKIE['reg_capitalcity']>time() || isset($lr['id']))
{
$error .= 'Íåäàâíî ñ âàøåãî IP óæå ðåãèñòðèðîâàëñÿ ïåðñîíàæ. Ñ îäíîãî IP àäðåñà ðàçðåøåíà ðåãèñòðàöèÿ ïåðñîíàæåé íå ÷àùå, ÷åì ðàç â ÷àñ. Ïîïðîáóéòå ïîçæå.<br>'; $_POST['step'] = 1;
}
if($error=='')
{
$reg_bonus = false;
/*if(isset($_POST['register_code']))
{
$cd = mysql_fetch_array(mysql_query('SELECT * FROM `register_code` WHERE `code` = "'.mysql_real_escape_string($_POST['register_code']).'" AND `time_finish` = "0" AND `use` = "0" LIMIT 1'));
if(isset($cd['id']) && $cd['use']==0)
{
$reg_bonus = true;
$upd = mysql_query('UPDATE `register_code` SET `use` = "'.$reg['id'].'",`time_start`="'.time().'" WHERE `id` = "'.$cd['id'].'" LIMIT 1');
if($upd && $reg['id']>0)
{
$uz = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.mysql_real_escape_string($cd['uid']).'" LIMIT 1'));
if(!isset($uz['id']))
{
$uz['login'] = '<i>Íåâèäèìêà</i>';
}
$error .= 'Âû óñïåøíî àêòèâèðîâàëè ïðèãëàøåíèå îò '.$uz['login'].'. Òåïåðü âû ìîæåòå çàðåãèñòðèðîâàòüñÿ. Êîä äåéñòâóåò òîëüêî íà ýòó ðåãèñòðàöèþ.<br>';
mysql_query("UPDATE `items_users` SET `data`='info=Êîä ïðèãëàøåíèÿ: <b>".$cd['code']."</b><br>Ïðè óòåðè ïðèãëàøåíèÿ ðåãèñòðàöèÿ ïî äàííîìó êîäó áóäåò çàïðåùåíà.<br><div style=\"color:brown;\">Êòî-òî ðåãåñòðèðóåòñÿ ïî âàøåìó ïðèãëàøåíèþ. Äàòà: ".date('d.n.Y H:i',time())."</div>' WHERE `secret_id` = '".$cd['code']."' LIMIT 1");
$cd['use'] = $reg['id'];
if($cd['time_create']<time()-60*60)
{
$error .= 'Ðåãèñòðàöèîííûé êîä ïðîñðî÷åí.<br>';
$reg_bonus = false;
}
}else{
$error .= 'Îøèáêà ïîäòâåðæäåíèÿ. Ïîïðîáóéòå ïîçæå...';
}
}else{
$error .= 'Ðåãèñòðàöèîííûé êîä áûë èñïîëüçîâàí ðàíåå, ëèáî íå ñóùåñòâóåò.<br>';
}
}
$cd = mysql_fetch_array(mysql_query('SELECT * FROM `register_code` WHERE `use` = "'.$reg['id'].'" AND `time_finish` = "0" LIMIT 1'));
if(!isset($cd['id']))
{
$reg_bonus = false;
$error .= 'Ïðåäìåò íå íàéäåí. (ïðèãëàøåíèå â èíâåíòàðå ïîëüçîâàòåëÿ)<br>';
}else{
$reg_bonus = true;
$cdi = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `secret_id` = "'.$cd['code'].'" AND `delete` = "0" AND `inShop` = "0" LIMIT 1'));
if(!isset($cdi['id']))
{
$reg_bonus = false;
$error .= 'Ïðåäìåò íå íàéäåí.';
}
}
//$reg_bonus = true;
//ðåãèñòðàöèÿ òðåáóåò ïðèãëàøåíèÿ
if($reg_bonus==false)
{
$error .= '<form action="register.php" method="post">Ðåãèñòðàöèÿ òîëüêî ïî ïðèãëàøåíèþ. Ââåäèòå êîä ïðèãëàøåíèÿ:<br><input name="register_code" type="text" style="width:200px;"> <input type="submit" value="Ââåñòè êîä"></form>'; $_POST['step'] = 1;
}
*/
}
$reg_bonus = true;
if($_POST['step']>1)
{
//Çàïðåùåííûå ëîãèíû
$nologin = array(0=>'àíãåë',1=>'angel',2=>'àäìèíèñòðàöèÿ',3=>'administration',4=>'Êîììåíòàòîð',5=>'Ìèðîçäàòåëü',6=>'Ìóñîðùèê',7=>'Ïàäàëüùèê',8=>'Ïîâåëèòåëü',9=>'Àðõèâàðèóñ',10=>'Ïåðåñìåøíèê',11=>'Âîëûíùèê',12=>'Ëîðä Ðàçðóøèòåëü',13=>'Ìèëîñåðäèå',14=>'Ñïðàâåäëèâîñòü',15=>'Èñêóøåíèå',16=>'Âîçíåñåíèå');
$blacklist = "!@#$%^&*()\+¨¸|/'`\"";
$sr = '_-éöóêåíãøùçõúôûâàïðîëäæýÿ÷ñìèòüáþ¸1234567890';
$i = 0;
while($i<count($nologin))
{
if(preg_match("/".$nologin[$i]."/i",$filter->mystr($reg_d[0])))
{
$error .= 'Âûáåðèòå, ïîæàëóéñòà, äðóãîé íèê.<br>'; $_POST['step'] = 1; $i = count($nologin);
}
$i++;
}
$reg_d[0] = str_replace(' ',' ',$reg_d[0]);
//Ëîãèí îò 4 äî 20 ñèìâîëîâ
if(strlen($reg_d[0])>20)
{
$error .= 'Ëîãèí äîëæåí ñîäåðæàòü íå áîëåå 20 ñèìâîëîâ.<br>'; $_POST['step'] = 1;
}
if(strlen($reg_d[0])<4)
{
$error .= 'Ëîãèí äîëæåí ñîäåðæàòü íå ìåíåå 4 ñèìâîëîâ.<br>'; $_POST['step'] = 1;
}
//Îäèí àëôàâèò
$er = $this->en_ru($reg_d[0]);
if($er==true)
{
$error .= 'Â ëîãèíå ðàçðåøåíî èñïîëüçîâàòü òîëüêî áóêâû îäíîãî àëôàâèòà ðóññêîãî èëè àíãëèéñêîãî. Íåëüçÿ ñìåøèâàòü.<br>'; $_POST['step'] = 1;
}
//Çàïðåùåííûé ñèìâîëû
if(strpos($sr,$reg_d[0]))
{
$error .= 'Ëîãèí ñîäåðæèò çàïðåùåííûå ñèìâîëû.<br>'; $_POST['step'] = 1;
}
//Ïåðñîíàæè â áàçå
$log = mysql_fetch_array(mysql_query('SELECT `id` from `users` where `login`="'.mysql_real_escape_string($reg_d[0]).'" LIMIT 1'));
$log2 = mysql_fetch_array(mysql_query('SELECT `id` from `lastNames` where `login`="'.mysql_real_escape_string($reg_d[0]).'" LIMIT 1'));
if(isset($log['id']) || isset($log2['id']))
{
$error .= 'Ëîãèí '.$reg_d[0].' óæå çàíÿò, âûáåðèòå äðóãîé.<br>'; $_POST['step'] = 1;
}
//Ðàçäåëèòåëè
if(substr_count($reg_d[0],' ')+substr_count($reg_d[0],'-')+substr_count($reg_d[0],'_')>2)
{
$error .= 'Íå áîëåå äâóõ ðàçäåëèòåëåé îäíîâðåìåííî (ïðîáåë, òèðå, íèæíåå ïîä÷åðêèâàíèå).<br>'; $_POST['step'] = 1;
}
$reg_d[0] = trim($reg_d[0],' ');
if($_POST['step']!=1)
{
$stp = 2; $noup = 0;
}
}
if($_POST['step']>2)
{
//ïðîâåðÿåì ïàðîëü
if(strlen($reg_d[1])<6 || strlen($reg_d[1])>30)
{
$error .= 'Äëèíà ïàðîëÿ íå ìîæåò áûòü ìåíüøå 6 ñèìâîëîâ èëè áîëåå 30 ñèìâîëîâ.<br>'; $_POST['step'] = 2;
}
if($reg_d[1]!=$reg_d[2])
{
$error .= 'Â àíêåòå ïàðîëü íóæíî ââåñòè äâàæäû, äëÿ ïðîâåðêè. Âî âòîðîé ðàç âû åãî ââåëè íåâåðíî, áóäüòå âíèìàòåëüíåå.<br>'; $_POST['step'] = 2;
}
if(preg_match('/'.$reg_d[0].'/i',$reg_d[1]))
{
$error .= 'Ïàðîëü ñîäåðæèò ýëåìåíòû ëîãèíà.<br>'; $_POST['step'] = 2;
}
if($_POST['step']!=2)
{
$stp = 3; $noup = 0;
}
}
if($_POST['step']>3)
{
//ïðîâåðÿåì e-mail
if(strlen($reg_d[3])<6 || strlen($reg_d[3])>50)
{
$error .= 'E-mail íå ìîæåò áûòü êîðî÷å 6-õ ñèìâîëîâ è äëèíåå 50-òè.<br>'; $_POST['step'] = 3;
}
if(!preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $reg_d[3]))
{
$error .= 'Âû óêàçàëè ÿâíî îøèáî÷íûé E-mail.<br>'; $_POST['step'] = 3;
}
$reg_d[4] = $chat->str_count($reg_d[4],30);
$reg_d[5] = $chat->str_count($reg_d[5],30);
if($_POST['step']!=3)
{
$stp = 4; $noup = 0;
}
}
if($_POST['step']>4)
{
//Èìÿ, Ïîë, Ãîðîä, Äåâèç è ò.ä.
$er = $this->en_ru($reg_d[6]);
if($er==true || strlen($reg_d[6])<2)
{
$error .= 'Óêàæèòå âàøå ðåàëüíîå èìÿ!<br>'; $_POST['step'] = 4;
}
$reg_d[6] = $chat->str_count($reg_d[6],90);
$reg_d[7] = round($reg_d[7]);
$reg_d[8] = round($reg_d[8]);
$reg_d[9] = round($reg_d[9]);
if($reg_d[7]<1 || $reg_d[7]>31 || $reg_d[8]<1 || $reg_d[8]>12 || $reg_d[9]<1920 || $reg_d[9]>2006)
{
$error .= 'Îøèáêà â íàïèñàíèè äíÿ ðîæäåíèÿ.<br>'; $_POST['step'] = 4;
}
if($reg_d[15]!=0 && $reg_d[15]!=1)
{
$error .= 'Âû óêàçàëè íå âåðíûé ïîë.<br>'; $_POST['step'] = 4;
}
if($reg_d[14]!='Black' && $reg_d[14]!='Blue' && $reg_d[14]!='Fuchsia' && $reg_d[14]!='Gray' && $reg_d[14]!='Green' && $reg_d[14]!='Maroon' && $reg_d[14]!='Navy' && $reg_d[14]!='Olive' && $reg_d[14]!='Purple' && $reg_d[14]!='Teal' && $reg_d[14]!='Orange' && $reg_d[14]!='Chocolate' && $reg_d[14]!='DarkKhaki' && $reg_d[14]!='SandyBrown')
{
$error .= 'Âû óêàçàëè íå âåðíûé öâåò ñîîáùåíèÿ â ÷àòå.<br>'; $_POST['step'] = 4;
}
if($_POST['step']!=4)
{
$stp = 5; $noup = 0;
}
}
if($_POST['step']>5)
{
//Ñîãëàøåíèå ñ çàêîíàìè
if(!isset($_POST['law_'.$reg['id']]) || $_POST['law_'.$reg['id']]!='on')
{
$error .= 'Èçâèíèòå, áåç ïðèíÿòèÿ ïðàâèë íàøåãî êëóáà, âû íå ìîæåòå çàðåãèñòðèðîâàòü ñâîé ïåðñîíàæ.<br>'; $_POST['step'] = 5;
}
if(!isset($_POST['law2_'.$reg['id']]) || $_POST['law2_'.$reg['id']]!='on')
{
$error .= 'Èçâèíèòå, áåç ïðèíÿòèÿ <u>Ñîãëàøåíèÿ î ïðåäîñòàâëåíèè ñåðâèñà èãðû '.$c['title'].'</u>, âû íå ìîæåòå çàðåãèñòðèðîâàòü ïåðñîíàæ.<br>'; $_POST['step'] = 5;
}
if($_POST['code']!=$_SESSION['code'] || $_SESSION['code']<100 || $_POST['code']=='')
{
$error .= 'Îøèáêà ââåäåíèÿ êîäà.<br>'; $_POST['step'] = 5;
}
if($_POST['step']!=5)
{
//çàâåðøåíèå ðåãèñòðàöèè è ðåäèðåêò â èãðó
if($filter->spamFiltr($reg_d[13])!=0)
{
$reg_d[13] = '';
}
if($filter->spamFiltr($reg_d[10])!=0)
{
$reg_d[10] = '';
}
if($filter->spamFiltr($reg_d[6])!=0)
{
$reg_d[6] = '';
}
/*$mbid = mysql_fetch_array(mysql_query('select min(t1.id + 1)
from users t1
where t1.id + 1 not in (select id from users where id > 9999) AND t1.id > 9998'));
//$mbid1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `id` = "'.$mbid[0].'" LIMIT 1'));
//$mbid2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `id` = "'.$mbid[0].'" LIMIT 1'));
//if(isset($mbid1['id']) && isset($mbid2['id'])) {
*/
$mbid = 'NULL';
/*}else{
/* ÷èñòèì âîçìîæíûå äàííûå */
/*if($mbid [0]> 0) {
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$mbid[0].'" LIMIT 1');
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$mbid[0].'" LIMIT 1');
mysql_query('DELETE FROM `bank` WHERE `uid` = "'.$mbid[0].'" LIMIT 1');
mysql_query('DELETE FROM `users_delo` WHERE `uid` = "'.$mbid[0].'" LIMIT 1');
mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$mbid[0].'" LIMIT 1');
}
$mbid = $mbid[0];
}*/
if($_COOKIE['b4n'] == '1') {
setcookie('b4n','2',time()+60*60*24*3);
$reg['referal'] = 'btl4.net';
}elseif(isset($_COOKIE['hstreger'])) {
$reg['referal'] = $_COOKIE['hstreger'];
}
$ins = mysql_query("INSERT INTO `users` (`activ`,`fnq`,`host_reg`,`room`,`login`,`pass`,`ipreg`,`ip`,`city`,`cityreg`,`a1`,`q1`,`mail`,`name`,`bithday`,`sex`,`city_real`,`icq`,`icq_hide`,`deviz`,`chatColor`,`timereg`) VALUES (
'0',
'0',
'".mysql_real_escape_string($reg['referal'])."',
'0',
'".$reg_d[0]."',
'".md5($reg_d[1])."',
'".IP."',
'".IP."',
'capitalcity',
'capitalcity',
'".$reg_d[4]."',
'".$reg_d[5]."',
'".$reg_d[3]."',
'".$reg_d[6]."',
'".$reg_d[7].".".$reg_d[8].".".$reg_d[9]."',
'".$reg_d[15]."',
'".$reg_d[10]."',
'".$reg_d[11]."',
'".$reg_d[12]."',
'".$reg_d[13]."',
'".$reg_d[14]."',
'".time()."')");
if($ins)
{
$uid = mysql_insert_id();
$refer = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`banned`,`admin`,`level` FROM `users` WHERE `id` = "'.mysql_real_escape_string($reg['referal']).'" LIMIT 1'));
if(isset($refer['id'])) {
mysql_query("INSERT INTO `items_users` (`gift`,`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$refer['login']."','".$uid."','3199','noodet=1|items_in_file=sunduk_new|var_id=1|open=1|noremont=1|nodelete=1|nosale=1',1,2,'capitalcity',".time().")");
$text = '<font color=red>Âû ñòàëè âîñïèòàííèêîì èãðîêà &quot;'.$refer['login'].'&quot;!  èíâåíòàðå (ðàçäåë -ïðî÷åå-) âû íàéäåòå âñïîìîãàòåëüíûå ïðåäìåòû.</font>';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
}
mysql_query("INSERT INTO `online` (`uid`,`timeStart`) VALUES ('".$uid."','".time()."')");
mysql_query("INSERT INTO `stats` (`id`,`stats`) VALUES ('".$uid."','s1=3|s2=3|s3=3|s4=3|rinv=40|m9=5|m6=10')");
//Äîáàâëÿåì ïðåäìåòû
mysql_query("INSERT INTO `items_users` (`gift`,`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('Ìèðîçäàòåëü','".$uid."','1','add_hpAll=3',10,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`gift`,`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('Ìóñîðùèê','".$uid."','73','add_mib3=1|add_mab3=1|add_mib4=1|add_mab4=1',20,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','724','moment=1|sudba=".mysql_real_escape_string($reg_d[0])."|moment_hp=100|nohaos=1|musor=2|noremont=1',100,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','865','tr_lvl=1|sudba=".mysql_real_escape_string($reg_d[0])."|useOnLogin=1|musor=1|noremont=1',50,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','4014','sudba=".mysql_real_escape_string($reg_d[0])."|noremont=1|usefromfile=1|musor=1|nodelete=1|nosale=1|expUpg=300000',1,2,'capitalcity',".time().")");
/*
$text = 'Àäìèíèñòðàöèÿ ïðîåêòà: Æåëàåì ïðèÿòíîãî îáùåíèÿ, âåëèêèõ ïîáåä è íåçàáûâàåìûõ âïå÷àòëåíèé â íàøåé ñ âàìè èãðå! :-)';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
$text = 'Âû ïîëó÷èëè ïðåäìåò [img[items/pot_cureHP100_20.gif]][1] &quot;Çåëüå Æèçíè&quot;, îí íàõîäèòñÿ â èíâåíòàðå, â ðàçäåëå &quot;ýëèêñèðû&quot;';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
$text = 'Âû ïîëó÷èëè ïðåäìåò [img[items/pal_button8.gif]][1] &quot;Íàïàäåíèå&quot;, îí íàõîäèòñÿ â èíâåíòàðå, â ðàçäåëå &quot;çàêëÿòèÿ&quot;';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
$text = 'Âû ïîëó÷èëè ïðåäìåò [img[items/qsvit_hran.gif]][1] &quot;Ñâèòîê Îáó÷åíèÿ&quot;, îí íàõîäèòñÿ â èíâåíòàðå, â ðàçäåëå &quot;çàêëÿòèÿ&quot;. <b><font color=red>Èñïîëüçîâàâ äàííûé ñâèòîê Âû ïîëó÷èòå +300.000 åä. îïûòà</font></b>';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
*/
if(isset($_COOKIE['login']) || isset($_COOKIE['pass']))
{
setcookie('login','',time()-60*60*24,'',$c['host']);
setcookie('pass','',time()-60*60*24,'',$c['host']);
}
setcookie('login',$reg_d[0],time()+60*60*24*7,'',$c['host']);
setcookie('pass',md5($reg_d[1]),time()+60*60*24*7,'',$c['host']);
setcookie('auth',md5($reg_d[1].'AUTH'.IP),time()+60*60*24*365,'',$c['host']);
setcookie('reg_capitalcity',true,time()+60*60,'',$c['host']);
$chat->send('',1,'capitalcity','','','Âàñ ïðèâåòñòâóåò íîâè÷îê: [login:'.$reg_d[0].']',time(),12,1,0,0);
mysql_query("UPDATE `users` SET `online`='".time()."' WHERE `uid` = '".$uid."' LIMIT 1");
mysql_query("UPDATE `register_code` SET `reg_id`='".$uid."',`time_finish`='".time()."' WHERE `id` = '".$cd['id']."' LIMIT 1");
mysql_query("UPDATE `items_users` SET `delete`='".time()."' WHERE `secret_id` = '".$cd['code']."' LIMIT 1");
mysql_query('DELETE FROM `register` WHERE `id` = "'.$reg['id'].'" LIMIT 1');
header('location: /bk');
die('Ðåãèñòàðöèÿ ïðîøëà óñïåøíî...');
}else{
$error .= 'Îøèáêà ðåãèñòðàöèè. Ïîïðîáóéòå ïîçæå...<br>';
}
}
}
}
return $stp;
}
}
$r = new register;
?>

338
_incl_data/class/__reg0.php Normal file
View File

@ -0,0 +1,338 @@
<?
if(!defined('GAME'))
{
die();
}
class register
{
public function testLogin($v)
{
}
public function en_ru($txt)
{
$g = false;
$en = preg_match("/^(([a-zA-Z _-])+)$/i", $txt);
$ru = preg_match("/^(([à-ÿÀ-ß _-])+)$/i", $txt);
if(($ru && $en) || (!$ru && !$en))
{
$g = true;
}
return $g;
}
public function testStep()
{
global $c,$reg,$error,$filter,$chat,$reg_d,$noup,$youip;
$stp = 1;
if(isset($_POST['step']) && isset($reg['id']))
{
$upd = '';
$lr = mysql_fetch_array(mysql_query('SELECT `id`,`ipreg` FROM `users` WHERE `cityreg`="capitalcity" AND `timereg`>"'.(time()-60*60*1).'" AND `ipreg` = "'.mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']).'" LIMIT 1'));
if(isset($_COOKIE['reg_capitalcity']) || (int)$_COOKIE['reg_capitalcity']>time() || isset($lr['id']))
{
$error .= 'Íåäàâíî ñ âàøåãî IP óæå ðåãèñòðèðîâàëñÿ ïåðñîíàæ. Ñ îäíîãî IP àäðåñà ðàçðåøåíà ðåãèñòðàöèÿ ïåðñîíàæåé íå ÷àùå, ÷åì ðàç â ÷àñ. Ïîïðîáóéòå ïîçæå.<br>'; $_POST['step'] = 1;
}
if($error=='')
{
$reg_bonus = false;
/*if(isset($_POST['register_code']))
{
$cd = mysql_fetch_array(mysql_query('SELECT * FROM `register_code` WHERE `code` = "'.mysql_real_escape_string($_POST['register_code']).'" AND `time_finish` = "0" AND `use` = "0" LIMIT 1'));
if(isset($cd['id']) && $cd['use']==0)
{
$reg_bonus = true;
$upd = mysql_query('UPDATE `register_code` SET `use` = "'.$reg['id'].'",`time_start`="'.time().'" WHERE `id` = "'.$cd['id'].'" LIMIT 1');
if($upd && $reg['id']>0)
{
$uz = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.mysql_real_escape_string($cd['uid']).'" LIMIT 1'));
if(!isset($uz['id']))
{
$uz['login'] = '<i>Íåâèäèìêà</i>';
}
$error .= 'Âû óñïåøíî àêòèâèðîâàëè ïðèãëàøåíèå îò '.$uz['login'].'. Òåïåðü âû ìîæåòå çàðåãèñòðèðîâàòüñÿ. Êîä äåéñòâóåò òîëüêî íà ýòó ðåãèñòðàöèþ.<br>';
mysql_query("UPDATE `items_users` SET `data`='info=Êîä ïðèãëàøåíèÿ: <b>".$cd['code']."</b><br>Ïðè óòåðè ïðèãëàøåíèÿ ðåãèñòðàöèÿ ïî äàííîìó êîäó áóäåò çàïðåùåíà.<br><div style=\"color:brown;\">Êòî-òî ðåãåñòðèðóåòñÿ ïî âàøåìó ïðèãëàøåíèþ. Äàòà: ".date('d.n.Y H:i',time())."</div>' WHERE `secret_id` = '".$cd['code']."' LIMIT 1");
$cd['use'] = $reg['id'];
if($cd['time_create']<time()-60*60)
{
$error .= 'Ðåãèñòðàöèîííûé êîä ïðîñðî÷åí.<br>';
$reg_bonus = false;
}
}else{
$error .= 'Îøèáêà ïîäòâåðæäåíèÿ. Ïîïðîáóéòå ïîçæå...';
}
}else{
$error .= 'Ðåãèñòðàöèîííûé êîä áûë èñïîëüçîâàí ðàíåå, ëèáî íå ñóùåñòâóåò.<br>';
}
}
$cd = mysql_fetch_array(mysql_query('SELECT * FROM `register_code` WHERE `use` = "'.$reg['id'].'" AND `time_finish` = "0" LIMIT 1'));
if(!isset($cd['id']))
{
$reg_bonus = false;
$error .= 'Ïðåäìåò íå íàéäåí. (ïðèãëàøåíèå â èíâåíòàðå ïîëüçîâàòåëÿ)<br>';
}else{
$reg_bonus = true;
$cdi = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `secret_id` = "'.$cd['code'].'" AND `delete` = "0" AND `inShop` = "0" LIMIT 1'));
if(!isset($cdi['id']))
{
$reg_bonus = false;
$error .= 'Ïðåäìåò íå íàéäåí.';
}
}
//$reg_bonus = true;
//ðåãèñòðàöèÿ òðåáóåò ïðèãëàøåíèÿ
if($reg_bonus==false)
{
$error .= '<form action="register.php" method="post">Ðåãèñòðàöèÿ òîëüêî ïî ïðèãëàøåíèþ. Ââåäèòå êîä ïðèãëàøåíèÿ:<br><input name="register_code" type="text" style="width:200px;"> <input type="submit" value="Ââåñòè êîä"></form>'; $_POST['step'] = 1;
}
*/
}
$reg_bonus = true;
if($_POST['step']>1)
{
//Çàïðåùåííûå ëîãèíû
$nologin = array(0=>'àíãåë',1=>'angel',2=>'àäìèíèñòðàöèÿ',3=>'administration',4=>'Êîììåíòàòîð',5=>'Ìèðîçäàòåëü',6=>'Ìóñîðùèê',7=>'Ïàäàëüùèê',8=>'Ïîâåëèòåëü',9=>'Àðõèâàðèóñ',10=>'Ïåðåñìåøíèê',11=>'Âîëûíùèê',12=>'Ëîðä Ðàçðóøèòåëü',13=>'Ìèëîñåðäèå',14=>'Ñïðàâåäëèâîñòü',15=>'Èñêóøåíèå',16=>'Âîçíåñåíèå');
$blacklist = "!@#$%^&*()\+¨¸|/'`\"";
$sr = '_-éöóêåíãøùçõúôûâàïðîëäæýÿ÷ñìèòüáþ¸1234567890';
$i = 0;
while($i<count($nologin))
{
if(preg_match("/".$nologin[$i]."/i",$filter->mystr($reg_d[0])))
{
$error .= 'Âûáåðèòå, ïîæàëóéñòà, äðóãîé íèê.<br>'; $_POST['step'] = 1; $i = count($nologin);
}
$i++;
}
$reg_d[0] = str_replace(' ',' ',$reg_d[0]);
//Ëîãèí îò 4 äî 20 ñèìâîëîâ
if(strlen($reg_d[0])>20)
{
$error .= 'Ëîãèí äîëæåí ñîäåðæàòü íå áîëåå 20 ñèìâîëîâ.<br>'; $_POST['step'] = 1;
}
if(strlen($reg_d[0])<4)
{
$error .= 'Ëîãèí äîëæåí ñîäåðæàòü íå ìåíåå 4 ñèìâîëîâ.<br>'; $_POST['step'] = 1;
}
//Îäèí àëôàâèò
$er = $this->en_ru($reg_d[0]);
if($er==true)
{
$error .= 'Â ëîãèíå ðàçðåøåíî èñïîëüçîâàòü òîëüêî áóêâû îäíîãî àëôàâèòà ðóññêîãî èëè àíãëèéñêîãî. Íåëüçÿ ñìåøèâàòü.<br>'; $_POST['step'] = 1;
}
//Çàïðåùåííûé ñèìâîëû
if(strpos($sr,$reg_d[0]))
{
$error .= 'Ëîãèí ñîäåðæèò çàïðåùåííûå ñèìâîëû.<br>'; $_POST['step'] = 1;
}
//Ïåðñîíàæè â áàçå
$log = mysql_fetch_array(mysql_query('SELECT `id` from `users` where `login`="'.mysql_real_escape_string($reg_d[0]).'" LIMIT 1'));
$log2 = mysql_fetch_array(mysql_query('SELECT `id` from `lastNames` where `login`="'.mysql_real_escape_string($reg_d[0]).'" LIMIT 1'));
if(isset($log['id']) || isset($log2['id']))
{
$error .= 'Ëîãèí '.$reg_d[0].' óæå çàíÿò, âûáåðèòå äðóãîé.<br>'; $_POST['step'] = 1;
}
//Ðàçäåëèòåëè
if(substr_count($reg_d[0],' ')+substr_count($reg_d[0],'-')+substr_count($reg_d[0],'_')>2)
{
$error .= 'Íå áîëåå äâóõ ðàçäåëèòåëåé îäíîâðåìåííî (ïðîáåë, òèðå, íèæíåå ïîä÷åðêèâàíèå).<br>'; $_POST['step'] = 1;
}
$reg_d[0] = trim($reg_d[0],' ');
if($_POST['step']!=1)
{
$stp = 2; $noup = 0;
}
}
if($_POST['step']>2)
{
//ïðîâåðÿåì ïàðîëü
if(strlen($reg_d[1])<6 || strlen($reg_d[1])>30)
{
$error .= 'Äëèíà ïàðîëÿ íå ìîæåò áûòü ìåíüøå 6 ñèìâîëîâ èëè áîëåå 30 ñèìâîëîâ.<br>'; $_POST['step'] = 2;
}
if($reg_d[1]!=$reg_d[2])
{
$error .= 'Â àíêåòå ïàðîëü íóæíî ââåñòè äâàæäû, äëÿ ïðîâåðêè. Âî âòîðîé ðàç âû åãî ââåëè íåâåðíî, áóäüòå âíèìàòåëüíåå.<br>'; $_POST['step'] = 2;
}
if(preg_match('/'.$reg_d[0].'/i',$reg_d[1]))
{
$error .= 'Ïàðîëü ñîäåðæèò ýëåìåíòû ëîãèíà.<br>'; $_POST['step'] = 2;
}
if($_POST['step']!=2)
{
$stp = 3; $noup = 0;
}
}
if($_POST['step']>3)
{
//ïðîâåðÿåì e-mail
if(strlen($reg_d[3])<6 || strlen($reg_d[3])>50)
{
$error .= 'E-mail íå ìîæåò áûòü êîðî÷å 6-õ ñèìâîëîâ è äëèíåå 50-òè.<br>'; $_POST['step'] = 3;
}
if(!preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $reg_d[3]))
{
$error .= 'Âû óêàçàëè ÿâíî îøèáî÷íûé E-mail.<br>'; $_POST['step'] = 3;
}
$reg_d[4] = $chat->str_count($reg_d[4],30);
$reg_d[5] = $chat->str_count($reg_d[5],30);
if($_POST['step']!=3)
{
$stp = 4; $noup = 0;
}
}
if($_POST['step']>4)
{
//Èìÿ, Ïîë, Ãîðîä, Äåâèç è ò.ä.
$er = $this->en_ru($reg_d[6]);
if($er==true || strlen($reg_d[6])<2)
{
$error .= 'Óêàæèòå âàøå ðåàëüíîå èìÿ!<br>'; $_POST['step'] = 4;
}
$reg_d[6] = $chat->str_count($reg_d[6],90);
$reg_d[7] = round($reg_d[7]);
$reg_d[8] = round($reg_d[8]);
$reg_d[9] = round($reg_d[9]);
if($reg_d[7]<1 || $reg_d[7]>31 || $reg_d[8]<1 || $reg_d[8]>12 || $reg_d[9]<1920 || $reg_d[9]>2006)
{
$error .= 'Îøèáêà â íàïèñàíèè äíÿ ðîæäåíèÿ.<br>'; $_POST['step'] = 4;
}
if($reg_d[15]!=0 && $reg_d[15]!=1)
{
$error .= 'Âû óêàçàëè íå âåðíûé ïîë.<br>'; $_POST['step'] = 4;
}
if($reg_d[14]!='Black' && $reg_d[14]!='Blue' && $reg_d[14]!='Fuchsia' && $reg_d[14]!='Gray' && $reg_d[14]!='Green' && $reg_d[14]!='Maroon' && $reg_d[14]!='Navy' && $reg_d[14]!='Olive' && $reg_d[14]!='Purple' && $reg_d[14]!='Teal' && $reg_d[14]!='Orange' && $reg_d[14]!='Chocolate' && $reg_d[14]!='DarkKhaki' && $reg_d[14]!='SandyBrown')
{
$error .= 'Âû óêàçàëè íå âåðíûé öâåò ñîîáùåíèÿ â ÷àòå.<br>'; $_POST['step'] = 4;
}
if($_POST['step']!=4)
{
$stp = 5; $noup = 0;
}
}
if($_POST['step']>5)
{
//Ñîãëàøåíèå ñ çàêîíàìè
if(!isset($_POST['law_'.$reg['id']]) || $_POST['law_'.$reg['id']]!='on')
{
$error .= 'Èçâèíèòå, áåç ïðèíÿòèÿ ïðàâèë íàøåãî êëóáà, âû íå ìîæåòå çàðåãèñòðèðîâàòü ñâîé ïåðñîíàæ.<br>'; $_POST['step'] = 5;
}
if(!isset($_POST['law2_'.$reg['id']]) || $_POST['law2_'.$reg['id']]!='on')
{
$error .= 'Èçâèíèòå, áåç ïðèíÿòèÿ <u>Ñîãëàøåíèÿ î ïðåäîñòàâëåíèè ñåðâèñà èãðû '.$c['title'].'</u>, âû íå ìîæåòå çàðåãèñòðèðîâàòü ïåðñîíàæ.<br>'; $_POST['step'] = 5;
}
if($_POST['code']!=$_SESSION['code'] || $_SESSION['code']<100 || $_POST['code']=='')
{
$error .= 'Îøèáêà ââåäåíèÿ êîäà.<br>'; $_POST['step'] = 5;
}
if($_POST['step']!=5)
{
//çàâåðøåíèå ðåãèñòðàöèè è ðåäèðåêò â èãðó
if($filter->spamFiltr($reg_d[13])!=0)
{
$reg_d[13] = '';
}
if($filter->spamFiltr($reg_d[10])!=0)
{
$reg_d[10] = '';
}
if($filter->spamFiltr($reg_d[6])!=0)
{
$reg_d[6] = '';
}
if((int)$reg['referal'] > 0) {
mysql_query("UPDATE `users` SET `referals` = `referals` + 1 WHERE `id` = '".mysql_real_escape_string((int)$reg['referal'])."' LIMIT 1");
}
$ins = mysql_query("INSERT INTO `users` (`host_reg`,`room`,`login`,`pass`,`ipreg`,`ip`,`city`,`cityreg`,`a1`,`q1`,`mail`,`name`,`bithday`,`sex`,`city_real`,`icq`,`icq_hide`,`deviz`,`chatColor`,`timereg`) VALUES (
'".mysql_real_escape_string($reg['referal'])."',
'0',
'".$reg_d[0]."',
'".md5($reg_d[1])."',
'".$_SERVER['HTTP_X_REAL_IP']."',
'".$_SERVER['HTTP_X_REAL_IP']."',
'capitalcity',
'capitalcity',
'".$reg_d[4]."',
'".$reg_d[5]."',
'".$reg_d[3]."',
'".$reg_d[6]."',
'".$reg_d[7].".".$reg_d[8].".".$reg_d[9]."',
'".$reg_d[15]."',
'".$reg_d[10]."',
'".$reg_d[11]."',
'".$reg_d[12]."',
'".$reg_d[13]."',
'".$reg_d[14]."',
'".time()."')");
if($ins)
{
$uid = mysql_insert_id();
mysql_query("INSERT INTO `online` (`uid`,`timeStart`) VALUES ('".$uid."','".time()."')");
mysql_query("INSERT INTO `stats` (`id`,`stats`) VALUES ('".$uid."','s1=3|s2=3|s3=3|s4=3|rinv=40|m9=5|m6=10')");
//Äîáàâëÿåì ïðåäìåòû
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','1','add_hpAll=3',10,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','73','add_mib3=1|add_mab3=1|add_mib4=1|add_mab4=1',20,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','724','moment=1|moment_hp=100|nohaos=1|musor=2|noremont=1',100,2,'capitalcity',".time().")");
mysql_query("INSERT INTO `items_users` (`uid`,`item_id`,`data`,`iznosMAX`,`geniration`,`maidin`,`time_create`) VALUES ('".$uid."','865','tr_lvl=1|useOnLogin=1|musor=1|noremont=1',50,2,'capitalcity',".time().")");
$text = 'Àäìèíèñòðàöèÿ ïðîåêòà: Æåëàåì ïðèÿòíîãî îáùåíèÿ, âåëèêèõ ïîáåä è íåçàáûâàåìûõ âïå÷àòëåíèé â íàøåé ñ âàìè èãðå! :-)';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
$text = 'Âû ïîëó÷èëè ïðåäìåò [img[items/pot_cureHP100_20.gif]][1] &quot;Çåëüå Æèçíè&quot;, îí íàõîäèòñÿ â èíâåíòàðå, â ðàçäåëå &quot;ýëèêñèðû&quot;';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
$text = 'Âû ïîëó÷èëè ïðåäìåò [img[items/pal_button8.gif]][1] &quot;Íàïàäåíèå&quot;, îí íàõîäèòñÿ â èíâåíòàðå, â ðàçäåëå &quot;çàêëÿòèÿ&quot;';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('capitalcity','0','','".$reg_d[0]."','".$text."','".time()."','11','0')");
if(isset($_COOKIE['login']) || isset($_COOKIE['pass']))
{
setcookie('login','',time()-60*60*24,'',$c['host']);
setcookie('pass','',time()-60*60*24,'',$c['host']);
}
setcookie('login',$reg_d[0],time()+60*60*24*7,'',$c['host']);
setcookie('pass',md5($reg_d[1]),time()+60*60*24*7,'',$c['host']);
setcookie('auth',md5($reg_d[1].'AUTH'.$_SERVER['HTTP_X_REAL_IP']),time()+60*60*24*365,'',$c['host']);
setcookie('reg_capitalcity',true,time()+60*60,'',$c['host']);
$chat->send('',1,'capitalcity','','','Âàñ ïðèâåòñòâóåò íîâè÷îê: [login:'.$reg_d[0].']',time(),12,1,0,0);
mysql_query("UPDATE `users` SET `online`='".time()."' WHERE `id` = '".$uid."' LIMIT 1");
mysql_query("UPDATE `register_code` SET `reg_id`='".$uid."',`time_finish`='".time()."' WHERE `id` = '".$cd['id']."' LIMIT 1");
mysql_query("UPDATE `items_users` SET `delete`='".time()."' WHERE `secret_id` = '".$cd['code']."' LIMIT 1");
mysql_query('DELETE FROM `register` WHERE `id` = "'.$reg['id'].'" LIMIT 1');
header('location: https://new-combats.com/bk');
die('Ðåãèñòàðöèÿ ïðîøëà óñïåøíî...');
}else{
$error .= 'Îøèáêà ðåãèñòðàöèè. Ïîïðîáóéòå ïîçæå...<br>';
}
}
}
}
return $stp;
}
}
$r = new register;
?>

View File

@ -0,0 +1,35 @@
<?php
if(!defined('GAME')) {
die();
}
class season {
public static $yy = array(
1 => array( 1 , '01' , 'ßíâàðü' , 'ßíâàðüñêèé' ),
2 => array( 2 , '02' , 'Ôåâðàëü' , 'Ôåâðàëüñêèé' ),
3 => array( 3 , '03' , 'Ìàðò' , 'Ìàðòîâñêèé' ),
4 => array( 4 , '04' , 'Àïðåëü' , 'Àïðåëüñêèé' ),
5 => array( 5 , '05' , 'Ìàé' , 'Ìàéñêèé' ),
6 => array( 6 , '06' , 'Èþíü' , 'Èþíüñêèé' ),
7 => array( 7 , '07' , 'Èþëü' , 'Èþëüñêèé' ),
8 => array( 8 , '08' , 'Àâãóñò' , 'Àâãóñòîâñêèé' ),
9 => array( 9 , '09' , 'Ñåíòÿáðü' , 'Ñåíòÿáðüñêèé' ),
10 => array( 10 , '10' , 'Îêòÿáðü' , 'Îêòÿáðüñêèé' ),
11 => array( 11 , '11' , 'Íîÿáðü' , 'Íîÿáðüñêèé' ),
12 => array( 12 , '12' , 'Äåêàáðü' , 'Äåêàáðüñêèé' ),
);
public static $date = array( ), $m = array( );
public static function data( $val ) {
self::$m = mysql_fetch_array(mysql_query('SELECT * FROM `sss_m` WHERE `id` = "'.mysql_real_escape_string((int)$val).'" LIMIT 1'));
if( self::$m['s'] != self::$date['m'] ) {
self::$m = array( );
}
}
}
?>

View File

@ -0,0 +1,197 @@
<?
if(!defined('GAME'))
{
die();
}
class telegram
{
private static $flag_one;
public static function start()
{
if (!isset(self::$flag_one))
{
$c = __CLASS__;
self::$flag_one = new $c($server);
}
return self::$flag_one;
}
public function send($to,$from,$text,$time,$fromType)
{
mysql_query('START TRANSACTION');
$ins = mysql_query("INSERT INTO `telegram` (`uid`,`from`,`fromType`,`text`,`time`) VALUES ('".$to."','".$from."','".$fromType."','".mysql_real_escape_string(AddSlashes(HtmlSpecialChars($text,NULL,'cp1251')))."','".time()."')");
mysql_query('COMMIT');
if($ins)
{
return mysql_insert_id();
}
}
public function readMsg($id,$uid)
{
$msg = mysql_fetch_array(mysql_query('SELECT * FROM `telegram` WHERE `id`="'.$id.'" AND `uid`="'.$uid.'" LIMIT 1 FOR UPDATE'));
if(isset($msg['id']))
{
mysql_query('START TRANSACTION');
$upd = mysql_query('UPDATE `telegram` SET `read`="1" WHERE `id` = "'.$id.'" AND `uid`="'.$uid.'" LIMIT 1');
mysql_query('COMMIT');
if($upd && $msg['lock']==0)
{
echo '<script>readGood('.$id.',"https://img.new-combats.com/i/misc/read.gif"); nobtext('.$id.');</script>';
}
}
}
public function lockMsg($id,$uid)
{
$msg = mysql_fetch_array(mysql_query('SELECT * FROM `telegram` WHERE `id`="'.$id.'" AND `uid`="'.$uid.'" LIMIT 1 FOR UPDATE'));
if(isset($msg['id']))
{
$lock = array(0=>1,1=>0);
mysql_query('START TRANSACTION');
$upd = mysql_query('UPDATE `telegram` SET `read`="1",`lock`="'.$lock[$msg['lock']].'" WHERE `id` = "'.$id.'" AND `uid`="'.$uid.'" LIMIT 1');
mysql_query('COMMIT');
if($upd)
{
if($lock[$msg['lock']]==1)
{
echo '<script>readGood('.$id.',"https://img.new-combats.com/i/lock_message.gif"); nobtext('.$id.');</script>';
}else{
echo '<script>readGood('.$id.',"https://img.new-combats.com/i/misc/read.gif");</script>';
}
}
}
}
public function deleteMsgAll($uid,$pg)
{
mysql_query('START TRANSACTION');
$upd = mysql_query('UPDATE `telegram` SET `delete`="1" WHERE `uid`="'.$uid.'" AND `read`="1" AND `lock`="0" AND `delete`="0"');
mysql_query('COMMIT');
if($upd)
{
echo '<script> getPage('.$pg.');</script>';
}
}
public function deleteMsg($id,$uid,$pg)
{
$msg = mysql_fetch_array(mysql_query('SELECT * FROM `telegram` WHERE `id`="'.$id.'" AND `uid`="'.$uid.'" LIMIT 1 FOR UPDATE'));
if(isset($msg['id']))
{
mysql_query('START TRANSACTION');
$upd = mysql_query('UPDATE `telegram` SET `delete`="1" WHERE `id` = "'.$id.'" AND `uid`="'.$uid.'" LIMIT 1');
mysql_query('COMMIT');
if($upd && $msg['delete']==0 && $msg['lock']==0)
{
echo '<script> getPage('.$pg.');</script>';
}
}
}
private function addMsgTable($id,$from,$fromType,$ttl,$time,$lock,$read,$pg)
{
$i1 = '<img id="msgImg'.$id.'" src="https://img.new-combats.com/i/misc/unread.gif">';
if($read==1)
{
$i1 = '<img id="msgImg'.$id.'" src="https://img.new-combats.com/i/misc/read.gif">';
}
if($lock==1)
{
$i1 = '<img id="msgImg'.$id.'" src="https://img.new-combats.com/i/lock_message.gif">';
}
if($fromType==1)
{
$from = '<a href="info/login='.$from.'" target="_blank" title="Èíô. î '.$from.'">'.$from.'</a>';
}elseif($read==0)
{
$from = '<b id="tablePostTxtB'.$id.'">'.$from.'</b>';
}
echo '<table id="tablePost'.$id.'" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" class="underLine2"><div align="center">'.$i1.'</div></td>
<td width="200" id="tablePostTxt'.$id.'" class="underLine2">'.$from.'</td>
<td width="290" class="underLine2"><a onClick="openPost('.$id.'); return false;" href="#read'.$id.'" title="Ïðî÷èòàòü ñîîáùåíèå">'.substr($ttl,0,30).'...</a></td>
<td width="120" class="underLine2">'.date('d.m.y H:i',$time).'</td>
<td width="30" class="underLine2"><div align="center"><IMG style="cursor:pointer;" onClick="lockPost('.$id.');" title="Áëîêèðîâêà ñîîáùåíèÿ" src="https://img.new-combats.com/i/locked.gif"></div></td>
<td width="30" class="underLine2"><div align="center"><IMG style="cursor:pointer;" onClick="deletePost('.$id.','.$pg.');" title="Óäàëèòü ñîîáùåíèå" src="https://img.new-combats.com/i/clear.gif" width="11" height="11"></div></td>
</tr>
</table>
<div id="readMSG'.$id.'" style="display:none;" class="unreadMSG">'.$ttl.'</div>';
}
public function seeMsg($uid,$page,$maxPages)
{
$page = ceil($page);
echo '<div id="jx" style="display:none;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" class="underLine"><div align="center"></div></td>
<td width="200" class="underLine"><b>Îò êîãî</b></td>
<td width="290" class="underLine"><b>Çàãîëîâîê ñîîáùåíèÿ</b></td>
<td width="120" class="underLine"><b>Êîãäà</b></td>
<td width="30" class="underLine"><div align="center"><IMG alt="Áëîêèðîâêà ñîîáùåíèé" src="https://img.new-combats.com/i/lock_message.gif"></div></td>
<td width="30" class="underLine"><div align="center"><IMG style="cursor:pointer;" onClick="deletePostAll('.$page.');" alt="Óäàëèòü âñå ïðî÷èòàííûå ñîîáùåíèÿ" src="https://img.new-combats.com/i/clear.gif" width="11" height="11"></div></td>
</tr>
</table>';
$i = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `telegram` WHERE `uid`="'.$uid.'" AND `delete`="0"'));
$pg = ceil($i[0]/$maxPages);
if($page<0)
{
$page = 0;
}elseif($page>$pg)
{
$page = $pg;
}
if($i[0]>0)
{
$sp = mysql_query('SELECT * FROM `telegram` WHERE `uid`="'.$uid.'" AND `delete`="0" ORDER BY `id` DESC LIMIT '.(($page-1)*$maxPages).' , '.$maxPages.'');
while($pl = mysql_fetch_array($sp))
{
$this->addMsgTable($pl['id'],$pl['from'],$pl['fromType'],$pl['text'],$pl['time'],$pl['lock'],$pl['read'],$page);
}
}
if($i[0]==0)
{
echo '<div class="noMsg" align="center">Ñîîáùåíèé íåò</div>';
}elseif($i[0]>$maxPages){
$pages = '';
$i = 1;
while($i<=$pg)
{
$cls = '';
if($page==$i)
{
$cls = 'style="color:#6f0000; font-size:14px;"';
}
$pages .= '&nbsp;<a '.$cls.' onClick="getPage('.$i.'); return false;" href="#page'.$i.'">'.$i.'</a>';
$i++;
}
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30"><div align="center"></div></td>
<td width="200">Ñòðàíèöû: '.$pages.'</td>
<td width="240"></td>
<td width="170"></td>
<td width="30"></td>
<td width="30"></td>
</tr>
</table>';
}
}
public function __clone()
{
trigger_error('Äóáëèðîâàíèå íå äîïóñêàåòñÿ.', E_USER_ERROR);
}
}
?>

View File

@ -0,0 +1,539 @@
<?
if(!defined('GAME'))
{
die();
}
class turnir {
public $info,$user,$name = array(
0 => 'Âûæèòü ëþáîé öåíîé',
1 => 'Êàæäûé ñàì çà ñåáÿ',
2 => 'Çàõâàò êëþ÷à'
);
public function start() {
global $c,$u;
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.$u->info['inTurnirnew'].'" LIMIT 1'));
$this->user = mysql_fetch_array(mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$u->info['inTurnirnew'].'" AND `bot` = "'.$u->info['id'].'" LIMIT 1'));
}
public function startTurnir() {
global $c,$u;
$row = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `users` WHERE `win` = "0" AND `lose` = "0" AND `nich` = "0"'));
if($row[0] > 0 && $this->info['status'] != 3) {
mysql_query('UPDATE `turnirs` SET `status` = "3" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
//Ñîçäàíèå ïîåäèíêà
mysql_query('INSERT INTO `battle` (`city`,`time_start`,`timeout`,`type`,`turnir`) VALUES ("'.$u->info['city'].'","'.time().'","60","1","'.$this->info['id'].'")');
$uri = mysql_insert_id();
//Çàêèäûâàåì ïåðñîíàæåé â ïîåäèíîê
mysql_query('UPDATE `users` SET `battle` = "'.$uri.'" WHERE `inUser` = "0" AND `inTurnirnew` = "'.$this->info['id'].'"');
//Îáîçíà÷àåì çàâåðøåíèå òóðíèðà ïðè âûõîäå
die('Ïåðåéòèäå â ðàçäåë "ïîåäèíêè"...');
}else{
if($this->info['status'] == 3) {
$this->finishTurnir();
}
}
}
public function finishTurnir() {
global $c,$u;
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.$u->info['inTurnirnew'].'" LIMIT 1'));
//mysql_query('UPDATE `users` SET `inUser` = 0, `inTurnirnew` = 0 WHERE `inTurnirnew` = '.$this->info['id'].' AND `inUser` > 0 LIMIT '.$this->info['users_in']);
if($this->info['status'] == 3) {
$win = '';
$lose = '';
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" ORDER BY `points` DESC');
while($pl = mysql_fetch_array($sp)) {
mysql_query('DELETE FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'"');
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['bot'].'" LIMIT 1'));
if(isset($inf['id'],$bot['id'])) {
//âûäàåì ïðèçû è ò.ä
mysql_query('DELETE FROM `users` WHERE `id` = "'.$bot['id'].'" LIMIT 1');
mysql_query('DELETE FROM `stats` WHERE `id` = "'.$bot['id'].'" LIMIT 1');
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$bot['id'].'" LIMIT 1000');
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$bot['id'].'" LIMIT 1000');
}
if($pl['team'] == $this->info['winner'] && $this->info['winner'] != 0) {
$inf['add_expn'] = 3000;
$inf['add_expp'] = array(
0,
1,
5,
10,
15,
25,
35,
70,
100,
150,
200,
300,
500,
700,
1000
);
//$inf['add_expn'] = floor($inf['add_expn']/100*$inf['add_expp'][$inf['level']]);
//$inf['add_expn'] = floor($inf['add_expn']/100*$inf['add_expp'][7]);
//ïîëó÷àåì îïûò (ñ 0 ïî 12 ëâë)
$inf['add_expn'] = array( 10 , 30 , 55 , 62 , 92 , 180 , 350 , 1350 , 4500 , 7000 , 21000 , 30000 , 35000 );
$inf['add_expn'] = $inf['add_expn'][$inf['level']];
mysql_query('UPDATE `users` SET `win` = `win` + 1,`win_t` = `win_t` + 1 WHERE `id` = "'.$inf['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `exp` = `exp` + '.$inf['add_expn'].' WHERE `id` = "'.$inf['id'].'" LIMIT 1');
$win .= '<b>'.$inf['login'].'</b>, ';
$r = 'Òóðíèð çàâåðøåí. Âû ÿâëÿåòåñü ïîáåäèòåëåì òóðíèðà, ïîëó÷åíî îïûòà: <b>'.$inf['add_expn'].'</b>.';
/*if( $this->info['users_in'] >= 10 ) {
$r .= '  òóðíèðå ñîáðàëîñü 10 èëè áîëåå ÷åëîâåê: <b>×åê íà 1 åêð.</b> äîáàâëåí ê Âàì â èíâåíòàðü.';
$u->addItem(4393,$inf['id'],'');
}*/
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','".$inf['room']."','','".$inf['login']."','".$r."','".time()."','6','0')");
}elseif($pl['team'] != $this->info['winner'] && $this->info['winner'] != 0) {
mysql_query('UPDATE `users` SET `lose` = `lose` + 1,`lose_t` = `lose_t` + 1 WHERE `id` = "'.$inf['id'].'" LIMIT 1');
$lose .= '<b>'.$inf['login'].'</b>, ';
}else{
mysql_query('UPDATE `users` SET `nich` = `nich` + 1 WHERE `id` = "'.$inf['id'].'" LIMIT 1');
}
mysql_query('DELETE FROM `users_turnirs` WHERE `uid` = "'.$inf['id'].'" LIMIT 1');
}
mysql_query('UPDATE `users` SET `inUser` = "0",`inTurnirnew` = "0" WHERE `inTurnirnew` = "'.$this->info['id'].'" LIMIT '.$this->info['users_in']);
mysql_query('UPDATE `turnirs` SET `chat` = 4 , `winner` = -1,`users_in` = 0,`status` = 0,`winner` = -1,`step` = 0,`time` = "'.(time()+$this->info['time2']).'",`count` = `count` + 1 WHERE `id` = '.$this->info['id'].' LIMIT 1');
if($win != '') {
$win = rtrim($win,', ');
$lose = rtrim($lose,', ');
$win = 'Ïîáåäèòåëè òóðíèðà: '.$win.'. Ïðîèãðàâøàÿ ñòîðîíà: '.$lose.'. Ñëåäóþùèé òóðíèð íà÷íåòñÿ ÷åðåç '.$u->timeOut($this->info['time2']).' ('.date('d.m.Y H:i',(time()+$this->info['time2'])).').';
}else{
$win = 'Ïîáåäèòåëè òóðíèðà îòñóòñòâóåò. Ñëåäóþùèé òóðíèð íà÷íåòñÿ ÷åðåç '.$u->timeOut($this->info['time2']).' ('.date('d.m.Y H:i',(time()+$this->info['time2'])).').';
}
$r = '<font color=black><b>Òóðíèð çàâåðøåí.</b></font> '.$win;
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
}
}
public function locationSee() {
global $c,$u;
$r = '';
$tm1 = '';
$tm2 = '';
$noitm = array(
869 => 1,
1246 => 1,
155 => 1,
1245 => 1,
678 => 1
);
if($this->info['step'] != 3 && $this->info['step'] != 0) {
//ïîëó÷åíèå êîìïëåêòà
if(isset($_GET['gocomplect']) && $this->user['points'] < 2) {
$aso = explode(',',$this->user['items']);
$ast = explode('-',$_GET['gocomplect']);
$asg = array();
$asj = array();
$asgp = array();
$i = 0;
while($i < count($aso)) {
if($aso[$i] > 0) {
$asg[$aso[$i]] = true;
}
$i++;
}
$i = 0; $j = 0; $noitm = 0;
$addi = 1;
while($i < count($ast)) {
if($ast[$i] > 0) {
if($asg[$ast[$i]] != true) {
$noitm++;
}
$itm = mysql_fetch_array(mysql_query('SELECT `id`,`inSlot`,`price1` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($ast[$i]).'" LIMIT 1'));
if(isset($itm['id'])) {
$itm2 = mysql_fetch_array(mysql_query('SELECT `iid`,`price_1` FROM `items_shop` WHERE `item_id` = "'.mysql_real_escape_string($ast[$i]).'" AND `kolvo` > 0 LIMIT 1'));
if($itm2['price_1'] > $itm['price1']) {
$itm['price1'] = $itm2['price_1'];
}
if($itm['inSlot'] == 3) {
$asg[$itm['inSlot']][count($asg[$itm['inSlot']])] = $itm['id'];
$asgp[$itm['inSlot']][count($asgp[$itm['inSlot']])] = $itm['price1'];
$j++;
}elseif($itm['inSlot'] == 10) {
$asg[$itm['inSlot']][count($asg[$itm['inSlot']])] = $itm['id'];
$asgp[$itm['inSlot']][count($asgp[$itm['inSlot']])] = $itm['price1'];
$j++;
}else{
$asg[$itm['inSlot']] = $itm['id'];
$asp[$itm['inSlot']] = $itm['price1'];
$j++;
}
}
}
$i++;
}
if($noitm > 0) {
echo 'Èñïîëüçîâàíèå áàãîâ êàðàåòñÿ çàêîíîì!';
$addi = 0;
}elseif(count($asg[3]) > 2) {
echo 'Âû âûáðàëè ñëèøêîì ìíîãî ïðåäìåòîâ, âûáåðèòå òîëüêî äâà îðóæèÿ è îäèí ùèò';
$addi = 0;
}elseif(count($asg[10]) > 3) {
echo 'Âû âûáðàëè ñëèøêîì ìíîãî ïðåäìåòîâ, âûáåðèòå òîëüêî òðè êîëüöà';
$addi = 0;
}elseif($j > 16) {
echo 'Âû âûáðàëè ñëèøêîì ìíîãî ïðåäìåòîâ';
$addi = 0;
}elseif($j < 1) {
echo 'Âûáåðèòå õîòÿ áû îäèí ïðåäìåò';
$addi = 0;
}
//$addi = 0;
if($addi == 1) {
$i = 0;
while($i <= 17) {
if($i == 10) {
if($asg[$i][0] > 0) {
$u->addItem($asg[$i][0],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i][0]);
}
if($asg[$i][1] > 0) {
$u->addItem($asg[$i][1],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i][1]);
}
if($asg[$i][2] > 0) {
$u->addItem($asg[$i][2],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i][2]);
}
}elseif($i == 3) {
if($asg[$i][0] > 0) {
$u->addItem($asg[$i][0],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i][0]);
}
if($asg[$i][1] > 0) {
$u->addItem($asg[$i][1],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i][1]);
}
}elseif($asg[$i] > 0) {
$u->addItem($asg[$i],$u->info['id']);
$this->user['points'] += 1+round($asgp[$i]);
}
$i++;
}
mysql_query('UPDATE `users_turnirs` SET `points` = "'.$this->user['points'].'",`items` = "0" WHERE `bot` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `ability` = "100",`skills` = "10" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `users` SET `level` = "12" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `turnirs` SET `step` = "0" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
$this->info['step'] = 0;
$this->info['items'] = '0';
}
}
}
if($this->info['step'] == 3) {
$this->finishTurnir();
}elseif($this->info['step'] == 0) {
//ðàñïðåäåëÿåì êîìàíäû
$po = array(0,0);
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" AND `points` > 3 ORDER BY `points` DESC LIMIT '.$this->info['users_in']);
$tmr = rand(1,2);
if($tmr == 1) {
$tmr = array(2,1);
}else{
$tmr = array(1,2);
}
while($pl = mysql_fetch_array($sp)) {
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['bot'].'" LIMIT 1'));
if(isset($inf['id'],$bot['id'])) {
if($po[1] == $po[2]) {
$tm = rand(1,2);
}elseif($po[1] > $po[2]) {
$tm = 2;
}else{
$tm = 1;
}
//$tm = $tmr[$tm];
$bot['team'] = $tm;
$po[$bot['team']] += $pl['points'];
mysql_query('UPDATE `stats` SET `team` = "'.$bot['team'].'" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
mysql_query('UPDATE `users_turnirs` SET `team` = "'.$bot['team'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
}
mysql_query('UPDATE `turnirs` SET `step` = "1" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
}
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" LIMIT '.$this->info['users_in']);
$po = array(0,0);
while($pl = mysql_fetch_array($sp)) {
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
$bot = mysql_fetch_array(mysql_query('SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `u`.`id` = "'.$pl['bot'].'" LIMIT 1'));
if(isset($inf['id'],$bot['id'])) {
$po[$bot['team']] += $pl['points'];
//${'tm'.$bot['team']} .= '<b>'.$bot['login'].'</b> ['.$bot['level'].']<br>';
${'tm'.$bot['team']} .= $u->microLogin($bot,2).'<br>';
}
}
$r .= '<style>/* öâåòà êîìàíä */
.CSSteam0 { font-weight: bold; cursor:pointer; }
.CSSteam1 { font-weight: bold; color: #6666CC; cursor:pointer; }
.CSSteam2 { font-weight: bold; color: #B06A00; cursor:pointer; }
.CSSteam3 { font-weight: bold; color: #269088; cursor:pointer; }
.CSSteam4 { font-weight: bold; color: #A0AF20; cursor:pointer; }
.CSSteam5 { font-weight: bold; color: #0F79D3; cursor:pointer; }
.CSSteam6 { font-weight: bold; color: #D85E23; cursor:pointer; }
.CSSteam7 { font-weight: bold; color: #5C832F; cursor:pointer; }
.CSSteam8 { font-weight: bold; color: #842B61; cursor:pointer; }
.CSSteam9 { font-weight: bold; color: navy; cursor:pointer; }
.CSSvs { font-weight: bold; }</style>';
$r .= '<h3>&laquo;'.$this->name[$this->info['type']].'&raquo;</h3><br>Íà÷àëî òóðíèðà ÷åðåç '.$u->timeOut($this->info['time'] - time()).'! ';
if(isset($_GET['hpregenNowTurnir'])) {
if($u->stats['hpNow'] < $u->stats['hpAll'] || $u->stats['mpNow'] < $u->stats['mpAll']) {
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpAll'].'",`mpNow` = "'.$u->stats['mpAll'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
}
if($this->user['points'] < 3) {
//Åùå íå ïîëó÷èëè îáìóíäèðîâàíèå
if($this->user['points'] < 2) {
$r .= '<INPUT class=\'btn_grey\' onClick="selectItmSave()" TYPE=button name=tmp value="Ïîëó÷èòü îáìóíäèðîâàíèå">';
}else{
$r .= ' <INPUT class=\'btn_grey\' onClick="location=\'main.php\';" TYPE=button name=tmp value="ß ãîòîâ';
if($u->info['sex'] == 1) {
$r .= 'à';
}
$r .= '!">';
}
}else{
$r .= '<small><b>Âû ó÷àñòâóåòå â òóðíèðå!</b></small>';
$r .= ' &nbsp; <INPUT class=\'btn_grey\' onClick="location.href=\'main.php?hpregenNowTurnir=1\'" TYPE=button name=tmp value="Âîññòàíîâèòü HP è MP">';
}
$r .= '<div style="float:right"><INPUT onClick="location=\'main.php\';" TYPE=button name=tmp value="Îáíîâèòü"></div>';
if($this->user['points'] < 3) {
if($this->user['items'] != '0') {
$r .= '<div align="left" style="height:1px; width:100%; margin:10px 0 10px 0; border-top:1px solid #999999;"></div>';
if($this->user['items'] == '') {
//Âûäàåì ïðåäìåòû äëÿ âûáîðà
$ai = '';
$sp = mysql_query('SELECT `a`.*,`b`.* FROM `items_shop` AS `a` LEFT JOIN `items_main` AS `b` ON (`a`.`item_id` = `b`.`id`) WHERE `a`.`sid` = 1 AND
(`a`.`r` != 5 AND `a`.`r` != 9 AND `a`.`r` <= 18 AND `a`.`kolvo` > 0 AND `cantBuy` = 0 AND `a`.`level` < 9 AND `b`.`level` < 9) AND
`b`.`class` != 6');
while($pl = mysql_fetch_array($sp)) {
if(!isset($noitm[$pl['item_id']])) {
$aso[$pl['inslot']][count($aso[$pl['inslot']])] = $pl;
}
}
$j = 1;
$com = array();
while($j <= 5) {
$i = 0;
while($i <= 17) {
if($i == 3) {
//
$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
}elseif($i == 14) {
//ïðàâàÿ ðóêà
$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
}else{
//îáìóíäèðîâàíèå
$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
if($i == 10) {
$ai .= $com[$i]['id'].',';
$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
$ai .= $com[$i]['id'].',';
//$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
//$ai .= $com[$i]['id'].',';
}
}
if($com[$i]['id'] > 0 && $i != 10) {
$ai .= $com[$i]['id'].',';
}
$i++;
}
$j++;
}
unset($com);
$ai .= '0';
$this->user['items'] = $ai;
mysql_query('UPDATE `users_turnirs` SET `items` = "'.$ai.'" WHERE `id` = "'.$this->user['id'].'" LIMIT 1');
}
//Âûâîäèì ïðåäìåòû ÷òîáû íàäåòü èõ
$ai = explode(',',$this->user['items']);
$i = 0; $ia = array();
while($i < count($ai)) {
if($ai[$i] > 0) {
$pli = mysql_fetch_array(mysql_query('SELECT `id`,`inSlot`,`name`,`type`,`img`,`level` FROM `items_main` WHERE `id` = "'.$ai[$i].'" LIMIT 1'));
$ia[$pli['inSlot']][count($ia[$pli['inSlot']])] = $pli;
unset($pli);
}
$i++;
}
unset($ai);
$r .= '<b>Âûáåðèòå ïðåäìåòû äëÿ òóðíèðà:</b><br>';
?>
<style>
.its0 {
margin:2px;
cursor:pointer;
filter:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-ms-filter:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(100%);
}
.its1 {
background-color:#ee9898;
margin:1px;
border:1px solid #b16060;
}
</style>
<script>
var set = [
];
set[3] = [0,0,0];
set[10] = [0,0,0,0];
function selectItmAdd(x,y,id,s) {
if(s != 10 && s != 3) {
if(set[s] != undefined && set[s] != 0) {
$('#it_'+set[s][1]+'_'+set[s][2]).attr('class','its0');
set[s] = 0;
}
set[s] = [id,x,y];
$('#it_'+x+'_'+y).attr('class','its1');
}else if(s == 10) {
if(set[s][0] > 2) {
$('#it_'+set[s][1][1]+'_'+set[s][1][2]).attr('class','its0');
$('#it_'+set[s][2][1]+'_'+set[s][2][2]).attr('class','its0');
$('#it_'+set[s][3][1]+'_'+set[s][3][2]).attr('class','its0');
set[s] = [0,0,0,0];
}
if(set[s][1] == 0) {
set[s][1] = [id,x,y];
}else if(set[s][2] == 0) {
set[s][2] = [id,x,y];
}else if(set[s][3] == 0) {
set[s][3] = [id,x,y];
}
set[s][0]++;
$('#it_'+x+'_'+y).attr('class','its1');
}else if(s == 3) {
if(set[s][0] > 1) {
$('#it_'+set[s][1][1]+'_'+set[s][1][2]).attr('class','its0');
$('#it_'+set[s][2][1]+'_'+set[s][2][2]).attr('class','its0');
set[s] = [0,0,0];
}
if(set[s][1] == 0) {
set[s][1] = [id,x,y];
}else if(set[s][2] == 0) {
set[s][2] = [id,x,y];
}
set[s][0]++;
$('#it_'+x+'_'+y).attr('class','its1');
}
}
function selectItmSave() {
var i = 0;
var r = '';
while(i <= 17) {
if(set[i] != undefined) {
if(i == 10) {
if(set[i][1][0] != undefined) {
r += set[i][1][0]+'-';
}
if(set[i][2][0] != undefined) {
r += set[i][2][0]+'-';
}
if(set[i][3][0] != undefined) {
r += set[i][3][0]+'-';
}
}else if(i == 3) {
if(set[i][1][0] != undefined) {
r += set[i][1][0]+'-';
}
if(set[i][2][0] != undefined) {
r += set[i][2][0]+'-';
}
}else{
if(set[i][0] != undefined) {
r += set[i][0]+'-';
}
}
}
i++;
}
location = "main.php?gocomplect="+r;
}
</script>
<?
$i = 0;
while($i <= 17) {
if(count($ia[$i]) > 0) {
$j = 0;
while($j < count($ia[$i])) {
$r .= '<img id="it_'.$i.'_'.$j.'" onclick="selectItmAdd('.$i.','.$j.','.$ia[$i][$j]['id'].','.$ia[$i][$j]['inSlot'].');" class="its0" title="'.$ia[$i][$j]['name'].'" src="https://img.new-combats.com/i/items/'.$ia[$i][$j]['img'].'">';
$j++;
}
$r .= '<br>';
}
$i++;
}
}
}
$r .= '<div align="left" style="height:1px; width:100%; margin:10px 0 10px 0; border-top:1px solid #999999;"></div>';
//$r .= '<b class="CSSteam1">Êîìàíäà ¹1</b>: '.rtrim($tm1,', ');
//$r .= '<br><b class="CSSteam2">Êîìàíäà ¹2</b>: '.rtrim($tm2,', ');
$r .= '<table style="border:1px solid #99cccc" width="700" bgcolor="#bbdddd" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="350" align="center" bgcolor="#99cccc"><b class="CSSteam1">Êîìàíäà 1</b></td>
<td align="center" bgcolor="#99cccc"><b class="CSSteam2">Êîìàíäà 2</b></td>
</tr>
<tr>
<td align="center" style="border-right:1px solid #99cccc">'.rtrim($tm1,', ').'</td>
<td align="center">'.rtrim($tm2,', ').'</td>
</tr>
</table>';
if( ($this->info['time'] - time() < 0) && $this->info['step'] == 1) {
//íà÷èíàåì òóðíèð
$this->startTurnir();
}
echo $r;
}
}
$tur = new turnir;
$tur->start();
?>

12883
_incl_data/class/__user.php Normal file

File diff suppressed because it is too large Load Diff

12519
_incl_data/class/__userOLD.php Normal file

File diff suppressed because it is too large Load Diff

3852
_incl_data/class/__zv.php Normal file

File diff suppressed because it is too large Load Diff

2547
_incl_data/class/_cron_.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
<?php
if( !defined('GAME') ) {
die();
}
class botLogic {
public $bot = array( );
//Ïîëó÷åíèå èíôîðìàöèè î áîòå
public function botInfo( $id ) {
self::$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
if( !isset(self::$bot['id']) ) {
self::$bot = 'stop';
}
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,516 @@
<?php
if( !defined('GAME') ) {
die();
}
class botPriemLogic {
static $p = array();
static function start( $i, $id ) {
self::$p = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = "'.$id.'" LIMIT 1'));
$test = self::testpriem( self::$p );
if( isset(self::$p['id']) && $test == 0 ) {
//Èñïîëüçóåì ïðèåì ïîä íîìåðîì $id
if( $id == 1 ) { self::priem1( $i ); } //Ïðèêðûòüñÿ 1|2|3|4|5|6|7|8|9|10|11|13|14|45|47|48|49|188|204|211|217|220|223|232|235|240|0|0|0|0|0|0|0|0|0|0|0|0|0|0
elseif( $id == 2 ) { self::priem2( $i ); } //Âëîìèòü
elseif( $id == 3 ) { self::priem3( $i ); } //Ñîáðàòü çóáû
elseif( $id == 4 ) { self::priem4( $i ); } //Ñèëüíûé óäàð
elseif( $id == 5 ) { self::priem5( $i ); } //Óòåðåòü ïîò
elseif( $id == 6 ) { self::priem6( $i ); } //Âîëÿ ê ïîáåäå
elseif( $id == 7 ) { self::priem7( $i ); } //Àêòèâíàÿ çàùèòà
elseif( $id == 8 ) { self::priem8( $i ); } //Òàíåö âåòðà
elseif( $id == 9 ) { self::priem9( $i ); } //Äèêàÿ óäà÷à
elseif( $id == 10 ) { self::priem10( $i ); } //Ïðåäâèäèíèå
elseif( $id == 11 ) { self::priem11( $i ); } //Óäà÷íûé óäàð
elseif( $id == 13 ) { self::priem13( $i ); } //Ñòîéêîñòü
elseif( $id == 14 ) { self::priem14( $i ); } //ßðîñòü
elseif( $id == 45 ) { self::priem45( $i ); } //Ïîëíàÿ çàùèòà
elseif( $id == 47 ) { self::priem47( $i ); } //Ñëåïàÿ óäà÷à
elseif( $id == 48 ) { self::priem48( $i ); } //Òàíåö ëåçâèé
elseif( $id == 49 ) { self::priem49( $i ); } //Âòîðîå äûõàíèå
elseif( $id == 188 ) { self::priem188( $i ); } //Æàæäà êðîâè
elseif( $id == 204 ) { self::priem204( $i ); } //Îáðå÷åííîñòü
elseif( $id == 211 ) { self::priem211( $i ); } //Àãðåññèâíàÿ çàùèòà
elseif( $id == 217 ) { self::priem217( $i ); } //Ðàçãàäàòü òàêòèêó
elseif( $id == 220 ) { self::priem220( $i ); } //Ñòàâêà íà îïåðåæåíèå
elseif( $id == 223 ) { self::priem223( $i ); } //Ðûâîê
elseif( $id == 232 ) { self::priem232( $i ); } //Âûæèòü
elseif( $id == 235 ) { self::priem235( $i ); } //Øîêèðóþùèé óäàð
elseif( $id == 240 ) { self::priem240( $i ); } //Õëåáíóòü êðîâè
elseif( $id >= 175 && $id <= 179 ) { self::priem175( $i ); }
//*********************************
}
return true;
}
static function usePriem($id,$on = NULL) {
//if(self::$p['id'] > 7 && self::$p['id'] < 11) {
//botLogic::e(botLogic::$bot['login'].', èñïîëüçóþ ïðèåì &quot;'.self::$p['name'].'&quot; , battle: <a target=_blank href=https://new-combats.com/logs.php?log='.botLogic::$bot['battle'].'>Link</a>');
//}
$go_txt = '&usepriem='.$id;
if( $on != '') {
$on = str_replace(' ','%20',$on);
$go_txt .= '&useon='.$on;
}
botLogic::inuser_go_btl( botLogic::$bot , $go_txt );
}
//Ñòàâêà íà îïåðåæåíèå
static function priem220( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ðàçãàäàòü òàêòèêó
static function priem217( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Îáðå÷åííîñòü
static function priem204( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Âûæèòü
static function priem232( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(self::hp() > 30 || rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Æàæäà êðîâè
static function priem188( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Øîê óäàð
static function priem235( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Õëåáíóòü êðîâè
static function priem240( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
//if(botLogic::$st['tactic2'] < 7 || botLogic::$st['tactic4'] < 3 || self::hp() > 70) {
if(self::hp() > 70) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ñèëîâîå ïîëå
static function priem175( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
/*if(botLogic::$st['hpNow'] >= botLogic::$st['hpAll']) {
$su = false;
}elseif(botLogic::$st['hpNow'] < 5) {
$su = false;
}elseif(rand(0,100) >= 50) {
$su = false;
}*/
if($su == true) {
self::usePriem( $i );
}
}
//Ïðèêðûòüñÿ
static function priem1( $i ) {
$su = true;
if(rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Âëîìèòü
static function priem2( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ñîáðàòü çóáû
static function priem3( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
/*if(botLogic::$st['hpNow'] >= botLogic::$st['hpAll']) {
$su = false;
}elseif(botLogic::$st['hpNow'] < 10) {
$su = false;
}elseif(isset(botLogic::$pr[1]) && botLogic::$pr[1] < 1) {
$su = false;
}*/
if(self::hp() > 70 || rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Âîëÿ ê ïîáåäå
static function priem6( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(self::hp() > 40 || rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Òàíåö âåòðà
static function priem8( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Òàíåö ëåçâèé
static function priem48( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 70) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Äèêàÿ óäà÷à
static function priem9( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ñëåïàÿ óäà÷à
static function priem47( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ïðåäâèäåíüå
static function priem10( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Âòîðîå äûõàíèå
static function priem49( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 80 || self::hp() > 60) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ðûâîê
static function priem223( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(self::hp() > 50 || rand(0,100) >= 50) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Óäà÷íûé óäàð
static function priem11( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
//if(isset(botLogic::$pr[6]) && botLogic::$st['tactic7'] > 0 && self::hp() < 66 && botLogic::$st['tactic1'] < 14) {
if(rand(0,100) >= 30){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ñòîéêîñòü
static function priem13( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 50){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//ßðîñòü
static function priem14( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(rand(0,100) >= 50){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ñèëüíûé óäàð
static function priem4( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
/*if(isset(botLogic::$pr[6]) && botLogic::$st['tactic7'] > 0 && self::hp() < 66 && botLogic::$st['tactic1'] < 14) {
$su = false;
}elseif((isset(botLogic::$pr[11]) || isset(botLogic::$pr[6])) && rand(0,100) <= 75) {*/
if(rand(0,100) >= 60){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Óòåðåòü ïîò
static function priem5( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
if(self::hp() > 95) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Àãðåññèâíàÿ çàùèòà
static function priem211( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
//if( rand(0,100) >= 80 || (isset(botLogic::$pr[7]) && botLogic::$pr[7] < 1) || (isset(botLogic::$pr[45]) && botLogic::$pr[45] < 1) || self::hp() > 80 ) {
if( rand(0,100) >= 80){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Ïîëíàÿ çàùèòà
static function priem45( $i ) {
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
//if( rand(0,100) >= 60 || (isset(botLogic::$pr[7]) && botLogic::$pr[7] < 1) || (isset(botLogic::$pr[211]) && botLogic::$pr[211] < 1) || self::hp() > 80 ) {
if( rand(0,100) >= 50){
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
//Àêòèâíàÿ çàùèòà
static function priem7( $i ) {
//if (rand(0,100) >= 50){$su = true;}else{$su = false;}
$su = true;
//Ëîãèêà èñïîëüçîâàíèÿ ïðèåìà
/* Åñëè åñòü àáñîëþòíàÿ çàùèòà (àãðåññèâíóþ) è å¸ âîçìîæíî èñîïëüçîâàòü, à òàê-æå ÍÐ ìåíåå 70% */
//if( rand(0,100) >= 50 || (isset(botLogic::$pr[45]) && botLogic::$pr[45] < 1) || (isset(botLogic::$pr[211]) && botLogic::$pr[211] < 1) || self::hp() > 80 ) {
if(rand(0,100) >= 30) {
$su = false;
}
if($su == true) {
self::usePriem( $i );
}
}
static function hp() {
$p = round((botLogic::$st['hpNow']/botLogic::$st['hpAll']*100),2);
return $p;
}
//Òåñò íà âîçìîæíîñòü èñïîëüçîâàíèÿ
static function testpriem($pl) {
global $u;
$notr = 0;
$tr = $u->lookStats($pl['tr']);
$d2 = $u->lookStats($pl['date2']);
$x = 1;
while( $x <= 7 ) {
if(botLogic::$bot['tactic'.$x] < $pl['tt'.$x] && $x!=7 && $pl['tt'.$x] > 0) {
$notr++;
}elseif($x==7) {
if($pl['tt'.$x]>0 && botLogic::$bot['tactic'.$x]<=0) {
$notr++;
}
}
$x++;
}
if($pl['xuse']>0) {
$xu = $u->testAction('`vars` = "use_priem_'.botLogic::$bot['battle'].'_'.botLogic::$bot['id'].'" AND `vals` = "'.$pl['id'].'" LIMIT '.$pl['xuse'].'',2);
if($xu[0] >= $pl['xuse']) {
$notr++;
}
}
$x = 0;
$t = $u->items['tr'];
while($x < count($t))
{
$n = $t[$x];
if(isset($tr['tr_'.$n]))
{
if($n=='lvl')
{
if($tr['tr_'.$n] > botLogic::$bot['level'])
{
$notr++;
}
}elseif($tr['tr_'.$n] > botLogic::$st[$n])
{
$notr++;
}
}
$x++;
}
if(isset($tr['tr_mpNow']))
{
if(botLogic::$st['mpNow'] < $tr['tr_mpNow'])
{
$notr++;
}
}
if($pl['trUser']==1)
{
//òðåáóåò ÷òîáû ïîëüçîâàòåëü ñ êåì-òî ðàçìåíèâàëñÿ (ïðè îæèäàíèè ïðèåì ãàñíèò)
$ga = mysql_fetch_array(mysql_query('SELECT `id` FROM `battle_act` WHERE `battle` = "'.botLogic::$bot['battle'].'" AND `uid1` = "'.botLogic::$bot['id'].'" AND `uid2` = "'.botLogic::$bot['enemy'].'" LIMIT 1'));
if(isset($ga['id']))
{
$notr++;
}
}
//Åñëè ïðèåì óæå èñïîëüçîâàëè
if(botLogic::$st['prsu'][$pl['id']]>0) {
$notr++;
}
return $notr;
}
}
?>

294
_incl_data/class/dealer.php Normal file
View File

@ -0,0 +1,294 @@
<?
die('Что-то тут не так...');
/*
* Класс обработчика запроса от GameDealer.ru
* by victor niko
* niko@gamedealer.ru
* skype: victornikoua
* 14.09.2012
*
* $old = new Model_PartnerProjects_GamedealerReq;
$result = $old->init();
die((($result)));
*/
class Model_PartnerProjects_GamedealerReq{
private $allowIp = array(
'127.0.0.1'
);
private $gamedealerkey = '12345677';
var $projectid = 1;
function init(){
$ip = $_SERVER['REMOTE_ADDR'];
if(!in_array($ip,$this->allowIp))return $this->xml(array('status'=>-10,'desc'=>'ErrIP'));
//рабочий режим
//$xml = file_get_contents('php://input');
//тестовый режим. Параметры: check_balance / pay / getpacages / check_login
$xml = $this->testxml('check_balance');
$result = $this->parse($xml);
if(!is_object($result))return $this->xml(array('status'=>-50,'desc'=>'ErrorInitParse'));
if(isset($result->method)){
$methodname = 'gamedealer_'.(string)$result->method;
if(!method_exists($this, $methodname))return $this->xml(array('status'=>-20,'desc'=>'ErrMethod'));
try{
$resulttry = $this->$methodname($result);
return $this->xml($resulttry);
}catch(Exception $e){}
}
return $this->xml(array('status'=>-10,'desc'=>'MethodError '.$methodname.isset($e)?$e->getMessage():false));
}
private function _sign($method,$params=array()){
return md5(implode($params).$method.md5($this->gamedealerkey));
}
/*Генератор XML-ответа*/
function xml($arr=false){
header("Content-type: text/xml; charset=utf-8");
if(!$arr)$arr = array('status'=>-1,'desc'=>"ErrorXML");
$xml = '<gdanswer>'."\n";
foreach($arr as $k => $v){
$xml .= '<'.$k.'>'."";
if(is_array($v)){
foreach($v as $itemkey => $itemvalue){
if(is_array($itemvalue)){
$xml .= ' <item ';
foreach($itemvalue as $itemvalue_k => $itemvalue_v)$xml .= ' '.$itemvalue_k.'="'.$itemvalue_v.'" ';
$xml .= '></item>'."\n";
}else{
$xml .= '<'.$itemkey.'>'.$itemvalue.'</'.$itemkey.'>'."\n";
}
}
}else {
$xml .= $v;
}
$xml .= '</'.$k.'>'."\n";
}
$xml .= '</gdanswer>';
return $xml;
}
//проверка счета-акканта
function gamedealer_check_login($params){
$bank = isset($params->nick)?(int)$params->nick:false;
$projectid = isset($params->projectid)?(int)$params->projectid:false;
$sign = isset($params->sign)?(string)$params->sign:false;
$hash = $this->_sign('check_login',array($bank));
if($sign!=$hash)return array('status'=>-10,'desc'=>'SignError');
$check = $this->checkLoginByBank($bank);
if(isset($check['login'])){
return array('status'=>1,'desc'=>'Счет указан верно','addinfo'=>$check['login']);
}
return array('status'=>-100,'desc'=>'Ошибка проверки счета');
}
//запрос на оплату
function gamedealer_pay($params){
$bank = isset($params->nick)?(int)$params->nick:false;
$projectid = isset($params->projectid)?(int)$params->projectid:false;
$sign = isset($params->sign)?(string)$params->sign:false;
$paymentid = isset($params->payid)?(int)$params->payid:false; // уникальный номер платежа
$amount = isset($params->amount)?number_format((float)$params->amount,'2','.',''):false; //сумма в игровой валюте
$pacageid = isset($params->pacageid)?(int)$params->pacageid:''; //идентификатор покупки опции в ГД. если нету - платеж на счет юзера
$partneritemid = isset($params->partneritemid)?(int)$params->partneritemid:''; //идентификатор продукта в вашей системе
$additemid = isset($params->additemid)?(int)$params->additemid:''; //дополнительный идентификатор пакета
$paymethodid = isset($params->paymethodid)?(string)$params->paymethodid:false; //метод оплаты по системе геймдилер // может быть пустым)
$hash = $this->_sign('pay',array($bank,$projectid.$pacageid.$amount,$paymentid));
if($sign!=$hash)return array('status'=>-10,'desc'=>'SignError');
if($amount<0.01)return array('status'=>-20,'desc'=>'сумма слишком маленькая');
$check = $this->checkLoginByBank($bank);
if(!isset($check['login']))return array('status'=>-10,'desc'=>'Ошибка логина. счет неверный'); //логин перса добываем
return $this->oldbk_dopayment($paymentid,$bank,$projectid,$pacageid,$partneritemid,$amount,$check['login'],$additemid);
}
function gamedealer_check_balance($params){
$projectid = isset($params->projectid)?(int)$params->projectid:false;
$sign = isset($params->sign)?(string)$params->sign:false;
$method = 'check_balance';
if($sign != $this->_sign($method,array('projectid'=>$projectid)))return array('status'=>-10,'desc'=>"errSign");
$balance = 500;
return array('status'=>1,'desc'=>"Balance: ".$balance,'balance'=>$balance); //баланс в игре
}
function gamedealer_getpacages($params){
$sign = isset($params->sign)?(string)$params->sign:false;
$projectid = isset($params->projectid)?(int)$params->projectid:false;
$method = 'getpacages';
if($sign != $this->_sign($method,array('projectid'=>$projectid)))return array('status'=>-10,'desc'=>"errSign");
return array(
'status'=>1,
'desc'=>'Список снизу :)',
'pacages'=>array(
array(
'title'=>'Название сильвера',
'price'=>20,
'partneritemid'=>1 //ид в системе игры
),
array(
'title'=>'Название сильвера 2',
'price'=>20,
'partneritemid'=>1 //ид в системе игры
),
)
);
}
function parse($xml){
try{
return simplexml_load_string($xml);
}catch(Exception $e){
return false;
}
}
//тестовый интерфейс
function testxml($method='check_login'){
switch($method){
case 'check_login':
$nick = 243;
return '<?xml version="1.0" encoding="utf-8"?>
<gamedealer>
<method>check_login</method>
<nick>'.$nick.'</nick>
<projectid>1</projectid>
<sign>'.md5($nick.$method.md5($this->gamedealerkey)).'</sign>
</gamedealer>';
break;
case 'pay':
$amount= 0.01;
$nick = 243;
$projectid = 1;
$payid = 112222;
//$bank,$projectid.$pacageid.$amount,$paymentid
#echo "$nick.$projectid.$amount.$payid.$method";
$sign = md5($nick.$projectid.$amount.$payid.$method.md5($this->gamedealerkey));
return '<?xml version="1.0" encoding="utf-8"?>
<gamedealer>
<method>pay</method>
<nick>'.$nick.'</nick>
<projectid>'.$projectid.'</projectid>
<amount>'.$amount.'</amount>
<payid>'.$payid.'</payid>
<sign>'.$sign.'</sign>
</gamedealer>';
break;
case 'getpacages':
//список пакетов
return '<?xml version="1.0" encoding="utf-8"?>
<gamedealer>
<projectid>1</projectid>
<method>'.$method.'</method>
<sign>'.md5('1'.$method.md5($this->gamedealerkey)).'</sign>
</gamedealer>';
break;
case 'check_balance':
//баланс
return '<?xml version="1.0" encoding="utf-8"?>
<gamedealer>
<projectid>1</projectid>
<method>'.$method.'</method>
<sign>'.md5('1'.$method.md5($this->gamedealerkey)).'</sign>
</gamedealer>';
break;
}
}
//прием оплаты
private function oldbk_dopayment($paymentid,$bank,$projectid,$pacageid,$partneritemid,$amount,$login,$additemid){
//$additemid - дополнительный дентификатор пакета. например - ID клана
//если оплата на клан - projectid = 20099 // pacageid = 25 //partneritemid = 1 (в вашей системе)// additemid = 5 //идентификатор клана
//если пакеты
if($pacageid){
//если покупка билетов - то количество = amount/price ну и там округлять, остаток на счет.
return array('status'=>1,'desc'=>'Сильвер аккаунт успешно оплачен','paymentid'=>1); //уникальный номер платежа в системе проекта.
}else{
//просто оплата на баланс по счету
return array('status'=>1,'desc'=>'Счет попонен','paymentid'=>1); //уникальный номер платежа в системе проекта.
//или
return array('status'=>3,'desc'=>'Аккаунт уже оплачен с таким payid','paymentid'=>1);//уникальный номер платежа в системе проекта.
}
return array('status'=>-10,'desc'=>'Ошибка поиска карты/сильвера и т.п. или сумма не та');
}
//проверка счета
function checkLoginByBank($bank){
return array('status'=>1,'desc'=>'Bank exissts','login'=>'Администратор');
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
<?
session_start();
function er($e)
{
global $c;
die('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><meta http-equiv="Content-Language" content="ru"><TITLE>Ïðîèçîøëà îøèáêà</TITLE></HEAD><BODY text="#FFFFFF"><p><font color=black>Ïðîèçîøëà îøèáêà: <pre>'.$e.'</pre><b><p><a href="https://'.$c[0].'/">Íàçàä</b></a><HR><p align="right">(c) <a href="https://'.$c[0].'/">'.$c[1].'</a></p></body></html>');
}
function GetRealIp()
{
if(!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip=$_SERVER['HTTP_CLIENT_IP'];
}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}else{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
define('IP',GetRealIp());
define('GAME',true);
include_once('_incl_data/__config.php');
include_once('_incl_data/class/__db_connect.php');
include_once('_incl_data/class/__user.php');
if(!isset($u->info['id']) || $u->info['ip'] != IP || $u->info['admin'] == 1) {
die('<meta http-equiv="refresh" content="0; URL=https://new-combats.com/">');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Âèçóàëüíûé ðåäàêòîð Ëàáèðèíòîâ &copy; new-combats.com</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jqueryrotate.js"></script>
<script type="text/javascript" src="js/jquery.zclip.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/title.js"></script>
<link rel="stylesheet" type="text/css" href="css/clu0b.css" />
<link rel="stylesheet" type="text/css" href="css/windows.css" />
</head>
<body>
<div style="background:#CCCCCC;padding:10px;">
<span style="padding:5px; background:#999999;"><span style="color:#CCCCCC">#</span> <b>1</b></span>
<select name="select" id="select">
<option value="0">Âûáåðèòå íîìåð ïåùåðû</option>
<? $i = 0; while($i <= 100) { ?>
<option value="<?=$i?>"><?=$i?></option>
<? } ?>
</select>
</div>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?
if( isset($s[1]) && $s[1] == '1/hramstok1' ) {
/*
Ñóíäóê: Âîäîñòîê äëÿ ñáîðà ïðîá
* Çàìåíÿåò ïðåäìåò Ïóñòàÿ ñêëÿíêà (4693) íà (4694) Ñêëÿíêà ñ ïðîáàìè
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = 4693 AND `uid` = "'.$u->info['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
if(!isset($vad['itm']['id'])) {
$r = 'Ó âàñ íåò ïîäõîäÿùåãî ïðåäìåòà äëÿ õðàíåíèÿ ïðîá... Âñå ðóêè â êàêîì-òî ãîâíå...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
mysql_query('UPDATE `items_users` SET `item_id` = 4694 WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
$r = 'Âû óñïåøíî âçÿëè ïðîáû ñ âîäîñòîêà! Íàáðàííóþ ñêëÿíêó íóæíî îòíåñòè îáðàòíî, ê Àðêâèåððî â Õðàì Çíàíèé.';
}
unset($vad);
}
?>

View File

@ -0,0 +1,31 @@
<?
if( isset($s[1]) && $s[1] == '1/podogrevatel' ) {
/*
Ñóíäóê: Îáîãðåâàòåëü
* ïàäàåò ãàéêà
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
$vad['itm'] = array(2390,2543,724);
$vad['itm'] = $vad['itm'][rand(0,count($vad['itm'])-1)];
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['itm'].'" LIMIT 1'));
$this->pickitem($obj,$vad['itm']['id'],0,'',false);
$r = 'Âû îáíàðóæèëè ïðåäìåò &quot;'.$vad['itm']['name'].'&quot;.';
}
unset($vad);
}
?>

View File

@ -0,0 +1,34 @@
<?
if( isset($s[1]) && $s[1] == '1/rjav' ) {
/*
Ñóíäóê: Ðæàâûå òðóáû
* Îáìåí êëþ÷÷èèèèêà íà âåíòèëü
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = 1004 AND `uid` = "'.$u->info['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
if(!isset($vad['itm']['id'])) {
$r = 'Ó âàñ íåò ïîäõîäÿùåãî ïðåäìåòà ÷òîáû îòêðóòèòü âåíòèëü...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
$this->pickitem($obj,1005,$u->info['id'],'',false);
$r = 'Âû óñïåøíî îòêðóòèëè âåíòèëü! (Ïðåäìåò &quot;Êëþ÷èèèê&quot; áûë èçüÿò)';
}
unset($vad);
}
?>

View File

@ -0,0 +1,28 @@
<?
if( isset($s[1]) && $s[1] == '1/vods1' ) {
/*
Ñóíäóê: Âîäîñòîê
* ïàäàåò ãàéêà
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
$this->pickitem($obj,1002,0,'',false);
$r = 'Âû îáíàðóæèëè ïðåäìåò &quot;Ãàéêà&quot;.';
}
unset($vad);
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == '101/altar' ) {
/*
Àëòàðü
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ -3 , ó 7
* Äëÿ ïðîõîäà òðåáóåòñÿ 1 êàìåíü òèïà 881 èëè 878
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
//Ïðîâåðÿåì êàìíè
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE (`item_id` = "881" OR `item_id` = "878") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
// Óäàëåíà ïðîâåðêà íà ãðóïïèðîâêó ïðåäìåòîâ 13.10.2015
$vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
$vad['go'] = true;
}
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "-3",`y` = "7",`s` = "1" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
// $u->deleteItem(,$u->info['id'],1); // Óáðàíî 14.10.2015
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="'.time().'",`delete`="'.time().'" WHERE `id`="'.$vad['sp']['id'].'" LIMIT 1');
if($upd){
$r = 'Âû ðàñòâîðèëè &quot;'.$vad['pl']['name'].'&quot; â àëòàðå è ïðîèçîøåë âçðûâ. Àëòàðü ïåðåìåñòèë âàñ â òàéíóþ êîìíàòó';
echo '<script>location.href="main.php"</script>';
} else {
$r = '×òî-òî ïîøëî íå òàê, ïîïðîáóéòå ïîçæå.';
}
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Äëÿ ïåðåìåùåíèÿ òðåáóåòñÿ îäèí èç äðàãîöåííûõ êàìíåé';
}
unset($vad);
}
?>

View File

@ -0,0 +1,42 @@
<?
if( isset($s[1]) && $s[1] == '101/i9' ) {
/*
Ñóíäóê: ëîâóøêà
* Ñíèìàåò äî 1000 ÍÐ îäèí ðàç
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
$vad['test'] = mysql_fetch_array(mysql_query('SELECT `id`,`uid` FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( !isset($vad['test']['id']) ) {
$vad['go'] = true;
}else{
$r = ' ñóíäóêå áûëà ëîâóøêà, å¸ àêòèâèðîâàë ïåðñîíàæ '.$u->microLogin($vad['test']['uid'],1);
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
$r = 'Â ñóíäóêå áûëà ëîâóøêà óñòàíîâëåííàÿ îäíèì èç îáèòàòåëåé ïîäçåìåëüÿ!';
$vad['min_hp'] = rand(100,1000);
$u->stats['hpNow'] -= $vad['min_hp'];
if( $u->stats['hpNow'] < 0 ) {
$u->stats['hpNow'] = 0;
}
if($u->info['sex'] == 0) {
$vad['text'] = '[img[items/trap.gif]] <b>'.$u->info['login'].'</b> óãîäèë â ëîâóøêó îñòàâëåííóþ â &quot;'.$obj['name'].'&quot;. <b>-'.$vad['min_hp'].'</b> ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']';
}else{
$vad['text'] = '[img[items/trap.gif]] <b>'.$u->info['login'].'</b> óãîäèëà â ëîâóøêó îñòàâëåííóþ â &quot;'.$obj['name'].'&quot;. <b>-'.$vad['min_hp'].'</b> ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']';
}
$this->sys_chat($vad['text']);
$u->info['hpNow'] = $u->stats['hpNow'];
mysql_query('UPDATE `stats` SET `regHP` = "'.time().'",`hpNow` = "'.$u->stats['hpNow'].'" WHERE `id` = "'.$u->stats['id'].'" LIMIT 1');
//
$this->testDie();
}
unset($vad);
}
?>

View File

@ -0,0 +1,28 @@
<?
if( isset($s[1]) && $s[1] == '101/kotel' ) {
/*
Ñóíäóê: Êîòåë
* Ìîæíî íàéòè Ñóùíîñòü ùèòà
* Ìîæåò îòíÿòü 100-1000 ÍÐ
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî ïåðåâåðíóë êîòåë...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
//Íàãðàäà
$this->pickitem($obj,5239,$u->info['id']);
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè ïðåäìåò &quot;Àìáðîçèÿ ïîäìàñòåðüÿ Âëàäûê&quot;';
}
unset($vad);
}
?>

View File

@ -0,0 +1,29 @@
<?
if( isset($s[1]) && $s[1] == '101/krovat' ) {
/*
Ñóíäóê: Êðîâàòü
* Ìîæíî ïîëó÷èòü îäèí èç äâóõ ðåñóðñîâ
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['items'] = array(472,473,474,475,476,477,478,479,481,485,486,487,692,693,1153,1179,2079,2177,2090);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],$u->info['id'],'',$vad['dn_delete'][$vad['items']['id']]);
}
unset($vad);
}
?>

View File

@ -0,0 +1,161 @@
<?
if( isset($s[1]) && $s[1] == '101/laba1' ) {
/*
Ñóíäóê: Ëàáîëàòîðèÿ
* Ìîæíî ñîáðàòü ñëó÷àéíóþ òàêòèêó, íî íå áîëåå 3 íà ÷åëîâåêà çà ïîõîä è íå áîëåå 10 íà êîìàíäó
* 897 - Ñëèòîê ïóñòûííîé ðóäû
* 903 - Òûñÿ÷åëåòíèé êàìåíü
* 888 - Øåïîò ãîð
* 892 - Ýññåíöèÿ ÷èñòîòû
* 950 - Êîæà Îáùåãî Âðàãà
* 904 - Êðèñòàëë âðåìåí
* 878 - Ëó÷èñòûé òîïàç
* 880 - Ýññåíöèÿ ãëóáèíû
* 879 - Ðàëèýëü
* 899 - Êîðåíü çìåèíîãî äåðåâà
* 882 - Ãëóáèííûé êàìåíü
* 908 - Êàìåíü çàòàåííîãî ñîëíöà
* 909 - Ýññåíöèÿ ïðàâåäíîãî ãíåâà
* 902 - Ïëîä çìåèíîãî äåðåâà
* 881 - Ëó÷èñòûé Ðóáèí
* 893 - Ýññåíöèÿ ëóííîãî ñâåòà
* 898 - Òðîåêîðåíü
* 890 - Ñãóñòîê àñòðàëà
* 907 - Êðèñòàëë ñòàáèëüíîñòè
* 905 - Ñòèõèàëèÿ
-- Áîÿ
4243 - 897 õ3
4244 - 903 õ2
4245 - 888 õ2
4246 - 892 õ1
4247 - 879 õ1 , 892 õ1
-- Çàùèòû
4248 - 950 õ3
4249 - 904 õ2
4250 - 878 õ2
4251 - 880 õ1
4252 - 880 õ1 , 892 õ1
-- Êðîâè
4253 - 899 õ3
4254 - 882 õ2
4255 - 908 õ2
4256 - 909 õ1
4257 - 909 õ1 , 892 õ1
-- Îòâåòà
4258 - 899 õ3
4259 - 902 õ2
4260 - 881 õ2
4261 - 893 õ1
4262 - 893 õ1 , 892 õ1
-- Îòðàæåíèÿ
4263 - 898 õ3
4264 - 890 õ2
4265 - 907 õ2
4266 - 905 õ1
4267 - 905 õ1 , 892 õ1
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['recept'] = array(
//Á
array( 897, 3 ),
array( 903, 2 ),
array( 888, 2 ),
array( 892, 1 ),
array( 892, 1, 892, 1 ),
//Ç
array( 950, 3 ),
array( 904, 2 ),
array( 878, 2 ),
array( 880, 1 ),
array( 880, 1, 892, 1 ),
//Ê
array( 899, 3 ),
array( 882, 2 ),
array( 908, 2 ),
array( 909, 1 ),
array( 909, 1, 892, 1 ),
//Îòâåòà
array( 899, 3 ),
array( 902, 2 ),
array( 881, 2 ),
array( 893, 1 ),
array( 893, 1, 892, 1 ),
//Îòðàæåíèÿ
array( 898, 3 ),
array( 890, 2 ),
array( 907, 2 ),
array( 905, 1 ),
array( 905, 1, 892, 1 )
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_lab" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_lab" LIMIT 1'));
$vad['i'] = 0;
while( $vad['i'] < count($vad['recept']) ) {
//4243 + $vad['i']
$vad['tr_itm'] = $vad['recept'][$vad['i']][0];
if( $vad['tr_itm'] > 0 ) {
$vad['tr_itm'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "'.$vad['recept'][$vad['i']][0].'" AND (`delete` = "0" OR `delete` = "1000") AND `inShop` = "0" AND `inTransfer` = "0" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['tr_itm'][0] >= $vad['recept'][$vad['i']][1] ) {
$vad['tr_itm'] = true;
}else{
$vad['tr_itm'] = false;
}
}
if( $vad['recept'][$vad['i']][2] > 0 && $vad['tr_itm'] == true ) {
$vad['tr_itm'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id` = "'.$vad['recept'][$vad['i']][2].'" AND (`delete` = "0" OR `delete` = "1000") AND `inShop` = "0" AND `inTransfer` = "0" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['tr_itm'][2] >= $vad['recept'][$vad['i']][3] ) {
//âñå îê
}else{
$vad['tr_itm'] = false;
}
}
if( $vad['tr_itm'] == true ) {
$vad['itm'][] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.(4243 + $vad['i']).'" LIMIT 1'));
$vad['tr'][(4243 + $vad['i'])] = array( $vad['recept'][$vad['i']][0] , $vad['recept'][$vad['i']][1] , $vad['recept'][$vad['i']][2] , $vad['recept'][$vad['i']][3] );
}
$vad['i']++;
}
$vad['itm'] = $vad['itm'][rand(0,count($vad['itm'])-1)];
if( $vad['test2'][0] >= 10 ) {
$r = 'Íå óäàëîñü âîñïîëüçîâàòüñÿ ëàáîðàòîðèåé, íå áîëåå 10 ðàç íà êîìàíäó çà îäèí ïîõîä';
$vad['go'] = false;
}elseif( $vad['test1'][0] >= 3 ) {
$r = 'Íå óäàëîñü âîñïîëüçîâàòüñÿ ëàáîðàòîðèåé, íå áîëåå 3 ðàç íà ïåðñîíàæà çà îäèí ïîõîä';
$vad['go'] = false;
}elseif(!isset($vad['itm']['id'])) {
$r = 'Íåäîñòàòî÷íî èíãðèäèåíòîâ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
//Âûäàåì ïðåäìåò
if( $vad['tr'][$vad['itm']['id']][1] > 0 ) {
$u->deleteItemID($vad['tr'][$vad['itm']['id']][0],$u->info['id'],$vad['tr'][$vad['itm']['id']][1]);
}
if( $vad['tr'][$vad['itm']['id']][3] > 0 ) {
$u->deleteItemID($vad['tr'][$vad['itm']['id']][2],$u->info['id'],$vad['tr'][$vad['itm']['id']][3]);
}
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`uid`,`time`,`vars`,`x`,`y`) VALUES (
"'.$u->info['dnow'].'","'.$u->info['id'].'","'.time().'","obj_act'.$obj['id'].'_lab","'.$obj['x'].'","'.$obj['y'].'"
)');
$u->addItem($vad['itm']['id'],$u->info['id'],'|frompisher=101');
$r = 'Âû ñîçäàëè ïðåäìåò &quot;'.$vad['itm']['name'].'&quot;! Ðàñïëàâèâ ðåñóðñû ...';
if($u->info['sex'] == 0) {
$vad['text'] = '<b>'.$u->info['login'].'</b> ñîçäàë ïðåäìåò &quot;'.$vad['itm']['name'].'&quot; ïðè ïîìîùè &quot;'.$obj['name'].'&quot;.';
}else{
$vad['text'] = '<b>'.$u->info['login'].'</b> ñîçäàëà ïðåäìåò &quot;'.$vad['itm']['name'].'&quot; ïðè ïîìîùè &quot;'.$obj['name'].'&quot;.';
}
$this->sys_chat($vad['text']);
}
}
?>

View File

@ -0,0 +1,41 @@
<?
if( isset($s[1]) && $s[1] == '101/nakova' ) {
/*
Ñóíäóê: Íàêîâàëüíÿ
* Ìîæíî ñîçäàòü ñóùíîñòü õ2 ñ ñóäüáîé
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî óæå ðàçáèë ñóùíîñòü çà ýòîò ïîõîä, íàêîâàëüíÿ ñëîìàíà...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "1035" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
$vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
}else{
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
//Íàãðàäà
$u->deleteItem($vad['sp']['id'],$u->info['id'],1);
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$vad['sp']['id'].'" LIMIT 1');
$this->pickitem($obj,1035,$u->info['id'],'|sudba=-1');
$this->pickitem($obj,1035,$u->info['id'],'|sudba=-1');
$r = 'Âû èñïîëüçîâàëè &quot;'.$obj['name'].'&quot; è ðàçáèëè &quot;Ñóùíîñòü&quot; íà äâå ÷àñòè';
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Äëÿ èñïîëüçîâàíèÿ íåîáõîäèì ïðåäìåò &quot;Ñóùíîñòü Ðåñóðñà&quot;';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,19 @@
<?
if( isset($s[1]) && $s[1] == '101/nakova2' ) {
/*
Íàêîâàëüíÿ 2
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ 3 , ó 42
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "3",`y` = "42",`s` = "3" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$r = 'Âû ïîäîøëè ê íàêîâàëüíå...';
echo '<script>location.href="main.php"</script>';
}
unset($vad);
}
?>

View File

@ -0,0 +1,28 @@
<?
if( isset($s[1]) && $s[1] == '101/reshetka1' ) {
/*
Ðåøåòêà
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
//Ïðîâåðÿåì êàìíè
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "1189" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
// Óäàëåíà ïðîâåðêà íà ãðóïïèðîâêó ïðåäìåòîâ 14.10.2015
// $vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
$vad['go'] = true;
}
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "4",`y` = "42",`s` = "1" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//$u->deleteItem($vad['sp']['id'],$u->info['id'],1);
echo '<script>location.href="main.php"</script>';
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Äëÿ ïðîõîäà òðåáóåòñÿ ïðåäìåò &quot;Ìåðöàþùèé êëþ÷ ¹3&quot;';
}
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '101/sunduk0' ) {
/*
Ñóíäóê: Ñóíäóê
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 1 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
//Âûêèäûâàåì Ëó÷èñòûé òîïàç
$vad['items'] = array(878);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
//Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,50 @@
<?
if( isset($s[1]) && $s[1] == '101/sunduk1' ) {
/*
Ñóíäóê: Ñóíäóê
* Ìîæíî íàéòè Ñòàëü , Ìèôðèë , Ïóñòûå áóòûëêè
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 1 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
//Âûêèäûâàåì áóòûëêó, ìèôðèë, ëèáî ñòàëü
$vad['items'] = array(4272,1189);
$vad['dn_delete'] = array(
1189 => true
);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
//Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,55 @@
<?
if( isset($s[1]) && $s[1] == '101/sunduk2' ) {
/*
Ñóíäóê: Ñóíäóê
* Ìîæíî íàéòè Îòâîðÿþùàÿ ïå÷àòü ¹3 1175
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
//Âûêèäûâàåì Îòâîðÿþùàÿ ïå÷àòü ¹3
$vad['items'] = array(1175);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 && rand(1,100) < 80) {
// Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
/*
//îòêóäà òóò ñóùíîñòè? îáëîìÿòñÿ!
if( rand(0,100) < 10 ) {
//Ñóùíîñòü ñàïîã
$this->pickitem($obj,4279,0);
}
if( rand(0,100) < 10 ) {
//Ñóùíîñòü ùèòà
$this->pickitem($obj,4269,0);
}
*/
if( $this->pickitem($obj,$vad['items'],0) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
} else {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","false"
)');
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,38 @@
<?
if( isset($s[1]) && $s[1] == '101/sunduk3' ) {
/*
Ñóíäóê: Ñóíäóê
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(1,100) > 20 ) {
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû íè÷åãî íå îáíàðóæèëè...';
}else{
$vad['items'] = array(4279,4269);
if( rand(1,100) < 9 ) {
$vad['items'][] = 4274;
}
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,38 @@
<?
if( isset($s[1]) && $s[1] == '101/sunduk4' ) {
/*
Ñóíäóê: Ñóíäóê
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(1,100) > 50 ) {
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû íè÷åãî íå îáíàðóæèëè...';
}else{
$vad['items'] = array(882);
if( rand(1,40) < 16 ) {
$vad['items'][] = 723;
}
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,36 @@
<?
if( isset($s[1]) && $s[1] == '101/telejka' ) {
/*
Ñóíäóê: Òåëåæêà
* Ìîæíî ïîëó÷èòü îäèí èç äâóõ ðåñóðñîâ
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(0,100) < 80 ) {
if( rand(0,100) < 51 ) {
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;Ëó÷èñòîå ñåðåáðî&quot;';
$this->pickitem($obj,895,$u->info['id']);
}else{
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;Ñåðåáðî&quot;';
$this->pickitem($obj,875,$u->info['id']);
}
}else{
$r = 'Âû íè÷åãî íå ñìîãëè íàéòè...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,93 @@
<?
if( isset($s[1]) && $s[1] == '101/viboina' ) {
/*
Ñóíäóê: Âûáîèíà
* Ìîæíî íàéòè Ñòàëü , Ìèôðèë , Ïóñòûå áóòûëêè
* Ìîæåò îòíÿòü 100-1000 ÍÐ
* Ìîãóò èñïîëüçîâàòü òîëüêî 2 ÷åëîâåêà èç êîìàíäû
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
$vad['test3'] = mysql_fetch_array(mysql_query('SELECT `id`,`vals` FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_bad" LIMIT 1'));
$vad['test4'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_bad_use" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
$vad['test5'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_bad_use" AND `uid` != "'.$u->info['id'].'" LIMIT 1'));
if( !isset($vad['test3']['id']) ) {
//Îïðåäåëÿåì ëîâóøêà èëè íåò
if( rand(0,100) < 50 ) {
$vad['bad'] = 1;
}else{
$vad['bad'] = 0;
}
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'_bad","'.$vad['bad'].'"
)');
}else{
$vad['bad'] = $vad['test3']['vals'];
}
if( $vad['test2'][0] > 0 ) {
//$r = 'Âû óæå îáûñêàëè çäåñü âñå...';
$r = 'Êàæåòñÿ, âû çäåñü ïîáûâàëè ðàíüøå...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 1 || ( $vad['test4'] == 0 && $vad['test5'] >= 2 ) ) {
$r = 'Êàæåòñÿ, êòî-òî çäåñü ïîáûâàë ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['bad'] == 1 && $vad['go'] == true ) {
//Âû óãîäèëè â ëîâóøêó
$vad['test3'] = mysql_fetch_array(mysql_query('SELECT `id`,`vals` FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'_bad_use" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( !isset($vad['test3']['id']) ) {
//Ëîâóøêà íà 50% ÍÐ , Åñëè ÍÐ áàîëüøå 2 åä.
$vad['go'] = false;
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'_bad_use",""
)');
$r = 'Â ñóíäóêå áûëà ëîâóøêà óñòàíîâëåííàÿ îäíèì èç îáèòàòåëåé ïîäçåìåëüÿ!';
$vad['min_hp'] = round(2+$u->stats['hpNow']/4);
$u->stats['hpNow'] -= $vad['min_hp'];
if( $u->stats['hpNow'] < 0 ) {
$u->stats['hpNow'] = 0;
}
if($u->info['sex'] == 0) {
$vad['text'] = '[img[items/trap.gif]] <b>'.$u->info['login'].'</b> óãîäèë â ëîâóøêó îñòàâëåííóþ â &quot;'.$obj['name'].'&quot;. <b>-'.$vad['min_hp'].'</b> ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']';
}else{
$vad['text'] = '[img[items/trap.gif]] <b>'.$u->info['login'].'</b> óãîäèëà â ëîâóøêó îñòàâëåííóþ â &quot;'.$obj['name'].'&quot;. <b>-'.$vad['min_hp'].'</b> ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']';
}
$this->sys_chat($vad['text']);
$u->info['hpNow'] = $u->stats['hpNow'];
mysql_query('UPDATE `stats` SET `regHP` = "'.time().'",`hpNow` = "'.$u->stats['hpNow'].'" WHERE `id` = "'.$u->stats['id'].'" LIMIT 1');
//
$this->testDie();
}
}
if( $vad['go'] == true ) {
//Âûêèäûâàåì áóòûëêó, ìèôðèë, ëèáî ñòàëü
$vad['items'] = array(2,877,896);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
//Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( $this->pickitem($obj,$vad['items'],$u->info['id']) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == '101/viboina2' ) {
/*
Âûáîèíà
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ 4 , ó 26
* Äëÿ ïðîõîäà òðåáóåòñÿ 1 Ëèíçà Ïîðòàëà - 4298
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
//Ïðîâåðÿåì êàìíè
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "4298" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
// Óäàëåíà ïðîâåðêà íà ãðóïïèðîâêó ïðåäìåòîâ 14.10.2015
// $vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1')); // Áåðåì íàçâàíèå "Ëèíçà Ïîðòàëà" è âñå.. ñìûñë çàïðîñà... ñòàòèêà.
$vad['go'] = true;
}
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "4",`y` = "26",`s` = "4" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//$u->deleteItem($vad['sp']['id'],$u->info['id'],1);// Óáðàíî 14.10.2015
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="'.time().'",`delete`="'.time().'" WHERE `id`="'.$vad['sp']['id'].'" LIMIT 1');
if($upd){
$r = 'Âû ïåðåìåñòèëèñü ïðè ïîìîùè &quot;Ëèíçà Ïîðòàëà&quot; íà äðóãóþ ñòîðîíó';
echo '<script>location.href="main.php"</script>';
} else {
$r = '×òî-òî ïîøëî íå òàê, ïîïðîáóéòå ïîçæå.';
}
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Äëÿ ïåðåìåùåíèÿ òðåáóåòñÿ &quot;Ëèíçà Ïîðòàëà&quot;';
}
unset($vad);
}
?>

View File

@ -0,0 +1,19 @@
<?
if( isset($s[1]) && $s[1] == '101/viboina3' ) {
/*
Âûáîèíà
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ 4 , ó 25
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "4",`y` = "25",`s` = "2" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$r = 'Âû ïåðåøëè íà äðóãóþ ñòîðîíó çàâàëà';
echo '<script>location.href="main.php"</script>';
}
unset($vad);
}
?>

View File

@ -0,0 +1,19 @@
<?
if( isset($s[1]) && $s[1] == '101/viboina4' ) {
/*
Âûáîèíà
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ 4 , ó 27
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('UPDATE `stats` SET `x` = "4",`y` = "27",`s` = "2" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$r = 'Âû ïåðåøëè íà äðóãóþ ñòîðîíó çàâàëà';
echo '<script>location.href="main.php"</script>';
}
unset($vad);
}
?>

View File

@ -0,0 +1,59 @@
<?
if( isset($s[1]) && $s[1] == '104/sunduk1' ) {
/*
Ñóíäóê: Ñóíäóê
* Ìîæíî íàéòè Ñòàëü , Ìèôðèë , Ïóñòûå áóòûëêè
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 1 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
//Âûêèäûâàåì áóòûëêó, ìèôðèë, ëèáî ñòàëü
$vad['items'] = array(
724,724,724,724,724,724,724,724,724,724,724,724,724,724,
2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,
4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,4709,
4710,4710,4710,4710,4710,4710,4710,4710,4710,4710,
4711,4711,4711,4711,4711,
4712,4712,4712,4712,4713,
724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,
2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390,2390
);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 724 && rand(0,100) < 31 ) {
$vad['items'] = 724;
}
if( $vad['items'] != 0 ) {
//Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'') ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,31 @@
<?
if( isset($s[1]) && $s[1] == '106/btn1' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Âû óæå íàæàëè íà &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['items'] = array(2390);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Íàæàâ íà &quot;'.$obj['name'].'&quot; âû ïîëó÷èëè &quot;'.$vad['items']['name'].'&quot;.';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
unset($vad);
}
?>

View File

@ -0,0 +1,27 @@
<?
if( isset($s[1]) && $s[1] == '106/door1' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['qst'] = mysql_fetch_array(mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "'.$u->info['id'].'" AND `var` = "noobqst1" AND `val` = 1 LIMIT 1'));
if(!isset($vad['qst']['id'])) {
$r = 'Äâåðü çàêðûòà. Ñíà÷àëà âûïîëíèòå çàäàíèÿ Ó÷èòåëÿ.';
}else{
mysql_query('UPDATE `stats` SET `x` = -2,`y` = 6,`s` = 1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
die();
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,27 @@
<?
if( isset($s[1]) && $s[1] == '106/door2' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['qst'] = mysql_fetch_array(mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "'.$u->info['id'].'" AND `var` = "noobqst1" AND `val` = 1 LIMIT 1'));
if(!isset($vad['qst']['id'])) {
$r = 'Äâåðü çàêðûòà. Ñíà÷àëà âûïîëíèòå çàäàíèÿ Ó÷èòåëÿ.';
}else{
mysql_query('UPDATE `stats` SET `x` = -2,`y` = 1,`s` = 3 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
die();
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,51 @@
<?
if( isset($s[1]) && $s[1] == '106/door3' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['qst'] = mysql_fetch_array(mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "'.$u->info['id'].'" AND `var` = "noobqst1" AND `val` = 1 LIMIT 1'));
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND (`item_id` = 724 OR `item_id` = 4704) LIMIT 1'));
if(!isset($vad['qst']['id']) || !isset($vad['itm']['id'])) {
$r = 'Äâåðü çàêðûòà. Ñíà÷àëà âûïîëíèòå çàäàíèÿ Ó÷èòåëÿ è êóïèòå Ôóòáîëêó ñ Ýëèêñèðîì.';
}else{
//Íà÷àëî îáó÷åíèÿ
$humor = array(
0 => array(
':maniac: Ñèëüíî íå áåéòå ;)',':beggar: Áóäåò ïîïðîøàéíè÷àòü - áåéòå!',':pal: Âîçìîæíî ñâåòëûé!',
':vamp: Âîçìîæíî òåìíûé!',':susel: Ñóäÿ ïî çäîðîâåííîìó áèöåïñó - ýòî ìóæèê!',':duel: È ñðàçó æå êèíóëñÿ â áîé!',
':friday: Íå äîëãî äóìàâ îí íà÷àë èñêàòü ñîáóòûëüíèêà!',':doc: Ëåêàðü: Íîâè÷îê! Äà, äà! Òû! Åñëè òåáÿ ñëîìàþò - ó çíàõàðÿ òåáÿ ñîáåðóò îáðàòíî!'
),
1 => array(
':maniac: Ïîìíèòå! Äåâî÷åê íå áüåì ;)',':nail: Îíà êðàñèò íîãòè, íå îòâëåêàéòå âñå ñðàçó ;)',':pal: Âîçìîæíî ñâåòëàÿ!',
':vamp: Âîçìîæíî òåìíàÿ!',':rev: Ñóäÿ ïî êðàñèâîé îäåæäå - ýòî æåíùèíà!',':hug: È ñðàçó æå êèíóëàñü âñåõ öåëîâàòü!',
':angel2: Àíãåë ñîøåë ñ íåáåñ...'
)
);
$humor = $humor[$u->info['sex']];
//$u->info['fnq'] = 1;
//mysql_query('UPDATE `users` SET `fnq` = "'.$u->info['fnq'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//Îòïðàâëÿåì ñîîáùåíèå â ÷àò î íîâè÷êå
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = 0 AND `item_id` = 4703');
mysql_query('UPDATE `users` SET `room` = 4 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `hpNow` = 1000,`mpNow` = 1000,`dn` = 0 , `dnow` = 0 , `x` = 0 , `y` = 0 , `s` = 0 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->send('','','','','','Â íàøåì ìèðå ïîÿâèëñÿ íîâûé èãðîê &quot;<b>' . $u->info['login'] . '</b>&quot;! '.$humor[rand(0,count($humor)-1)].'',time(),6,0,0,0,1,0);
//mysql_query('UPDATE `stats` SET `x` = 0,`y` = 5 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
die();
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,28 @@
<?
if( isset($s[1]) && $s[1] == '106/door4' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['qst'] = mysql_fetch_array(mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "'.$u->info['id'].'" AND `var` = "noobqst1" AND `val` = 1 LIMIT 1'));
$vad['qst2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `item_id` = "4703" AND `delete` = 0 LIMIT 1'));
if(!isset($vad['qst']['id']) && $vad['qst2'][0] > 0) {
$r = 'Äâåðü çàêðûòà. Ñíà÷àëà âûïîëíèòå çàäàíèÿ Ó÷èòåëÿ è ïîòðàòüòå âñå ñâîè Æåòîíû.';
}else{
mysql_query('UPDATE `stats` SET `x` = 0,`y` = 5 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
die();
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,20 @@
<?
if(isset($s[1]) && $s[1] == '108/door1') {
$vad = array('go' => true);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if($vad['test1'][0] > 0) {
$r = 'Êòî-òî âàñ îïåðåäèë...';
$vad['go'] = false;
}
if($vad['go'] == 'true') {
mysql_query('INSERT INTO `dungeon_actions` (`dn`, `time`, `x`, `y`, `uid`, `vars`, `vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'")');
$vad['items'] = array(4914, 4915, 4916, 4917, 4918);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0, count($vad['items'])-1)]).'" LIMIT 1'));
$vad['dn_delete'][$vad['items']['id']] = true;
$r = 'Âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj, $vad['items']['id'], 1,'',true, 1);
}
unset($vad);
}
?>

View File

@ -0,0 +1,30 @@
<?
if(isset($s[1]) && $s[1] == '108/fontan1') {
$vad = array('go' => true);
$bots = mysql_fetch_array(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "'.$u->info['dnow'].'" AND ((`x` = "-7" AND `y` = "9") OR (`x` = "-5" AND `y` = "9") OR (`x` = "-7" AND `y` = "8") OR (`x` = "-6" AND `y` = "8") OR (`x` = "-5" AND `y` = "6")) AND `delete` = "0" LIMIT 1'));
if(isset($bots['id2'])) {
$r = 'Íå âñå áîòû óáèòû ...';
$vad['go'] = false;
}
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if($vad['test1'][0] > 2) {
$r = 'Ôîíòàí ïóñò ...';
$vad['go'] = false;
}
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if($vad['test2'][0] > 0) {
$r = 'Âû óæå ïîëüçîâàëèñü ôîíòàíîì ...';
$vad['go'] = false;
}
if($vad['go'] == 'true') {
$vad['items'] = array(4911, 4912, 4913);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0, count($vad['items'])-1)]).'" LIMIT 1'));
$vad['dn_delete'][$vad['items']['id']] = false;
$r = 'Âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj, $vad['items']['id'], 1,'',false, 1);
mysql_query('INSERT INTO `dungeon_actions` (`dn`, `time`, `x`, `y`, `uid`, `vars`, `vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'")');
}
unset($vad);
}
?>

View File

@ -0,0 +1,44 @@
<?
if(isset($s[1]) && $s[1] == '108/fontan2') {
$vad = array('go' => true);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if($vad['test1'][0] > 1) {
$r = 'Ôîíòàí ïóñò ...';
$vad['go'] = false;
}
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if($vad['test2'][0] > 0) {
$r = 'Âû óæå ïîëüçîâàëèñü ôîíòàíîì ...';
$vad['go'] = false;
}
if($vad['go'] == true) {
$vad['bt'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['bt']['id'])) {
if($vad['bt']['inGroup'] > 1) {
$r = 'Ïðåäìåò íå äîëæåí íàõîäèòüñÿ â ãðóïïå';
$vad['go'] = false;
} else {
$vad['go'] = true;
}
} else {
$r = 'Ó âàñ íåò ïóñòîé áóòûëêè.';
$vad['go'] = false;
}
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`, `time`, `x`, `y`, `uid`, `vars`, `vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'")');
$r = 'Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
$u->deleteItem(intval($vad['bt']['id']),$u->info['id'],1);
$u->addItem(round(2417),$u->info['id'],'|musor=2|noremont=1|nosale=1',108, 3);
}
unset($vad);
}
?>

View File

@ -0,0 +1,32 @@
<?
if(isset($s[1]) && $s[1] == '108/fontan3') {
$vad = array('go' => true);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if($vad['test1'][0] > 0) {
$r = 'Ôîíòàí ïóñò ...';
$vad['go'] = false;
}
$bots = mysql_fetch_array(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "'.$u->info['dnow'].'" AND ((`x` = "-6" AND `y` = "32") OR (`x` = "-6" AND `y` = "31") OR (`x` = "-5" AND `y` = "32") OR (`x` = "-5" AND `y` = "31") OR (`x` = "-5" AND `y` = "30")) AND `delete` = "0" LIMIT 1'));
if(isset($bots['id2'])) {
$r = 'Íå âñå áîòû óáèòû ...';
$vad['go'] = false;
}
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "'.$u->info['dnow'].'" AND `id_bot` = "484" AND `delete` = "0" LIMIT 1'));
if(isset($vad['test2']['id2'])) {
$r = 'Êîðîëü âñ¸ åùå æèâ ...';
$vad['go'] = false;
}
if($vad['go'] == true) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`, `time`, `x`, `y`, `uid`, `vars`, `vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'")');
//4041
$u->addItem(round(4041),$u->info['id'],'|musor=2|noremont=1|nosale=1',108, 1);
$r = 'Âû ïîëó÷èëè Ñíàäîáüå Çàáûòûõ Ìàñòåðîâ';
}
unset($vad);
}
?>

View File

@ -0,0 +1,82 @@
<?
if( isset($s[1]) && $s[1] == '12/altar_1_5stage' ) {
/*
Ñóíäóê: Àëòàðü Îñêîëêîâ
# '4443', '4444', '4445' = 4446
# '4517', '4518', '4519', '4520', '4521' = 4522
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go_p' => true,
'go_r' => true,
'portal' => array(0=>false, 1=>false, 2=>false),
'portal_items' => array(0=>false, 1=>false, 2=>false),
'rune' => array(0=>false, 1=>false, 2=>false, 3=>false, 4=>false),
'rune_items' => array(0=>false, 1=>false, 2=>false, 3=>false, 4=>false)
);
$vad['portal_q'] = mysql_query('SELECT * FROM `items_users` WHERE (`item_id` = "4443" OR `item_id` = "4444" OR `item_id` = "4445") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" GROUP BY item_id LIMIT 3');
while($vad['sp'] = mysql_fetch_array($vad['portal_q']) ){
if($vad['sp']['item_id'] == '4443'){
$vad['portal'][0] = true;
$vad['portal_items'][0] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4444'){
$vad['portal'][1] = true;
$vad['portal_items'][1] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4445'){
$vad['portal'][2] = true;
$vad['portal_items'][2] = $vad['sp']['id'];
}
}
$vad['rune_q'] = mysql_query('SELECT * FROM `items_users` WHERE (`item_id` = "4517" OR `item_id` = "4518" OR `item_id` = "4519" OR `item_id` = "4520" OR `item_id` = "4521") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" GROUP BY item_id LIMIT 5');
while($vad['sp'] = mysql_fetch_array($vad['rune_q'])){
if($vad['sp']['item_id'] == '4517'){
$vad['rune'][0] = true;
$vad['rune_items'][0] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4518'){
$vad['rune'][1] = true;
$vad['rune_items'][1] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4519'){
$vad['rune'][2] = true;
$vad['rune_items'][2] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4520'){
$vad['rune'][3] = true;
$vad['rune_items'][3] = $vad['sp']['id'];
} elseif($vad['sp']['item_id'] == '4521'){
$vad['rune'][4] = true;
$vad['rune_items'][4] = $vad['sp']['id'];
}
}
if( isset($vad['portal']) AND $vad['portal'][2]==true AND $vad['portal'][1]==true AND $vad['portal'][0]==true ){
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","altar_keyportal'.$obj['id'].'","'.$vad['bad'].'"
)');
foreach($vad['portal_items'] as $vad['row']){
$u->deleteItem($vad['row'],$u->info['id'],1);
}
$this->pickitem($obj,4446,$u->info['id'],'|sudba=-1');
$r = 'Âû èñïîëüçîâàëè &quot;'.$obj['name'].'&quot; è ñîáðàëè &quot;Êëþ÷ Ïîðòàëà&quot; èç òðåõ ÷àñòåé...';
} else {
$vad['go_p'] == false;
}
if( isset($vad['rune']) AND $vad['rune'][4]==true AND $vad['rune'][3]==true AND $vad['rune'][2]==true AND $vad['rune'][1]==true AND $vad['rune'][0]==true ){
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","altar_keyrune'.$obj['id'].'","'.$vad['bad'].'"
)');
foreach($vad['rune_items'] as $vad['row']){
$u->deleteItem($vad['row'],$u->info['id'],1);
}
$this->pickitem($obj,4522,$u->info['id'],'|sudba=-1', true);
if( !isset($r) ) $r ='';
$r .= 'Âû èñïîëüçîâàëè &quot;'.$obj['name'].'&quot; è ñîáðàëè &quot;Îòïèðàþùàÿ ðóíà&quot; èç ïÿòè ÷àñòåé...';
} else {
$vad['go_r'] == false;
}
if( $vad['go_r']==false && $vad['go_p']==false ) {
$r = 'Íè÷åãî íå ïîëó÷èëîñü... ';
}
unset($vad);
}
?>

View File

@ -0,0 +1,32 @@
<?
if( isset($s[1]) && $s[1] == '12/door_01' ) {
/*
Ðåøåòêà
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
//Ïðîâåðÿåì êàìíè
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "4516" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
if( $vad['sp']['inGroup'] > 0 ) {
$r = 'Ïðåäìåò íå äîëæåí íàõîäèòüñÿ â ãðóïïå';
}else{
$vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
$vad['go'] = true;
}
}
if($u->info['x'] == '-3' && $u->info['y'] == '64' && $vad['go'] == true ){
mysql_query('UPDATE `stats` SET `x` = "-3",`y` = "63" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
}elseif( $u->info['x'] == '-3' && $u->info['y'] == '63') {
$r = 'Ðåøåòêà óæå îòêðûòà';
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Äëÿ ïðîõîäà òðåáóåòñÿ ïðåäìåò &quot;Êëþ÷ îò Ñîêðîâèùíèöû&quot;';
}
unset($vad);
}
?>

View File

@ -0,0 +1,23 @@
<?
if(isset($s[1]) && $s[1] == '12/door_02') {
$vad = array('go' => false);
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "4522" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['sp']['id'])) {
if($vad['sp']['inGroup'] > 0) {
$r = 'Ïðåäìåò íå äîëæåí íàõîäèòüñÿ â ãðóïïå';
} else {
$vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
$vad['go'] = true;
}
}
if($u->info['x'] == '0' && $u->info['y'] == '65' && $vad['go'] == true) {
mysql_query('UPDATE `stats` SET `x` = "0", `y` = "66" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('Location: main.php');
} elseif($u->info['x'] == '0' && $u->info['y'] == '66') {
$r = 'Äâåðü óæå îòêðûòà';
} elseif(!isset($vad['sp']['id'])) {
$r = 'Äëÿ ïðîõîäà òðåáóåòñÿ ïðåäìåò &quot;Îòïèðàþùàÿ ðóíà&quot;';
}
unset($vad);
}
?>

View File

@ -0,0 +1,29 @@
<?
if(isset($s[1]) && $s[1] == '12/fontan1') {
$vad = array('go' => false);
$vad['use_fontan'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `uid` = "'.$u->info['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "2" LIMIT 1'));
if(!isset($vad['use_fontan']['id'])) {
$vad['key'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "1174" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['key']['id'])) {
$vad['bottle'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['bottle']['id'])) {
$vad['go'] = true;
} else {
$r = 'Äëÿ èñïîëüçîâàíèÿ òðåáóåòñÿ &quot;Ïóñòàÿ Áóòûëêà&quot;';
}
} else {
$r = 'Äëÿ èñïîëüçîâàíèÿ òðåáóåòñÿ &quot;Ìåðöàþùèé Êëþ÷ ¹1&quot;';
}
} else {
if($u->info['sex'] == 1) { $a = 'à'; } else { $a = ''; }
$r = 'Ìíå êàæåòñÿ, ÷òî çäåñü ÿ óæå áûë'.$a.'..';
}
if($vad['go'] == true) {
$r = 'Âû âîñïîëüçîâàëèñü &quot;Êëþ÷ ¹1&quot;. Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
$u->deleteItem(intval($vad['key']['id']), $u->info['id'], 1);
$u->deleteItem(intval($vad['bottle']['id']), $u->info['id'], 1);
$u->addItem(round(4403), $u->info['id'], '|musor=2|noremont=1|nosale=1',12);
}
unset($vad);
}
?>

View File

@ -0,0 +1,44 @@
<?
if( isset($s[1]) && $s[1] == '12/fontan2' ) {
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
// Òðåáóåòñÿ äîáàâèòü íà ïðîâåðêó Íå áîëüøå 4 èãðîêîâ èç ãðóïïû.
$vad['use_fontan'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `uid` = "'.$u->info['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "2" LIMIT 1')); // Ïðîâåðêà íà èñïîëüçîâàíåå ðàíåå.
if(!isset($vad['use_fontan']['id'])) {
$vad['all_uses'] = mysql_num_rows(mysql_query('SELECT * FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "2" LIMIT 5'));
if($vad['all_uses']>=4){
$r = 'Íè÷åãî íå îñòàëîñü, êòî-òî ïîáûâàë çäåñü ðàíüøå.';
} else {
$vad['kill_dk'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_bots` WHERE `id_bot` = "123" AND `dn` = "'.$u->info['dnow'].'" AND `for_dn` = "0" LIMIT 1')); //Ïðîâåðÿåì óáèòà ëè Äàðüÿíà Êîðò
if( isset($vad['kill_dk']['id2']) ) {
if( $vad['kill_dk']['delete'] > 0 ) {
$vad['bt'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['bt']['id']) ) {
$vad['go'] = true;
} else {
$r = 'Ó âàñ íåò ïóñòîé áóòûëêè.';
}
} else {
$r = 'Âû íå ìîæåòå âîñïîëüçîâàòüñÿ ôîíòàíîì, ïîêà Äàðüÿíà Êîðò æèâà.';
}
} else {
$r = 'Âû óâåðåíû ÷òî Äàðüÿíà Êîðò ìåðòâà? Íèãäå íåò åå îñòàíêîâ..';
}
}
} else {
if($u->info['sex']==1)$a='à'; else $a='';
$r = 'Ìíå êàæåòñÿ, ÷òî çäåñü ÿ óæå áûë'.$a.'..';
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`uid`,`dn`,`x`,`y`,`time`,`vars`,`vals`) VALUES ( "'.$u->info['id'].'","'.$u->info['dnow'].'","'.$u->info['x'].'","'.$u->info['y'].'","'.time().'", "use_fontan","2" )'); // Âûïèëè ðàç, âîò è õâàòèò ñ âàñ!
$r = 'Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
$u->deleteItem(intval($vad['bt']['id']),$u->info['id'],1); // Óäàëÿåì Ïóñòàÿ Áóòûëêà = 2.
$u->addItem(round(1186),$u->info['id'],'|musor=2|noremont=1|nosale=1',12, 3); // Âåëèêîå çåëüå Ñòîéêîñòè 1186
}
unset($vad);
}
?>

View File

@ -0,0 +1,58 @@
<?
if( isset($s[1]) && $s[1] == '12/fontan3' ) {
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
// Òðåáóåòñÿ äîáàâèòü ïðîâåðêó Íå áîëüøå 2 èãðîêîâ èç ãðóïïû.
$vad['use_fontan'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `uid` = "'.$u->info['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "3" LIMIT 1')); // Ïðîâåðêà íà èñïîëüçîâàíåå ðàíåå.
if(!isset($vad['use_fontan']['id'])) {
$vad['all_uses'] = mysql_num_rows(mysql_query('SELECT * FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "3" LIMIT 5'));
if($vad['all_uses']>=2){
$r = 'Íè÷åãî íå îñòàëîñü, êòî-òî ïîáûâàë çäåñü ðàíüøå.';
} else {
$vad['kill_monsters'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_bots` WHERE ((`id_bot` = "370" && `x` = "-2" && `y` = "31") OR (`id_bot` = "374" && `x` = "-2" && `y` = "31") OR (`id_bot` = "375" && `x` = "-3" && `y` = "32") OR (`id_bot` = "375" && `x` = "-3" && `y` = "32") OR (`id_bot` = "373" && `x` = "-1" && `y` = "32") OR (`id_bot` = "373" && `x` = "-3" && `y` = "32") OR (`id_bot` = "373" && `x` = "-3" && `y` = "31")) AND `delete` = "0" AND `dn` = "'.$u->info['dnow'].'" AND `for_dn` = "0" LIMIT 10')); //Ïðîâåðÿåì óáèòà ëè ãðóïïà ìîíñòðîâ
if( !isset($vad['kill_monsters']['0']['id2']) ) {
$vad['bt'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['bt']['id']) ) {
//if( $vad['bt']['inGroup'] > 0 ) {
// $r = 'Ïðåäìåò íå äîëæåí íàõîäèòüñÿ â ãðóïïå';
//}else{
// Âûáèðàåì êàìíè
$vad['gems']['query'] = mysql_query('SELECT `id`,`inGroup` FROM `items_users` WHERE (`item_id` = "908" OR `item_id` = "906" OR `item_id` = "907" OR `item_id` = "881" OR `item_id` = "878" OR `item_id` = "888") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 99');
// Âûáèðàåì ðàíäîìíûé êàìåíü èç...
$vad['gems']['query'] = mysql_result($vad['gems']['query'], (rand(0, (mysql_num_rows($vad['gems']['query'])-1))),0);
if( $vad['gems']['query'] != "" ) {
$vad['go'] = true;
} else {
$r = '×òî-òî ïîøëî íå òàê, íåîáõîäèì äðàãîöåííûé êàìåíü...';
}
//}
} else {
$r = 'Ó âàñ íåò ïóñòîé áóòûëêè.';
}
} else {
$r = 'Âû óâåðåíû ÷òî óáèëè âñþ ãðóïïó ìîíñòðîâ?';
}
}
} else {
if($u->info['sex']==1)$a='à'; else $a='';
$r = 'Ìíå êàæåòñÿ, ÷òî çäåñü ÿ óæå áûë'.$a.'..';
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`uid`,`dn`,`x`,`y`,`time`,`vars`,`vals`) VALUES ( "'.$u->info['id'].'","'.$u->info['dnow'].'","'.$u->info['x'].'","'.$u->info['y'].'","'.time().'", "use_fontan","3" )'); // Âûïèëè ðàç, âîò è õâàòèò ñ âàñ!
$r = 'Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
mysql_query('DELETE FROM `items_users` WHERE `id` = "'.mysql_real_escape_string(intval($vad['gems']['query'])).'" LIMIT 1');
mysql_query('DELETE FROM `items_users` WHERE `id` = "'.mysql_real_escape_string(intval($vad['bt']['id'])).'" LIMIT 1');
$u->addItem(round(1188),$u->info['id'],'|musor=2|noremont=1|nosale=1',12, 3); // Âåëèêîå çåëüå Îòðèöàíèÿ 1188
}
unset($vad);
}
?>

View File

@ -0,0 +1,45 @@
<?
if(isset($s[1]) && $s[1] == '12/fontan4') {
$vad = array('go' => false);
$vad['use_fontan'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `uid` = "'.$u->info['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "4" LIMIT 1'));
if(!isset($vad['use_fontan']['id'])) {
$vad['all_uses'] = mysql_num_rows(mysql_query('SELECT * FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "4" LIMIT 5'));
if($vad['all_uses'] >= 3) {
$r = 'Íè÷åãî íå îñòàëîñü, êòî-òî ïîáûâàë çäåñü ðàíüøå.';
} else {
$vad['kill_monsters'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_bots` WHERE ((`id_bot` = "121" && `x` = "-5" && `y` = "30") OR (`id_bot` = "118" && `x` = "-6" && `y` = "30") OR (`id_bot` = "114" && `x` = "-5" && `y` = "29") OR (`id_bot` = "112" && `x` = "-7" && `y` = "29") OR (`id_bot` = "122" && `x` = "-7" && `y` = "30")) AND `delete` = "0" AND `dn` = "'.$u->info['dnow'].'" AND `for_dn` = "0" LIMIT 10'));
if(!isset($vad['kill_monsters']['id2'])) {
$vad['bottle'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" ORDER BY `id` DESC LIMIT 1'));
if(isset($vad['bottle']['id'])) {
// if($vad['bottle']['inGroup'] > 0) {
// $r = 'Ïóñòàÿ áóòûëêà íå äîëæåíà íàõîäèòüñÿ â ãðóïïå...';
// } else {
$vad['gems']['query'] = mysql_query('SELECT `id`, `inGroup` FROM `items_users` WHERE (`item_id` = "908" OR `item_id` = "906" OR `item_id` = "907" OR `item_id` = "881" OR `item_id` = "878" OR `item_id` = "888") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 99');
$vad['gems']['query'] = mysql_result($vad['gems']['query'], (rand(0, (mysql_num_rows($vad['gems']['query'])-1))),0);
if($vad['gems']['query'] != '') {
$vad['go'] = true;
} else {
$r = 'Ó âàñ íåò äðàãîöåííûõ êàìíåé...';
}
// }
} else {
$r = 'Ó âàñ íåò ïóñòîé áóòûëêè.';
}
} else {
$r = 'Âû óâåðåíû ÷òî óáèëè âñþ ãðóïïó ìîíñòðîâ?';
}
}
} else {
if($u->info['sex'] == 1) { $a = 'à'; } else { $a = ''; }
$r = 'Ìíå êàæåòñÿ, ÷òî çäåñü ÿ óæå áûë'.$a.'..';
}
if($vad['go'] == true) {
mysql_query('INSERT INTO `dungeon_actions` (`uid`, `dn`, `x`, `y`, `time`, `vars`, `vals`) VALUES ( "'.$u->info['id'].'", "'.$u->info['dnow'].'", "'.$u->info['x'].'", "'.$u->info['y'].'", "'.time().'", "use_fontan", "4" )');
$r = 'Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
$vad['drug'] = array(0 => 2588, 1 => 2590, 2 => 2589, 3 => 2145);
mysql_query('DELETE FROM `items_users` WHERE `id` = "'.mysql_real_escape_string(intval($vad['bottle']['id'])).'" LIMIT 1');
$u->addItem(round($vad['drug'][rand(0,3)]), $u->info['id'], '|musor=2|nosale=1|noremont=1', 12, 3);
}
unset($vad);
}
?>

View File

@ -0,0 +1,41 @@
<?
if(isset($s[1]) && $s[1] == '12/s1') {
$vad = array('go' => true);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
if($vad['test1'][0] > 0) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if($vad['go'] == true) {
$vad['items'] = array(1175);
$vad['items'] = $vad['items'][rand(0, count($vad['items'])-1)];
if($vad['items'] != 0 && rand(0, 100) < 80) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`, `time`, `x`, `y`, `uid`, `vars`, `vals`) VALUES ("'.$u->info['dnow'].'", "'.time().'", "'.$obj['x'].'", "'.$obj['y'].'", "'.$u->info['id'].'", "obj_act'.$obj['id'].'", "")');
$vad['i'] = 0;
$vad['items'] = array(array(888, 15), array(4759, 15), array(4523, 8), array(4524, 8), array(4525, 8), array(4526, 8), array(4527, 8), array(4528, 8), array(4529, 8), array(4530, 8), array(4531, 8));
if(rand(0,100) < 50) {
$r = 'Âû íè÷åãî íå íàøëè...';
} else {
while($vad['i'] < count($vad['items'])) {
$vad['j'] = $vad['items'][$vad['i']];
if(isset($vad['j']) && !isset($vad['k'])) {
if(rand(0, 100) < $vad['j'][1]) {
$this->pickitem($obj,$vad['j'][0],0);
$vad['k']++;
}
}
$vad['i']++;
}
if($vad['k'] == 0) {
$vad['itm'] = $vad['items'][rand(0, count(($vad['items']))-1)];
$this->pickitem($obj, $vad['itm'][0], 0);
}
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}
} else {
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_01_4stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Âåðõíÿÿ ×àñòü Êëþ÷à Ïîðòàëà" - 4443
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4443);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,43 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_01_5stage' ) {
/*
Ñóíäóê: Ïîòåðÿííûé ñóíäóê
Êëþ÷ îò Ñîêðîâèùíèöû - 4516
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4516);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'', true) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_02_4stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
Ïðàâàÿ ×àñòü Êëþ÷à Ïîðòàëà - 4444
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4444);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_03_4stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
Ëåâàÿ ×àñòü Êëþ÷à Ïîðòàëà - 4445
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4445);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,66 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_04_4stage' ) {
/*
Ñóíäóê: Ïîòåðÿííûé ñóíäóê, ìîæíî íàéòè êëþ÷ ïîðòàëà
# Òàêòèêè
# `id` IN ('4243', '4244', '4245', '4246', '4247', '4248', '4249', '4250', '4251', '4252', '4253', '4254', '4255', '4256', '4257', '4258', '4259', '4260', '4261', '4262', '4263', '4264', '4265', '4266', '4267')
# Ýëèêè 15%
#'4514', '4515')
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 1'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
if(rand(0,100) > 85){ # Ýëèêè
$vad['items'] = array(4514,4515);
} else{ # Òàêòèêè
$vad['repcent'] = rand(0,100);
if( $vad['repcent'] <= 60 ) { # Òàêòèêè [1,2] 60%
$vad['items'] = array(4243, 4244, 4248, 4249, 4253, 4254, 4258, 4259, 4263, 4264);
} elseif( $vad['repcent'] > 60 AND $vad['repcent'] <= 83 ) {# Òàêòèêè [3] 23%
$vad['items'] = array(4245, 4250, 4255, 4260, 4265);
} elseif( $vad['repcent'] > 83 AND $vad['repcent'] <= 95 ) {# Òàêòèêè [4] 12%
$vad['items'] = array(4246, 4251, 4256, 4261, 4266);
}elseif( $vad['repcent'] > 95 ) { # Òàêòèêè [5] 5%
$vad['items'] = array(4247, 4252, 4257, 4262, 4267);
}
if($vad['repcent'] < 87){ # Ýëèêè
$vad['items'] = array_merge(array(4514,4515), $vad['items']);
}
}
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
//Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',$vad['dn_delete'][$vad['items']]) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,43 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_11_5stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Ïåðâàÿ ÷àñòü ðóíû" - 4517
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
} elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4517);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'', true) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_12_5stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Âòîðàÿ ÷àñòü ðóíû" - 4518
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4518);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( !isset($vad['dn_delete'][$vad['items']]) ) {
$vad['dn_delete'][$vad['items']] = false;
}
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'', true) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,43 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_13_5stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Òðåòüÿ ÷àñòü ðóíû" - 4519
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4519);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',true) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,43 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_14_5stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"×åòâåðòàÿ ÷àñòü ðóíû" - 4520
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4520);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if( $this->pickitem($obj,$vad['items'],$u->info['id'],'',true) ) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,43 @@
<?
if( isset($s[1]) && $s[1] == '12/sunduk_15_5stage' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Ïÿòàÿ ÷àñòü ðóíû" - 4521
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" LIMIT 5'));
$vad['test2'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `vars` = "obj_act'.$obj['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if( $vad['test2'][0] > 0 ) {
$r = 'Âû óæå îáûñêàëè &quot;'.$obj['name'].'&quot;...';
$vad['go'] = false;
}elseif( $vad['test1'][0] > 5 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; ðàíüøå âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
$vad['items'] = array(4521);
$vad['items'] = $vad['items'][rand(0,count($vad['items'])-1)];
if( $vad['items'] != 0 ) {
# Âûáðàñûâàåì ïðåäìåò
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
)');
if($this->pickitem($obj, $vad['items'], $u->info['id'], '', true)) {
$r = 'Âû îáíàðóæèëè ïðåäìåòû...';
}else{
$r = '×òî-òî ïîøëî íå òàê, ïðåäìåòû ðàñòâîðèëèñü...';
}
}else{
$r = 'Âû íå íàøëè íè÷åãî ïîëåçíîãî...';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,26 @@
<?
if( isset($s[1]) && $s[1] == '15/shaiba' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Âåðõíÿÿ ×àñòü Êëþ÷à Ïîðòàëà" - 4443
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$r = 'Øàéáà ó âàñ! Çàáåéòå å¸ â âîðîòà ïðîòèâíèêà!';
//Óäàëÿåì øàéáó
mysql_query('DELETE FROM `dungeon_obj` WHERE `id` = "'.$obj['id'].'" LIMIT 1');
//Äîáàâëÿåì øàéáó â èíâåíòàðü èãðîêà
$vad['itm'] = $u->addItem(4910,$u->info['id']);
if($vad['itm'] > 0) {
mysql_query('UPDATE `items_users` SET `gift` = "Øàéáà" WHERE `id` = "'.$vad['itm'].'" LIMIT 1');
}
$this->sys_chat('<b>'.$u->info['login'].'</b> ïåðåõâàòèë Øàéáó!');
unset($vad);
}
?>

View File

@ -0,0 +1,46 @@
<?
if( isset($s[1]) && $s[1] == '15/vorota' ) {
/*
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
"Âåðõíÿÿ ×àñòü Êëþ÷à Ïîðòàëà" - 4443
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['you'] = mysql_fetch_array(mysql_query('SELECT * FROM `katok_now` WHERE `clone` = "'.$u->info['id'].'" LIMIT 1'));
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = 4910 AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if($u->info['x'] != $obj['x']) {
$r = 'Âû ìîæåòå óäàðèòü òîëüêî ïðÿìî ïåðåä âîðîòàìè, áèòü ñáîêó íåëüçÿ!';
}elseif(($vad['you']['team'] == 2 && $obj['name'] == 'Âîðîòà Ñèíèõ') || ($vad['you']['team'] == 1 && $obj['name'] == 'Âîðîòà Êðàñíûõ')) {
$r = 'Âû õîòèòå çàáèòü øàéáó â ñâîè âîðîòà? :)';
}elseif(isset($vad['itm']['id'])) {
$r = 'Âû áðîñèëè øàéáó â '.$obj['name'].'! ';
//Ïðîâåðÿåì çàáèë èëè íåò, 30% ÷òî çàáèë
if(rand(0,100) < 30) {
$r = ' <B>ÃÎÎÎÎOÎÎÎÎÎÎÎÎÎË!</b> Øàéáà âîçâðàùåíà íà öåíòð ïîëÿ!';
$this->sys_chat('<b>'.$u->info['login'].'</b> çàáèë <font color=red><b>ÃÎË!!!</b></font>! (Øàéáà ïåðåìåùåíà íà öåíòð)');
mysql_query('UPDATE `katok_now` SET `win` = `win` + 1 WHERE `id` = "'.$vad['you']['id'].'" LIMIT 1');
}else{
$r = ' È ïðîìàçàëè! Øàéáà âîçâðàùåíà íà öåíòð ïîëÿ!';
$this->sys_chat('<b>'.$u->info['login'].'</b> ïðîìàçàë! (Øàéáà ïåðåìåùåíà íà öåíòð)');
}
//Óäàëÿåì øàéáó è ñòàâèì íà öåíòð ñíîâà
mysql_query('DELETE FROM `items_users` WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
//
mysql_query('INSERT INTO `dungeon_obj` (
`name`,`dn`,`x`,`y`,`img`,`delete`,`action`,`for_dn`,
`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`
) VALUES (
"Øàéáà","'.$u->info['dnow'].'","5","7","shaiba.png","0","fileact:15/shaiba","0",
"0","120","220","0","0","5","8","12","0","0","0","0","{use:\'takeit\',rt1:69,rl1:-47,rt2:74,rl2:126,rt3:76,rl3:140,rt4:80,rl4:150}"
)');
//
}else{
$r = 'Áåç øàéáû âàì çäåñü íå÷åãî äåëàòü, îòïðàâëÿéòåñü è îòáåðèòå å¸!';
}
unset($vad);
}
?>

View File

@ -0,0 +1,47 @@
<?
if( isset($s[1]) && $s[1] == '3/altar' ) {
/*
ÀËòàðü
* Ìîæíî ïîëó÷èòü îäèí èç 4 eff
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Íè÷åãî íå ïðîèçîøëî...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['i1'] = array(
0 => 422,
1 => 423,
2 => 424,
3 => 425,
4 => 458
);
$vad['i2'] = array(
422 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("422","'.$u->info['id'].'","Áëàãîñëîâåíèå ×åðíîêíèæíèêà","add_m6=5|nofastfinisheff=1|onlyOne=1","60","'.time().'") ' ,
423 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("423","'.$u->info['id'].'","Áëàãîñëîâåíèå Ýïèñêîïà","add_m10=5|nofastfinisheff=1|onlyOne=1","61","'.time().'") ' ,
424 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("424","'.$u->info['id'].'","Áëàãîñëîâåíèå Îôèöåðà Ãëóáèí","add_speedhp=-50|nofastfinisheff=1|onlyOne=1","62","'.time().'") ' ,
425 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("425","'.$u->info['id'].'","Áëàãîñëîâåíèå Ñòðàæåé","add_m5=100|nofastfinisheff=1|onlyOne=1","63","'.time().'") ',
458 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("458","'.$u->info['id'].'","Áëàãîñëîâåíèå Ïîâåëèòåëÿ","add_m7=5|nofastfinisheff=1|onlyOne=1","76","'.time().'") ' );
$vad['i1'] = $vad['i1'][rand(0,count($vad['i1'])-1)];
if( isset($vad['i2'][$vad['i1']]) ) {
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = "'.$vad['i1'].'" AND `delete` = 0');
mysql_query($vad['i2'][$vad['i1']]);
$r = 'Íà âàñ íàëîæåíî çàêëÿòèå!';
}else{
$r = 'Íà âàñ íàëîæåíî çàêëÿòèå! (ýôôåêò íå íàéäåí, ïîæàëóéñÿ Àäìèíàì)';
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,28 @@
<?
if( isset($s[1]) && $s[1] == '3/altar_clean' ) {
/*
ÀËòàðü Î÷èùåíèÿ
* Óíè÷òîæàåò âñå íåãàòèâíûå åôôåêòû ïîëó÷åííûå â àëòàðÿõ
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Íè÷åãî íå ïðîèçîøëî...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND (`id_eff` = "422" OR `id_eff` = "423" OR `id_eff` = "424" OR `id_eff` = "425" ) ');
$r = 'Âû î÷èñòèëèñü...';
}
unset($vad);
}
?>

View File

@ -0,0 +1,33 @@
<?
if( isset($s[1]) && $s[1] == '3/chest_trap' ) {
/*
Ñóíäóê: Êðîâàòü
* Ìîæíî ïîëó÷èòü îäèí èç äâóõ ðåñóðñîâ
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî îáûñêàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['items'] = array();
$vad['sp'] = mysql_query('SELECT `id` FROM `items_main` WHERE `type` >= 1 AND `type` <= 22 AND `id` IN (SELECT `item_id` FROM `items_shop` WHERE `sid` = 1 AND `kolvo` > 0) AND `id` IN (SELECT `items_id` FROM `items_main_data` WHERE `data` NOT LIKE "%tr_lvl=1%" AND `data` NOT LIKE "%tr_lvl=2%" AND `data` NOT LIKE "%tr_lvl=3%")');
while( $vad['pl'] = mysql_fetch_array($vad['sp']) ) {
$vad['items'][] = $vad['pl']['id'];
}
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],$u->info['id'],'',$vad['dn_delete'][$vad['items']['id']]);
}
unset($vad);
}
?>

View File

@ -0,0 +1,31 @@
<?
if( isset($s[1]) && $s[1] == '3/fontan' ) {
/*
Àëòàðü
* Òåëåïîðòèðóåò íà íåîáõîäèìóþ êëåòêó õ -3 , ó 7
* Äëÿ ïðîõîäà òðåáóåòñÿ 1 êàìåíü òèïà 881 èëè 878
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Íè÷åãî íå ïðîèçîøëî...';
$vad['go'] = false;
}
//Ïðîâåðÿåì êàìíè
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['items'] = array(2413,2414,2415,2416);
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="'.time().'",`delete`="'.time().'" WHERE `id`="'.$vad['sp']['id'].'" LIMIT 1');
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],$u->info['id'],'',$vad['dn_delete'][$vad['items']['id']]);
unset($vad);
}
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == '3/fontan_vos' ) {
/*
Ôîíòàí
* Ìîæíî ïîëó÷èòü 1 èç 5 eff
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Íè÷åãî íå ïðîèçîøëî...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$rn = array(
1 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("433","'.$u->info['id'].'","Ãðÿçíàÿ êðîâü x2","add_speedhp=-160|nofastfinisheff=1","64","'.time().'") ' ,
2 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("434","'.$u->info['id'].'","Ãðÿçíàÿ êðîâü x3","add_speedhp=-240|nofastfinisheff=1","64","'.time().'") ' ,
3 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("435","'.$u->info['id'].'","Ãðÿçíàÿ êðîâü x4","add_speedhp=-320|nofastfinisheff=1","64","'.time().'") ' ,
4 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("436","'.$u->info['id'].'","Ãðÿçíàÿ êðîâü x5","add_speedhp=-400|nofastfinisheff=1","64","'.time().'") ',
5 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("437","'.$u->info['id'].'","Âîññòàíîâëåíèå ÕÏ","add_speedhp=80|nofastfinisheff=1","70","'.time().'") ');
$rn = $rn[rand(1,5)];
MySQL_query($rn);
$r = 'Íà âàñ íàëîæåíî çàêëÿòèå!';
}
unset($vad);
}
?>

View File

@ -0,0 +1,32 @@
<?
if( isset($s[1]) && $s[1] == '3/fontan_win' ) {
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => false
);
//Ïðîâåðÿåì êàìíè
$vad['sp'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE (`item_id` = "881" OR `item_id` = "878") AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if( isset($vad['sp']['id']) ) {
// Óäàëåíà ïðîâåðêà íà ãðóïïèðîâêó ïðåäìåòîâ 13.10.2015
$vad['pl'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$vad['sp']['item_id'].'" LIMIT 1'));
$vad['go'] = true;
}
if( $vad['go'] == true ) {
$vad['items'] = array(2413,2414,2415,2416);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="'.time().'",`delete`="'.time().'" WHERE `id`="'.$vad['sp']['id'].'" LIMIT 1');
if($upd){
$r = 'Âû ðàñòâîðèëè &quot;'.$vad['pl']['name'].'&quot;<br>';
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],$u->info['id'],'',$vad['dn_delete'][$vad['items']['id']]);
//echo '<script>location.href="main.php"</script>';
} else {
$r = '×òî-òî ïîøëî íå òàê, ïîïðîáóéòå ïîçæå.';
}
}elseif( !isset($vad['sp']['id']) ) {
$r = 'Òðåáóåòñÿ îäèí èç äðàãîöåííûõ êàìíåé';
}
unset($vad);
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == '3/musor' ) {
/*
Êó÷à ìóñîðà
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Íè÷åãî íå ïðîèçîøëî...<br>';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$rn = array(
1 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("427","'.$u->info['id'].'","Ãðÿçíàÿ êðîâü","add_speedhp=-40|nofastfinisheff=1","64","'.time().'") ' ,
2 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("428","'.$u->info['id'].'","Ñêðûòàÿ ñëàáîñòü","add_s1=-2|add_s2=-2|add_s3=-2|nofastfinisheff=1","65","'.time().'") ' ,
3 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("429","'.$u->info['id'].'","Òðÿñóùèåñÿ Ðóêè","add_s1=-6|nofastfinisheff=1","66","'.time().'") ' ,
4 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("430","'.$u->info['id'].'","Æåëóäî÷íûé Ãðèïï","add_s2=-6|nofastfinisheff=1","67","'.time().'") ',
5 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("431","'.$u->info['id'].'","Ãóäÿùàÿ Ãîëîâà","add_s3=-6|nofastfinisheff=1","68","'.time().'") ',
6 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("432","'.$u->info['id'].'","Ðàíèìîñòü","add_za=-10|nofastfinisheff=1","69","'.time().'") ');
$rn = $rn[rand(1,6)];
mysql_query($rn);
$r = 'Íà âàñ íàëîæåíî çàêëÿòèå!<br>';
}
unset($vad);
}
?>

View File

@ -0,0 +1,518 @@
<?php
echo "
<script language='JavaScript'>
var elem = document.getElementById('se-pre-con');
elem.parentNode.removeChild(elem);
</script>
";
if(!defined('GAME')) { die(); }
if($_GET['go_away']) { header('location: main.php'); die(); }
if($u->info['battle'] != 0) { header('location: main.php'); die(); }
if(isset($_POST['clip76_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4677" LIMIT 1'));
if($u->count_items(950, $u->info['id'], 1) > 0) {
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4677, $u->info['id'], $data, $obj);
$u->deleteItemID(950, $u->info['id'], 1);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè ×åðíàÿ ìåòêà';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ýññåíöèÿ ïðàâåäíîãî ãíåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Øåïîò ãîð&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êàìåíü çàòàåííîãî ñîëíöà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ãîëîñà ïðåäêîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòîå Ñåðåáðî&quot;";
}
} elseif(isset($_POST['clip80_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4758" LIMIT 1'));
if($u->count_items(950, $u->info['id'], 1) > 0) {
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(1035, $u->info['id'], 1) > 0) {
$data = '|frompisher=12|onlyOne=1|oneType=84';
$u->addItem(4758, $u->info['id'], $data, $obj);
$u->deleteItemID(950, $u->info['id'], 1);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$u->deleteItemID(1035, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Êëàóñòðîôîáèÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñóùíîñòü ðåñóðñà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ýññåíöèÿ ïðàâåäíîãî ãíåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Øåïîò ãîð&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êàìåíü çàòàåííîãî ñîëíöà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ãîëîñà ïðåäêîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòîå Ñåðåáðî&quot;";
}
} elseif(isset($_POST['clip81_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4679" LIMIT 1'));
if($u->count_items(906, $u->info['id'], 1) > 0) {
if($u->count_items(907, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4679, $u->info['id'], $data, $obj);
$u->deleteItemID(906, $u->info['id'], 1);
$u->deleteItemID(907, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óìèðàþùåé Çåìëè';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ãîëîñà ïðåäêîâ&quot;";
}
} elseif(isset($_POST['clip82_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4680" LIMIT 1'));
if($u->count_items(877, $u->info['id'], 1) > 0) {
if($u->count_items(890, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(888, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4680, $u->info['id'], $data, $obj);
$u->deleteItemID(877, $u->info['id'], 1);
$u->deleteItemID(890, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(888, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Ñòèõàþùåãî Âåòðà';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Øåïîò ãîð&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ïëîä çìåèíîãî äåðåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê àñòðàëà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòàëü&quot;";
}
} elseif(isset($_POST['clip89_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4681" LIMIT 1'));
if($u->count_items(900, $u->info['id'], 1) > 0) {
if($u->count_items(882, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(904, $u->info['id'], 1) > 0) {
if($u->count_items(908, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4681, $u->info['id'], $data, $obj);
$u->deleteItemID(900, $u->info['id'], 1);
$u->deleteItemID(882, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(904, $u->info['id'], 1);
$u->deleteItemID(908, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Çàìåðçàþùåé Âîäû';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êàìåíü çàòàåííîãî ñîëíöà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë âðåìåí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ãëóáèííûé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êîæà çìåèíîãî äåðåâà&quot;";
}
} elseif(isset($_POST['clip90_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4682" LIMIT 1'));
if($u->count_items(950, $u->info['id'], 1) > 0) {
if($u->count_items(889, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4682, $u->info['id'], $data, $obj);
$u->deleteItemID(950, $u->info['id'], 1);
$u->deleteItemID(889, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(906, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óãàñàþùåãî Îãíÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé òîïàç&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ïëîä çìåèíîãî äåðåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êîæà Îáùåãî Âðàãà&quot;";
}
} elseif(isset($_POST['clip91_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4683" LIMIT 1'));
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(881, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4683, $u->info['id'], $data, $obj);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(881, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Ëåãêîãî Îòóïëåíèÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòèõèàëèÿ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé ðóáèí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} elseif(isset($_POST['clip92_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4684" LIMIT 1'));
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(881, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4684, $u->info['id'], $data, $obj);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(881, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óÿçâèìîñòè';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòèõèàëèÿ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé ðóáèí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} elseif(isset($_POST['clip93_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4685" LIMIT 1'));
if($u->count_items(901, $u->info['id'], 1) > 0) {
if($u->count_items(889, $u->info['id'], 1) > 0) {
if($u->count_items(890, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4685, $u->info['id'], $data, $obj);
$u->deleteItemID(901, $u->info['id'], 1);
$u->deleteItemID(889, $u->info['id'], 1);
$u->deleteItemID(890, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1]';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê àñòðàëà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë òûñÿ÷è îòâåòîâ&quot;";
}
} elseif(isset($_POST['clip94_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4686" LIMIT 1'));
if($u->count_items(4685, $u->info['id'], 1) > 0) {
if($u->count_items(4688, $u->info['id'], 1) > 0) {
if($u->count_items(4689, $u->info['id'], 1) > 0) {
if($u->count_items(4690, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4686, $u->info['id'], $data, $obj);
$u->deleteItemID(4685, $u->info['id'], 1);
$u->deleteItemID(4688, $u->info['id'], 1);
$u->deleteItemID(4689, $u->info['id'], 1);
$u->deleteItemID(4690, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [2]';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Óñêîðèòåëü äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñìàçêà äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òîïëèâî äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1]&quot;";
}
}
function getColor($id, $num) {
global $u;
$color = 'green';
$ch = mysql_query("SELECT `id` FROM `items_users` WHERE `uid` = ".$u->info['id']." AND `delete` = 0 AND `item_id` = ".(int)$id." AND inShop = 0 AND inOdet = 0");
if(mysql_num_rows($ch) < $num) { $color = 'red'; }
return $color;
}
function getImg($id, $num) {
global $u;
$img = 'good.png';
$ch = mysql_query("SELECT `id` FROM `items_users` WHERE `uid` = ".$u->info['id']." AND `delete` = 0 AND `item_id` = ".(int)$id." AND inShop = 0 AND inOdet = 0");
if(mysql_num_rows($ch) < $num) { $img = 'i/clear.gif'; }
return $img;
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://img.new-combats.com/css/main.css" />
<meta content="text/html; charset=windows-1251" http-equiv="Content-type" />
<meta http-equiv="Cache-Control" content="no-cache, max-age=0, must-revalidate, no-store" />
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="Expires" content="0" />
<style>
.row { cursor:pointer; }
#answer1 {color: #003388; font-weight: bold; text-decoration: none; }
</style>
<script type="text/javascript">
function show(ele) {
var srcElement = document.getElementById(ele);
if(srcElement != null) {
if(srcElement.style.display == "block") {
srcElement.style.display= 'none';
} else {
srcElement.style.display='block';
}
}
}
function OpenDiv(vr) {
var dg01 = document.getElementById(vr);
if(dg01.style.display == '') {
dg01.style.display = 'none'
} else {
dg01.style.display = ''
}
}
</script>
<script type="text/javascript" src="https://img.new-combats.com/js/inf.0.104.js?<?=mt_rand(1436,1293286936)/10000000000?>" charset="utf-8"></script>
</head>
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor="#d7d7d7" onLoad="">
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width=100%>
<TD style="width: 40%; vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2 style="width: 100%; ">
<tr><TD align=center><h4>Ìàñòåðñêàÿ Çàáûòûõ Ìàñòåðîâ</h4></TD></tr>
<TR>
</TABLE>
</TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
</TR>
</TABLE>
</html>
<? if($err != '') { echo "<center><b style='color: Red;'>".$err."</b></center>"; } ?>
<table width="100%">
<tr>
<td width="255" valign="top"><div align="left"><? $st = array(); $st2 = array(); $st = $u->getStats($u->info['id'],1); $st2 = $st[1]; $st = $st[0]; $rgd = $u->regen($u->info['id'],$st,1); $us = $u->getInfoPers($u->info['id'],1,$st); if($us!=false){ echo $us[0]; }else{ echo 'information is lost.'; } ?></div>
<div align="left"></div><div align="left"></div>
<div style="float: left">
<td valign="top"><br />
<div id="step1" style="margin-left: 20px;"></div>
<br /><br />
<table>
<tr>
<td>
<div id="answer1">
<a href="#" onclick="OpenDiv('clip76')">×åðíàÿ ìåòêà <img src="https://img.new-combats.com/i/items/spell_curse.gif"></a><br />
<div id="clip76" style="display: none; color: black;">
<p style="color:<?=getColor(950, 1)?>"> Ëó÷èñòîå Ñåðåáðî <img src="https://img.new-combats.com/<?=getImg(950, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(907, 1)?>"> Ñãóñòîê ýôèðà <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Êðèñòàëë ãîëîñà ïðåäêîâ <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Êàìåíü çàòàåííîãî ñîëíöà <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Øåïîò ãîð <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Ýññåíöèÿ ïðàâåäíîãî ãíåâà <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip76_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip80')">Êëàóñòðîôîáèÿ <img src="https://img.new-combats.com/i/items/d_blat24.gif"></a><br />
<div id="clip80" style="display: none; color: black;">
<p style="color:<?=getColor(950, 1)?>"> Êîæà îáùåãî âðàãà <img src="https://img.new-combats.com/<?=getImg(950, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Ëó÷èñòûé òîïàç <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip80_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip81')">Ïðîêëÿòüå Óìèðàþùåé Çåìëè <img src="https://img.new-combats.com/i/items/m_ptp_1.gif"></a><br />
<div id="clip81" style="display: none; color: black;">
<p style="color:<?=getColor(906, 1)?>"> Êðèñòàëë ãîëîñà ïðåäêîâ <img src="https://img.new-combats.com/<?=getImg(906, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip81_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip82')">Ïðîêëÿòüå Ñòèõàþùåãî Âåòðà <img src="https://img.new-combats.com/i/items/m_ptp_2.gif"></a><br />
<div id="clip82" style="display: none; color: black;">
<p style="color:<?=getColor(877, 1)?>"> Ñòàëü <img src="https://img.new-combats.com/<?=getImg(877, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(890, 1)?>"> Ñãóñòîê àñòðàëà <img src="https://img.new-combats.com/<?=getImg(890, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(888, 1)?>"> Øåïîò ãîð <img src="https://img.new-combats.com/<?=getImg(888, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip82_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip89')">Ïðîêëÿòüå Çàìåðçàþùåé Âîäû <img src="https://img.new-combats.com/i/items/m_ptp_3.gif"></a><br />
<div id="clip89" style="display: none; color: black;">
<p style="color:<?=getColor(900, 1)?>"> Êîðà çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(900, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(882, 1)?>"> Ãëóáèííûé êàìåíü <img src="https://img.new-combats.com/<?=getImg(882, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(904, 1)?>"> Êðèñòàëë âðåìåí <img src="https://img.new-combats.com/<?=getImg(904, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(908, 1)?>"> Êàìåíü çàòàåííîãî ñîëíöà <img src="https://img.new-combats.com/<?=getImg(908, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip89_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip90')">Ïðîêëÿòüå Óãàñàþùåãî Îãíÿ <img src="https://img.new-combats.com/i/items/m_ptp_4.gif"></a><br />
<div id="clip90" style="display: none; color: black;">
<p style="color:<?=getColor(950, 1)?>"> Êîæà Îáùåãî Âðàãà <img src="https://img.new-combats.com/<?=getImg(950, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(889, 1)?>"> Ñãóñòîê ýôèðà <img src="https://img.new-combats.com/<?=getImg(889, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Ëó÷èñòûé òîïàç <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip90_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip91')">Ïðîêëÿòüå Ëåãêîãî Îòóïëåíèÿ <img src="https://img.new-combats.com/i/items/m_ptp_5.gif"></a><br />
<div id="clip91" style="display: none; color: black;">
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(881, 1)?>"> Ëó÷èñòûé ðóáèí <img src="https://img.new-combats.com/<?=getImg(881, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip91_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip92')">Ïðîêëÿòüå Óÿçâèìîñòè <img src="https://img.new-combats.com/i/items/m_ptp_6.gif"></a><br />
<div id="clip92" style="display: none; color: black;">
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(881, 1)?>"> Ëó÷èñòûé ðóáèí <img src="https://img.new-combats.com/<?=getImg(881, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip92_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip93')">Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1] <img src="https://img.new-combats.com/i/items/enhp_6_revamp10.gif"></a><br />
<div id="clip93" style="display: none; color: black;">
<p style="color:<?=getColor(901, 1)?>"> Êðèñòàëë òûñÿ÷è îòâåòîâ <img src="https://img.new-combats.com/<?=getImg(901, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(889, 1)?>"> Ñãóñòîê ýôèðà <img src="https://img.new-combats.com/<?=getImg(889, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(890, 1)?>"> Ñãóñòîê àñòðàëà <img src="https://img.new-combats.com/<?=getImg(890, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip93_" value="Ñîáðàòü" />
</form>
</div>
<a href="#" onclick="OpenDiv('clip94')">Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [2] <img src="https://img.new-combats.com/i/items/enhp_6_revamp10_2.gif"></a><br />
<div id="clip94" style="display: none; color: black;">
<p style="color:<?=getColor(4685, 1)?>"> Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1] <img src="https://img.new-combats.com/<?=getImg(4685, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4688, 1)?>"> Òîïëèâî äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4688, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4689, 1)?>"> Ñìàçêà äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4689, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4690, 1)?>"> Óñêîðèòåëü äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4690, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip94_" value="Ñîáðàòü" />
</form>
</div>
<br>
<a href="?go_away=1">Óéòè. (Âûõîä)</a>
</div>
</td>
</tr>
</table>
</td>
</div>
<div style="float:left">
<td width="120">
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<TABLE border=0 cellSpacing=1 cellPadding=0 width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
</TBODY></TABLE></TD>
<TD><TABLE border=0 cellSpacing=0 cellPadding=0 width="100%"><TBODY>
</TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<TABLE width=100% align="right">
<tr><td>
<br />
<br />
<br />
</TD></tr>
</TABLE>
</body>
</html>

View File

@ -0,0 +1,504 @@
<?php
if(!defined('GAME')) { die(); }
if($_GET['go_away']) { header('location: main.php'); die(); }
if($u->info['battle'] != 0) { header('location: main.php'); die(); }
if(isset($_POST['clip76_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4677" LIMIT 1'));
if($u->count_items(877, $u->info['id'], 1) > 0) {
if($u->count_items(882, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(881, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4677, $u->info['id'], $data, $obj);
$u->deleteItemID(877, $u->info['id'], 1);
$u->deleteItemID(882, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(881, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè ×åðíàÿ Ìåòêà';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé òîïàç&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé ðóáèí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ïëîä çìåèíîãî äåðåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ãëóáèííûé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòàëü&quot;";
}
} elseif(isset($_POST['clip80_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4758" LIMIT 1'));
if($u->count_items(950, $u->info['id'], 1) > 0) {
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4758, $u->info['id'], $data, $obj);
$u->deleteItemID(950, $u->info['id'], 1);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Êëàóñòðîôîáèÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ýññåíöèÿ ïðàâåäíîãî ãíåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Øåïîò ãîð&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êàìåíü çàòàåííîãî ñîëíöà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ãîëîñà ïðåäêîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòîå Ñåðåáðî&quot;";
}
} elseif(isset($_POST['clip81_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4679" LIMIT 1'));
if($u->count_items(906, $u->info['id'], 1) > 0) {
if($u->count_items(907, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4679, $u->info['id'], $data, $obj);
$u->deleteItemID(906, $u->info['id'], 1);
$u->deleteItemID(907, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óìèðàþùåé Çåìëè';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ãîëîñà ïðåäêîâ&quot;";
}
} elseif(isset($_POST['clip82_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4680" LIMIT 1'));
if($u->count_items(877, $u->info['id'], 1) > 0) {
if($u->count_items(890, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(888, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4680, $u->info['id'], $data, $obj);
$u->deleteItemID(877, $u->info['id'], 1);
$u->deleteItemID(890, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(888, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Ñòèõàþùåãî Âåòðà';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Øåïîò ãîð&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ïëîä çìåèíîãî äåðåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê àñòðàëà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòàëü&quot;";
}
} elseif(isset($_POST['clip89_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4681" LIMIT 1'));
if($u->count_items(900, $u->info['id'], 1) > 0) {
if($u->count_items(882, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(904, $u->info['id'], 1) > 0) {
if($u->count_items(908, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4681, $u->info['id'], $data, $obj);
$u->deleteItemID(900, $u->info['id'], 1);
$u->deleteItemID(882, $u->info['id'], 1);
$u->deleteItemID(903, $u->info['id'], 1);
$u->deleteItemID(904, $u->info['id'], 1);
$u->deleteItemID(908, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Çàìåðçàþùåé Âîäû';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êàìåíü çàòàåííîãî ñîëíöà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë âðåìåí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ãëóáèííûé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êîæà çìåèíîãî äåðåâà&quot;";
}
} elseif(isset($_POST['clip90_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4682" LIMIT 1'));
if($u->count_items(950, $u->info['id'], 1) > 0) {
if($u->count_items(889, $u->info['id'], 1) > 0) {
if($u->count_items(902, $u->info['id'], 1) > 0) {
if($u->count_items(903, $u->info['id'], 1) > 0) {
if($u->count_items(878, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4682, $u->info['id'], $data, $obj);
$u->deleteItemID(950, $u->info['id'], 1);
$u->deleteItemID(889, $u->info['id'], 1);
$u->deleteItemID(902, $u->info['id'], 1);
$u->deleteItemID(906, $u->info['id'], 1);
$u->deleteItemID(878, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óãàñàþùåãî Îãíÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé òîïàç&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òûñÿ÷åëåòíèé êàìåíü&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ïëîä çìåèíîãî äåðåâà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êîæà Îáùåãî Âðàãà&quot;";
}
} elseif(isset($_POST['clip91_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4683" LIMIT 1'));
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(881, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4683, $u->info['id'], $data, $obj);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(881, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Ëåãêîãî Îòóïëåíèÿ';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòèõèàëèÿ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé ðóáèí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} elseif(isset($_POST['clip92_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4684" LIMIT 1'));
if($u->count_items(907, $u->info['id'], 1) > 0) {
if($u->count_items(881, $u->info['id'], 1) > 0) {
if($u->count_items(905, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4684, $u->info['id'], $data, $obj);
$u->deleteItemID(907, $u->info['id'], 1);
$u->deleteItemID(881, $u->info['id'], 1);
$u->deleteItemID(905, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Ïðîêëÿòüå Óÿçâèìîñòè';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñòèõèàëèÿ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ëó÷èñòûé ðóáèí&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë ñòàáèëüíîñòè&quot;";
}
} elseif(isset($_POST['clip93_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4685" LIMIT 1'));
if($u->count_items(901, $u->info['id'], 1) > 0) {
if($u->count_items(889, $u->info['id'], 1) > 0) {
if($u->count_items(890, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4685, $u->info['id'], $data, $obj);
$u->deleteItemID(901, $u->info['id'], 1);
$u->deleteItemID(889, $u->info['id'], 1);
$u->deleteItemID(890, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1]';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê àñòðàëà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñãóñòîê ýôèðà&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Êðèñòàëë òûñÿ÷è îòâåòîâ&quot;";
}
} elseif(isset($_POST['clip94_'])) {
$obj = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "4686" LIMIT 1'));
if($u->count_items(4685, $u->info['id'], 1) > 0) {
if($u->count_items(4688, $u->info['id'], 1) > 0) {
if($u->count_items(4689, $u->info['id'], 1) > 0) {
if($u->count_items(4690, $u->info['id'], 1) > 0) {
$data = '|frompisher=12';
$u->addItem(4686, $u->info['id'], $data, $obj);
$u->deleteItemID(4685, $u->info['id'], 1);
$u->deleteItemID(4688, $u->info['id'], 1);
$u->deleteItemID(4689, $u->info['id'], 1);
$u->deleteItemID(4690, $u->info['id'], 1);
$err = 'Âû ïîëó÷èëè Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [2]';
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Óñêîðèòåëü äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Ñìàçêà äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Òîïëèâî äëÿ Ãîëåìîâ&quot;";
}
} else {
$err = "Íå õâàòàåò ðåñóðñîâ &quot;Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1]&quot;";
}
}
function getColor($id, $num) {
global $u;
$color = 'green';
$ch = mysql_query("SELECT `id` FROM `items_users` WHERE `uid` = ".$u->info['id']." AND `delete` = 0 AND `item_id` = ".(int)$id." AND inShop = 0 AND inOdet = 0");
if(mysql_num_rows($ch) < $num) { $color = 'red'; }
return $color;
}
function getImg($id, $num) {
global $u;
$img = 'good.png';
$ch = mysql_query("SELECT `id` FROM `items_users` WHERE `uid` = ".$u->info['id']." AND `delete` = 0 AND `item_id` = ".(int)$id." AND inShop = 0 AND inOdet = 0");
if(mysql_num_rows($ch) < $num) { $img = 'i/clear.gif'; }
return $img;
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://img.new-combats.com/css/main.css" />
<meta content="text/html; charset=windows-1251" http-equiv="Content-type" />
<meta http-equiv="Cache-Control" content="no-cache, max-age=0, must-revalidate, no-store" />
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="Expires" content="0" />
<style>
.row { cursor:pointer; }
#answer1 {color: #003388; font-weight: bold; text-decoration: none; }
</style>
<script type="text/javascript">
function show(ele) {
var srcElement = document.getElementById(ele);
if(srcElement != null) {
if(srcElement.style.display == "block") {
srcElement.style.display= 'none';
} else {
srcElement.style.display='block';
}
}
}
function OpenDiv(vr) {
var dg01 = document.getElementById(vr);
if(dg01.style.display == '') {
dg01.style.display = 'none'
} else {
dg01.style.display = ''
}
}
</script>
<script type="text/javascript" src="https://img.new-combats.com/js/inf.0.104.js?<?=mt_rand(1436,1293286936)/10000000000?>" charset="utf-8"></script>
</head>
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor="#d7d7d7" onLoad="">
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width=100%>
<TD style="width: 40%; vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2 style="width: 100%; ">
<tr><TD align=center><h4>Ìàñòåðñêàÿ Çàáûòûõ Ìàñòåðîâ</h4></TD></tr>
<TR>
</TABLE>
</TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
</TR>
</TABLE>
</html>
<? if($err != '') { echo "<center><b style='color: Red;'>".$err."</b></center>"; } ?>
<table width="100%">
<tr>
<td width="255" valign="top"><div align="left"><? $st = array(); $st2 = array(); $st = $u->getStats($u->info['id'],1); $st2 = $st[1]; $st = $st[0]; $rgd = $u->regen($u->info['id'],$st,1); $us = $u->getInfoPers($u->info['id'],1,$st); if($us!=false){ echo $us[0]; }else{ echo 'information is lost.'; } ?></div>
<div align="left"></div><div align="left"></div>
<div style="float: left">
<td valign="top"><br />
<div id="step1" style="margin-left: 20px;"></div>
<br /><br />
<table>
<tr>
<td>
<div id="answer1">
• <a href="#" onclick="OpenDiv('clip76')">×åðíàÿ ìåòêà <img src="https://img.new-combats.com/i/items/spell_curse.gif"></a><br />
<div id="clip76" style="display: none; color: black;">
<p style="color:<?=getColor(877, 1)?>"> Còàëü <img src="https://img.new-combats.com/<?=getImg(877, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(882, 1)?>"> Ãëóáèííûé êàìåíü <img src="https://img.new-combats.com/<?=getImg(882, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(881, 1)?>"> Ëó÷èñòûé ðóáèí <img src="https://img.new-combats.com/<?=getImg(881, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Ëó÷èñòûé òîïàç <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip76_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip80')">Êëàóñòðîôîáèÿ <img src="https://img.new-combats.com/i/items/d_blat24.gif"></a><br />
<div id="clip80" style="display: none; color: black;">
<p style="color:<?=getColor(950, 1)?>"> Êîæà îáùåãî âðàãà <img src="https://img.new-combats.com/<?=getImg(950, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Ëó÷èñòûé òîïàç <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip80_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip81')">Ïðîêëÿòüå Óìèðàþùåé Çåìëè <img src="https://img.new-combats.com/i/items/m_ptp_1.gif"></a><br />
<div id="clip81" style="display: none; color: black;">
<p style="color:<?=getColor(906, 1)?>"> Êðèñòàëë ãîëîñà ïðåäêîâ <img src="https://img.new-combats.com/<?=getImg(906, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip81_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip82')">Ïðîêëÿòüå Ñòèõàþùåãî Âåòðà <img src="https://img.new-combats.com/i/items/m_ptp_2.gif"></a><br />
<div id="clip82" style="display: none; color: black;">
<p style="color:<?=getColor(877, 1)?>"> Ñòàëü <img src="https://img.new-combats.com/<?=getImg(877, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(890, 1)?>"> Ñãóñòîê àñòðàëà <img src="https://img.new-combats.com/<?=getImg(890, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(888, 1)?>"> Øåïîò ãîð <img src="https://img.new-combats.com/<?=getImg(888, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip82_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip89')">Ïðîêëÿòüå Çàìåðçàþùåé Âîäû <img src="https://img.new-combats.com/i/items/m_ptp_3.gif"></a><br />
<div id="clip89" style="display: none; color: black;">
<p style="color:<?=getColor(900, 1)?>"> Êîðà çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(900, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(882, 1)?>"> Ãëóáèííûé êàìåíü <img src="https://img.new-combats.com/<?=getImg(882, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(904, 1)?>"> Êðèñòàëë âðåìåí <img src="https://img.new-combats.com/<?=getImg(904, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(908, 1)?>"> Êàìåíü çàòàåííîãî ñîëíöà <img src="https://img.new-combats.com/<?=getImg(908, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip89_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip90')">Ïðîêëÿòüå Óãàñàþùåãî Îãíÿ <img src="https://img.new-combats.com/i/items/m_ptp_4.gif"></a><br />
<div id="clip90" style="display: none; color: black;">
<p style="color:<?=getColor(950, 1)?>"> Êîæà Îáùåãî Âðàãà <img src="https://img.new-combats.com/<?=getImg(950, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(889, 1)?>"> Ñãóñòîê ýôèðà <img src="https://img.new-combats.com/<?=getImg(889, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(902, 1)?>"> Ïëîä çìåèíîãî äåðåâà <img src="https://img.new-combats.com/<?=getImg(902, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(903, 1)?>"> Òûñÿ÷åëåòíèé êàìåíü <img src="https://img.new-combats.com/<?=getImg(903, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(878, 1)?>"> Ëó÷èñòûé òîïàç <img src="https://img.new-combats.com/<?=getImg(878, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip90_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip91')">Ïðîêëÿòüå Ëåãêîãî Îòóïëåíèÿ <img src="https://img.new-combats.com/i/items/m_ptp_5.gif"></a><br />
<div id="clip91" style="display: none; color: black;">
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(881, 1)?>"> Ëó÷èñòûé ðóáèí <img src="https://img.new-combats.com/<?=getImg(881, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip91_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip92')">Ïðîêëÿòüå Óÿçâèìîñòè <img src="https://img.new-combats.com/i/items/m_ptp_6.gif"></a><br />
<div id="clip92" style="display: none; color: black;">
<p style="color:<?=getColor(907, 1)?>"> Êðèñòàëë ñòàáèëüíîñòè <img src="https://img.new-combats.com/<?=getImg(907, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(881, 1)?>"> Ëó÷èñòûé ðóáèí <img src="https://img.new-combats.com/<?=getImg(881, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(905, 1)?>"> Ñòèõèàëèÿ <img src="https://img.new-combats.com/<?=getImg(905, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip92_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip93')">Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1] <img src="https://img.new-combats.com/i/items/enhp_6_revamp10.gif"></a><br />
<div id="clip93" style="display: none; color: black;">
<p style="color:<?=getColor(901, 1)?>"> Êðèñòàëë òûñÿ÷è îòâåòîâ <img src="https://img.new-combats.com/<?=getImg(901, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(889, 1)?>"> Ñãóñòîê ýôèðà <img src="https://img.new-combats.com/<?=getImg(889, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(890, 1)?>"> Ñãóñòîê àñòðàëà <img src="https://img.new-combats.com/<?=getImg(890, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip93_" value="Ñîáðàòü" />
</form>
</div>
• <a href="#" onclick="OpenDiv('clip94')">Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [2] <img src="https://img.new-combats.com/i/items/enhp_6_revamp10_2.gif"></a><br />
<div id="clip94" style="display: none; color: black;">
<p style="color:<?=getColor(4685, 1)?>"> Çà÷àðîâàòü êîëüöî: Âûòÿãèâàíèå äóøè [1] <img src="https://img.new-combats.com/<?=getImg(4685, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4688, 1)?>"> Òîïëèâî äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4688, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4689, 1)?>"> Ñìàçêà äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4689, 1)?>" width="13" height="13" /></p>
<p style="color:<?=getColor(4690, 1)?>"> Óñêîðèòåëü äëÿ Ãîëåìîâ <img src="https://img.new-combats.com/<?=getImg(4690, 1)?>" width="13" height="13" /></p>
<form action="" method="POST">
<input type="submit" name="clip94_" value="Ñîáðàòü" />
</form>
</div>
<br>
• <a href="?go_away=1">Óéòè. (Âûõîä)</a>
</div>
</td>
</tr>
</table>
</td>
</div>
<div style="float:left">
<td width="120">
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<TABLE border=0 cellSpacing=1 cellPadding=0 width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
</TBODY></TABLE></TD>
<TD><TABLE border=0 cellSpacing=0 cellPadding=0 width="100%"><TBODY>
</TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<TABLE width=100% align="right">
<tr><td>
<br />
<br />
<br />
</TD></tr>
</TABLE>
</body>
</html>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == 'vbig1' ) {
/*
Ñóíäóê: Áëåêëûé ïîäçåìíèê (4559)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî ñîðâàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(0,100) > 25 ) {
$r = 'îáûñêàâ &quot;'.$obj['name'].'&quot; âû íè÷åãî íå îáíàðóæèëè...';
}else{
$vad['items'] = array(4559);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == 'vbig2' ) {
/*
Ñóíäóê: ×åðåïè÷íûé ïîäçåìíèê (4560)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî ñîðâàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(0,100) > 25 ) {
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû íè÷åãî íå îáíàðóæèëè...';
}else{
$vad['items'] = array(4560);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
}
unset($vad);
}
?>

View File

@ -0,0 +1,35 @@
<?
if( isset($s[1]) && $s[1] == 'vbig3' ) {
/*
Ñóíäóê: Êðîâàâûé ïîäçåìíèê (4561)
*/
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
$vad = array(
'go' => true
);
$vad['test1'] = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1'));
if( $vad['test1'][0] > 0 ) {
$r = 'Êòî-òî ñîðâàë &quot;'.$obj['name'].'&quot; äî âàñ...';
$vad['go'] = false;
}
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
if( rand(0,100) > 25 ) {
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû íè÷åãî íå îáíàðóæèëè...';
}else{
$vad['items'] = array(4561);
$vad['items'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($vad['items'][rand(0,count($vad['items'])-1)]).'" LIMIT 1'));
if( !isset($vad['dn_delete'][$vad['items']['id']]) ) {
$vad['dn_delete'][$vad['items']['id']] = false;
}
$r = 'Îáûñêàâ &quot;'.$obj['name'].'&quot; âû îáíàðóæèëè &quot;'.$vad['items']['name'].'&quot;';
$this->pickitem($obj,$vad['items']['id'],0,'',$vad['dn_delete'][$vad['items']['id']]);
}
}
unset($vad);
}
?>

View File

1122
_incl_data/class/inf.php Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More