closes #17, великое переименование классов для автозагрузчика, актуализация кода

This commit is contained in:
Ivor Barhansky 2022-08-25 14:23:36 +03:00
parent 6cd7b13db0
commit 42714daeda
203 changed files with 38783 additions and 39766 deletions

81
AI.php
View File

@ -12,8 +12,8 @@ if(isset($_GET['m1'])) {
setlocale(LC_CTYPE, "ru_RU.CP1251");
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include_once '_incl_data/__config.php';
include_once '_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)) {
@ -26,13 +26,15 @@ if(isset($_GET['m1'])) {
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
$u = User::start();
$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 = 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'])) {
@ -117,14 +119,9 @@ if( isset($_GET['test'])) {
$i = 3;
function yrn($sila) {
$r = 0;
$level = $_GET['test'];
$r = 2 + $level + $sila - round($sila / 5);
return $r;
function yrn($sila)
{
return 2 + $_GET['test'] + $sila - round($sila / 5);
}
@ -136,7 +133,7 @@ if( isset($_GET['test'])) {
echo ' style="background-color:grey;color:#fff;"';
}
echo '>&nbsp;';
echo $i.' = '.yrn($i).'';
echo $i . ' = ' . yrn($i);
echo '</div>';
$i++;
}
@ -144,52 +141,42 @@ if( isset($_GET['test'])) {
die();
}
function getIP() {
if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP'];
return $_SERVER['REMOTE_ADDR'];
function getIP()
{
return isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : $_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'])) {
if (!isset($_GET['robot']) && getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP(
) != '31.131.116.166' && !isset($_GET['test'])) {
die(getIP() . '<br>' . $_SERVER['SERVER_ADDR']);
}
}
define('GAME',true);
const 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 = [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']
);
}
}
$count = array(
0,
0,
0,
0,
0,
0
$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'
);
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();
$btltest = [];
while ($pl = mysql_fetch_array($sp)) {
@ -211,12 +198,12 @@ while($pl = mysql_fetch_array($sp)) {
mysql_query('UPDATE `users` SET `online` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
botLogic::start( $pl['id'] );
BotLogic::start($pl['id']);
} else {
if ($pl['zv'] > 0) {
botLogic::start( $pl['id'] );
BotLogic::start($pl['id']);
}
if ($pl['timereg'] == 0) {
@ -234,7 +221,7 @@ while($pl = mysql_fetch_array($sp)) {
echo '*';
}
echo '+';
echo '['.$pl['login'].'] -> Äåéñòâèå: '.$pl['ipreg'].' , îæèäàåì: '.($pl['timeMain']-time()).' ñåê., çàÿâêà: '.$pl['zv'].', ïîåäèíîê: '.$pl['battle'].'';
echo '[' . $pl['login'] . '] -> Äåéñòâèå: ' . $pl['ipreg'] . ' , îæèäàåì: ' . ($pl['timeMain'] - time(
)) . ' ñåê., çàÿâêà: ' . $pl['zv'] . ', ïîåäèíîê: ' . $pl['battle'] . '';
echo '<hr>';
}
?>

View File

@ -87,9 +87,10 @@ spl_autoload_register(function ($className) {
__DIR__ . '/class/' . str_replace('\\', '/', $className . '.php'),
__DIR__ . '/class/' . $className . '.php'
];
foreach ($fileName as $file)
foreach ($fileName as $file) {
if (file_exists($file)) {
require_once $file;
break;
}
}
});

View File

@ -1,14 +1,13 @@
<?
<?php
if (!defined('GAME')) {
die();
}
ignore_user_abort(true);
ini_set('memory_limit', '512M');
class battleClass
class Battle
{
public function __construct() {
ignore_user_abort(true);
}
public function maginfoattack($u1, $u2, $type)
{
/*
@ -2729,24 +2728,7 @@ class battleClass
$bms[$i] = $this->info['money3'];
$this->users[$i]['lose'] += 1;
//Äîáàâëÿåì ýôôåêò îñëàáëåíèÿ
/*if($this->users[$i]['level']>=4 && $this->info['dungeon'] == 0 && $this->stats[$i]['silver'] < 2){
$noOsl = 0;
$nn = 0;
while($nn<count($this->stats[$i]['effects'])){
if($this->stats[$i]['effects'][$nn]['id_eff']==5){
$noOsl = 1;
}
$nn++;
}
if($noOsl==0){
if($this->users[$i]['id'] != 3874647) {
$magic->oslablenie($this->users[$i]['id']);
}
}
}*/
//
mysql_query('UPDATE `users` SET `swin` = 0, `slose` = `slose` + 1 WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1');
//
$act01 = 2;
@ -5288,10 +5270,10 @@ class battleClass
}
//Âûäåëåíèå èç ëîã òåêñòà
public function addlt($a, $id, $s, $rnd)
public function addlt($a, $id, $s, $rnd = null)
{
global $log_text;
if ($rnd == null) {
if ($rnd === null) {
$rnd = rand(0, (count($log_text[$s][$id]) - 1));
}
return '{' . $a . 'x' . $id . 'x' . $rnd . '}';
@ -11801,6 +11783,3 @@ class battleClass
//Êîíåö ñïàñåíèÿ
}
$btl = new battleClass;
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,399 @@
<?php
class BotPriemLogic
{
private static $p = [];
public 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;
}
private static function usePriem($id, $on = null)
{
$go_txt = '&usepriem=' . $id;
if ($on != '') {
$on = str_replace(' ', '%20', $on);
$go_txt .= '&useon=' . $on;
}
BotLogic::inuser_go_btl(BotLogic::$bot, $go_txt);
}
//Ñòàâêà íà îïåðåæåíèå
private static function priem220($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Ðàçãàäàòü òàêòèêó
private static function priem217($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Îáðå÷åííîñòü
private static function priem204($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Âûæèòü
private static function priem232($i)
{
if (self::hp() <= 30 && rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Æàæäà êðîâè
private static function priem188($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Øîê óäàð
private static function priem235($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Õëåáíóòü êðîâè
private static function priem240($i)
{
if (self::hp() <= 70) {
self::usePriem($i);
}
}
//Ñèëîâîå ïîëå
private static function priem175($i)
{
self::usePriem($i);
}
//Ïðèêðûòüñÿ
private static function priem1($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Âëîìèòü
private static function priem2($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Ñîáðàòü çóáû
private static function priem3($i)
{
if (self::hp() <= 70 && rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Âîëÿ ê ïîáåäå
private static function priem6($i)
{
if (self::hp() <= 40 && rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Òàíåö âåòðà
private static function priem8($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Òàíåö ëåçâèé
private static function priem48($i)
{
if (rand(0, 100) < 70) {
self::usePriem($i);
}
}
//Äèêàÿ óäà÷à
private static function priem9($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Ñëåïàÿ óäà÷à
private static function priem47($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Ïðåäâèäåíüå
private static function priem10($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Âòîðîå äûõàíèå
private static function priem49($i)
{
if (rand(0, 100) < 80 && self::hp() <= 60) {
self::usePriem($i);
}
}
//Ðûâîê
private static function priem223($i)
{
if (self::hp() <= 50 && rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Óäà÷íûé óäàð
private static function priem11($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
//Ñòîéêîñòü
private static function priem13($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//ßðîñòü
private static function priem14($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Ñèëüíûé óäàð
private static function priem4($i)
{
if (rand(0, 100) < 60) {
self::usePriem($i);
}
}
//Óòåðåòü ïîò
private static function priem5($i)
{
if (self::hp() <= 95) {
self::usePriem($i);
}
}
//Àãðåññèâíàÿ çàùèòà
private static function priem211($i)
{
if (rand(0, 100) < 80) {
self::usePriem($i);
}
}
//Ïîëíàÿ çàùèòà
private static function priem45($i)
{
if (rand(0, 100) < 50) {
self::usePriem($i);
}
}
//Àêòèâíàÿ çàùèòà
private static function priem7($i)
{
if (rand(0, 100) < 30) {
self::usePriem($i);
}
}
private static function hp()
{
return round((BotLogic::$st['hpNow'] / BotLogic::$st['hpAll'] * 100), 2);
}
//Òåñò íà âîçìîæíîñòü èñïîëüçîâàíèÿ
private 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']) && 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;
}
}

View File

@ -0,0 +1,63 @@
<?php
/** Ïîëó÷àåì íà âõîä ñòðîêó, à íà âûõîä ðåçóëüòàò ìàòåìàòè÷åñêîé îïåðàöèè â ñòðîêå. */
class CalculateFromString
{
const PATTERN = '/(?:\-?\d+(?:\.?\d+)?[\+\-\*\/])+\-?\d+(?:\.?\d+)?/';
const PARENTHESIS_DEPTH = 10;
public function calculate($input){
if(strpos($input, '+') != null || strpos($input, '-') != null || strpos($input, '/') != null || strpos($input, '*') != null){
// Remove white spaces and invalid math chars
$input = str_replace(',', '.', $input);
$input = str_replace(' ', '', $input);
$input = preg_replace('[^0-9\.\+\-\*\/\(\)]', '', $input);
// Calculate each of the parenthesis from the top
$i = 0;
while(strpos($input, '(') || strpos($input, ')')){
$input = preg_replace_callback('/\(([^\(\)]+)\)/', 'self::callback', $input);
$i++;
if($i > self::PARENTHESIS_DEPTH){
break;
}
}
// Calculate the result
if(preg_match(self::PATTERN, $input, $match)){
return $this->compute($match[0]);
}
// To handle the special case of expressions surrounded by global parenthesis like "(1+1)"
if(is_numeric($input)){
return $input;
}
return 0;
}
return $input;
}
private function compute($input){
$compute = create_function('', 'return '.$input.';');
return 0 + $compute();
}
private function callback($input){
if(is_numeric($input[1])){
return $input[1];
}
elseif(preg_match(self::PATTERN, $input[1], $match)){
return $this->compute($match[0]);
}
return 0;
}
}
$Cal = new CalculateFromString();
$xyz='(100 * 25000) + (250 * 25000) + ((500/100) * 25000)';
$result = $Cal->calculate($xyz);
echo $result;

85
_incl_data/class/Chat.php Normal file

File diff suppressed because one or more lines are too long

1398
_incl_data/class/Dialog.php Normal file

File diff suppressed because it is too large Load Diff

1813
_incl_data/class/Dungeon.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,609 @@
<?php
class DungeonEditor
{
public $bs, $info, $see, $error, $gs = 1, $map = [0 => [] //êàðòà
], $id_dng, $cord = ['x' => 0], $sg = [1 => [1 => 1, 2 => 2, 3 => 3, 4 => 4], 2 => [1 => 2, 2 => 3, 3 => 4, 4 => 1], 3 => [1 => 3, 2 => 4, 3 => 1, 4 => 2], 4 => [1 => 4, 2 => 1, 3 => 2, 4 => 3]];
public function start()
{
global $u, $c, $code, $id;
$this->info = ['id2' => $id, 'id' => 0, 'name' => 'Ðåäàêòèðîâàíèå Ïåùåðû', 'room' => 0, 'time_start' => time(), 'time_start' => 0, 'uid' => 0, 'type' => 0, 'bsid' => 0];
$this->id_dng = $this->info['id2'];
$this->gs = $u->info['psevdo_s'];
if ($this->gs < 1 || $this->gs > 4) {
$this->gs = 1;
}
if ($this->info['bsid'] > 0) {
$this->bs = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `city` = "' . $u->info['city'] . '" AND `id` = "' . $this->info['bsid'] . '" AND `time_start` = "' . $this->info['time_start'] . '" LIMIT 1'));
//Åñëè ÁÑ çàêîí÷åíà
if (isset($this->bs['id']) && $this->bs['users'] - $this->bs['users_finish'] < 2) {
$u->bsfinish($this->bs, false, null);
}
}
/* ãåíåðèðóåì âèä ïåðñîíàæà (òîëüêî êàðòà)
$this->gs = 1; //ñìîòðèì ïðÿìî
2; //ñìîòðèì ëåâî
3; //ñìîòðèì âíèç
4; //ñìîòðèì ïðàâî
( ( ( `y` >= '.$u->info['psevdo_y'].' && `y` <= '.($u->info['psevdo_y']+4).' ) && ( `x` >= '.($u->info['psevdo_x']-1).' && `x` <= '.($u->info['psevdo_x']+1).' ) ) || ( (`x` = '.($u->info['psevdo_x']+2).' || `x` = '.($u->info['psevdo_x']-2).') && ( `y` = '.($u->info['psevdo_y']+3).' || `y` = '.($u->info['psevdo_y']+4).' ) ) )
*/
$whr = [1 => ' ((`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`y` >= ' . $u->info['psevdo_y'] . ' && `y` <= ' . ($u->info['psevdo_y'] + 4) . ')) ', //ïðÿìî
3 => ' ((`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`y` <= ' . $u->info['psevdo_y'] . ' && `y` >= ' . ($u->info['psevdo_y'] - 4) . ')) ', //âíèç
2 => ' ((`x` <= ' . $u->info['psevdo_x'] . ' && `x` >= ' . ($u->info['psevdo_x'] - 4) . ') && (`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `y` >= ' . ($u->info['psevdo_y'] - 2) . ')) ', //ëåâî
4 => ' ((`x` >= ' . $u->info['psevdo_x'] . ' && `x` <= ' . ($u->info['psevdo_x'] + 4) . ') && (`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `y` >= ' . ($u->info['psevdo_y'] - 2) . ')) ' //ïðàâî
];
$i = 1;
$sp = mysql_query('SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $this->id_dng . '" AND ' . $whr[$this->gs] . ' ORDER BY `y` ASC , `x` ASC LIMIT 25');
while ($pl = mysql_fetch_array($sp)) {
$this->map[0][$pl['y'] . '_' . $pl['x']] = $pl;
$i++;
}
$this->map['good'] = $i; //öåëûõ êëåòîê
$this->map[1] = $this->genMatix();
$this->lookDungeon();
}
public function usersDng()
{
global $u, $c;
$r = '';
/* îòîáðàæåíèå áîòîâ (áåñïîëåçíî â äàííîì ðåäàêòîðå) */
}
public function atack($id)
{
global $u, $c, $code;
/* íàïàäåíèå, êàêîå íàïàäåíèå ìîæåò áûòü â ðåäàêòîðå? :) Íà ñàìîãî ñåáÿ, ñî ñòóëîì? :) */
}
public function takeinv($id)
{
global $u, $c, $code;
/* Ýòî ðåäàêòîð, à íå ìàéíêðàôò, çäåñü íè÷åãî ñîáèðàòü íå íóæíî :) */
}
public function takeit($id)
{
global $u, $c, $code, $magic;
/*  ðåäàêòîðå íè÷åãî íå ïàäàåò ;) */
}
public function addItem($i)
{
//äîáàâëÿåì ïðåäìåò â ïåùåðó (âîçìîæíî âûïàë èç áîòà èëè èç ñóíäóêà)
/* À ÷òî åùå? Ïóëüò ê óïðàâëåíèþ Çåìëåé?! */
}
public function itemsMap()
{
global $u, $c, $code;
/* Äà íè÷åãî çäåñü íå ïàäàåò! Ãîâîðþ æå! */
}
public function testLike($x1, $y1, $x2, $y2)
{
//èç $x1,$y1 â $x2,$y2
//äîñòóïíà-ëè ýòà êëåòêà äëÿ äåéñòâèé
$r = 0;
$c1 = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `x` = "' . $x1 . '" AND `y` = "' . $y1 . '" AND `id_dng` = "' . $this->info['id2'] . '" LIMIT 1'));
$c2 = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `x` = "' . $x2 . '" AND `y` = "' . $y2 . '" AND `id_dng` = "' . $this->info['id2'] . '" LIMIT 1'));
if (isset($c1['id']) && isset($c2['id'])) {
if ($x1 == $x2 && $y1 == $y2) {
$r = 1;
} elseif (
$x1 == $x2 - 1 && $c1['go_1'] == 1 || //ïðàâî
$x1 == $x2 + 1 && $c1['go_2'] == 1 || //ëåâî
$y1 == $y2 - 1 && $c1['go_3'] == 1 || //âåðõ
$y1 == $y2 + 1 && $c1['go_4'] == 1 //íèç
)
{
$r = 1;
}
}
return $r;
}
public function genObjects()
{
global $u, $c, $code;
////i:{id,name,mapPoint,action,img,type},
//'count':1,0:{0:1234,1:'Ñóíäóê',2:5,3:'',4:'test.gif',5:0,6:position,7:width,8:heigh,9:left,10:top},
//psition 0 - ïî öåíòðó , 1- ñâåðõó, 2- ñëåâà, 3- ñíèçó, 4- ñïðàâà
$r = '';
$whr = [1 => ' (((`u`.`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`u`.`y` >= ' . ($u->info['psevdo_y'] + 1) . ' && `u`.`y` <= ' . ($u->info['psevdo_y'] + 4) . ')) OR (`u`.`y` = ' . $u->info['psevdo_y'] . ' && `u`.`x` = ' . $u->info['psevdo_x'] . ')) ', //ïðÿìî
3 => ' (((`u`.`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`u`.`y` <= ' . ($u->info['psevdo_y'] - 1) . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 4) . ')) OR (`u`.`y` = ' . $u->info['psevdo_y'] . ' && `u`.`x` = ' . $u->info['psevdo_x'] . ')) ', //âíèç
2 => ' (((`u`.`x` <= ' . ($u->info['psevdo_x'] - 1) . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 4) . ') && (`u`.`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 2) . '))OR (`u`.`y` = ' . $u->info['psevdo_y'] . ' && `u`.`x` = ' . $u->info['psevdo_x'] . ')) ', //ëåâî
4 => ' (((`u`.`x` >= ' . ($u->info['psevdo_x'] + 1) . ' && `u`.`x` <= ' . ($u->info['psevdo_x'] + 4) . ') && (`u`.`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 2) . ')) OR (`u`.`y` = ' . $u->info['psevdo_y'] . ' && `u`.`x` = ' . $u->info['psevdo_x'] . ')) ' //ïðàâî
];
$sp = mysql_query('SELECT `u`.* FROM `dungeon_obj` AS `u` WHERE `u`.`dn` = "0" AND `u`.`for_dn` = "' . $this->id_dng . '" AND ((`u`.`s` = "0" OR `u`.`s` = "' . $this->gs . '") OR `u`.`s2` = "' . $this->gs . '") AND ' . $whr[$this->gs] . ' LIMIT 76');
# die('SELECT `u`.* FROM `dungeon_obj` AS `u` WHERE `u`.`dn` = "0" AND `u`.`for_dn` = "'.$this->id_dng.'" AND ((`u`.`s` = "0" OR `u`.`s` = "'.$this->gs.'") OR `u`.`s2` = "'.$this->gs.'") AND '.$whr[$this->gs].' LIMIT 76');
$i = 0;
$pos = [];
while ($pl = mysql_fetch_array($sp)) {
if ($pl['fix_x_y'] == 0 || ($pl['fix_x_y'] == 1 && $pl['x'] == $u->info['psevdo_x']) || ($pl['fix_x_y'] == 2 && $pl['y'] == $u->info['psevdo_y']) || ($pl['fix_x_y'] == 3 && $pl['x'] == $u->info['psevdo_x'] && $pl['y'] == $u->info['psevdo_y'])) {
if (($pl['os1'] == 0 && $pl['os2'] == 0 && $pl['os3'] == 0 && $pl['os4'] == 0) || ($this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os1'] || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os2'] || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os3'] || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os4'])) {
$i++;
if (!isset($pos[$this->cord[$pl['y'] . '_' . $pl['x']]])) {
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]] = 0;
}
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]]++;
$r .= ',' . ($i - 1) . ':{\'x\':' . $pl['x'] . ',\'y\':' . $pl['y'] . ',0:' . $pl['id'] . ',1:\'' . $pl['name'] . '\',2:' . (0 + $this->cord[$pl['y'] . '_' . $pl['x']]) . ',3:\'action\',4:\'' . $pl['img'] . '\',5:' . $pl['type'] . ',6:0,7:' . $pl['w'] . ',8:' . $pl['h'] . ',9:' . $pl['left'] . ',10:' . $pl['top'] . ',11:' . $pl['date'] . ',12:' . $pl['type'] . ',13:' . $pl['type2'] . ',14:' . $pl['s'] . ',15:' . $pl['s2'] . ',16:' . $pl['os1'] . ',17:' . $pl['os2'] . ',18:' . $pl['os3'] . ',19:' . $pl['os4'] . ',20:' . $pl['fix_x_y'] . '}';
} elseif ($this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os1'] - 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os2'] - 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os3'] - 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os4'] - 1) {
$dt2 = explode(',', ltrim(rtrim($pl['date'], '\}'), '\{'));
$da = [];
$is = 0;
while ($is < count($dt2)) {
$dt2[$is] = explode(':', $dt2[$is]);
$da[$dt2[$is][0]] = $dt2[$is][1];
$is++;
}
#if(isset($da['rl2']))$da['rl2'] = -round((int)$da['rl2'] * 0.70); // Ñëåâà
if (isset($da['rl2'])) $da['rl2'] = round((int)$da['rl2'] - 230); // Ñëåâà
if (isset($da['rl3'])) $da['rl3'] = round((int)$da['rl3'] + 160);
if (isset($da['rl4'])) $da['rl4'] = round((int)$da['rl4'] - 120);
$pl['date'] = str_replace('"', '', json_encode($da));
$i++;
if (!isset($pos[$this->cord[$pl['y'] . '_' . $pl['x']]])) {
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]] = 0;
}
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]]++;
$r .= ',' . ($i - 1) . ':{\'x\':' . $pl['x'] . ',\'y\':' . $pl['y'] . ',0:' . $pl['id'] . ',1:\'' . $pl['name'] . '\',2:' . (0 + $this->cord[$pl['y'] . '_' . $pl['x']]) . ',3:\'action\',4:\'' . $pl['img'] . '\',5:' . $pl['type'] . ',6:0,7:' . $pl['w'] . ',8:' . $pl['h'] . ',9:' . $pl['left'] . ',10:' . $pl['top'] . ',11:' . $pl['date'] . ',12:' . $pl['type'] . ',13:' . $pl['type2'] . ',14:' . $pl['s'] . ',15:' . $pl['s2'] . ',16:' . $pl['os1'] . ',17:' . $pl['os2'] . ',18:' . $pl['os3'] . ',19:' . $pl['os4'] . ',20:' . $pl['fix_x_y'] . '}';
} elseif ($this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os1'] + 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os2'] + 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os3'] + 1 || $this->cord[$pl['y'] . '_' . $pl['x']] == $pl['os4'] + 1) {
$dt2 = explode(',', ltrim(rtrim($pl['date'], '\}'), '\{'));
$da = [];
$is = 0;
while ($is < count($dt2)) {
$dt2[$is] = explode(':', $dt2[$is]);
$da[$dt2[$is][0]] = $dt2[$is][1];
$is++;
}
#if(isset($da['rl2']))$da['rl2'] = 355-round((int)$da['rl2'] * 0.30); // Ñïðàâà
if (isset($da['rl2'])) $da['rl2'] = round((int)$da['rl2'] + 230); // Ñïðàâà
if (isset($da['rl3'])) $da['rl3'] = round((int)$da['rl3'] - 160);
if (isset($da['rl4'])) $da['rl4'] = round((int)$da['rl4'] + 120);
$pl['date'] = str_replace('"', '', json_encode($da));
$i++;
if (!isset($pos[$this->cord[$pl['y'] . '_' . $pl['x']]])) {
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]] = 0;
}
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]]++;
$r .= ',' . ($i - 1) . ':{\'x\':' . $pl['x'] . ',\'y\':' . $pl['y'] . ',0:' . $pl['id'] . ',1:\'' . $pl['name'] . '\',2:' . (0 + $this->cord[$pl['y'] . '_' . $pl['x']]) . ',3:\'action\',4:\'' . $pl['img'] . '\',5:' . $pl['type'] . ',6:0,7:' . $pl['w'] . ',8:' . $pl['h'] . ',9:' . $pl['left'] . ',10:' . $pl['top'] . ',11:' . $pl['date'] . ',12:' . $pl['type'] . ',13:' . $pl['type2'] . ',14:' . $pl['s'] . ',15:' . $pl['s2'] . ',16:' . $pl['os1'] . ',17:' . $pl['os2'] . ',18:' . $pl['os3'] . ',19:' . $pl['os4'] . ',20:' . $pl['fix_x_y'] . '}';
}
}
}
return 'count:' . $i . $r;
}
public function genUsers()
{
global $u, $c, $code;
////i:{id,login,mapPoint,sex,obraz,type,users_p},
//'count':1,0:{0:1015,1:'Test1',2:5,3:0,4:'1',5:'user',6:1},
$r = '';
$whr = [1 => ' ((`u`.`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`u`.`y` >= ' . $u->info['psevdo_y'] . ' && `u`.`y` <= ' . ($u->info['psevdo_y'] + 4) . ')) ', //ïðÿìî
3 => ' ((`u`.`x` <= ' . ($u->info['psevdo_x'] + 2) . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 2) . ') && (`u`.`y` <= ' . $u->info['psevdo_y'] . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 4) . ')) ', //âíèç
2 => ' ((`u`.`x` <= ' . $u->info['psevdo_x'] . ' && `u`.`x` >= ' . ($u->info['psevdo_x'] - 4) . ') && (`u`.`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 2) . ')) ', //ëåâî
4 => ' ((`u`.`x` >= ' . $u->info['psevdo_x'] . ' && `u`.`x` <= ' . ($u->info['psevdo_x'] + 4) . ') && (`u`.`y` <= ' . ($u->info['psevdo_y'] + 2) . ' && `u`.`y` >= ' . ($u->info['psevdo_y'] - 2) . ')) ' //ïðàâî
];
$i = 0;
//îòîáðàæàåì áîòîâ
$sp = mysql_query('SELECT `u`.*,`st`.* FROM `dungeon_bots` AS `u` LEFT JOIN `test_bot` AS `st` ON (`u`.`id_bot` = `st`.`id`) WHERE ' . $whr[$this->gs] . ' AND `dn` = "0" AND `for_dn` = "' . $this->id_dng . '" AND `u`.`delete` = "0" LIMIT 50');
while ($pl = mysql_fetch_array($sp)) {
$i++;
if (!isset($pos[$this->cord[$pl['y'] . '_' . $pl['x']]])) {
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]] = 0;
}
$pos[$this->cord[$pl['y'] . '_' . $pl['x']]]++;
$dlg = 0;
if ($pl['dialog'] > 0) {
$dlg = $pl['dialog'];
}
$r .= ',' . ($i - 1) . ':{0:' . $pl['id2'] . ',1:\'' . $pl['login'] . '\',2:' . (0 + $this->cord[$pl['y'] . '_' . $pl['x']]) . ',3:' . $pl['sex'] . ',4:\'' . str_replace('.gif', '', $pl['obraz']) . '\',5:\'bot\',6:' . $pos[$this->cord[$pl['y'] . '_' . $pl['x']]] . ',7:' . $dlg . '}';
}
return 'count:' . $i . $r;
}
public function botAtack($bot, $uid, $bs)
{
global $u, $c, $code;
$user = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `users` WHERE `id` = "' . $uid['id'] . '" LIMIT 1'));
if ($user['battle'] > 0) {
$btli = mysql_fetch_array(mysql_query('SELECT `id` FROM `battle` WHERE `id` = "' . $user['battle'] . '" AND `team_win` = "-1" LIMIT 1'));
}
if (!isset($btli['id'])) {
//Ñîçäàåì ïîåäèíîê
$btl_id = 0;
$expB = 0;
$btl = ['players' => '', 'timeout' => 180, 'type' => 0, 'invis' => 0, 'noinc' => 0, 'travmChance' => 0, 'typeBattle' => 0, 'addExp' => $expB, 'money' => 0];
mysql_query('INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
"' . $this->info['id2'] . '",
"' . $this->info['id'] . '",
"' . $bot['x'] . '",
"' . $bot['y'] . '",
"' . $u->info['city'] . '",
"' . time() . '",
"' . $btl['players'] . '",
"' . $btl['timeout'] . '",
"' . $btl['type'] . '",
"' . $btl['invis'] . '",
"' . $btl['noinc'] . '",
"' . $btl['travmChance'] . '",
"' . $btl['typeBattle'] . '",
"' . $btl['addExp'] . '",
"' . $btl['money'] . '")');
$btl_id = mysql_insert_id();
if ($btl_id > 0) {
//Äîáàâëÿåì áîòîâ
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "0" AND `dn` = "' . $this->info['id'] . '" AND `x` = "' . $bot['x'] . '" AND `y` = "' . $bot['y'] . '" LIMIT 50');
$j = 0;
$logins_bot = [];
while ($pl = mysql_fetch_array($sp)) {
mysql_query('UPDATE `dungeon_bots` SET `inBattle` = "' . $btl_id . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
$jui = 1;
while ($jui <= $pl['colvo']) {
$k = $u->addNewbot($pl['id_bot'], null, null, $logins_bot);
$logins_bot = $k['logins_bot'];
if ($k) {
$upd = mysql_query('UPDATE `users` SET `battle` = "' . $btl_id . '" WHERE `id` = "' . $k['id'] . '" LIMIT 1');
if ($upd) {
$upd = mysql_query('UPDATE `stats` SET `x`="' . $bot['x'] . '",`y`="' . $bot['y'] . '",`team` = "1" WHERE `id` = "' . $k['id'] . '" LIMIT 1');
if ($upd) {
$j++;
}
}
}
$jui++;
}
}
unset($logins_bot);
if ($j > 0) {
mysql_query('UPDATE `users` SET `battle` = "' . $btl_id . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `team` = "2" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
}
}
}
}
public function testGo($id)
{
global $u, $c, $code;
$go = 0;
if ($id == 1) {
//âïåðåä
$go = $this->sg[$this->gs][1];
} elseif ($id == 2) {
//íàçàä
$go = $this->sg[$this->gs][3];
} elseif ($id == 3) {
//íà ïðàâî
$go = $this->sg[$this->gs][4];
} elseif ($id == 4) {
//íà ëåâî
$go = $this->sg[$this->gs][2];
}
$thp = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `x` = "' . $u->info['psevdo_x'] . '" AND `y` = "' . $u->info['psevdo_y'] . '" AND `id_dng` = "' . $this->info['id2'] . '" LIMIT 1'));
$ng = [4 => 1, 2 => 2, 1 => 3, 3 => 4];
if (isset($thp['id']) && $thp['go_' . $ng[$go]] == 0) {
$go = 0;
}
$tgo = [0 => 0, 1 => 0];
if ($go == 1) {
$tgo[1] += 1;
} elseif ($go == 2) {
$tgo[0] -= 1;
} elseif ($go == 3) {
$tgo[1] -= 1;
} elseif ($go == 4) {
$tgo[0] += 1;
}
$tbot = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_bots` WHERE `x` = "' . ($u->info['psevdo_x'] + (int)$tgo[0]) . '" AND `y` = "' . ($u->info['psevdo_y'] + (int)$tgo[1]) . '" AND `dn` = "' . $this->info['id'] . '" AND `for_dn` = "0" AND `delete` = "0" LIMIT 1'));
if (isset($tbot['id2']) && $u->info['admin'] == 0) {
$go = 0;
}
$tmap = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `x` = "' . $u->info['psevdo_x'] . '" AND `y` = "' . $u->info['psevdo_y'] . '" AND `id_dng` = "' . $this->info['id2'] . '" LIMIT 1'));
//íàëè÷èå ïðåäìåòà
if ($tmap['tr_items'] != '') {
$ti = explode(',', $tmap['tr_items']);
$i = 0;
$trnit = '';
while ($i < count($ti)) {
$ti2 = explode('=', $ti[$i]);
if ($ti2[0] > 0 && $ti2[1] > 0) {
$num_rows = mysql_num_rows(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `inShop` = "0" AND `item_id` = "' . ((int)$ti2[0]) . '" LIMIT ' . ((int)$ti2[1]) . ''));
if ($num_rows < (int)$ti2[1]) {
$tgo = $ti2[2];
if ($tgo != '0000' && $tgo[$ng[$go] - 1] == 1) {
$go = 0;
$trm = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . ((int)$ti2[0]) . '" LIMIT 1'));
$trnit .= '&quot;' . $trm['name'] . '&quot;, ';
}
}
}
$i++;
}
if ($trnit != '') {
$trnit = rtrim($trnit, ', ');
$this->error = 'Ó âàñ íåò ïîäõîäÿùåãî ïðåäìåòà. Òðåáóåòñÿ ' . $trnit;
}
}
$tmGo = $u->info['timeGo'] - time(); //ñêîëüêî ñåêóíä îñòàëîñü
if ($tmGo > 0) {
$go = 0;
$this->error = 'Íå òàê áûñòðî...';
}
if ($u->aves['now'] >= $u->aves['max']) {
$go = 0;
$this->error = 'Âû íå ìîæåòå ïåðåìåùàòüñÿ, ðþêçàê ïåðåïîëíåí ...';
}
if ($go > 0) {
if ($go == 1) {
$u->info['psevdo_y'] += 1;
} elseif ($go == 2) {
$u->info['psevdo_x'] -= 1;
} elseif ($go == 3) {
$u->info['psevdo_y'] -= 1;
} elseif ($go == 4) {
$u->info['psevdo_x'] += 1;
}
$u->info['timeGo'] = time() + $tmap['timeGO'];
$u->info['timeGoL'] = time();
mysql_query('UPDATE `stats` SET `x` = "' . $u->info['psevdo_x'] . '",`y` = "' . $u->info['psevdo_y'] . '",`timeGo` = "' . $u->info['timeGo'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
}
public function testGone($id)
{
global $u, $c, $code;
$go = 0;
if ($id == 1) {
//âïåðåä
$go = $this->sg[$this->gs][1];
} elseif ($id == 2) {
//íàçàä
$go = $this->sg[$this->gs][3];
} elseif ($id == 3) {
//íà ïðàâî
$go = $this->sg[$this->gs][4];
} elseif ($id == 4) {
//íà ëåâî
$go = $this->sg[$this->gs][2];
}
$thp = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `x` = "' . $u->info['psevdo_x'] . '" AND `y` = "' . $u->info['psevdo_y'] . '" AND `id_dng` = "' . $this->info['id2'] . '" LIMIT 1'));
$ng = [4 => 1, 2 => 2, 1 => 3, 3 => 4];
if (isset($thp['id']) && $thp['go_' . $ng[$go]] == 0) {
$go = 0;
}
$tgo = [0 => 0, 1 => 0];
if ($go == 1) {
$tgo[1] += 1;
} elseif ($go == 2) {
$tgo[0] -= 1;
} elseif ($go == 3) {
$tgo[1] -= 1;
} elseif ($go == 4) {
$tgo[0] += 1;
}
$tbot = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_bots` WHERE `x` = "' . ($u->info['psevdo_x'] + (int)$tgo[0]) . '" AND `y` = "' . ($u->info['psevdo_y'] + (int)$tgo[1]) . '" AND `dn` = "' . $this->info['id'] . '" AND `for_dn` = "0" AND `delete` = "0" LIMIT 1'));
if (isset($tbot['id2']) && $u->info['admin'] == 0) {
$go = 0;
}
return $go;
}
public function testSt($id, $s)
{
$r = 0;
//çàìåíÿåì îòîáðàæåíèå ñòåí â çàâèñèìîñòè îò óãëà îáçîðà
$s = $this->sg[$this->gs][$s];
if (isset($this->map[1][$id]['id'])) {
$r = $this->map[1][$id]['st'][($s - 1)];
}
return $r;
}
public function lookDungeon()
{
global $u, $c, $code, $pd;
/* Ãåíåðèðóåì èçîáðàæåíèå êàðòû */
/* LEVEL 1 */
if ($this->testSt(2, 4) > 0 || $this->testSt(3, 2) > 0) {
$pd[28] = 1;
}
if ($this->testSt(1, 4) > 0 || $this->testSt(2, 2) > 0) {
$pd[27] = 1;
}
if ($this->testSt(2, 1) > 0 || $this->testSt(5, 3) > 0) {
$pd[26] = 1;
}
if ($this->testSt(3, 1) > 0 || $this->testSt(6, 3) > 0) {
$pd[25] = 1;
}
if ($this->testSt(1, 1) > 0 || $this->testSt(4, 3) > 0) {
$pd[24] = 1;
}
/* LEVEL 2 */
if ($this->testSt(5, 4) > 0 || $this->testSt(6, 2) > 0) {
$pd[23] = 1;
}
if ($this->testSt(4, 4) > 0 || $this->testSt(5, 2) > 0) {
$pd[22] = 1;
}
if ($this->testSt(5, 1) > 0 || $this->testSt(8, 3) > 0) {
$pd[21] = 1;
}
if ($this->testSt(6, 1) > 0 || $this->testSt(7, 3) > 0) {
$pd[20] = 1;
}
if ($this->testSt(4, 1) > 0 || $this->testSt(9, 3) > 0) {
$pd[19] = 1;
}
/* LEVEL 3 */
if ($this->testSt(8, 4) > 0 || $this->testSt(7, 2) > 0) {
$pd[18] = 1;
}
if ($this->testSt(9, 4) > 0 || $this->testSt(8, 2) > 0) {
$pd[17] = 1;
}
if ($this->testSt(8, 1) > 0 || $this->testSt(12, 3) > 0) {
$pd[16] = 1;
}
if ($this->testSt(7, 1) > 0 || $this->testSt(13, 3) > 0) {
$pd[15] = 1;
}
if ($this->testSt(9, 1) > 0 || $this->testSt(11, 3) > 0) {
$pd[14] = 1;
}
/* LEVEL 4 */
if ($this->testSt(12, 4) > 0 || $this->testSt(13, 2) > 0) {
$pd[13] = 1;
}
if ($this->testSt(12, 2) > 0 || $this->testSt(11, 4) > 0) {
$pd[12] = 1;
}
if ($this->testSt(13, 1) > 0 || $this->testSt(17, 3) > 0) {
$pd[11] = 1;
} //8
if ($this->testSt(11, 1) > 0 || $this->testSt(16, 3) > 0) {
$pd[10] = 1;
} //7
if ($this->testSt(12, 1) > 0 || $this->testSt(15, 3) > 0) {
$pd[9] = 1;
}
if ($this->testSt(14, 1) > 0 || $this->testSt(18, 3) > 0) {
$pd[6] = 1;
} //2
if ($this->testSt(10, 1) > 0 || $this->testSt(19, 3) > 0) {
$pd[5] = 1;
} //1
if ($this->testSt(16, 4) > 0 || $this->testSt(15, 2) > 0) {
$pd[4] = 1;
}
if ($this->testSt(15, 4) > 0 || $this->testSt(17, 2) > 0) {
$pd[3] = 1;
}
/* Ãåíåðèðóåì ïðåäìåòû íà êàðòå */
/* Ãåíåðèðóåì ïåðñîíàæåé è áîòîâ íà êàðòå */
}
public function getMatrix($y, $x)
{
global $u;
$this->cord['x']++;
$this->cord[($u->info['psevdo_y'] + $y) . '_' . ($u->info['psevdo_x'] + $x)] = $this->cord['x'];
return $this->map[0][($u->info['psevdo_y'] + $y) . '_' . ($u->info['psevdo_x'] + $x)];
}
public function genMatix()
{
$r = [];
if ($this->gs == 1) {
//1; //ñìîòðèì ïðÿìî
$r[1] = $this->getMatrix(0, -1);
$r[2] = $this->getMatrix(0, 0);
$r[3] = $this->getMatrix(0, 1);
$r[4] = $this->getMatrix(1, -1);
$r[5] = $this->getMatrix(1, 0);
$r[6] = $this->getMatrix(1, 1);
$r[7] = $this->getMatrix(2, 1);
$r[8] = $this->getMatrix(2, 0);
$r[9] = $this->getMatrix(2, -1);
$r[10] = $this->getMatrix(3, -2);
$r[11] = $this->getMatrix(3, -1);
$r[12] = $this->getMatrix(3, 0);
$r[13] = $this->getMatrix(3, 1);
$r[14] = $this->getMatrix(3, 2);
$r[15] = $this->getMatrix(4, 0);
$r[16] = $this->getMatrix(4, -1);
$r[17] = $this->getMatrix(4, 1);
$r[18] = $this->getMatrix(4, 2);
$r[19] = $this->getMatrix(4, -2);
} elseif ($this->gs == 2) {
//2; //ñìîòðèì ëåâî
$r[1] = $this->getMatrix(-1, 0);
$r[2] = $this->getMatrix(0, 0);
$r[3] = $this->getMatrix(1, 0);
$r[4] = $this->getMatrix(-1, -1);
$r[5] = $this->getMatrix(0, -1);
$r[6] = $this->getMatrix(1, -1);
$r[7] = $this->getMatrix(1, -2);
$r[8] = $this->getMatrix(0, -2);
$r[9] = $this->getMatrix(-1, -2);
$r[10] = $this->getMatrix(-2, -3);
$r[11] = $this->getMatrix(-1, -3);
$r[12] = $this->getMatrix(0, -3);
$r[13] = $this->getMatrix(1, -3);
$r[14] = $this->getMatrix(2, -3);
$r[15] = $this->getMatrix(0, -4);
$r[16] = $this->getMatrix(-1, -4);
$r[17] = $this->getMatrix(1, -4);
$r[18] = $this->getMatrix(2, -4);
$r[19] = $this->getMatrix(-2, -4);
} elseif ($this->gs == 3) {
//3; //ñìîòðèì âíèç
$r[1] = $this->getMatrix(0, 1);
$r[2] = $this->getMatrix(0, 0);
$r[3] = $this->getMatrix(0, -1);
$r[4] = $this->getMatrix(-1, 1);
$r[5] = $this->getMatrix(-1, 0);
$r[6] = $this->getMatrix(-1, -1);
$r[7] = $this->getMatrix(-2, -1);
$r[8] = $this->getMatrix(-2, 0);
$r[9] = $this->getMatrix(-2, 1);
$r[10] = $this->getMatrix(-3, 2);
$r[11] = $this->getMatrix(-3, 1);
$r[12] = $this->getMatrix(-3, 0);
$r[13] = $this->getMatrix(-3, -1);
$r[14] = $this->getMatrix(-3, -2);
$r[15] = $this->getMatrix(-4, 0);
$r[16] = $this->getMatrix(-4, 1);
$r[17] = $this->getMatrix(-4, -1);
$r[18] = $this->getMatrix(-4, -2);
$r[19] = $this->getMatrix(-4, 2);
} elseif ($this->gs == 4) {
//4; //ñìîòðèì ïðàâî
$r[1] = $this->getMatrix(1, 0);
$r[2] = $this->getMatrix(0, 0);
$r[3] = $this->getMatrix(-1, 0);
$r[4] = $this->getMatrix(1, 1);
$r[5] = $this->getMatrix(0, 1);
$r[6] = $this->getMatrix(-1, 1);
$r[7] = $this->getMatrix(-1, 2);
$r[8] = $this->getMatrix(0, 2);
$r[9] = $this->getMatrix(1, 2);
$r[10] = $this->getMatrix(2, 3);
$r[11] = $this->getMatrix(1, 3);
$r[12] = $this->getMatrix(0, 3);
$r[13] = $this->getMatrix(-1, 3);
$r[14] = $this->getMatrix(-2, 3);
$r[15] = $this->getMatrix(0, 4);
$r[16] = $this->getMatrix(1, 4);
$r[17] = $this->getMatrix(-1, 4);
$r[18] = $this->getMatrix(-2, 4);
$r[19] = $this->getMatrix(2, 4);
}
return $r;
}
}

View File

@ -1,7 +1,4 @@
<?php
if (!defined('GAME')) {
die();
}
class Filter
{
@ -14,15 +11,18 @@ class Filter
}
//
//Ñìàéëèêè
public $sm = ["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];
private $sm = ["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")');
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)
public function setOnline($online, $uid)
{
$add = 0;
@ -45,7 +45,9 @@ class Filter
$on['time_today'] += $add;
}
$add = $on['time_all'] + $add;
mysql_query('UPDATE `online` SET `mainTime` = "' . $mt . '",`time_today` = "' . $on['time_today'] . '",`lastUp` = "' . $lst . '",`time_all` = "' . $add . '" WHERE `id` = "' . $on['id'] . '" LIMIT 1');
mysql_query(
'UPDATE `online` SET `mainTime` = "' . $mt . '",`time_today` = "' . $on['time_today'] . '",`lastUp` = "' . $lst . '",`time_all` = "' . $add . '" WHERE `id` = "' . $on['id'] . '" LIMIT 1'
);
}
}
}
@ -93,8 +95,7 @@ class Filter
$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);
$testEN = preg_replace('/[^A-z]*/i', '', $txt);
$testEN2 = $txt;
$testEN2 = str_replace('&quot;', '', $testEN2);
@ -116,10 +117,8 @@ class Filter
$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);
$testEN2 = preg_replace('/[^A-z]*/i', '', $testEN2);
$testRU = preg_replace('/[^À-ÿ]*/i', '', $txt);
$testRU2 = $txt;
$testRU2 = str_replace('a', 'à', $testRU2);
@ -143,15 +142,9 @@ class Filter
$i = 0;
$spe = explode('|', $spam);
while ($i <= count($spe)) {
if (
isset($spe[$i]) &&
$spe[$i] != '' &&
$spe[$i] != 'new-combats.com' &&
(
stristr($testEN, $spe[$i]) ||
stristr($testRU, $spe[$i])
)
) {
if (isset($spe[$i]) && $spe[$i] != '' && $spe[$i] != 'new-combats.com' && (stristr(
$testEN, $spe[$i]
) || stristr($testRU, $spe[$i]))) {
$nospam .= '%' . $spe[$i];
}
$i++;
@ -164,5 +157,3 @@ class Filter
trigger_error('Äóáëèðîâàíèå íå äîïóñêàåòñÿ.', E_USER_ERROR);
}
}
$filter = new Filter();

View File

@ -0,0 +1,245 @@
<?php
/**@deprecated âðîäå íèãäå íå âûçûâàåòñÿ, íèêåì íå èñïîëüçóåòñÿ */
class GameDealer
{
//Êîíôèãóðàöèè
private $c = [
'db_name' => 'pay_operations', //Òàáëèöà â êîòîðóþ çàíîñÿòñÿ äàííûå
'db_host' => 'localhost',
'db_user' => 'newcom1_abk',
'db_pass' => '4nWYsIM[c?}P',
'db_base' => 'newcom1_abk', /* Íàñòðîéêè ïëàòåæåé */
'ip_list' => ['127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'], //Óêàçûâàòü ÷åðåç çàïÿòóþ (Ðàçðåøåííûå IP)
'key' => 'qtzl0igb', //gamedealer key
'id' => '65643' //ID ïðîåêòà
], $BACK = []; //Ðåçóëüòàò êîòîðûé âîçâðàùàåì â êîíöå
//Êîäèðóåì èç ÞÒÔ-8 â Êèðèëèöó
public function in($text)
{
return iconv("UTF-8", "cp1251", $text);
}
//Êîäèðóåì èç Êèðèëèöó â ÞÒÔ-8
public function out($text)
{
return iconv("cp1251", "UTF-8", $text);
}
//Äîáàâëÿåì äàííûå â áàçó äàííûõ
public function add($type, $value, $money)
{
mysql_query('INSERT INTO `' . $this->c['db_name'] . '` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("' . time() . '","' . mysql_real_escape_string($type) . '","' . $_SERVER['HTTP_X_REAL_IP'] . '","' . mysql_real_escape_string($value) . '","' . mysql_real_escape_string($money) . '","' . mysql_real_escape_string($this->id) . '")');
}
//Ïîäêëþ÷àåìñÿ ê áàçå äàííûõ
public function connect_db()
{
$db = mysql_connect($this->c['db_host'], $this->c['db_user'], $this->c['db_pass']) or die('Îøèáêà ïîäêëþ÷åíèÿ ê MySQL ñåðâåðó!');
mysql_select_db($this->c['db_base'], $db) or die('Îøèáêà ïîäêëþ÷åíèÿ ê áàçå äàííûõ!');
mysql_query('SET NAMES cp1251');
}
public function output($a, $v = null)
{
$r = '';
$i = 0;
while ($i < count($a)) {
$rn = '';
$tb = '';
if ($v != null) {
$rn = "\r\n";
$tb = " ";
}
$r .= $rn . '<' . $a[$i][0] . '>';
if (!is_array($a[$i][1])) {
$rn = '';
$tb = '';
$r .= $rn . $tb . ($this->out($a[$i][1]));
} else {
if ($i > 0) {
$r .= $rn;
}
$r .= $tb . ($this->output($a[$i][1], 1));
}
$r .= $rn . '</' . $a[$i][0] . '>';
$i++;
}
return $r;
}
//Ãåíåðèðóåì XML-ôàéë
public function backInformation()
{
header('Content-Type: text/html/force-download');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo $this->output($this->BACK, 1);
}
//Ïðîâåðêà ñóùåñòâîâàíèÿ ïåðñîíàæà
public function test_accaunt($nick)
{
$r = false;
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `bank` WHERE `id` = "' . mysql_real_escape_string($nick) . '" LIMIT 1'));
if (isset($nick['id'])) {
$r = true;
}
return $r;
}
//Ïîëó÷àåò ñ÷åò â áàíêå ïî ëîãèíó
public function getBank($nick)
{
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "' . mysql_real_escape_string($nick) . '" LIMIT 1'));
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `bank` WHERE `uid` = "' . mysql_real_escape_string($nick['id']) . '" LIMIT 1'));
return $nick['id'];
}
//Ïîèñê ëîãèíà
public function bank_user($nick)
{
$nick = mysql_fetch_array(mysql_query('SELECT `id`,`uid FROM `bank` WHERE `id` = "' . mysql_real_escape_string($nick) . '" LIMIT 1'));
$nick = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `login` = "' . mysql_real_escape_string($nick['uid']) . '" LIMIT 1'));
return $nick['login'];
}
//Íà÷èíàåì îáðàáîòêó çàïðîñîâ
public function start_session()
{
$ip = '';
$ip = $_SERVER['HTTP_X_REAL_IP'];
//Ïîäêëþ÷àåìñÿ ê ÁÄ
$this->connect_db();
//Ïîëó÷àåì äàííûå çàïðîñà
//$xml = file_get_contents('php://input');
//Ïàðñèíã XML çàïðîñà
if (function_exists('simplexml_load_string')) {
$xml = simplexml_load_string($xml);
} else {
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Íå óäàëîñü ïðîèçâåñòè îáðàáîòêó çàïðîñà']]]];
die($this->backInformation());
}
$this->id = $xml->projectid;
if (!in_array($ip, $this->c['ip_list'])) {
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Íåò äîñòóïà ñ äàííîãî IP']]]];
die($this->backInformation());
}
//Îáðàáîòêà çàïðîñîâ
if ($xml->method == 'check_balance') {
//<sign>MD5(method+MD5(gdKey))</sign>
$sign = md5($xml->method . md5($this->c['key']));
if ($sign == $xml->sign) {
//Áàëàíñ äèëåðà
$balance = 1000000;
$this->BACK = [['gdanswer', [['status', '1'], ['desc', 'Áàëàíñ äèëåðà: ' . $balance], ['balance', $balance]]]];
$this->add('4', 'check:' . $xml->nick . ':1' . $r, 0);
}
} elseif ($xml->method == 'check') {
/*
nick - ëîãèí ïåðñîíàæà <sign>MD5(nick+method+MD5(gdKey))</sign> */
$sign = md5($xml->nick . $xml->method . md5($this->c['key']));
if ($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if ($this->test_accaunt($xml->nick) == true) {
//Ïåðñîíàæ íàéäåí è çà÷èñëÿåì åìó èãðîâóþ âàëþòó
$this->BACK = [['gdanswer', [['status', '1'], ['desc', 'Áàíêîâñêèé ñ÷åò íàéäåí']]]];
$this->add('3', 'check:' . $xml->nick . ':1' . $r, 0);
} else {
//Ïåðñîíàæ íå íàéäåí
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Ïëàòåæ íå îáðàáîòàí. Áàíêîâñêèé ñ÷åò íå íàéäåí.']]]];
$this->add('-1', 'Ïåðñîíàæ íå íàéäåí:pay:' . $xml->nick . ':0', 0);
}
}
} elseif ($xml->method == 'pay') {
/* Ïðîâîäèì ïëàòåæ
nick - ëîãèí àêêàóíòà , projectid - id ïðîåêòà , sign , amount - äåíüãè , payid - id ïëàòåæà */
$sign = md5($xml->nick . $xml->projectid . $xml->amount . $xml->payid . $xml->method . md5($this->c['key']));
if ($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if ($this->test_accaunt($xml->nick)) {
//Ïåðñîíàæ íàéäåí è çà÷èñëÿåì åìó èãðîâóþ âàëþòó
$bank = $this->test_accaunt($xml->nick);
if ($bank > 0) {
mysql_query('UPDATE `bank` SET `money2` = `money2` + ' . mysql_real_escape_string($xml->amount) . ' WHERE `id` = "' . mysql_real_escape_string($xml->nick) . '" LIMIT 1');
$this->BACK = [['gdanswer', [['status', '1'], ['desc', 'Ïëàòåæ ïðîøåë óñïåøíî'], ['id', $this->c['id']]]]];
$this->add('2', 'pay:' . $xml->nick . ':' . $xml->projectid . ':' . $xml->sign . ':' . $xml->amount . ':' . $xml->payid . ':' . $bank['id'], $xml->amount);
$user = mysql_fetch_array(mysql_query('SELECT `id`,`uid` FROM `bank` WHERE `id` = "' . mysql_real_escape_string($xml->nick) . '" LIMIT 1'));
$user = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`city`,`sex`,`room` FROM `users` WHERE `id` = "' . mysql_real_escape_string($user['uid']) . '" LIMIT 1'));
mysql_query('UPDATE `users` SET `catch` = `catch` + ' . mysql_real_escape_string(floor($xml->amount)) . ' WHERE `id` = "' . mysql_real_escape_string($xml->nick) . '" LIMIT 1');
$r = '<span class=date>' . date('d.m.Y H:i') . '</span> Àëõèìèê <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Enchanter</b> / Àâòîìàòè÷åñêàÿ îïëàòà</u> ñîîáùàåò: ';
if ($user['sex'] == 1) {
$r .= 'Óâàæàåìàÿ';
} else {
$r .= 'Óâàæàåìûé';
}
$r .= ' <b>' . $user['login'] . '</b>, íà Âàø áàíêîâñêèé ñ÷åò ¹' . $bank . ' çà÷èñëåíî ' . $xml->amount . ' Ekr. Áëàãîäàðèì Âàñ çà ïîêóïêó!';
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $user['city'] . "','" . $user['room'] . "','','" . $user['login'] . "','" . $r . "','-1','5','0')");
} else {
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Ó ïîëüçîâàòåëÿ îòñóòñòâóåò áàíê'], ['id', $this->c['id']]]]];
$this->add('-1', 'Ó ïåðñîíàæà îòñóòñòâóåò áàíê:pay:' . $xml->nick . ':' . $xml->projectid . ':' . $xml->sign . ':' . $xml->amount . ':' . $xml->payid . ':' . $bank['id'], $xml->amount);
}
} else {
//Ïåðñîíàæ íå íàéäåí
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Ïëàòåæ íå îáðàáîòàí. Ïåðñîíàæ íå íàéäåí.']]]];
$this->add('-1', 'Ïåðñîíàæ íå íàéäåí:pay:' . $xml->nick . ':0', 0);
}
} else {
//Îøèáêà ñèãíàòóðû
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Îøèáêà ñèãíàòóðû']]]];
$this->add('-1', 'Îøèáêà ñèãíàòóðû:pay:' . $xml->nick . ':0', 0);
}
} elseif ($xml->method == 'check_login') {
/* Ïðîâåðêà àêêàóíòà
nick - ëîãèí àêêàóíòà , projectid - id ïðîåêòà , sign */
$sign = md5($xml->nick . $xml->method . md5($this->c['key']));
if ($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if ($this->test_accaunt($xml->nick)) {
//Ïåðñîíàæ íàéäåí
$this->BACK = [['gdanswer', [['status', '1'], ['desc', 'Ñ÷åò íàéäåí'], ['addinfo', $this->bank_user($xml->nick)]]]];
$this->add('1', 'check_login:' . $xml->nick . ':1' . $r, 0);
} else {
//Ïåðñîíàæ íå íàéäåí
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Ñ÷åò íå íàéäåí']]]];
$this->add('-1', 'Ïåðñîíàæ íå íàéäåí:check_login:' . $xml->nick . ':0', 0);
}
} else {
//Îøèáêà ñèãíàòóðû
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Îøèáêà ñèãíàòóðû']]]];
$this->add('-1', 'Îøèáêà ñèãíàòóðû:pay:' . $xml->nick . ':0', 0);
}
} else {
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'Íåèçâåñòíûé òèï çàïðîñà']]]];
$this->add('-1', 'Íåèçâåñòíûé òèï çàïðîñà:error_method:gamedealer', 0);
}
//Âîçâðàùàåì ðåçóëüòàò
$this->backInformation();
}
}
$pay = new GameDealer;
$pay->start_session();

View File

@ -93,7 +93,7 @@ class Achievements
],
];
public function __construct(\user $user)
public function __construct(\User $user)
{
$this->user = $user;
$this->info = Db::getRow('select * from users_achiv where id = ?', [$user->info['id']]);

View File

@ -10,7 +10,6 @@ require_once 'Tournament/Tournament.php';
require_once 'Tournament/TournamentModel.php';
require_once 'Achievements.php';
//Âìåñòî êðîíà äëÿ òóðíèðà.
if (Tournament::IS_ENABLED) {
(new Tournament())->startAllBattles();

View File

@ -3,6 +3,7 @@
namespace Insallah;
use Exception;
use http\Message;
use PDO;
use PDOException;
use PDOStatement;
@ -35,17 +36,18 @@ class Db
* DB constructor.
* @throws Exception
*/
public function __construct(){
public function __construct()
{
if (self::$instance === null) {
try {
self::$db = new PDO(
'mysql:host='.self::DB_HOST.';dbname='.self::DB_NAME,
'mysql:host=' . self::DB_HOST . ';dbname=' . self::DB_PREFIX . 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
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES " . self::CHARSET,
]
);
} catch (PDOException $e) {
@ -59,7 +61,8 @@ class Db
* @param $stmt
* @return PDOStatement
*/
public static function query($stmt) {
public static function query($stmt)
{
return self::$db->query($stmt);
}
@ -67,7 +70,8 @@ class Db
* @param $stmt
* @return PDOStatement
*/
public static function prepare($stmt) {
public static function prepare($stmt)
{
return self::$db->prepare($stmt);
}
@ -75,14 +79,16 @@ class Db
* @param $query
* @return int
*/
static public function exec($query) {
static public function exec($query)
{
return self::$db->exec($query);
}
/**
* @return string
*/
static public function lastInsertId() {
static public function lastInsertId()
{
return self::$db->lastInsertId();
}
@ -92,7 +98,8 @@ class Db
* @return PDOStatement
* @throws Exception
*/
public static function run($query, $args = []) {
public static function run($query, $args = [])
{
try {
if (!$args) {
return self::query($query);
@ -109,8 +116,10 @@ class Db
* @param $query
* @param array $args
* @return mixed
* @throws Exception
*/
public static function getRow($query, $args = []) {
public static function getRow($query, $args = [])
{
return self::run($query, $args)->fetch();
}
@ -118,8 +127,10 @@ class Db
* @param $query
* @param array $args
* @return array
* @throws Exception
*/
public static function getRows($query, $args = []) {
public static function getRows($query, $args = [])
{
return self::run($query, $args)->fetchAll();
}
@ -127,8 +138,10 @@ class Db
* @param $query
* @param array $args
* @return mixed
* @throws Exception
*/
public static function getValue($query, $args = []) {
public static function getValue($query, $args = [])
{
$result = self::getRow($query, $args);
if (!empty($result)) {
$result = array_shift($result);
@ -140,11 +153,16 @@ class Db
* @param $query
* @param array $args
* @return array
* @throws Exception
*/
public static function getColumn($query, $args = []) {
public static function getColumn($query, $args = [])
{
return self::run($query, $args)->fetchAll(PDO::FETCH_COLUMN);
}
/**
* @throws Exception
*/
public static function sql($query, $args = [])
{
self::run($query, $args);

View File

@ -1,11 +1,4 @@
<?php
if (!defined('GAME')) {
die();
}
ignore_user_abort(true);
if (isset($_POST['useitemon'])) {
$_GET['login'] = $_POST['useitemon'];
}
class Magic
{
@ -14,6 +7,13 @@ class Magic
public $c_magic = [4174, 4175, 4176, 4177, 4178, 4179, 4180];
public $e_magic = [4185, 4186, 4187];
public function __construct() {
ignore_user_abort(true);
if (isset($_POST['useitemon'])) {
$_GET['login'] = $_POST['useitemon'];
}
}
public function inBattleLog($txt, $usr = null)
{
global $u;
@ -30,26 +30,23 @@ class Magic
//Использование предмета
public function useItems($id)
{
global $u, $c, $code, $btl, $e_magic, $c_magic;
global $u, $btl;
$itm = mysql_fetch_array(mysql_query('SELECT `iu`.`id` AS `iuid`,`im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid` = "' . $u->info['id'] . '" AND `iu`.`inShop`="0" AND `iu`.`delete`="0" AND `iu`.`id` = "' . mysql_real_escape_string((int)$id) . '" LIMIT 1'));
$bs_is = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "' . $u->info['inTurnir'] . '" LIMIT 1'));
if (isset($itm['id'])) {
if ($itm['group'] == 1) {
//Группа предметов
if ($u->itemsX($itm['id']) > 1) {
if ($itm['group'] == 1 && $u->itemsX($itm['id']) > 1) {
//вытаскиваем предмет из группы
$u->unstack($itm['id'], 1);
}
}
$st = $u->lookStats($itm['data']);
if (isset($st['tr_lvl']) && $st['tr_lvl'] > $u->info['level']) {
$u->error = 'Вы слишком малы чтобы использовать данный предмет ';
$err = 'Вы слишком малы чтобы использовать данный предмет';
return $err;
return 'Вы слишком малы чтобы использовать данный предмет';
}
if ($itm['magic_chance'] > 0 && $itm['magic_chance'] < 100) {
@ -58,14 +55,14 @@ class Magic
$itm['magic_chance'] = 99;
}
}
if (isset($bs_is['id'])) {
if (in_array($itm['item_id'], $e_magic) || in_array($itm['item_id'], $c_magic)) {
if (isset($bs_is['id']) && (in_array($itm['item_id'], $this->e_magic) || in_array(
$itm['item_id'], $this->c_magic
))) {
$itm['magic_chance'] += $bs_is['users'];
if ($itm['magic_chance'] >= 99) {
$itm['magic_chance'] = 99;
}
}
}
if ($itm['iznosNOW'] >= $itm['iznosMAX']) {
$u->error = 'Не осталось зарядов...';
@ -1993,7 +1990,3 @@ class Magic
return $good;
}
}
$magic = new Magic;
?>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
<?php
class PriemsMain extends priems
{
/**
* Отдльный файл для методов приёмов.
* По закону жанра - ничерта не подключается самостоятльно,
* потому что "инклюд инклюда класса", файл не знает откуда и куда подключаться.
* Игра вызывает _cron_, _cron_ вызывает priems, priems вызывает N.php
* N.php вызывает _cron_, _users, _battles.
* Всё это в разных местах, скрипт не понимает в какой он папке и капут.
*/
}

View File

@ -1,11 +1,8 @@
<?
if (!defined('GAME')) {
die();
}
<?php
class quests
class Quests
{
public $free_x = 28, $data = [];
private $free_x = 28;
/* Ïðîâåðêà äîñòóïíîñòè êâåñòà */
public function testGood($pl)
@ -577,10 +574,6 @@ class quests
return $r;
}
/** Íåèçâåñòíî ïî÷åìó ëîìàåò ïëàâêó ðóí.
* PHP Fatal error: Call to a member function testquest() on a non-object
* @return void
*/
public function testquest()
{
global $u;
@ -885,7 +878,7 @@ class quests
return $r;
}
public function winQuest($pl)
private function winQuest($pl)
{
global $u, $c, $magic;
@ -1015,5 +1008,3 @@ class quests
return $dr;
}
}
$q = new quests;

View File

@ -2,13 +2,8 @@
use Insallah\Db;
if (!defined('GAME')) {
die();
}
class season
class Season
{
public static $yy = [
1 => [1, '01', 'ίνβΰπό', 'ίνβΰπόρκθι'],
2 => [2, '02', 'Τεβπΰλό', 'Τεβπΰλόρκθι'],
@ -23,8 +18,8 @@ class season
11 => [11, '11', 'Νξ<CE9D>από', 'Νξ<CE9D>απόρκθι'],
12 => [12, '12', 'Δεκΰαπό', 'Δεκΰαπόρκθι'],
];
public static $date = [], $m = [];
public static $date = [];
public static $m = [];
public static function data($val)
{
@ -33,5 +28,4 @@ class season
self::$m = [];
}
}
}

View File

@ -0,0 +1,170 @@
<?php
class Telegram
{
private static $instance;
/**Singletone*/
public static function start()
{
if (!isset(self::$instance)) {
self::$instance = new self();
}
return self::$instance;
}
private function send($to, $from, $text, $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 = [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,491 @@
<?php
if (!defined('GAME')) {
die();
}
class Tournir
{
private $u;
private $info;
private $user;
private $name = [0 => 'Âûæèòü ëþáîé öåíîé', 1 => 'Êàæäûé ñàì çà ñåáÿ', 2 => 'Çàõâàò êëþ÷à',];
public function __construct()
{
$this->u = User::start();
$this->start();
$this->locationSee();
}
private function start()
{
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "' . $this->u->info['inTurnirnew'] . '" LIMIT 1'));
$this->user = mysql_fetch_array(mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->u->info['inTurnirnew'] . '" AND `bot` = "' . $this->u->info['id'] . '" LIMIT 1'));
}
private function startTurnir()
{
$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) {
if ($this->info['status'] == 3) {
$this->finishTurnir();
}
} else {
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 ("' . $this->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('Ïåðåéòèäå â ðàçäåë "ïîåäèíêè"...');
}
}
private function finishTurnir()
{
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "' . $this->u->info['inTurnirnew'] . '" LIMIT 1'));
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'] = [0, 1, 5, 10, 15, 25, 35, 70, 100, 150, 200, 300, 500, 700, 1000];
//ïîëó÷àåì îïûò (ñ 0 ïî 12 ëâë)
$inf['add_expn'] = [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>.';
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 . '. Ñëåäóþùèé òóðíèð íà÷íåòñÿ ÷åðåç ' . $this->u->timeOut($this->info['time2']) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
} else {
$win = 'Ïîáåäèòåëè òóðíèðà îòñóòñòâóåò. Ñëåäóþùèé òóðíèð íà÷íåòñÿ ÷åðåç ' . $this->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')");
}
}
private function locationSee()
{
$r = '';
$tm1 = '';
$tm2 = '';
$noitm = [869 => 1, 1246 => 1, 155 => 1, 1245 => 1, 678 => 1];
//ïîëó÷åíèå êîìïëåêòà
if ($this->info['step'] != 3 && $this->info['step'] != 0 && isset($_GET['gocomplect']) && $this->user['points'] < 2) {
$aso = explode(',', $this->user['items']);
$ast = explode('-', $_GET['gocomplect']);
$asg = [];
$asj = [];
$asgp = [];
$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]]) {
$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 || $itm['inSlot'] == 10) {
$asg[$itm['inSlot']][count($asg[$itm['inSlot']])] = $itm['id'];
$asgp[$itm['inSlot']][count($asgp[$itm['inSlot']])] = $itm['price1'];
} 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;
}
if ($addi == 1) {
$i = 0;
while ($i <= 17) {
if ($i == 10) {
if ($asg[$i][0] > 0) {
$this->u->addItem($asg[$i][0], $this->u->info['id']);
$this->user['points'] += 1 + round($asgp[$i][0]);
}
if ($asg[$i][1] > 0) {
$this->u->addItem($asg[$i][1], $this->u->info['id']);
$this->user['points'] += 1 + round($asgp[$i][1]);
}
if ($asg[$i][2] > 0) {
$this->u->addItem($asg[$i][2], $this->u->info['id']);
$this->user['points'] += 1 + round($asgp[$i][2]);
}
} elseif ($i == 3) {
if ($asg[$i][0] > 0) {
$this->u->addItem($asg[$i][0], $this->u->info['id']);
$this->user['points'] += 1 + round($asgp[$i][0]);
}
if ($asg[$i][1] > 0) {
$this->u->addItem($asg[$i][1], $this->u->info['id']);
$this->user['points'] += 1 + round($asgp[$i][1]);
}
} elseif ($asg[$i] > 0) {
$this->u->addItem($asg[$i], $this->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` = "' . $this->u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `ability` = "100",`skills` = "10" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `users` SET `level` = "12" WHERE `id` = "' . $this->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 = [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 = [2, 1];
} else {
$tmr = [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 = [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']} .= $this->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>Íà÷àëî òóðíèðà ÷åðåç ' . $this->u->timeOut($this->info['time'] - time()) . '! ';
if (isset($_GET['hpregenNowTurnir']) && ($this->u->stats['hpNow'] < $this->u->stats['hpAll'] || $this->u->stats['mpNow'] < $this->u->stats['mpAll'])) {
mysql_query('UPDATE `stats` SET `hpNow` = "' . $this->u->stats['hpAll'] . '",`mpNow` = "' . $this->u->stats['mpAll'] . '" WHERE `id` = "' . $this->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 ($this->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 && $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 = [];
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 = [];
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 .= '<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;
}
}

View File

@ -2,26 +2,7 @@
use Insallah\Db;
if (!defined('GAME')) {
die();
}
ignore_user_abort(true);
function getdr($s, $v, $d)
{
global $u;
$i = 0;
while ($i < count($v)) {
if (isset($v[$i])) {
$s = str_replace('{' . $v[$i] . '}', $d[$i], $s);
}
$i++;
}
$s = eval("return (" . $s . ");");
return floor($s);
}
class user
class User
{
private static $flag_one;
public $pokol = 2; //Àêêòóàëüíîå ïîêîëåíèå ïðåäìåòîâ
@ -52,70 +33,13 @@ class user
$city_name2 = ['emeraldscity' => 'Emeraldscity', 'abandonedplain' => 'Abandonedplain', 'capitalcity' => 'Capitalcity', 'angelscity' => 'Angelscity', 'newcapitalcity' => 'Newcapitalcity', 'demonscity' => 'Demonscity', 'fallenearth' => 'FallenEarth', 'dreamscity' => 'Dreams City', 'suncity' => 'Sun City', 'devilscity' => 'Devils City'],
$stats, $info, $map, $mapUsers, $is = [
'acestar' => 'Следующий каст будет критическим', 'spasenie' => 'Спасение после смерти',
'more_awards' => 'Повышеная награда %', 'exp' => 'Получаемый опыт (%)', 'align_bs' => 'Служитель закона',
'nopryh' => 'Прямое поподание',
'puti' => 'Запрет перемещения',
'align' => 'Склонность',
'hpAll' => '<font color=darkgreen><strong>Уровень жизни (HP)</font></strong>',
'mpAll' => '<font color=blue><strong>Уровень маны (МP)</font></strong>',
'enAll' => 'Уровень энергии',
'sex' => 'Пол',
'lvl' => 'Уровень',
's1' => 'Сила', 's2' => 'Ловкость', 's3' => 'Интуиция', 's4' => 'Выносливость',
's5' => 'Интеллект', 's6' => 'Мудрость', 's7' => 'Духовность', 's8' => 'Воля',
's9' => 'Свобода духа', 's10' => 'Божественность', 's11' => 'Энергия',
'm1' => 'Мф. критического удара (%)', 'm2' => 'Мф. против критического удара (%)',
'm3' => 'Мф. мощности крит. удара (%)', 'm21' => 'Мф. абс. попадания (%)', 'm4' => 'Мф. увертывания (%)',
'm5' => 'Мф. против увертывания (%)', 'm6' => 'Мф. контрудара (%)', 'm7' => 'Мф. парирования (%)',
'm8' => 'Мф. блока щитом (%)', 'm9' => 'Мф. удара сквозь броню (%)', 'm14' => 'Мф. абс. критического удара (%)',
'm15' => 'Мф. абс. увертывания (%)', 'm16' => 'Мф. абс. парирования (%)', 'm17' => 'Мф. абс. контрудара (%)',
'm18' => 'Мф. абс. блока щитом (%)', 'm19' => 'Мф. абс. магический промах (%)', 'm20' => 'Мф. удача (%)',
'a1' => 'Мастерство владения ножами, кинжалами', 'a2' => 'Мастерство владения топорами, секирами',
'a3' => 'Мастерство владения дубинами, молотами', 'a4' => 'Мастерство владения мечами',
'a5' => 'Мастерство владения магическими посохами', 'a6' => 'Мастерство владения луками',
'a7' => 'Мастерство владения арбалетами', 'aall' => 'Мастерство владения оружием',
'mall' => 'Мастерство владения магией стихий', 'm2all' => 'Мастерство владения магией',
'mg1' => 'Мастерство владения магией огня', 'mg2' => 'Мастерство владения магией воздуха',
'mg3' => 'Мастерство владения магией воды', 'mg4' => 'Мастерство владения магией земли',
'mg5' => 'Мастерство владения магией Света', 'mg6' => 'Мастерство владения магией Тьмы',
'mg7' => 'Мастерство владения серой магией', 'tj' => 'Тяжелая броня', 'lh' => 'Легкая броня',
'minAtack' => 'Минимальный урон', 'maxAtack' => 'Максимальный урон', 'm10' => 'Мф. мощности урона',
'm11' => 'Мф. мощности магии стихий', 'm11a' => 'Мф. мощности магии', 'pa1' => 'Мф. мощности колющего урона',
'pa2' => 'Мф. мощности рубящего урона', 'pa3' => 'Мф. мощности дробящего урона', 'pa4' => 'Мф. мощности режущего урона',
'pm1' => 'Мф. мощности магии огня', 'pm2' => 'Мф. мощности магии воздуха', 'pm3' => 'Мф. мощности магии воды',
'pm4' => 'Мф. мощности магии земли', 'pm5' => 'Мф. мощности магии Света', 'pm6' => 'Мф. мощности магии Тьмы',
'pm7' => 'Мф. мощности серой магии', 'za' => 'Защита от урона', 'zm' => 'Защита от магии стихий',
'zma' => 'Защита от магии', 'za1' => 'Защита от колющего урона', 'za2' => 'Защита от рубящего урона',
'za3' => 'Защита от дробящего урона', 'za4' => 'Защита от режущего урона', 'zm1' => 'Защита от магии огня',
'zm2' => 'Защита от магии воздуха', 'zm3' => 'Защита от магии воды', 'zm4' => 'Защита от магии земли',
'zm5' => 'Защита от магии Света', 'zm6' => 'Защита от магии Тьмы', 'zm7' => 'Защита от серой магии',
'magic_cast' => 'Дополнительный каст за ход', 'pza' => 'Понижение защиты от урона', 'pzm' => 'Понижение защиты от магии',
'pza1' => 'Понижение защиты от колющего урона', 'min_heal_proc' => 'Эффект лечения (%)', 'notravma' => 'Защита от травм',
'yron_min' => 'Минимальный урон', 'yron_max' => 'Максимальный урон', 'zaproc' => 'Блокировка Физического Урона (%)',
'zmproc' => 'Блокировка Магического Урона (%)', 'zm2proc' => 'Защита от магии Воздуха (%)',
'pza2' => 'Понижение защиты от рубящего урона', 'pza3' => 'Понижение защиты от дробящего урона',
'pza4' => 'Понижение защиты от режущего урона', 'pzm1' => 'Понижение защиты от магии огня',
'pzm2' => 'Понижение защиты от магии воздуха', 'pzm3' => 'Понижение защиты от магии воды',
'pzm4' => 'Понижение защиты от магии земли', 'pzm5' => 'Понижение защиты от магии Света',
'pzm6' => 'Понижение защиты от магии Тьмы', 'pzm7' => 'Понижение защиты от серой магии',
'speedhp' => 'Регенерация здоровья (%)', 'speedmp' => 'Регенерация маны (%)', 'tya1' => 'Колющие атаки',
'tya2' => 'Рубящие атаки', 'tya3' => 'Дробящие атаки', 'tya4' => 'Режущие атаки', 'tym1' => 'Огненные атаки',
'mg2static_points' => 'Уровень заряда (Воздух)', 'tym2' => 'Электрические атаки', 'tym3' => 'Ледяные атаки',
'tym4' => 'Земляные атаки', 'hpProc' => 'Уровень жизни (%)', 'mpProc' => 'Уровень маны (%)', 'tym5' => 'Атаки Света',
'tym6' => 'Атаки Тьмы', 'tym7' => 'Серые атаки', 'min_use_mp' => 'Уменьшает расход маны', 'pog' => 'Поглощение урона',
'pog2' => 'Поглощение урона', 'pog2p' => 'Процент поглощение урона', 'pog2mp' => 'Цена поглощение урона',
'maxves' => 'Увеличивает рюкзак', 'bonusexp' => 'Увеличивает получаемый опыт', 'speeden' => 'Регенерация энергии (%)',
'antm3' => 'Мф. против мощности крита', 'repair_z' => 'Бесплатное извлечение заточек',
'repair_r' => 'Бесплатное извлечение рун',
'yza' => 'Уязвимость физическому урона (%)', 'yzm' => 'Уязвимость магии стихий (%)', 'yzma' => 'Уязвимость магии (%)',
'yza1' => 'Уязвимость колющему урона (%)', 'yza2' => 'Уязвимость рубящему урона (%)', 'yza3' => 'Уязвимость дробящему урона (%)',
'yza4' => 'Уязвимость режущему урона (%)', 'yzm1' => 'Уязвимость магии огня (%)', 'yzm2' => 'Уязвимость магии воздуха (%)',
'yzm3' => 'Уязвимость магии воды (%)', 'yzm4' => 'Уязвимость магии земли (%)', 'yzm5' => 'Уязвимость магии (%)',
'yzm6' => 'Уязвимость магии (%)', 'yzm7' => 'Уязвимость магии (%)', 'rep' => 'Репутация Рыцаря',
'repair_discount' => 'Скидка на ремонт вещей', 'hpVinos' => 'Бонус жизни', 'bronze' => 'Bronze Premium Account',
'silvers' => 'Silver Premium Account', 'gold' => 'Благодать Ангела',
'speed_dungeon' => 'Скорость передвижения по подземельям', 'zona' => 'Дополнительная зона атаки'
'acestar' => 'Следующий каст будет критическим', 'spasenie' => 'Спасение после смерти', 'more_awards' => 'Повышеная награда %', 'exp' => 'Получаемый опыт (%)', 'align_bs' => 'Служитель закона',
'nopryh' => 'Прямое поподание', 'puti' => 'Запрет перемещения', 'align' => 'Склонность', 'hpAll' => '<font color=darkgreen><strong>Уровень жизни (HP)</font></strong>', 'mpAll' => '<font color=blue><strong>Уровень маны (МP)</font></strong>', 'enAll' => 'Уровень энергии', 'sex' => 'Пол', 'lvl' => 'Уровень', 's1' => 'Сила', 's2' => 'Ловкость', 's3' => 'Интуиция', 's4' => 'Выносливость', 's5' => 'Интеллект', 's6' => 'Мудрость', 's7' => 'Духовность', 's8' => 'Воля', 's9' => 'Свобода духа', 's10' => 'Божественность', 's11' => 'Энергия', 'm1' => 'Мф. критического удара (%)', 'm2' => 'Мф. против критического удара (%)', 'm3' => 'Мф. мощности крит. удара (%)', 'm21' => 'Мф. абс. попадания (%)', 'm4' => 'Мф. увертывания (%)', 'm5' => 'Мф. против увертывания (%)', 'm6' => 'Мф. контрудара (%)', 'm7' => 'Мф. парирования (%)', 'm8' => 'Мф. блока щитом (%)', 'm9' => 'Мф. удара сквозь броню (%)', 'm14' => 'Мф. абс. критического удара (%)', 'm15' => 'Мф. абс. увертывания (%)', 'm16' => 'Мф. абс. парирования (%)', 'm17' => 'Мф. абс. контрудара (%)', 'm18' => 'Мф. абс. блока щитом (%)', 'm19' => 'Мф. абс. магический промах (%)', 'm20' => 'Мф. удача (%)', 'a1' => 'Мастерство владения ножами, кинжалами', 'a2' => 'Мастерство владения топорами, секирами', 'a3' => 'Мастерство владения дубинами, молотами', 'a4' => 'Мастерство владения мечами', 'a5' => 'Мастерство владения магическими посохами', 'a6' => 'Мастерство владения луками', 'a7' => 'Мастерство владения арбалетами', 'aall' => 'Мастерство владения оружием', 'mall' => 'Мастерство владения магией стихий', 'm2all' => 'Мастерство владения магией', 'mg1' => 'Мастерство владения магией огня', 'mg2' => 'Мастерство владения магией воздуха', 'mg3' => 'Мастерство владения магией воды', 'mg4' => 'Мастерство владения магией земли', 'mg5' => 'Мастерство владения магией Света', 'mg6' => 'Мастерство владения магией Тьмы', 'mg7' => 'Мастерство владения серой магией', 'tj' => 'Тяжелая броня', 'lh' => 'Легкая броня', 'minAtack' => 'Минимальный урон', 'maxAtack' => 'Максимальный урон', 'm10' => 'Мф. мощности урона', 'm11' => 'Мф. мощности магии стихий', 'm11a' => 'Мф. мощности магии', 'pa1' => 'Мф. мощности колющего урона', 'pa2' => 'Мф. мощности рубящего урона', 'pa3' => 'Мф. мощности дробящего урона', 'pa4' => 'Мф. мощности режущего урона', 'pm1' => 'Мф. мощности магии огня', 'pm2' => 'Мф. мощности магии воздуха', 'pm3' => 'Мф. мощности магии воды', 'pm4' => 'Мф. мощности магии земли', 'pm5' => 'Мф. мощности магии Света', 'pm6' => 'Мф. мощности магии Тьмы', 'pm7' => 'Мф. мощности серой магии', 'za' => 'Защита от урона', 'zm' => 'Защита от магии стихий', 'zma' => 'Защита от магии', 'za1' => 'Защита от колющего урона', 'za2' => 'Защита от рубящего урона', 'za3' => 'Защита от дробящего урона', 'za4' => 'Защита от режущего урона', 'zm1' => 'Защита от магии огня', 'zm2' => 'Защита от магии воздуха', 'zm3' => 'Защита от магии воды', 'zm4' => 'Защита от магии земли', 'zm5' => 'Защита от магии Света', 'zm6' => 'Защита от магии Тьмы', 'zm7' => 'Защита от серой магии', 'magic_cast' => 'Дополнительный каст за ход', 'pza' => 'Понижение защиты от урона', 'pzm' => 'Понижение защиты от магии', 'pza1' => 'Понижение защиты от колющего урона', 'min_heal_proc' => 'Эффект лечения (%)', 'notravma' => 'Защита от травм', 'yron_min' => 'Минимальный урон', 'yron_max' => 'Максимальный урон', 'zaproc' => 'Блокировка Физического Урона (%)', 'zmproc' => 'Блокировка Магического Урона (%)', 'zm2proc' => 'Защита от магии Воздуха (%)', 'pza2' => 'Понижение защиты от рубящего урона', 'pza3' => 'Понижение защиты от дробящего урона', 'pza4' => 'Понижение защиты от режущего урона', 'pzm1' => 'Понижение защиты от магии огня', 'pzm2' => 'Понижение защиты от магии воздуха', 'pzm3' => 'Понижение защиты от магии воды', 'pzm4' => 'Понижение защиты от магии земли', 'pzm5' => 'Понижение защиты от магии Света', 'pzm6' => 'Понижение защиты от магии Тьмы', 'pzm7' => 'Понижение защиты от серой магии', 'speedhp' => 'Регенерация здоровья (%)', 'speedmp' => 'Регенерация маны (%)', 'tya1' => 'Колющие атаки', 'tya2' => 'Рубящие атаки', 'tya3' => 'Дробящие атаки', 'tya4' => 'Режущие атаки', 'tym1' => 'Огненные атаки', 'mg2static_points' => 'Уровень заряда (Воздух)', 'tym2' => 'Электрические атаки', 'tym3' => 'Ледяные атаки', 'tym4' => 'Земляные атаки', 'hpProc' => 'Уровень жизни (%)', 'mpProc' => 'Уровень маны (%)', 'tym5' => 'Атаки Света', 'tym6' => 'Атаки Тьмы', 'tym7' => 'Серые атаки', 'min_use_mp' => 'Уменьшает расход маны', 'pog' => 'Поглощение урона', 'pog2' => 'Поглощение урона', 'pog2p' => 'Процент поглощение урона', 'pog2mp' => 'Цена поглощение урона', 'maxves' => 'Увеличивает рюкзак', 'bonusexp' => 'Увеличивает получаемый опыт', 'speeden' => 'Регенерация энергии (%)',
'antm3' => 'Мф. против мощности крита', 'repair_z' => 'Бесплатное извлечение заточек', 'repair_r' => 'Бесплатное извлечение рун',
'yza' => 'Уязвимость физическому урона (%)', 'yzm' => 'Уязвимость магии стихий (%)', 'yzma' => 'Уязвимость магии (%)'
, 'yza1' => 'Уязвимость колющему урона (%)', 'yza2' => 'Уязвимость рубящему урона (%)', 'yza3' => 'Уязвимость дробящему урона (%)', 'yza4' => 'Уязвимость режущему урона (%)'
, 'yzm1' => 'Уязвимость магии огня (%)', 'yzm2' => 'Уязвимость магии воздуха (%)', 'yzm3' => 'Уязвимость магии воды (%)', 'yzm4' => 'Уязвимость магии земли (%)', 'yzm5' => 'Уязвимость магии (%)', 'yzm6' => 'Уязвимость магии (%)', 'yzm7' => 'Уязвимость магии (%)', 'rep' => 'Репутация Рыцаря'
, 'repair_discount' => 'Скидка на ремонт вещей', 'hpVinos' => 'Бонус жизни', 'bronze' => 'Bronze Premium Account', 'silvers' => 'Silver Premium Account', 'gold' => 'Благодать Ангела', 'speed_dungeon' => 'Скорость передвижения по подземельям', 'zona' => 'Дополнительная зона атаки'
];
public $items = [
'tr' => ['sex', 'align', 'lvl', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10', 's11', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'mg1', 'mg2', 'mg3', 'mg4', 'mg5', 'mg6', 'mg7', 'mall', 'm2all', 'aall', 'rep', 'align_bs'],
@ -126,6 +50,7 @@ class user
'sv' => ['pza', 'pza1', 'pza2', 'pza3', 'pza4', 'pzm', 'pzm1', 'pzm2', 'pzm3', 'pzm4', 'pzm5', 'pzm6', 'pzm7', 'notravma', 'min_zonb', 'min_zona', 'nokrit', 'pog', 'min_use_mp', 'za1proc', 'za2proc', 'za3proc', 'za4proc', 'zaproc', 'zmproc', 'zm1proc', 'zm2proc', 'zm3proc', 'zm4proc', 'shopSale', 'shopSaleEkr', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10', 's11', 'aall', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'm2all', 'mall', 'mg1', 'mg2', 'mg3', 'mg4', 'mg5', 'mg6', 'mg7', 'hpAll', 'mpAll', 'enAll', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9', 'm14', 'm15', 'm16', 'm17', 'm18', 'm19', 'm20', 'm21', 'pa1', 'pa2', 'pa3', 'pa4', 'pm1', 'pm2', 'pm3', 'pm4', 'pm5', 'pm6', 'pm7', 'min_use_mp', 'za', 'za1', 'za2', 'za3', 'za4', 'zma', 'zm', 'zm1', 'zm2', 'zm3', 'zm4', 'zm5', 'zm6', 'zm7', 'mib1', 'mab1', 'mib2', 'mab2', 'mib3', 'mab3', 'mib4', 'mab4', 'speedhp', 'speedmp', 'm10', 'm11', 'zona', 'zonb', 'maxves', 'minAtack', 'maxAtack', 'speeden']
];
/**@deprecated do nothing*/
public function sys_add($uid, $time, $type, $text, $data, $time_see)
{
}
@ -396,19 +321,19 @@ class user
}
return $e;
}
/**@deprecated do nothing*/
public function add_buf($id, $tp, $uid = null, $mod = null)
{
}
/**@deprecated do nothing*/
public function del_buf($id, $uid = null, $mod = null)
{
}
/**@deprecated do nothing*/
public function see_buf($id, $uid = null, $mod = null)
{
}
/**@deprecated do nothing*/
public function sys_see($type)
{
}
@ -660,7 +585,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$sss = ceil($st['s4'] * 1.5);
} elseif ($item['type'] == 21) {
//ðåæóùèé
$sss = ceil($st['s3'] * 1);
$sss = ceil($st['s3'] * 0.75);
} else {
//áåç ïðîôèëüíîãî óðîíà
$sss = ceil($st['s1'] * 0.1);
@ -6961,8 +6886,21 @@ LIMIT 1'));
public function lookStats($m)
{
$arr = json_decode(str_replace(['=', '|'], ['":', ',"'], '{"' . $m . '}'), true);
return $arr ?: [];
$ist = [];
$di = explode('|', $m);
$i = 0;
$de = false;
while ($i < count($di)) {
$de = explode('=', $di[$i]);
if (isset($de[0], $de[1])) {
if (!isset($ist[$de[0]])) {
$ist[$de[0]] = 0;
}
$ist[$de[0]] = $de[1];
}
$i++;
}
return $ist;
}
public function testItems($uid, $sn, $dt)
@ -9549,7 +9487,7 @@ LIMIT 1'));
if (!isset($st['zm'])) {
$st['zm'] = 0;
}
$st['zm'] += $st['s4'] * 1.0;
$st['zm'] += $st['s4'] * 0.0;
if (!isset($st['zaproc'])) { //Òóò çì 'zaproc'=>'Çàùèòà îò óðîíà (%)','zmproc'=>'Çàùèòà îò ìàãèè ñòèõèé (%)
$st['zaproc'] = 0;
@ -9566,7 +9504,7 @@ LIMIT 1'));
if (!isset($st['antm3'])) {
$st['antm3'] = 0;
}
$st['antm3'] += $st['s2'] * 0.5;
$st['antm3'] += $st['s5'] * 0.5;
if (!isset($st['m10'])) {
@ -10768,5 +10706,3 @@ LIMIT 1'));
}
}
$u = user::start();

View File

@ -0,0 +1,28 @@
<?php
class UserRegister
{
public function __construct()
{
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'];
}
define('IP', $ip);
if ($_SERVER['HTTP_REFERER'] == 'https://new-combats.com/' && $_COOKIE['acomb1'] != '2') {
setcookie('acomb1', '1', time() + 60 * 60 * 24 * 3);
}
}
public function en_ru($txt)
{
$en = preg_match("/^(([0-9A-z _-])+)$/i", $txt);
$ru = preg_match("/^(([0-9À-ÿ _-])+)$/i", $txt);
return ($ru && $en) || (!$ru && !$en);
}
}

View File

@ -1,189 +0,0 @@
<?
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

@ -1,28 +1,38 @@
<?php
if(!defined('GAME'))
{
if (!defined('GAME')) {
die();
}
$db = [
's' => 'localhost', // server
'd' => 'newcom1_abk', // database
'u' => 'newcom1_abk', // user
'p' => '4nWYsIM[c?}P' // password
];
$dsn = 'mysql:host=' . $db['s'] . ';dbname=' . $db['d'];
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);
$dbgo = mysql_pconnect($db['s'], $db['u'], $db['p']);
mysql_select_db($db['d'], $dbgo);
mysql_query('SET NAMES cp1251');
if (!function_exists('GetRealIp')) {
function GetRealIpTest(){
if (!empty($_SERVER['HTTP_CLIENT_IP']))
function GetRealIpTest()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
return $_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
} elseif (!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');
$pdo = new PDO($dsn, $db['u'], $db['p'], [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES cp1251"]);

File diff suppressed because it is too large Load Diff

View File

@ -1,405 +0,0 @@
<?
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;
?>

View File

@ -1,197 +0,0 @@
<?
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

@ -1,539 +0,0 @@
<?
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();
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,516 +0,0 @@
<?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;
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
namespace Magic\Elemental;
use battleClass;
use Battle;
use Insallah\Math;
class Fire
@ -11,7 +11,7 @@ class Fire
private $color = '#a00';
private $colorCrit = '#f00';
private $colorMiss = '#909090';
public function __construct(battleClass $btl)
public function __construct(Battle $btl)
{
$this->btl = $btl;
}

View File

@ -4,7 +4,7 @@ if(!defined('GAME'))
die();
}
class Magic
class Magic2
{
public $youuse = 0;

File diff suppressed because one or more lines are too long

View File

@ -1,243 +0,0 @@
<?php
class GameDealerClass {
//Êîíôèãóðàöèè
public $c = array(
/* MySQL Áàçà äàííûõ */
'db_name' => 'pay_operations', //Òàáëèöà â êîòîðóþ çàíîñÿòñÿ äàííûå
'db_host' => 'localhost',
'db_user' => 'newcom1_abk',
'db_pass' => '4nWYsIM[c?}P',
'db_base' => 'newcom1_abk',
/* Íàñòðîéêè ïëàòåæåé */
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Óêàçûâàòü ÷åðåç çàïÿòóþ (Ðàçðåøåííûå IP)
'key' => 'qtzl0igb', //gamedealer key
'id' => '65643' //ID ïðîåêòà
),
$ip = '',
$BACK = array(); //Ðåçóëüòàò êîòîðûé âîçâðàùàåì â êîíöå
//Êîäèðóåì èç ÞÒÔ-8 â Êèðèëèöó
public function in($text) {
return iconv("UTF-8","cp1251",$text);
}
//Êîäèðóåì èç Êèðèëèöó â ÞÒÔ-8
public function out($text) {
return iconv("cp1251","UTF-8",$text);
}
//Äîáàâëÿåì äàííûå â áàçó äàííûõ
public function add($type,$value,$money) {
mysql_query('INSERT INTO `'.$this->c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")');
}
//Ïîäêëþ÷àåìñÿ ê áàçå äàííûõ
public function connect_db() {
$db = mysql_connect($this->c['db_host'],$this->c['db_user'],$this->c['db_pass']) or die('Îøèáêà ïîäêëþ÷åíèÿ ê MySQL ñåðâåðó!');
mysql_select_db($this->c['db_base'],$db) or die('Îøèáêà ïîäêëþ÷åíèÿ ê áàçå äàííûõ!');
mysql_query('SET NAMES cp1251');
}
public function output($a,$v = NULL) {
$r = '';
$i = 0;
while($i < count($a)) {
$rn = '';
$tb = '';
if($v != NULL) {
$rn = "\r\n";
$tb = " ";
}
$r .= $rn.'<'.$a[$i][0].'>';
if(!is_array($a[$i][1])) {
$rn = '';
$tb = '';
$r .= $rn.$tb.($this->out($a[$i][1]));
}else{
if($i > 0) {
$r .= $rn;
}
$r .= $tb.($this->output($a[$i][1],1));
}
$r .= $rn.'</'.$a[$i][0].'>';
$i++;
}
return $r;
}
//Ãåíåðèðóåì XML-ôàéë
public function backInformation() {
header('Content-Type: text/html/force-download');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo $this->output($this->BACK,1);
}
//Ïðîâåðêà ñóùåñòâîâàíèÿ ïåðñîíàæà
public function test_accaunt($nick) {
$r = false;
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `bank` WHERE `id` = "'.mysql_real_escape_string($nick).'" LIMIT 1'));
if(isset($nick['id'])) {
$r = true;
}
return $r;
}
//Ïîëó÷àåò ñ÷åò â áàíêå ïî ëîãèíó
public function getBank($nick) {
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "'.mysql_real_escape_string($nick).'" LIMIT 1'));
$nick = mysql_fetch_array(mysql_query('SELECT `id` FROM `bank` WHERE `uid` = "'.mysql_real_escape_string($nick['id']).'" LIMIT 1'));
return $nick['id'];
}
//Ïîèñê ëîãèíà
public function bank_user($nick) {
$nick = mysql_fetch_array(mysql_query('SELECT `id`,`uid FROM `bank` WHERE `id` = "'.mysql_real_escape_string($nick).'" LIMIT 1'));
$nick = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `login` = "'.mysql_real_escape_string($nick['uid']).'" LIMIT 1'));
return $nick['login'];
}
//Íà÷èíàåì îáðàáîòêó çàïðîñîâ
public function start_session() {
$this->ip = $_SERVER['HTTP_X_REAL_IP'];
//Ïîäêëþ÷àåìñÿ ê ÁÄ
$this->connect_db();
//Ïîëó÷àåì äàííûå çàïðîñà
//$xml = file_get_contents('php://input');
//Ïàðñèíã XML çàïðîñà
if(function_exists('simplexml_load_string')) {
$xml = simplexml_load_string($xml);
}else{
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Íå óäàëîñü ïðîèçâåñòè îáðàáîòêó çàïðîñà'))));
die($this->backInformation());
}
$this->id = $xml->projectid;
if(!in_array($this->ip,$this->c['ip_list'])) {
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Íåò äîñòóïà ñ äàííîãî IP'))));
die($this->backInformation());
}
//Îáðàáîòêà çàïðîñîâ
if($xml->method == 'check_balance') {
//<sign>MD5(method+MD5(gdKey))</sign>
$sign = md5($xml->method.md5($this->c['key']));
if($sign == $xml->sign) {
//Áàëàíñ äèëåðà
$balance = 1000000;
$this->BACK = array(array('gdanswer',array(array('status','1'),array('desc','Áàëàíñ äèëåðà: '.$balance),array('balance',$balance))));
$this->add('4','check:'.$xml->nick.':1'.$r,0);
}
}elseif($xml->method == 'check') {
/*
nick - ëîãèí ïåðñîíàæà <sign>MD5(nick+method+MD5(gdKey))</sign> */
$sign = md5($xml->nick.$xml->method.md5($this->c['key']));
if($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if($this->test_accaunt($xml->nick) == true) {
//Ïåðñîíàæ íàéäåí è çà÷èñëÿåì åìó èãðîâóþ âàëþòó
$this->BACK = array(array('gdanswer',array(array('status','1'),array('desc','Áàíêîâñêèé ñ÷åò íàéäåí'))));
$this->add('3','check:'.$xml->nick.':1'.$r,0);
}else{
//Ïåðñîíàæ íå íàéäåí
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Ïëàòåæ íå îáðàáîòàí. Áàíêîâñêèé ñ÷åò íå íàéäåí.'))));
$this->add('-1','Ïåðñîíàæ íå íàéäåí:pay:'.$xml->nick.':0',0);
}
}
}elseif($xml->method == 'pay') {
/* Ïðîâîäèì ïëàòåæ
nick - ëîãèí àêêàóíòà , projectid - id ïðîåêòà , sign , amount - äåíüãè , payid - id ïëàòåæà */
$sign = md5($xml->nick.$xml->projectid.$xml->amount.$xml->payid.$xml->method.md5($this->c['key']));
if($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if($this->test_accaunt($xml->nick) == true) {
//Ïåðñîíàæ íàéäåí è çà÷èñëÿåì åìó èãðîâóþ âàëþòó
$bank = $this->test_accaunt($xml->nick);
if($bank > 0) {
mysql_query('UPDATE `bank` SET `money2` = `money2` + '.mysql_real_escape_string($xml->amount).' WHERE `id` = "'.mysql_real_escape_string($xml->nick).'" LIMIT 1');
$this->BACK = array(array('gdanswer',array(array('status','1'),array('desc','Ïëàòåæ ïðîøåë óñïåøíî'),array('id',$this->c['id']))));
$this->add('2','pay:'.$xml->nick.':'.$xml->projectid.':'.$xml->sign.':'.$xml->amount.':'.$xml->payid.':'.$bank['id'],$xml->amount);
$user = mysql_fetch_array(mysql_query('SELECT `id`,`uid` FROM `bank` WHERE `id` = "'.mysql_real_escape_string($xml->nick).'" LIMIT 1'));
$user = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`city`,`sex`,`room` FROM `users` WHERE `id` = "'.mysql_real_escape_string($user['uid']).'" LIMIT 1'));
mysql_query('UPDATE `users` SET `catch` = `catch` + '.mysql_real_escape_string(floor($xml->amount)).' WHERE `id` = "'.mysql_real_escape_string($xml->nick).'" LIMIT 1');
$r = '<span class=date>'.date('d.m.Y H:i').'</span> Àëõèìèê <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Enchanter</b> / Àâòîìàòè÷åñêàÿ îïëàòà</u> ñîîáùàåò: ';
if($user['sex'] == 1) {
$r .= 'Óâàæàåìàÿ';
}else{
$r .= 'Óâàæàåìûé';
}
$r .= ' <b>'.$user['login'].'</b>, íà Âàø áàíêîâñêèé ñ÷åò ¹'.$bank.' çà÷èñëåíî '.$xml->amount.' Ekr. Áëàãîäàðèì Âàñ çà ïîêóïêó!';
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')");
}else{
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Ó ïîëüçîâàòåëÿ îòñóòñòâóåò áàíê'),array('id',$this->c['id']))));
$this->add('-1','Ó ïåðñîíàæà îòñóòñòâóåò áàíê:pay:'.$xml->nick.':'.$xml->projectid.':'.$xml->sign.':'.$xml->amount.':'.$xml->payid.':'.$bank['id'],$xml->amount);
}
}else{
//Ïåðñîíàæ íå íàéäåí
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Ïëàòåæ íå îáðàáîòàí. Ïåðñîíàæ íå íàéäåí.'))));
$this->add('-1','Ïåðñîíàæ íå íàéäåí:pay:'.$xml->nick.':0',0);
}
}else{
//Îøèáêà ñèãíàòóðû
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Îøèáêà ñèãíàòóðû'))));
$this->add('-1','Îøèáêà ñèãíàòóðû:pay:'.$xml->nick.':0',0);
}
}elseif($xml->method == 'check_login') {
/* Ïðîâåðêà àêêàóíòà
nick - ëîãèí àêêàóíòà , projectid - id ïðîåêòà , sign */
$sign = md5($xml->nick.$xml->method.md5($this->c['key']));
if($sign == $xml->sign) {
$xml->nick = $this->in($xml->nick);
if($this->test_accaunt($xml->nick) == true) {
//Ïåðñîíàæ íàéäåí
$this->BACK = array(array('gdanswer',array(array('status','1'),array('desc','Ñ÷åò íàéäåí'),array('addinfo',$this->bank_user($xml->nick)))));
$this->add('1','check_login:'.$xml->nick.':1'.$r,0);
}else{
//Ïåðñîíàæ íå íàéäåí
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Ñ÷åò íå íàéäåí'))));
$this->add('-1','Ïåðñîíàæ íå íàéäåí:check_login:'.$xml->nick.':0',0);
}
}else{
//Îøèáêà ñèãíàòóðû
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Îøèáêà ñèãíàòóðû'))));
$this->add('-1','Îøèáêà ñèãíàòóðû:pay:'.$xml->nick.':0',0);
}
}else{
$this->BACK = array(array('gdanswer',array(array('status','-1'),array('desc','Íåèçâåñòíûé òèï çàïðîñà'))));
$this->add('-1','Íåèçâåñòíûé òèï çàïðîñà:error_method:gamedealer',0);
}
//Çàíîñèì èíôîðìàöèþ
/* Ïðèìåð ðåçóëüòàòà çàïðîñà
$this->BACK = array(
array('gdanswer',array(array('status',-100),array('desc','Îïèñàíèå çàïðîñà')))
);
*/
//Âîçâðàùàåì ðåçóëüòàò
$this->backInformation();
}
}
$pay = new GameDealerClass;
$pay->start_session();
?>

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -59,11 +59,9 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;
//$pvr['hp'] = $pvr['hp'][0];
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -1,5 +1,5 @@
<?php
/**@var $this priems*/
/**@var $this Priems*/
if(!defined('GAME')) {
die();
}

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Öåëü {ñòèõèÿ}
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
* @var $pl
*/

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['mp'] = floor($pvr['mp']*$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['x']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['mpSee'] = '--';
$pvr['mpNow'] = floor($btl->stats[$btl->uids[$u1]]['mpNow']);
$pvr['mpAll'] = $btl->stats[$btl->uids[$u1]]['mpAll'];

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Öåëü {ñòèõèÿ}
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
* @var $pl
*/

View File

@ -1,4 +1,4 @@
<?
<?php
if (!defined('GAME')) {
die();
@ -16,7 +16,7 @@ if ($pvr['x5']['x'] > 0) {
$this->addEffPr($pl, $id);
$prv['color2'] = '0af';
$prv['text'] = $btl->addlt(1, 19, $btl->users[$btl->uids[$u->info['id']]]['sex'], null);
$prv['text'] = $btl->addlt(1, 19, $btl->users[$btl->uids[$this->u->info['id']]]['sex'], null);
$prv['text2'] = '{tm1} ' . $prv['text'];
$btl->priemAddLog($id, 1, 2, $u->info['id'], $this->ue['id'],
'<font color^^^^#' . $prv['color2'] . '>Ñòàòèêà</font>',

View File

@ -1,7 +1,7 @@
<?php
/**
* Прием: Заряд: Поражение
* @var battleClass $btl
* @var Battle $btl
* @var $id
* @var $pl
*/

View File

@ -1,4 +1,4 @@
<?
<?php /**@var $this Priems*/
if (!defined('GAME')) {
die();
}
@ -6,47 +6,29 @@ if(!defined('GAME')) {
Ïðèåì: Çàðÿä: Ñîáðàòü
*/
$pvr = array();
//$pvr['mg'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$btl->users[$btl->uids[$this->ue['id']]]['id'].'" AND `v2` = "260" AND `user_use` = "'.$u->info['id'].'" ORDER BY `id` DESC LIMIT 1'));
$pvr['mg'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$btl->users[$btl->uids[$this->ue['id']]]['id'].'" AND `v2` = "260" ORDER BY `id` DESC LIMIT 1'));
if( isset($pvr['mg']['id']) ) {
//Äåéñòâèå ïðè êëèêå
//$pvr['hp'] = floor(144/3*$pvr['mg']['x']);
/*$pvr['hp'] = 1;*/
//
$pvr['mg'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = ' . $btl->users[$btl->uids[$this->ue['id']]]['id'] . ' AND `v2` = 260 ORDER BY `id` DESC LIMIT 1'));
if (!isset($pvr['mg']['id'])) {
echo '<b style="color: red">Íà ïåðñîíàæå íåò Ñòàòèêè</b>';
$cup = true;
} else {
$pvr['data'] = $this->lookStatsArray($pvr['mg']['data']);
//
/**/
if( $pvr['data']['add_mg2static_points'][0] < 1 ) {
echo '<font color=red><b>Ñòàòèêà íå ñîáðàëà äîñòàòî÷íîãî êîëè÷åñòâà çàðÿäîâ</b></font>';
if ($pvr['data']['add_mg2static_points'] < 1) {
echo '<b style="color: red">Ñòàòèêà íå ñîáðàëà äîñòàòî÷íîãî êîëè÷åñòâà çàðÿäîâ</b>';
$cup = true;
} else {
$prv['text'] = $btl->addlt(1 , 21 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$prv['text'] = $btl->addlt(1, 21, $btl->users[$btl->uids[$this->u->info['id']]]['sex'], NULL);
//Öâåò ïðèåìàû
if( $pvr['promah'] == false ) {
if( $pvr['krit'] == false ) {
$prv['color2'] = '006699';
if(isset($btl->mcolor[$btl->mname['âîçäóõ']])) {
$prv['color2'] = $btl->mcolor[$btl->mname['âîçäóõ']];
}
$prv['color'] = '000000';
if(isset($btl->mncolor[$btl->mname['âîçäóõ']])) {
$prv['color'] = $btl->mncolor[$btl->mname['âîçäóõ']];
}
}else{
$prv['color2'] = 'FF0000';
$prv['color'] = 'FF0000';
}
}else{
$prv['color2'] = '909090';
$prv['color'] = '909090';
}
$prv['color'] = $this->logColor[$this::AIR];
//Õèëÿåì ìàíó
$pvr['mp'] = $pvr['data']['add_mg2static_points'][0]*(3*$u->info['level']);
$pvr['mp'] = $pvr['data']['add_mg2static_points'] * (3 * $this->u->info['level']);
//
$pvr['mpSee'] = '';
$pvr['mpNow'] = floor($btl->stats[$btl->uids[$u->info['id']]]['mpNow']);
$pvr['mpAll'] = $btl->stats[$btl->uids[$u->info['id']]]['mpAll'];
$pvr['mpNow'] = floor($btl->stats[$btl->uids[$this->u->info['id']]]['mpNow']);
$pvr['mpAll'] = $btl->stats[$btl->uids[$this->u->info['id']]]['mpAll'];
$pvr['mpTr'] = $pvr['mpNow'] + $pvr['mp'];
if ($pvr['mpTr'] > $pvr['mpAll']) {
@ -61,53 +43,32 @@ if( isset($pvr['mg']['id']) ) {
$pvr['mpSee'] = $pvr['mp'];
}
if( $pvr['mpSee'] == '' || $pvr['mpSee'] == 0 ) {
if (empty($pvr['mpSee'])) {
$pvr['mpSee'] = '--';
}
$u->stats['mpNow'] = $pvr['mpNow'];
$u->info['mpNow'] = $pvr['mpNow'];
$btl->stats[$btl->uids[$u->info['id']]]['mpNow'] = $pvr['mpNow'];
$btl->users[$btl->uids[$u->info['id']]]['mpNow'] = $pvr['mpNow'];
mysql_query('UPDATE `stats` SET `mpNow` = "'.$u->stats['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$this->u->stats['mpNow'] = $pvr['mpNow'];
$this->u->info['mpNow'] = $pvr['mpNow'];
$btl->stats[$btl->uids[$this->u->info['id']]]['mpNow'] = $pvr['mpNow'];
$btl->users[$btl->uids[$this->u->info['id']]]['mpNow'] = $pvr['mpNow'];
mysql_query('UPDATE `stats` SET `mpNow` = ' . $this->u->stats['mpNow'] . ' WHERE `id` = ' . $this->u->info['id']);
//Óäàëÿåì 1 íåãàòèâíûé ýôôåêò
$pvr['no'] = ' AND `a`.`v2` != 201';
$pvr['sp'] = mysql_query('SELECT `a`.* FROM `eff_users` AS `a` LEFT JOIN `priems` AS `b` ON `b`.`id` = `a`.`v2` WHERE `a`.`uid` = "'.$u->info['id'].'" AND `a`.`delete` = 0 AND `a`.`v1` = "priem" '.$pvr['no'].' AND `b`.`neg` > 0 LIMIT 1');
$pvr['sp'] = mysql_query('select * from eff_users left join priems on priems.id = v2 where `delete` = 0 and neg > 0 and v1 = \'priem\' and v2 != 201 and uid = ' . $this->u->info['id']);
$pvr['pl'] = mysql_fetch_array($pvr['sp']);
$pvr['pl']['priem'] = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = "'.$pvr['pl']['v2'].'" LIMIT 1'));
shuffle($pvr['pl']);
$pvr['pl'] = $pvr['pl'][0];
$pvr['pl']['priem'] = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = ' . $pvr['pl']['v2']));
if (isset($pvr['pl']['priem'])) {
$btl->delPriem($pvr['pl'],$btl->users[$btl->uids[$u->info['id']]],100);
$btl->delPriem($pvr['pl'], $btl->users[$btl->uids[$this->u->info['id']]], 100);
}
$prv['text2'] = '{tm1} ' . $prv['text'] . ' ÷åðåç {u2}. <font Color=' . $prv['color'] . '><b>' . $pvr['mpSee'] . '</b></font> [' . $pvr['mpNow'] . '/' . $pvr['mpAll'] . '] (ìàíà)';
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $this->ue['id'],
'<font color^^^^#'.$prv['color2'].'>Çàðÿä: Ñîáðàòü</font>',
$prv['text2'],
($btl->hodID + 1)
);
$btl->priemAddLog($id, 1, 2, $this->u->info['id'], $this->ue['id'], '<font color^^^^#' . $prv['color'] . '>Çàðÿä: Ñîáðàòü</font>', $prv['text2'], ($btl->hodID + 1));
//Äîáàâëÿåì ïðèåì
//$this->addEffPr($pl,$id);
//$this->addPriem($this->ue['id'],$pl['id'],'atgm='.($pvr['hp']/16).'',2,77,4,$u->info['id'],3,'îëåäåíåíèå',0,0,1);
//Óäàëÿåì îëåäåíåíèå
$pvr['mg']['priem']['id'] = $pvr['mg']['id'];
//$btl->delPriem($pvr['mg'],$btl->users[$btl->uids[$this->ue['id']]],2);
$pvr['edt'] = $u->lookStats($pvr['mg']['data']);
$pvr['edt']['add_zm2proc'] = 0;
$pvr['edt']['add_mg2static_points'] = 0;
$pvr['edt'] = $u->impStats($pvr['edt']);
mysql_query('UPDATE `eff_users` SET `x` = 1, `data` = "'.$pvr['edt'].'" WHERE `id` = "'.$pvr['mg']['id'].'" LIMIT 1');
//Îòíèìàåì òàêòèêè
//$this->mintr($pl);
$pvr['edt'] = $this->changeStatsData($pvr['mg']['data'], ['add_mg2static_points' => 0]);
mysql_query('UPDATE `eff_users` SET `x` = 1, `data` = "' . $pvr['edt'] . '" WHERE `id` = ' . $pvr['mg']['id']);
}
}else{
echo '<font color=red><b>Íà ïåðñîíàæå íåò Ñòàòèêè (Âàøåãî çàêëÿòèÿ)</b></font>';
$cup = true;
}
unset($pvr);
?>

View File

@ -1,43 +1,27 @@
<?
if(!defined('GAME')) {
die();
}
/*
Ïðèåì: Îëåäåíåíèå: Ðàçáèòü!
<?php
/** Ïðèåì: Îëåäåíåíèå: Ðàçáèòü! (êàêîãî-òî õðåíà íåêîòîðûå ïðè¸ìû ïîëíîñòüþ óìèðàþò ïðè ïåðåíîñå â _cron_)
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/
if (!$id) {
exit();
}
//$cup = $this->glaciationBreak($id, $pl, $btl);
$pvr = array();
$pvr['mg'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$btl->users[$btl->uids[$this->ue['id']]]['id'].'" AND `bj` = "îëåäåíåíèå" AND `user_use` = "'.$u->info['id'].'" ORDER BY `id` DESC LIMIT 1'));
if( isset($pvr['mg']['id']) ) {
$pvr['mg'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "' . $btl->users[$btl->uids[$this->ue['id']]]['id'] . '" AND `bj` = "îëåäåíåíèå" AND `user_use` = "' . $this->u->info['id'] . '" ORDER BY `id` DESC LIMIT 1'));
if (!isset($pvr['mg']['id'])) {
echo '<b style="color: red;">Íà ïåðñîíàæå íåò îëåäåíåíèÿ (Âàøåãî çàêëÿòèÿ)</b>';
$cup = true;
} else {
//Äåéñòâèå ïðè êëèêå
//$pvr['hp'] = floor(144/3*$pvr['mg']['x']);
$pvr['hp'] = 1;
//
$pvr['data'] = $this->lookStatsArray($pvr['mg']['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['rd']++;
}
}
$pvr['di']++;
}
//
//$pvr['hp'] = 444;
$pvr['hp'] = 100;
//$pvr['hp'] += floor($pvr['hp']/100*$u->stats['mg3']);//óìåëêè
//$pvr['hp'] += floor($pvr['hp']/100*($u->stats['s5']*0.15));//Èíòåëåêò , áûëî 0.33
//
if( $btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'] < floor($btl->stats[$btl->uids[$this->ue['id']]]['hpAll']/100*33) ) {
//$pvr['hp'] = floor( $pvr['hp'] + ($pvr['hp']/100*(50*$pvr['mg']['x'])) );
$pvr['hp'] = 80;
if ($btl->stats[$btl->uids[$this->ue['id']]]['hpNow'] < floor($btl->stats[$btl->uids[$this->ue['id']]]['hpAll'] * 0.2)) {
$pvr['hp'] *= 1.5;
}
$pvr['hp'] = $this->magatack( $u->info['id'], $this->ue['id'], $pvr['hp'], 'âîäà', 1 );
$pvr['hp'] = $this->magatack($this->u->info['id'], $this->ue['id'], $pvr['hp'], 'âîäà', 1);
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
@ -47,11 +31,11 @@ if( isset($pvr['mg']['id']) ) {
$pvr['hpAll'] = $btl->stats[$btl->uids[$this->ue['id']]]['hpAll'];
//Èñïîëüçóåì ïðîâåðêó íà óðîí ïðèåìîâ
$pvr['hp'] = $btl->testYronPriem( $u->info['id'], $this->ue['id'], 21, $pvr['hp'], 7, true );
$pvr['hp'] = $btl->testYronPriem($this->u->info['id'], $this->ue['id'], 21, $pvr['hp'], 7, true);
$pvr['hpSee'] = '-' . $pvr['hp'];
$pvr['hpNow'] -= $pvr['hp'];
$btl->priemYronSave($u->info['id'],$this->ue['id'],$pvr['hp'],0);
$btl->priemYronSave($this->u->info['id'], $this->ue['id'], $pvr['hp'], 0);
if ($pvr['hpNow'] > $pvr['hpAll']) {
$pvr['hpNow'] = $pvr['hpAll'];
@ -61,44 +45,24 @@ if( isset($pvr['mg']['id']) ) {
$btl->stats[$btl->uids[$this->ue['id']]]['hpNow'] = $pvr['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->stats[$btl->uids[$this->ue['id']]]['hpNow'].'" WHERE `id` = "'.$this->ue['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `hpNow` = ' . $pvr['hpNow'] . ' WHERE `id` = ' . $this->ue['id']);
$prv['text'] = $btl->addlt(1 , 19 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$prv['text'] = $btl->addlt(1, 19, $btl->users[$btl->uids[$this->u->info['id']]]['sex'], NULL);
//Öâåò ïðèåìà
if( $pvr['promah'] == false ) {
if( $pvr['krit'] == false ) {
$prv['color2'] = '006699';
if(isset($btl->mcolor[$btl->mname['âîäà']])) {
$prv['color2'] = $btl->mcolor[$btl->mname['âîäà']];
}
$prv['color'] = '000000';
if(isset($btl->mncolor[$btl->mname['âîäà']])) {
$prv['color'] = $btl->mncolor[$btl->mname['âîäà']];
}
if ($pvr['promah']) {
$prv['color'] = $this->logColor['miss'];
} elseif ($pvr['krit']) {
$prv['color'] = $this->logColor['crit'];
} else {
$prv['color2'] = 'FF0000';
$prv['color'] = 'FF0000';
$prv['color'] = $this->logColor[$this::WATER];
}
}else{
$prv['color2'] = '909090';
$prv['color'] = '909090';
}
$prv['text2'] = '{tm1} '.$prv['text'].'. <font Color='.$prv['color'].'><b '.$btl->maginfoattack($u->info['id'],$this->ue['id'],3).'>'.$pvr['hpSee'].'</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']';
$prv['text2'] = '{tm1} ' . $prv['text'] . '. <font Color=' . $prv['color'] . '><b ' . $btl->maginfoattack($this->u->info['id'], $this->ue['id'], 3) . '>' . $pvr['hpSee'] . '</b></font> [' . $pvr['hpNow'] . '/' . $pvr['hpAll'] . ']';
if ($pvr['promah_type'] == 2) {
$prv['text'] = $btl->addlt(1 , 20 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$prv['text2'] = '{tm1} '.$prv['text'].'. <font Color='.$prv['color'].'><b '.$btl->maginfoattack($u->info['id'],$this->ue['id'],3).'>--</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']';
$prv['text'] = $btl->addlt(1, 20, $btl->users[$btl->uids[$this->u->info['id']]]['sex'], NULL);
$prv['text2'] = '{tm1} ' . $prv['text'] . '. <font Color=' . $prv['color'] . '><b ' . $btl->maginfoattack($this->u->info['id'], $this->ue['id'], 3) . '>--</b></font> [' . $pvr['hpNow'] . '/' . $pvr['hpAll'] . ']';
}
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'<font color^^^^#'.$prv['color2'].'>Îëåäåíåíèå: Ðàçáèòü!</font>',
$prv['text2'],
($btl->hodID + 1)
);
//Äîáàâëÿåì ïðèåì
//$this->addEffPr($pl,$id);
//$this->addPriem($u->info['enemy'],$pl['id'],'atgm='.($pvr['hp']/16).'',2,77,4,$u->info['id'],3,'îëåäåíåíèå',0,0,1);
$btl->priemAddLog($id, 1, 2, $this->u->info['id'], $this->u->info['enemy'], '<font color^^^^#' . $prv['color'] . '>Îëåäåíåíèå: Ðàçáèòü!</font>', $prv['text2'], ($btl->hodID + 1));
//Óäàëÿåì îëåäåíåíèå
$pvr['mg']['priem']['id'] = $pvr['mg']['id'];
@ -106,9 +70,5 @@ if( isset($pvr['mg']['id']) ) {
//Îòíèìàåì òàêòèêè
$this->mintr($pl);
}else{
echo '<font color=red><b>Íà ïåðñîíàæå íåò îëåäåíåíèÿ (Âàøåãî çàêëÿòèÿ)</b></font>';
$cup = true;
}
unset($pvr);
?>

View File

@ -1,11 +1,10 @@
<?
<?php
/** @var $this Priems*/
if(!defined('GAME')) {
die();
}
/*
Ïðèåì: Êðèñòàëëèçàöèÿ
*/
$pvr = array();
/* Ïðèåì: Êðèñòàëëèçàöèÿ */
if( isset($pr_used_this) && isset($pr_moment) ) {
//Êàæäûé õîä
$fx_priem = function( $id , $at , $uid, $j_id ) {
@ -13,76 +12,5 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
};
unset( $pr_used_this );
}else{
//Äåéñòâèå ïðè êëèêå
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;
$pvr['hp'] = $btl->stats[$btl->uids[$this->ue['id']]]['s1'];
if( $pvr['hp'] > 10*$u->info['level'] ) {
$pvr['hp'] = $u->info['level']*10;
$this->crystalize($id, $pl, $btl);
}
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$this->ue['id']]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$this->ue['id']]]['hpAll'];
//Èñïîëüçóåì ïðîâåðêó íà óðîí ïðèåìîâ
$pvr['hp'] = $btl->testYronPriem( $u->info['id'], $this->ue['id'], 21, $pvr['hp'], 7, true );
$pvr['hpSee'] = '-'.$pvr['hp'];
$pvr['hpNow'] -= $pvr['hp'];
$btl->priemYronSave($u->info['id'],$this->ue['id'],$pvr['hp'],0);
if( $pvr['hpNow'] > $pvr['hpAll'] ) {
$pvr['hpNow'] = $pvr['hpAll'];
}elseif( $pvr['hpNow'] < 0 ) {
$pvr['hpNow'] = 0;
}
$btl->stats[$btl->uids[$this->ue['id']]]['hpNow'] = $pvr['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->stats[$btl->uids[$this->ue['id']]]['hpNow'].'" WHERE `id` = "'.$this->ue['id'].'" LIMIT 1');
$prv['text'] = $btl->addlt(1 , 19 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
//Öâåò ïðèåìà
if( $pvr['promah'] == false ) {
if( $pvr['krit'] == false ) {
$prv['color2'] = '006699';
if(isset($btl->mcolor[$btl->mname['âîäà']])) {
$prv['color2'] = $btl->mcolor[$btl->mname['âîäà']];
}
$prv['color'] = '000000';
if(isset($btl->mncolor[$btl->mname['âîäà']])) {
$prv['color'] = $btl->mncolor[$btl->mname['âîäà']];
}
}else{
$prv['color2'] = 'FF0000';
$prv['color'] = 'FF0000';
}
}else{
$prv['color2'] = '909090';
$prv['color'] = '909090';
}
$prv['text2'] = '{tm1} '.$prv['text'].'. <font Color='.$prv['color'].'><b '.$btl->maginfoattack($u->info['id'],$this->ue['id'],3).'>'.$pvr['hpSee'].'</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']';
if( $pvr['promah_type'] == 2 ) {
$prv['text'] = $btl->addlt(1 , 20 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$prv['text2'] = '{tm1} '.$prv['text'].'. <font Color='.$prv['color'].'><b '.$btl->maginfoattack($u->info['id'],$this->ue['id'],3).'>--</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']';
}
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $this->ue['id'],
'<font color^^^^#'.$prv['color2'].'>Êðèñòàëëèçàöèÿ</font>',
$prv['text2'],
($btl->hodID + 1)
);
//Äîáàâëÿåì ïðèåì
//$this->addEffPr($pl,$id);
$this->addPriem($this->ue['id'],268,'|add_s1=-'.$btl->stats[$btl->uids[$u->info['id']]]['mg3'].'|add_s2=-'.$btl->stats[$btl->uids[$u->info['id']]]['mg3'],2,77,3,$u->info['id'],3,'êðèñòàëëèçàöèÿ',0,0,1);
//Îòíèìàåì òàêòèêè
//$this->mintr($pl);
}
unset($pvr);
?>

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Öåëü {ñòèõèÿ}
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
* @var $pl
*/

View File

@ -101,11 +101,9 @@ if( isset($pr_momental_this)) {
//
//
//$priem->addPriem($u1,278,'|add_yzm3=-'.($btl->users[$btl->uids[$u2]]['level']).'',2,77,2,$u2,100,'èíåéêàñàíèå',0,0,1);
$pvr['x55'] = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$u1.'" AND `v2` = 25 AND `delete` = 0 LIMIT 1'));
if( $pvr['x55']['x'] <1 ) {
$priem->addPriem($u1,25,-1,2,77,-1,$u2,5,'öåëüâîäû',0,0,1);
//$priem->addPriem($u1,25,'|add_zm3=-20',2,77,-1,$u2,100,'öåëüâîäû',0,0,1);
if( $pvr['used'] == 0 ) {
$at['p'][$a]['atack'][$j]['yron']['plog'][] = '$this->priemAddLog( '.$id.', '.$b.', '.$a.', '.$u2.', '.$u1.',
"<font color^^^^#'.$prv['color2'].'>Öåëü Âîäû</font>",

View File

@ -145,8 +145,6 @@ if( isset($pr_momental_this)) {
}*/
//}
//
//$priem->addPriem($u1,279,'|add_yzm3=-'.floor($btl->users[$btl->uids[$u2]]['level']*1.25).'',2,77,2,$u2,100,'číĺéęŕńŕíčĺ',0,0,1);
//$priem->addPriem($u1,278,'|add_yzm3=-'.($btl->users[$btl->uids[$u2]]['level']).'',2,77,2,$u2,100,'číĺéęŕńŕíčĺ',0,0,1);
$pvr['x5'] = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$u1.'" AND `v2` = 25 AND `delete` = 0 LIMIT 1'));
if( $pvr['x5']['x'] < 5 ) {
$priem->addPriem($u1,25,'|add_zm3=-20',2,77,-1,$u2,100,'öåëüâîäû',0,0,1);

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Öåëü {ñòèõèÿ}
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
* @var $pl
*/

View File

@ -39,34 +39,12 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
if( $pvr['hp'] < 1 ) {
$pvr['hp'] = 1;
}
//
/*
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}
*/
//
$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data'] = $pvr['redata'];
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -39,34 +39,12 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
if( $pvr['hp'] < 1 ) {
$pvr['hp'] = 1;
}
//
/*
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}
*/
//
$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data'] = $pvr['redata'];
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -39,34 +39,12 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
if( $pvr['hp'] < 1 ) {
$pvr['hp'] = 1;
}
//
/*
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}
*/
//
$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data'] = $pvr['redata'];
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -41,32 +41,12 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];
/*//
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}*/
//
$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data'] = $pvr['redata'];
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -40,23 +40,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
//äåéñòâèÿ
$pvr['hp'] = rand(15,25);
/*//
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}*/
//
$pvr['hp'] = rand(15,25);
if( $pvr['ijk'] == 1 ) {
$pvr['mgtype'] = 5;
@ -101,11 +85,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -41,32 +41,12 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];
/*//
$pvr['data'] = $priem->lookStatsArray($btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data']);
$pvr['di'] = 0;
$pvr['dc'] = count($pvr['data']['atgm']);
$pvr['rd'] = 0;
$pvr['redata'] = '';
while( $pvr['di'] < 4 ) {
if( isset($pvr['data']['atgm'][($pvr['dc']-$pvr['di'])]) ) {
if( $pvr['rd'] < 3 ) {
$pvr['hp'] += $pvr['data']['atgm'][($pvr['dc']-$pvr['di'])];
$pvr['redata'] = 'atgm='.$pvr['data']['atgm'][($pvr['dc']-$pvr['di'])].'|'.$pvr['redata'];
$pvr['rd']++;
}
}
$pvr['di']++;
}*/
//
$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['data'] = $pvr['redata'];
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -1,17 +1,14 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
/** Ïðèåì: Ïîæèðàþùåå Ïëàìÿ [6]
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/
if (!$id) {
exit();
}
/*
Ïðèåì: Ïîæèðàþùåå Ïëàìÿ [6]
*/
if (isset($pr_used_this) && isset($pr_moment)) {
//Êàæäûé õîä

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Âñïûøêà [8]
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
*/

View File

@ -60,11 +60,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id int
* @var $pl array
*/

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Âñïûøêà [9]
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
*/

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Âñïûøêà [10]
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
*/

View File

@ -2,8 +2,8 @@
/**
* Ïðèåì: Âñïûøêà [11]
* @var $this priems
* @var $btl battleClass
* @var $this Priems
* @var $btl Battle
* @var $id
*/

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -59,11 +59,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -59,7 +59,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -59,7 +59,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -59,7 +59,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -61,7 +61,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -56,7 +56,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -59,7 +59,6 @@ if( isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !is
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
//$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäà', 0 );
$pvr['promah_type'] = 0;
$pvr['promah'] = false;
$pvr['krit'] = false;

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -57,11 +57,7 @@ if( isset($pr_used_this) && isset($pr_moment) ) {
mysql_query('UPDATE `eff_users` SET `data` = "'.$pvr['redata'].'" WHERE `id` = "'.$btl->stats[$btl->uids[$u1]]['effects'][$prv['j_priem']]['id'].'" LIMIT 1');
//
$pvr['hp'] = floor($pvr['hp']);
/*$pvr['hp'] = $priem->magatack( $u2, $u1, $pvr['hp'], 'âîäŕ', 0 );
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];*/
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u1]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u1]]['hpAll'];

View File

@ -1,4 +1,4 @@
<?
<?php
if( !defined('GAME') ) { die(); }
/*
Наложенное заклятие: Проклятье Древних
@ -6,47 +6,3 @@ if( !defined('GAME') ) { die(); }
Отнимает у противника 5 выносливости, 5 ловкости, 5 интуиции, 5 силы, 5 интеллекта на 5 разменов.
Шанс срабатывания: 5%
*/
if($e['bm_a1']=='curse_01'){
if(rand(0,10000)<500){
//íàíîñèì óðîí ìàãè÷åñêèì êîëüöîì
//$hpmin = rand(5,10);
//$hpmin = $priem->testPower($this->stats[$this->uids[$uid1]],$this->stats[$this->uids[$uid2]],$hpmin,3,2);
//$hpmin = round($hpmin);
//if($hpmin < 0) { $hpmin = 0; }
//$hp2 = $this->stats[$this->uids[$uid2]]['hpNow'];
//
////ðàñ÷åò óðîíà ñòèõèé
//
//$hp2 -= $hpmin;
//if($hp2<0)
//{
// $hp2 = 0;
//}elseif($hp2>$this->stats[$this->uids[$uid2]]['hpNow'])
//{
// $hp2 = $this->stats[$this->uids[$uid2]]['hpNow'];
//}
//
//$this->takeExp($u->info['id'],$hpmin,$uid1,$uid2);
//
////îòíèìàåì ÍÐ
//$this->users[$this->uids[$uid2]]['hpNow'] = $hp2;
//$this->stats[$this->uids[$uid2]]['hpNow'] = $hp2;
//mysql_query('UPDATE `stats` SET `hpNow` = '.$hp2.' WHERE `id` = "'.$uid2.'" LIMIT 1');
//
////çàíîñèì â ëîã áîÿ
//$vLog = 'time1='.time().'||s1='.$this->users[$this->uids[$uid1]]['sex'].'||t1='.$this->users[$this->uids[$uid1]]['team'].'||login1='.$this->users[$this->uids[$uid1]]['login'].'||s2='.$this->users[$this->uids[$uid2]]['sex'].'||t2='.$this->users[$this->uids[$uid2]]['team'].'||login2='.$this->users[$this->uids[$uid2]]['login'].'';
//$mas1 = array('time'=>time(),'battle'=>$this->info['id'],'id_hod'=>($this->hodID),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
//if($hpmin>0)
//{
// $hpmin = '-'.$hpmin;
//}else{
// $hpmin = '--';
//}
//$mas1['text'] = '{tm1} {u2} ïîëó÷èë ïîâðåæäåíèå îò ìàãè÷åñêîãî ïðåäìåòà &quot;<b>'.$itm['name'].'</b>&quot;. <b title=Òèï&nbsp;óðîíà:&nbsp;õîëîä ><font color=#0000FF>'.$hpmin.'</font></b> ['.ceil($hp2).'/'.$this->stats[$this->uids[$uid2]]['hpAll'].']';
//$this->add_log($mas1);
}
}
?>

View File

@ -12,7 +12,6 @@ if($e['bm_a1']=='itm286' && $end > 0)
//íàíîñèì óðîí ìàãè÷åñêèì êîëüöîì
$hpmin = rand(5,8);
$hpmin += round($this->stats[$this->uids[$uid1]]['mg1']*1.35);
//$hpmin = $priem->testPower($this->stats[$this->uids[$uid1]],$this->stats[$this->uids[$uid2]],$hpmin,1,2);
//
$hpmin = $priem->magatack($uid1,$uid2,$hpmin,'îãîíü',false);
$hpmin = $hpmin[0];

View File

@ -12,7 +12,6 @@ if($e['bm_a1']=='itm347' && $end > 0)
//íàíîñèì óðîí ìàãè÷åñêèì êîëüöîì
$hpmin = rand(5,8);
$hpmin += round($this->stats[$this->uids[$uid1]]['mg1']*1.35);
//$hpmin = $priem->testPower($this->stats[$this->uids[$uid1]],$this->stats[$this->uids[$uid2]],$hpmin,1,2);
//
$hpmin = $priem->magatack($uid1,$uid2,$hpmin,'îãîíü',false);
$hpmin = $hpmin[0];

View File

@ -1,9 +1,22 @@
<?
<?php
if(!defined('GAME'))
{
die();
}
function getdr($s, $v, $d)
{
$i = 0;
while ($i < count($v)) {
if (isset($v[$i])) {
$s = str_replace('{' . $v[$i] . '}', $d[$i], $s);
}
$i++;
}
$s = eval("return (" . $s . ");");
return floor($s);
}
if($pl['id'] == 189) {
$imun = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$u->info['enemy'].'" and `v2`="191" and `delete`="0" LIMIT 1'));
//Îøåëîìèòü
@ -27,23 +40,6 @@ if($pl['id'] == 189) {
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
/*$hp = $u->info['level']*2-$u->info['level'];
if($hp < 0) {
$hp = 0;
}*/
/*$btl->users[$btl->uids[$u->info['enemy']]]['hpNow'] -= $hp;
$btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'] -= $hp;
$btl->users[$btl->uids[$u->info['enemy']]]['last_hp'] = -$hp;
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'].'",`last_hp` = "'.$btl->users[$btl->uids[$u->info['enemy']]]['last_hp'].'" WHERE `id` = "'.$u->info['enemy'].'" LIMIT 1');
if($hp < 1) {
$hp = '--';
}else{
$hp = -$hp;
}*/
$mas1['text'] = '{tm1} {u1} {1x16x0} ïðèåì &quot;<b>'.$pl['name'].'</b>&quot; è îøåëîìèë'.$sx.' ïåðñîíàæà {u2} íà äâà õîäà.';
$pz = $btl->users[$btl->uids[$u->info['enemy']]]['priems_z'];
$p_id = $btl->users[$btl->uids[$u->info['enemy']]]['priems'];
@ -318,11 +314,7 @@ if($pl['id'] == 189) {
$pr78++;
}
}
/*if($pr78 > 0) {
$this->stats[$this->uids[$u1['id']]] = $u->getStats($u1['id'],0);
$this->stats[$this->uids[$u2['id']]] = $u->getStats($u2['id'],0);
$this->re_pd['restart'] = true;
}*/
unset($pr78,$vLog,$mas1,$pl031,$sp031);
}
}elseif($pl['id']==12)

View File

@ -11,7 +11,7 @@
$txt .= '<br><b><font color=red>Âû óæå ïîëó÷èëè </b></font>';
*/
$txt = isset($txt) ?: '';
$test = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest" LIMIT 1'));
if (!isset($test['id']))
{

578
admin.php
View File

@ -1,578 +0,0 @@
<?php
/*
ßäðî äëÿ îáðàáîòêè äàííûõ.
Îáðàáîòêà ïîåäèíêîâ, îáðàáîòêà çàÿâîê, îáðàáîòêà áîòîâ, îáðàáîòêà ïåùåð, îáðàáîòêà òóðíèðîâ, îáðàáîòêà âðåìåííûõ ãåíåðàöèé
*/
define('GAME',true);
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
if(isset($_GET['bonus'])) {
$sp = mysql_query('SELECT * FROM `users` WHERE `real` = 1 AND `banned` = 0 AND `id` = 75301');
while( $pl = mysql_fetch_array($sp) ) {
//
//$u->addItem(730, $pl['id'], '|nosale=1|notransfer=1|sudba=1|halo1=1');
//$u->addItem(1167, $pl['id'], '|nosale=1|notransfer=1|sudba=1|halo1=1');
$i = 1;
while( $i <= 25 ) {
//$u->addItem(4913, $pl['id'], '|nosale=1|notransfer=1|sudba=1|halo1=1');
if( $i <= 10 ) {
//$u->addItem(4039, $pl['id'], '|nosale=1|notransfer=1|sudba=1|halo1=1');
}
//$u->addItem(4690, $pl['id'], '|nosale=1|notransfer=1|sudba=1|halo1=1');
$i++;
}
//
/*$sp1 = mysql_query('SELECT `id` FROM `items_main` WHERE `magic_inci` = "tznanie" AND `name` NOT LIKE "%(òîì%" AND `name` NOT LIKE "%(ñåêðåòíûé òîì%"');
while( $pl1 = mysql_fetch_array($sp1) ) {
mysql_query('INSERT INTO `actions` (
`uid`,`time`,`city`,`room`,`vars`,`vals`
) VALUES (
"'.$pl['id'].'","'.time().'","capitalcity","213","read","'.$pl1['id'].'"
)');
}*/
}
die();
}
include('_incl_data/class/bot.logic.php');
if( $u->info['admin'] > 0 ) {
if(isset($_POST['complect_saver'])) {
$cs = $_POST['complect_saver'];
$cs = json_decode($cs);
$v1 = '';
$v2 = '';
$eff = '0';
$csa = $cs->{'lvl'};
$csm = $cs->{'lvl'}+1;
if($csa > 5) {
$csa = 5;
}
if($csm > 10) {
$csm = 10;
}
$up_id = 0;
$sp = mysql_query('SELECT * FROM `levels` ORDER BY `upLevel`');
$ups = array();
$all_ups = array();
$lvl = 0;
while($pl = mysql_fetch_array($sp)) {
$all_ups[$lvl][(0+$ups[$lvl])] = ($pl['upLevel']-1);
$ups[$lvl]++;
if($lvl != $pl['nextLevel']) {
$lvl = $pl['nextLevel'];
}else{
}
}
$up_id = $all_ups[$cs->{'lvl'}][$cs->{'up'}];
$stats = 's1='.$cs->{'s1'}.'|s2='.$cs->{'s2'}.'|s3='.$cs->{'s3'}.'|s4='.$cs->{'s4'}.'|rinv=40|m9=5|m6=10|a1='.$csa.'|a2='.$csa.'|a3='.$csa.'|a4='.$csa.'|a5='.$csa.'|mg1='.$csm.'|mg2='.$csm.'|mg3='.$csm.'|mg4='.$csm.'|mg5='.$csm.'|mg6='.$csa.'|mg7='.$csa.'|s5='.$cs->{'s5'}.'|s6='.$cs->{'s6'}.'|os1=0|os2=0|os3=0|os4=0|os5=0|os6=0|os7=0|os8=0|os9=0|os10=0|os11=0|s7=0|s8=0|s9=0|s10=0|a6=5|a7=5';
$i = 0;
while( $i < 20 ) {
if( $cs->{'w'.$i} > 0 ) {
$v1 .= ',`w'.$i.'`';
$v2 .= ',"'.$cs->{'w'.$i}.'"';
}
if( $cs->{'s'.$i} > 0 ) {
$v1 .= ',`s'.$i.'`';
$v2 .= ',"'.$cs->{'s'.$i}.'"';
}
if( $cs->{'e'.$i} > 0 ) {
$v1 .= ',`e'.$i.'`';
$v2 .= ',"'.$cs->{'e'.$i}.'"';
$eff .= ','.$i;
}
if( $cs->{'p'.$i} > 0 ) {
$v1 .= ',`p'.$i.'`';
$v2 .= ',"'.$cs->{'p'.$i}.'"';
}
$i++;
}
mysql_query('INSERT INTO `a_bot_tree` (`delete`,`class`,`level`,`up`,`stats`,`eff`,`pr`'.$v1.') VALUES ("1","'.$cs->{'class'}.'","'.$cs->{'lvl'}.'","'.$up_id.'","'.$stats.'","'.$eff.'","'.$pr.'"'.$v2.') ');
$_GET['good'] = mysql_insert_id();
//header('location: admin.php?good');
}
if(isset($_GET['good'])) {
$error = 'Êîìëïåêò áûë óñïåøíî ñîõðàíåí!<br><br>Íîìåð êîìïëåêòà: '.$_GET['good'];
die($error);
}
/* ÏÐÅÄÌÅÒÛ */
$w = array();
$ws = array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
10,
10,
13,
14,
15,
16,
17
);
$i = 1;
while( $i <= 17 ) {
if($i != 14) {
$sp = mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `inslot` = "'.$ws[$i].'" ORDER BY `type` ASC,`level` ASC');
while($pl = mysql_fetch_array($sp)) {
$w[$i] .= '['.$pl['id'].',"'.$pl['name'].'","'.$pl['img'].'"],';
}
$w[$i] = rtrim($w[$i],',');
}
$i++;
}
$sp = mysql_query('SELECT `id`,`name`,`img` FROM `items_main` WHERE `2too` = "1" OR `inslot` = "14" ORDER BY `type` ASC,`level` ASC');
while($pl = mysql_fetch_array($sp)) {
$w[14] .= '['.$pl['id'].',"'.$pl['name'].'","'.$pl['img'].'"],';
}
$w[14] = rtrim($w[14],',');
/* ÏÐÈÅÌÛ */
$pr = '';
$sp = mysql_query('SELECT `id`,`name`,`img` FROM `priems` ORDER BY `img` ASC');
while($pl = mysql_fetch_array($sp)) {
$pr .= '['.$pl['id'].',"'.$pl['name'].'","'.$pl['img'].'.gif"],';
}
$pr = rtrim($pr,',');
/* ÝÔÔÅÊÒÛ */
$eff = '';
$sp = mysql_query('SELECT `id2`,`mname`,`img` FROM `eff_main` WHERE `type1` != 23 ORDER BY `type1` ASC');
while($pl = mysql_fetch_array($sp)) {
$eff .= '['.$pl['id2'].',"'.$pl['mname'].'","'.$pl['img'].'"],';
}
$eff = rtrim($eff,',');
?>
<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="https://img.new-combats.com/css/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.js"></script>
<title>Ðåäàêòîð îáìóíäèðîâàíèÿ ïåðñîíàæåé</title>
<script>
var admin = {
com:{},
start:function() {
var i = 0;
while( i <= 17 ) {
$('#w'+i).attr('IDreal',i);
$('#w'+i).bind('click', function(){ admin.select($(this).attr('IDreal')); } );
i++;
}
var i = 0;
while( i <= 12 ) {
$('#e'+i).attr('IDreal',i);
$('#e'+i).bind('click', function(){ admin.select_eff($(this).attr('IDreal')); } );
i++;
}
var i = 0;
while( i <= 18 ) {
$('#p'+i).attr('IDreal',i);
$('#p'+i).bind('click', function(){ admin.select_pr($(this).attr('IDreal')); } );
i++;
}
},
save:function() {
var r = this.finish_line();
$('#save').html( '<b>Ñêîïèðóéòå â áóôåð îáìåíà:</b><br><br><form name="f1" id="f1" action="admin.php" target="_blank" method="post"><textarea name="complect_saver" style="width:600px;" rows="5">'+r+'</textarea><br><button type="sumbit"></button></form>' );
$('#f1').submit();
},
finish_line:function() {
this.com['lvl'] = $('#lvl').val();
this.com['up'] = $('#up').val();
this.com['class'] = $('#pclss').val();
var i = 1;
while( i <= 6 ) {
this.com['s'+i] = $('#s'+i).val();
i++;
}
var r = JSON.stringify( this.com );
return r;
},
take:function( id, i ) {
if( top.items[id][i] != undefined ) {
this.com['w'+id] = top.items[id][i][0];
$('#w'+id).attr({
'src':'https://img.new-combats.com/i/items/'+top.items[id][i][2],
'title':top.items[id][i][1]
});
}
},
take_eff:function( id, i ) {
if( top.items['eff'][i] != undefined ) {
this.com['e'+id] = top.items['eff'][i][0];
$('#e'+id).attr({
'src':'https://img.new-combats.com/i/eff/'+top.items['eff'][i][2],
'title':top.items['eff'][i][1]
});
}
},
take_pr:function( id, i ) {
if( top.items['pr'][i] != undefined ) {
this.com['p'+id] = top.items['pr'][i][0];
$('#p'+id).attr({
'src':'https://img.new-combats.com/i/eff/'+top.items['pr'][i][2],
'title':top.items['pr'][i][1]
});
}
},
select_pr:function (id) {
var html = '';
if( top.items['pr'] != undefined ) {
var i = 0;
while( i != -1 ) {
if( top.items['pr'][i] == undefined ) {
i = -2;
}else{
html += '<img width="40" height="25" onclick="admin.take_pr('+id+','+i+');" style="cursor:pointer;padding:2px;" title="'+top.items['pr'][i][1]+'" src="https://img.new-combats.com/i/eff/'+top.items['pr'][i][2]+'">';
}
i++;
}
}
if( html == '' ) {
html = 'Íåò ïîäõîäÿùèõ ïðèåìîâ';
}
$('#items_add').html( html );
},
select_eff:function (id) {
var html = '';
if( top.items['eff'] != undefined ) {
var i = 0;
while( i != -1 ) {
if( top.items['eff'][i] == undefined ) {
i = -2;
}else{
html += '<img width="40" height="25" onclick="admin.take_eff('+id+','+i+');" style="cursor:pointer;padding:2px;" title="'+top.items['eff'][i][1]+'" src="https://img.new-combats.com/i/eff/'+top.items['eff'][i][2]+'">';
}
i++;
}
}
if( html == '' ) {
html = 'Íåò ïîäõîäÿùèõ ýôôåêòîâ';
}
$('#items_add').html( html );
},
select:function( id ) {
var html = '';
if( top.items[id] != undefined ) {
var i = 0;
while( i != -1 ) {
if( top.items[id][i] == undefined ) {
i = -2;
}else{
html += '<img onclick="admin.take('+id+','+i+');" style="cursor:pointer;padding:2px;" title="'+top.items[id][i][1]+'" src="https://img.new-combats.com/i/items/'+top.items[id][i][2]+'">';
}
i++;
}
}
if( html == '' ) {
html = 'Íåò ïîäõîäÿùèõ ïðåäìåòîâ';
}
$('#items_add').html( html );
}
};
var items = {
<?
$i = 1;
while( $i <= 17 ) {
echo $i.':['.$w[$i].'],';
$i++;
}
echo '"eff":['.$eff.'],"pr":['.$pr.']';
?>
};
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
</head>
<body onLoad="admin.start();">
<table width="100%" border="0" cellpadding="25" cellspacing="0">
<tr>
<td width="250" valign="top"><div style="width:240px; padding:2px; border-bottom:1px solid #666666; border-right:1px solid #666666; border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">
<div align="center">
<!-- blocked -->
</div>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60" valign="top"><table width="60" height="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="60"><div style="position:relative"><img id="w1" style="display:block;" title="Ïóñòîé ñëîò øëåì" src="https://img.new-combats.com/i/items/w/w9.gif"></div></td>
</tr>
<tr>
<td height="40"><img id="w2" style="display:block;" title="Ïóñòîé ñëîò íàðó÷è" src="https://img.new-combats.com/i/items/w/w13.gif"></td>
</tr>
<tr>
<td height="60"><img id="w3" style="display:block;" title="Ïóñòîé ñëîò ùèò" src="https://img.new-combats.com/i/items/w/w3.gif"></td>
</tr>
<tr>
<td height="80"><img id="w5" style="display:block;" title="Ïóñòîé ñëîò ùèò" src="https://img.new-combats.com/i/items/w/w4.gif"></td>
</tr>
<tr>
<td height="40"><img id="w7" style="display:block;" title="Ïóñòîé ñëîò ïîÿñ" src="https://img.new-combats.com/i/items/w/w5.gif"></td>
</tr>
</table></td>
<td height="280" valign="top"><table width="120" height="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" valign="top" bgcolor="#EDEDED"><!-- HP and MP -->
<!-- --></td>
</tr>
<tr>
<td valign="top" bgcolor="#333333">&nbsp;</td>
</tr>
<tr>
<td height="40"><div align="center">
<table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò ïðàâûé êàðìàí" src="https://img.new-combats.com/i/items/w/w15.gif"></td>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò öåíòðàëüíûé êàðìàí" src="https://img.new-combats.com/i/items/w/w15.gif"></td>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò ëåâûé êàðìàí" src="https://img.new-combats.com/i/items/w/w15.gif"></td>
</tr>
<tr>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò ñìåíà" src="https://img.new-combats.com/i/items/w/w20.gif"></td>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò ñìåíà" src="https://img.new-combats.com/i/items/w/w20.gif"></td>
<td width="40" height="20"><img style="display:block;" title="Ïóñòîé ñëîò ñìåíà" src="https://img.new-combats.com/i/items/w/w20.gif"></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
<td width="60" valign="top"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"><img id="w8" style="display:block;" title="Ïóñòîé ñëîò ñåðüãè" src="https://img.new-combats.com/i/items/w/w1.gif"></td>
</tr>
<tr>
<td height="20"><img id="w9" style="display:block;" title="Ïóñòîé ñëîò îæåðåëüå" src="https://img.new-combats.com/i/items/w/w2.gif"></td>
</tr>
<tr>
<td height="20"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="20"><img id="w10" style="display:block;" title="Ïóñòîé ñëîò êîëüöî" src="https://img.new-combats.com/i/items/w/w6.gif"></td>
<td width="20"><img id="w11" style="display:block;" title="Ïóñòîé ñëîò êîëüöî" src="https://img.new-combats.com/i/items/w/w6.gif"></td>
<td width="20"><img id="w12" style="display:block;" title="Ïóñòîé ñëîò êîëüöî" src="https://img.new-combats.com/i/items/w/w6.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="40"><img id="w13" style="display:block;" title="Ïóñòîé ñëîò ïåð÷àòêè" src="https://img.new-combats.com/i/items/w/w11.gif"></td>
</tr>
<tr>
<td height="60"><img id="w14" style="display:block;" title="Ïóñòîé ñëîò ùèò" src="https://img.new-combats.com/i/items/w/w10.gif"></td>
</tr>
<tr>
<td height="80"><img id="w16" style="display:block;" title="Ïóñòîé ñëîò ùèò" src="https://img.new-combats.com/i/items/w/w19.gif"></td>
</tr>
<tr>
<td height="40"><img id="w17" style="display:block;" title="Ïóñòîé ñëîò îáóâü" src="https://img.new-combats.com/i/items/w/w12.gif"></td>
</tr>
</table></td>
</tr>
</table>
<p><strong>Ýôôåêòû:</strong></p>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40" height="25"><img id="e1" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="e2" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="e3" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="e4" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="e5" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="e6" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
</tr>
<tr>
<td height="25"><img id="e7" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="e8" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="e9" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="e10" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="e11" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="e12" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
</tr>
</table>
<p><strong>Ïðèåìû:</strong></p>
<table width="240" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40" height="25"><img id="p1" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="p2" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="p3" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="p4" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="p5" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td width="40"><img id="p6" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
</tr>
<tr>
<td height="25"><img id="p7" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p8" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p9" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p10" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p11" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p12" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
</tr>
<tr>
<td height="25"><img id="p13" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p14" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p15" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p16" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p17" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
<td><img id="p18" title="Ïóñòîé ñëîò çàêëèíàíèÿ" src="https://img.new-combats.com/i/items/w/w101.gif"></td>
</tr>
</table>
</div>
<p><a href="javascript:admin.save(1);">Ñîõðàíèòü êîìïëåêò â áàçó</a></p></td>
<td width="150" align="right" valign="top"><p><strong>Ñòàòû ïåðñîíàæà (ðîäíûå):</strong></p>
<p>
Ñèëà:
<input id="s1" style="width:35px" value="3"> <br>
Ëîâêîñòü:
<input id="s2" style="width:35px" value="3"> <br>
Èíòóèöèÿ:
<input id="s3" style="width:35px" value="3"> <br>
Âûíîñëèâîñòü:
<input id="s4" style="width:35px" value="3"> <br>
Èíòåëåêò:
<input id="s5" style="width:35px" value="0"> <br>
Ìóäðîñòü:
<input id="s6" style="width:35px" value="0">
</p>
<p><strong>Âûáåðèòå êëàññ êîìïëåêòà è àïï: </strong></p>
<p>
Êëàññ:
<select id="pclss">
<option selected value="1">Òàíê</option>
<option value="2">Êðèò</option>
<option value="3">Óâîðîò</option>
<option value="4">Óíèâåðñàë</option>
<option value="5">Ìàã îãíÿ</option>
<option value="6">Ìàã âîäû</option>
<option value="7">Ìàã çåìëè</option>
<option value="8">Ìàã âîçäóõà</option>
</select>
<br>
Óðîâåíü:
<input id="lvl" style="width:35px" value="0">
<br>
Àïï:
<input id="up" style="width:35px" value="0">
<br>
</p>
<hr>
</td>
<td valign="top">
<div id="save" style="border:1px solid red; padding:10px;margin:5px; background-color:#FCC; color:#333"></div>
<br>
<b>Ïðåäìåòû äëÿ ñëîòà:</b>
<br>
<div id="items_add">
</div>
</td>
</tr>
</table>
<script>
<?
if(isset($error)) {
echo 'alert("'.$error.'");';
}
?>
</script>
</body>
</html>
<?
}else{
echo 'Äëÿ ïîëó÷åíè äîñòóïà ê äàííîìó ðàçäåëó - îáðàòèòåñü ê Àäìèíèñòðàöèè ïðîåêòà, ïîëó÷èòü äîñòóï ìîæåò êàæäûé èãðîê, íî îêîí÷àòåëüíîå ðåøåíèå çàâèñèò èñêëþ÷èòåëüíî îò Àäìèíèñòðàöèè ïðîåêòà.';
}
?>

View File

@ -1,34 +1,27 @@
<?php
define('GAME',true);
# Admin Only Area
const GAME = true;
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
if(isset($_GET['connect'])) {
$u = User::start();
if (isset($_GET['connect'])) {
setcookie('adminionself', 'trueself', time() + 86400);
header('location: /balance.php');
die();
}
} elseif ($u->info['admin'] != 1 && !isset($_COOKIE['adminionself'])) {
die('balance.php');
}
if($u->info['admin']<1 && !isset($_COOKIE['adminionself']))
{
header('location: https://new-combats.com/'); die();
if ($u->info['admin'] < 1 && !isset($_COOKIE['adminionself'])) {
header('location: https://new-combats.com/');
die();
}
$noobs = '';
/*
if(!isset($_GET['noob']) || isset($_POST['money'])) {
$noobs = ' AND `time` < 1443155244 ';
}
*/
if (isset($_GET['all'])) {
$data = array(
$data = [
); //ïî äíÿì ñ ñàìîãî íà÷àëà
]; //ïî äíÿì ñ ñàìîãî íà÷àëà
$sp = mysql_query('SELECT * FROM `balance_money` WHERE `money` > 0' . $noobs . ' ORDER BY `id` ASC');
$max = 0;
//
@ -73,7 +66,11 @@ if(isset($_GET['all'])) {
$summ = 0;
$mn = date('m', $i);
}
echo '<td valign="bottom"><div title="Êóïèëè '.round(($data[date('d.m.Y',$i)]),2).' RUB'."\n".'Äàòà: '.date('d.m.Y',$i).'" class="boxpro'.$nl.'" style="height:'.round(10+$data[date('d.m.Y',$i)]/$max*100).'px;"></div></td>';
echo '<td valign="bottom"><div title="Êóïèëè ' . round(
($data[date('d.m.Y', $i)]), 2
) . ' RUB' . "\n" . 'Äàòà: ' . date('d.m.Y', $i) . '" class="boxpro' . $nl . '" style="height:' . round(
10 + $data[date('d.m.Y', $i)] / $max * 100
) . 'px;"></div></td>';
//
$i += 86400;
$sum += round(($data[date('d.m.Y', $i)]), 2);
@ -84,30 +81,37 @@ if(isset($_GET['all'])) {
//
//<td valign="bottom">&nbsp;</td>
//
echo '</tr></table><hr>Äíåé: '.$j.' , ñóììà: '.$sum.' RUB<br>Ñðåäíåå â äåíü: '.round($sum/$j,2).' RUB<br>Ñðåäíåå â ìåñÿö: '.round($sum/$j*30,2).' RUB<br>Çà ñåãîäíÿ: '.$today.' RUB';
echo '</tr></table><hr>Äíåé: ' . $j . ' , ñóììà: ' . $sum . ' RUB<br>Ñðåäíåå â äåíü: ' . round(
$sum / $j, 2
) . ' RUB<br>Ñðåäíåå â ìåñÿö: ' . round($sum / $j * 30, 2) . ' RUB<br>Çà ñåãîäíÿ: ' . $today . ' RUB';
die();
}
if(isset($_POST['money']))
{
$balance = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0'.$noobs.''));
if (isset($_POST['money'])) {
$balance = mysql_fetch_array(
mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0' . $noobs . '')
);
$balance = $balance[0] + (int)$_POST['money'];
mysql_query('INSERT INTO `balance_money` (`time`,`ip`,`money`,`comment2`,`balance`) VALUES ("'.time().'","'.$u->info['ip'].'","'.((int)$_POST['money']).'","'.mysql_real_escape_string($_POST['text']).'","'.$balance.'")');
}elseif(isset($_GET['cancel']))
{
mysql_query('UPDATE `balance_money` SET `cancel` = "'.$u->info['id'].'" WHERE `id` = "'.((int)$_GET['cancel']).'" LIMIT 1');
}elseif(isset($_GET['recancel']))
{
mysql_query(
'INSERT INTO `balance_money` (`time`,`ip`,`money`,`comment2`,`balance`) VALUES ("' . time(
) . '","' . $u->info['ip'] . '","' . ((int)$_POST['money']) . '","' . mysql_real_escape_string(
$_POST['text']
) . '","' . $balance . '")'
);
} elseif (isset($_GET['cancel'])) {
mysql_query(
'UPDATE `balance_money` SET `cancel` = "' . $u->info['id'] . '" WHERE `id` = "' . ((int)$_GET['cancel']) . '" LIMIT 1'
);
} elseif (isset($_GET['recancel'])) {
mysql_query('UPDATE `balance_money` SET `cancel` = "0" WHERE `id` = "' . ((int)$_GET['recancel']) . '" LIMIT 1');
}
$mm = date('m');
$yy = date('Y');
if(isset($_GET['mm']))
{
if (isset($_GET['mm'])) {
$mm = $_GET['mm'];//strtotime
}
$mf = array(
$mf = [
'01' => 'January',
'02' => 'February',
'03' => 'March',
@ -119,9 +123,9 @@ $mf = array(
'09' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December'
);
$mf2 = array(
'12' => 'December',
];
$mf2 = [
'12' => 'January',
'01' => 'February',
'02' => 'March',
@ -133,15 +137,13 @@ $mf2 = array(
'08' => 'September',
'09' => 'October',
'10' => 'November',
'11' => 'December'
);
if(!isset($mf[$mm]))
{
'11' => 'December',
];
if (!isset($mf[$mm])) {
$mm = date('m');
}
$yy2 = $yy;
if($mm=='12')
{
if ($mm == '12') {
$yy2++;
}
$time_start = strtotime("1 " . $mf[$mm] . " " . $yy . "");
@ -149,7 +151,11 @@ $time_finish = strtotime("1 ".$mf2[$mm]." ".$yy2."");
$balance = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0' . $noobs . ''));
$balance = $balance[0];
$plus = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0'.$noobs.' AND `time` >= '.$time_start.' AND `time` < '.$time_finish.' AND `cancel` = "0"'));
$plus = mysql_fetch_array(
mysql_query(
'SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0' . $noobs . ' AND `time` >= ' . $time_start . ' AND `time` < ' . $time_finish . ' AND `cancel` = "0"'
)
);
$plus = $plus[0];
?>
<!DOCTYPE html>
@ -166,6 +172,7 @@ body {
font-family: tahoma, arial, verdana, sans-serif, Lucida Sans;
font-size: 11px;
}
.txt1 {
color: #707a88;
}
@ -180,74 +187,133 @@ function MM_jumpMenu(targ,selObj,restore){ //v3.0
<body>
<table width="1000" bgcolor="#fefefe" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="center"><form name="form1" method="post" action="">
<td height="30" align="center">
<form name="form1" method="post" action="">
Ïåðèîä îò÷åòíîñòè:
<select name="mm" id="mm" onChange="MM_jumpMenu('parent',this,0)">
<option <? if($mm=='01'){ echo 'selected'; } ?> value="01">ÿíâàðü</option>
<option <? if($mm=='02'){ echo 'selected'; } ?> value="02">ôåâðàëü</option>
<option <? if($mm=='03'){ echo 'selected'; } ?> value="03">ìàðò</option>
<option <? if($mm=='04'){ echo 'selected'; } ?> value="04">àïðåëü</option>
<option <? if($mm=='05'){ echo 'selected'; } ?> value="05">ìàé</option>
<option <? if($mm=='06'){ echo 'selected'; } ?> value="06">èþíü</option>
<option <? if($mm=='07'){ echo 'selected'; } ?> value="07">èþëü</option>
<option <? if($mm=='08'){ echo 'selected'; } ?> value="08">àâãóñò</option>
<option <? if($mm=='09'){ echo 'selected'; } ?> value="09">ñåíòÿáðü</option>
<option <? if($mm=='10'){ echo 'selected'; } ?> value="10">îêòÿáðü</option>
<option <? if($mm=='11'){ echo 'selected'; } ?> value="11">íîÿáðü</option>
<option <? if($mm=='12'){ echo 'selected'; } ?> value="12">äåêàáðü</option>
<option <? if ($mm == '01') {
echo 'selected';
} ?> value="01">ÿíâàðü
</option>
<option <? if ($mm == '02') {
echo 'selected';
} ?> value="02">ôåâðàëü
</option>
<option <? if ($mm == '03') {
echo 'selected';
} ?> value="03">ìàðò
</option>
<option <? if ($mm == '04') {
echo 'selected';
} ?> value="04">àïðåëü
</option>
<option <? if ($mm == '05') {
echo 'selected';
} ?> value="05">ìàé
</option>
<option <? if ($mm == '06') {
echo 'selected';
} ?> value="06">èþíü
</option>
<option <? if ($mm == '07') {
echo 'selected';
} ?> value="07">èþëü
</option>
<option <? if ($mm == '08') {
echo 'selected';
} ?> value="08">àâãóñò
</option>
<option <? if ($mm == '09') {
echo 'selected';
} ?> value="09">ñåíòÿáðü
</option>
<option <? if ($mm == '10') {
echo 'selected';
} ?> value="10">îêòÿáðü
</option>
<option <? if ($mm == '11') {
echo 'selected';
} ?> value="11">íîÿáðü
</option>
<option <? if ($mm == '12') {
echo 'selected';
} ?> value="12">äåêàáðü
</option>
</select>
, <?= $yy; ?>
ãîäà.
Äîñòóïíûå ñðåäñòâà:
<span style="font-weight: bold"><?=number_format($balance, 0, ",", " ");?></span> RUB | Ïðèáûëü çà ýòîò ìåñÿö: <span style="font-weight: bold"><?=number_format($plus, 0, ",", " ");?></span> RUB | Äàòà ãåíåðàöèè îò÷åòà:
<span style="font-weight: bold"><?= number_format($balance, 0, ",", " "); ?></span> RUB | Ïðèáûëü çà
ýòîò ìåñÿö: <span style="font-weight: bold"><?= number_format($plus, 0, ",", " "); ?></span> RUB | Äàòà
ãåíåðàöèè îò÷åòà:
<?= date('d.m.Y H:i:s'); ?>
</form></td>
</tr>
<!--<tr>
<td>
<table width="1000" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="500" align="center" bgcolor="#CEE4C5" class="txt1" style="color: #265214; font-family: tahoma, arial, verdana, sans-serif, 'Lucida Sans';">Ïîñòóïëåíèå</td>
<td width="500" align="center" bgcolor="#E1C8C9" class="txt1" style="color: #A3585C">Ñïèñàíèå</td>
</tr>
</table>
</form>
</td>
</tr>-->
</tr>
<tr>
<td>
<?
$i = 1;
$days = ($time_finish - $time_start) / 86400;
while($i<=$days)
{
while ($i <= $days) {
$dt = $time_start + (86400 * ($i - 1));
if($dt<time())
{
$lim = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `balance_money` WHERE `time` >= '.$dt.''.$noobs.' AND `time` < '.($dt+86400).''));
if ($dt < time()) {
$lim = mysql_fetch_array(
mysql_query(
'SELECT COUNT(*) FROM `balance_money` WHERE `time` >= ' . $dt . '' . $noobs . ' AND `time` < ' . ($dt + 86400) . ''
)
);
$lim = $lim[0];
$mst = mysql_fetch_array(mysql_query('SELECT `money`,`balance` FROM `balance_money` WHERE `time` < '.$dt.''.$noobs.' AND `cancel` = "0" ORDER BY `id` DESC LIMIT 1')); $mst = $mst['balance'];
$mft = mysql_fetch_array(mysql_query('SELECT `money`,`balance` FROM `balance_money` WHERE `time` >= '.$dt.''.$noobs.' AND `time` < '.($dt+86400).' AND `cancel` = "0" ORDER BY `id` DESC LIMIT 1')); $mft = $mft['balance'];
$mst = mysql_fetch_array(
mysql_query(
'SELECT `money`,`balance` FROM `balance_money` WHERE `time` < ' . $dt . '' . $noobs . ' AND `cancel` = "0" ORDER BY `id` DESC LIMIT 1'
)
);
$mst = $mst['balance'];
$mft = mysql_fetch_array(
mysql_query(
'SELECT `money`,`balance` FROM `balance_money` WHERE `time` >= ' . $dt . '' . $noobs . ' AND `time` < ' . ($dt + 86400) . ' AND `cancel` = "0" ORDER BY `id` DESC LIMIT 1'
)
);
$mft = $mft['balance'];
?>
<!-- day -->
<div style="background-color:#cad3e0;color:#8591a2;border:1px solid #cdd5e2;">
<div style="padding:10px;">Äàòà: <b><?=date('d.m.Y',$dt);?></b>, Îïåðàöèé çà ýòîò äåíü: <?=$lim;?>, ñðåäñòâ â íà÷àëå äíÿ: <b><?=number_format($mst, 0, ",", " ");?></b> RUB, ñðåäñòâ â êîíöå äíÿ: <b><?=number_format($mft, 0, ",", " ");?></b> RUB</div>
<div style="padding:10px;">Äàòà: <b><?= date('d.m.Y', $dt); ?></b>, Îïåðàöèé çà ýòîò
äåíü: <?= $lim; ?>, ñðåäñòâ â íà÷àëå äíÿ: <b><?= number_format($mst, 0, ",", " "); ?></b>
RUB, ñðåäñòâ â êîíöå äíÿ: <b><?= number_format($mft, 0, ",", " "); ?></b> RUB
</div>
<!-- -->
<?
$sp = mysql_query('SELECT * FROM `balance_money` WHERE `time` >= '.$dt.''.$noobs.' AND `time` < '.($dt+86400).' ORDER BY `time` ASC LIMIT '.$lim);
while($pl = mysql_fetch_array($sp))
{
if($pl['money']>0 && $pl['cancel']==0)
{
$sp = mysql_query(
'SELECT * FROM `balance_money` WHERE `time` >= ' . $dt . '' . $noobs . ' AND `time` < ' . ($dt + 86400) . ' ORDER BY `time` ASC LIMIT ' . $lim
);
while ($pl = mysql_fetch_array($sp)) {
if ($pl['money'] > 0 && $pl['cancel'] == 0) {
?>
<table width="998" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="499" align="center" valign="top" bgcolor="#f5f7fa" class="txt1">
<table bgcolor="#e6f8ea" width="100%" border="0" cellspacing="0" cellpadding="5">
<table bgcolor="#e6f8ea" width="100%" border="0" cellspacing="0"
cellpadding="5">
<tr>
<td width="100" align="center"><?=date('d.m.Y H:i:s',$pl['time']);?></td>
<td width="75" align="center"><?=number_format($pl['money'], 0, ",", " ");?> RUB</td>
<td>Îñòàòîê: <span style="font-weight: bold"><?=number_format($pl['balance'], 0, ",", " ");?></span> RUB</td>
<td width="100" align="center"><? if($pl['cancel']==0){ echo '<a href="?mm='.$mm.'&cancel='.$pl['id'].'">Îòêðåïèòü</a>'; }else{ echo '<a href="?mm='.$mm.'&recancel='.$pl['id'].'">Ïðèêðåïèòü</a>'; } ?></td>
<td width="100" align="center"><?= date(
'd.m.Y H:i:s', $pl['time']
); ?></td>
<td width="75" align="center"><?= number_format(
$pl['money'], 0, ",", " "
); ?> RUB
</td>
<td>Îñòàòîê: <span style="font-weight: bold"><?= number_format(
$pl['balance'], 0, ",", " "
); ?></span> RUB
</td>
<td width="100" align="center"><? if ($pl['cancel'] == 0) {
echo '<a href="?mm=' . $mm . '&cancel=' . $pl['id'] . '">Îòêðåïèòü</a>';
} else {
echo '<a href="?mm=' . $mm . '&recancel=' . $pl['id'] . '">Ïðèêðåïèòü</a>';
} ?></td>
</tr>
</table>
</td>
@ -267,44 +333,74 @@ function MM_jumpMenu(targ,selObj,restore){ //v3.0
<td width="499" align="right" valign="top" bgcolor="#f5f7fa" class="txt1">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" bgcolor="#F5F7FA">&nbsp;<?=$pl['comment2'];?></td>
<td valign="top" bgcolor="#F5F7FA">
&nbsp;<?= $pl['comment2']; ?></td>
<td width="30" align="right" valign="top">&rarr;</td>
</tr>
</table>
</td>
<td width="499" align="center" valign="top" bgcolor="<? if($pl['money']<0){ echo '#f8e6ef'; }else{ echo '#F5F7FA'; } ?>" class="txt1">
<table bgcolor="<? if($pl['money']<0 && $pl['cancel']==0){ echo '#f8e6ef'; }else{ echo '#F5F7FA'; } ?>" width="100%" border="0" cellspacing="0" cellpadding="5">
<td width="499" align="center" valign="top" bgcolor="<? if ($pl['money'] < 0) {
echo '#f8e6ef';
} else {
echo '#F5F7FA';
} ?>" class="txt1">
<table bgcolor="<? if ($pl['money'] < 0 && $pl['cancel'] == 0) {
echo '#f8e6ef';
} else {
echo '#F5F7FA';
} ?>" width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100" align="center"><?=date('d.m.Y H:i:s',$pl['time']);?></td>
<td width="75" align="center"><?=number_format($pl['money'], 0, ",", " ");?> RUB</td>
<td>Îñòàòîê: <span style="font-weight: bold"><?=number_format($pl['balance'], 0, ",", " ");?></span> RUB</td>
<td width="100" align="center"><? if($pl['cancel']==0){ echo '<a href="?mm='.$mm.'&cancel='.$pl['id'].'">Îòêðåïèòü</a>'; }else{ echo '<a href="?mm='.$mm.'&recancel='.$pl['id'].'">Ïðèêðåïèòü</a>'; } ?></td>
<td width="100" align="center"><?= date(
'd.m.Y H:i:s', $pl['time']
); ?></td>
<td width="75" align="center"><?= number_format(
$pl['money'], 0, ",", " "
); ?> RUB
</td>
<td>Îñòàòîê: <span style="font-weight: bold"><?= number_format(
$pl['balance'], 0, ",", " "
); ?></span> RUB
</td>
<td width="100" align="center"><? if ($pl['cancel'] == 0) {
echo '<a href="?mm=' . $mm . '&cancel=' . $pl['id'] . '">Îòêðåïèòü</a>';
} else {
echo '<a href="?mm=' . $mm . '&recancel=' . $pl['id'] . '">Ïðèêðåïèòü</a>';
} ?></td>
</tr>
</table>
</td>
</tr>
</table>
<? } } ?>
<? }
} ?>
<!-- -->
</div>
<? } $i++; } ?>
<? }
$i++;
} ?>
<? if ($mm == date('m')) { ?>
<br><br><br>
<div style="background-color:#F5F7FA;">
<form name="form1" method="post" action="?mm=<?= $mm; ?>#addline">
<table width="100%" border="0" align="center" cellpadding="5" style="border:1px solid #8591a2;" cellspacing="0">
<table width="100%" border="0" align="center" cellpadding="5" style="border:1px solid #8591a2;"
cellspacing="0">
<tr>
<td bgcolor="#CAD3E0">Ñóììà: <input name="money" type="text" size="21" maxlength="7"/>
RUB</td>
RUB
</td>
</tr>
<tr>
<td bgcolor="#CAD3E0"><p class="txt1">Êîììåíòàðèé (500 ñèìâîëîâ ìàêñèìóì):</p>
<p>
<textarea style="width:980px;" name="text" id="text" cols="45" rows="5"></textarea>
<textarea style="width:980px;" name="text" id="text" cols="45"
rows="5"></textarea>
</p></td>
</tr>
<tr>
<td align="right" bgcolor="#CAD3E0"><input type="submit" name="button" id="button" value="Ïðèêðåïèòü ê îò÷åòó çà <?=date('d.m.Y');?>"></td>
<td align="right" bgcolor="#CAD3E0"><input type="submit" name="button" id="button"
value="Ïðèêðåïèòü ê îò÷åòó çà <?= date(
'd.m.Y'
); ?>"></td>
</tr>
</table>
</form>

View File

@ -1,28 +1,40 @@
<?php
define('GAME',true);
const GAME = true;
include_once('_incl_data/__config.php');
include_once('_incl_data/class/__db_connect.php');
include_once('_incl_data/class/__user.php');
$u = User::start();
if($u->room['name']!='Îäíîðóêèé áàíäèò')
{
if ($u->room['name'] != 'Îäíîðóêèé áàíäèò') {
die();
}else{
}
//Ðàçäàåì âûéãðûøè
function get2str($key='', $val='') {
function get2str($key = '', $val = '')
{
$get = $_GET;
if (is_array($key)) {
if ( count($key)>0 ) foreach ( $key as $k=>$v ) $get[$k] = $v;
} else $get[$key] = $val;
if ( count($get)>0 ) {
foreach ( $get as $k=>$v ) if ( empty($v) ) unset($get[$k]);
if (count($key) > 0) {
foreach ($key as $k => $v) {
$get[$k] = $v;
}
}
} else {
$get[$key] = $val;
}
if (count($get) > 0) {
foreach ( $get as $k=>$v ) $get[$k] = $k.'='.urlencode($v);
foreach ($get as $k => $v) {
if (empty($v)) {
unset($get[$k]);
}
}
}
if (count($get) > 0) {
foreach ($get as $k => $v) {
$get[$k] = $k . '=' . urlencode($v);
}
return '?' . implode('&', $get);
}
}
@ -36,9 +48,7 @@ if($u->room['name']!='
} elseif ($_GET['bet'] == 3) {
$s = 3;
}
if( $u->bank['money2'] < $s ) {
//Íåäîñòàòî÷íî äåíåã!
}else{
if ($u->bank['money2'] >= $s) {
//Èãðàåì!
$w1 = rand(0, 4);
$w2 = rand(0, 4);
@ -71,11 +81,7 @@ if($u->room['name']!='
// 1 2 3
$win = 1;
$n = 5;
}elseif( $w1 == 4 && $w3 == 4 ) {
// 1 2 3
$win = 1;
$n = 5;
}elseif( $w2 == 4 && $w3 == 4 ) {
} elseif ($w1 == 4 && $w3 == 4 || $w2 == 4 && $w3 == 4) {
// 1 2 3
$win = 1;
$n = 5;
@ -114,11 +120,7 @@ if($u->room['name']!='
// 1 2 3
$win = 1;
$n = 5;
}elseif( $w1 == 4 && $w3 == 4 ) {
// 1 2 3
$win = 1;
$n = 5;
}elseif( $w2 == 4 && $w3 == 4 ) {
} elseif ($w1 == 4 && $w3 == 4 || $w2 == 4 && $w3 == 4) {
// 1 2 3
$win = 1;
$n = 5;
@ -127,24 +129,31 @@ if($u->room['name']!='
//
$u->bank['money2'] -= $s;
$u->bank['money2'] += $s * $win;
mysql_query('UPDATE `bank` SET `money2` = "'.$u->bank['money2'].'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
mysql_query(
'UPDATE `bank` SET `money2` = "' . $u->bank['money2'] . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'
);
//
mysql_query('INSERT INTO `bandit` (`uid`,`time`,`room`,`s`,`wm`,`w`) VALUES (
"'.$u->info['id'].'","'.time().'","'.$u->info['room'].'","'.$s.'","'.($s*$win).'","'.$w1.$w2.$w3.'"
) ');
mysql_query(
'INSERT INTO `bandit` (`uid`,`time`,`room`,`s`,`wm`,`w`) VALUES (
"' . $u->info['id'] . '","' . time(
) . '","' . $u->info['room'] . '","' . $s . '","' . ($s * $win) . '","' . $w1 . $w2 . $w3 . '"
) '
);
$gid = mysql_insert_id();
//
if ($win > 0) {
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$u->info['city']."','390','','','<small>[<b><font color=0066ff>Êðóïüå</font></b>] Èãðîê <b>".mysql_real_escape_string($u->info['login'])."</b> âûèãðàë <b>".($s*$win).".00</b> åêð., ñòàâêà: ".$s.".00 åêð., èãðà ¹".$gid."</small>','".time()."','6','0')");
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','390','','','<small>[<b><font color=0066ff>Êðóïüå</font></b>] Èãðîê <b>" . mysql_real_escape_string(
$u->info['login']
) . "</b> âûèãðàë <b>" . ($s * $win) . ".00</b> åêð., ñòàâêà: " . $s . ".00 åêð., èãðà ¹" . $gid . "</small>','" . time(
) . "','6','0')"
);
}
//
$r .= 'cash='.floor($u->bank['money2']).'';
$r .= '&w1='.$w1.'&w2='.$w2.'&w3='.$w3.'&n='.$n.'&win='.($s*$win).'';
$r .= 'cash=' . floor($u->bank['money2']);
$r .= '&w1=' . $w1 . '&w2=' . $w2 . '&w3=' . $w3 . '&n=' . $n . '&win=' . ($s * $win);
}
} else {
$r .= 'cash='.floor($u->bank['money2']).'';
$r .= 'cash=' . floor($u->bank['money2']);
}
echo $r;
}
?>

View File

@ -1,16 +1,13 @@
<?
/*if(!defined('GAME'))
{
die();
}*/
define('GAME',true);
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
include('_incl_data/class/__dungeon.php');
<?php
if ($_POST['code']==$_SESSION['code'] && $_POST['code']!='')
{
const GAME = true;
require_once('_incl_data/__config.php');
require_once('_incl_data/class/__db_connect.php');
$u = User::start();
$d = new Dungeon;
$d->start();
if ($_POST['code'] == $_SESSION['code'] && $_POST['code'] != '') {
echo "<body onload=\"myWindow1();\">";
}
@ -20,7 +17,8 @@ if ($_POST['code']==$_SESSION['code'] && $_POST['code']!='')
<link rel="stylesheet" type="text/css" href="css/windows.css"/>
<link rel="stylesheet" type="text/css" href="css/hack.css"/>
<br>
<img style="width:164px;margin-top:5px;" src="show_reg_img/security2.php?register_id=<?=str_replace(' ','0',microtime())?>" width="107" height="26">
<img style="width:164px;margin-top:5px;"
src="show_reg_img/security2.php?register_id=<?= str_replace(' ', '0', microtime()) ?>" width="107" height="26">
<br>
<form action="bonuss.php" method="post">
<input style="width:164px;margin-top:5px;" type="text" size="30" name="code" value="戕ֈ!">
@ -33,6 +31,7 @@ if ($_POST['code']==$_SESSION['code'] && $_POST['code']!='')
function myWindow1() {
window.parent.open('main.php?takebns=<?echo $u->info['nextAct'];?>&getb1w=3&inv=1', '_self');
}
function myWindow2() {
var raz = window.parent.document.querySelector('iframe[src^="https://new-combats.com/bonuss.php"]'); // óäàëèòü ñîçäàííûé â ðîäèòåëå iframe
raz.parentNode.removeChild(raz);
@ -41,6 +40,7 @@ function myWindow2() {
</script>
<style>
html {
overflow: hidden; // óáðàòü ïîëîñû ïðîêðóòêè âíóòðè iframe, ò.ê. àòðèáóò scrolling="no" äëÿ iframe â HTML5 íå ïîääåðæèâàåòñÿ
overflow: hidden;
/ / óáðàòü ïîëîñû ïðîêðóòêè âíóòðè iframe, ò . ê . àòðèáóò scrolling = "no" äëÿ iframe â HTML5 íå ïîääåðæèâàåòñÿ
}
</style>

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