diff --git a/_incl_data/class/__user.php b/_incl_data/class/__user.php
index 3f7e0ea8..967e3cf3 100644
--- a/_incl_data/class/__user.php
+++ b/_incl_data/class/__user.php
@@ -6,7 +6,6 @@ if (!defined('GAME')) {
die();
}
ignore_user_abort(true);
-//system('pkill www-data');
function getdr($s, $v, $d)
{
@@ -28,16 +27,12 @@ class user
public $pokol = 2; //Акктуальное поколение предметов
public $ekrcast = [
310 => true, //Снадобье Забытых Мастеров
-
33 => true, //Звездная Энергия
34 => true, //Звездная Тяжесть
35 => true, //Звездная Сияние
-
42 => true, //Неуязвимость Оружию
43 => true, //Неуязвимость Стихиям
-
296 => true
-
];
public $aves = ['now' => 0, 'max' => 0], $rep, $tfer, $error2 = '', $room = [], $bank = [], $align_nm = [
1 => 'Свет',
@@ -74,18 +69,8 @@ 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']
];
- /*
- yrnhealmpprocmg3 - восставнавливает ману от урона по игроку, в % (магия воды)
- */
-
public function sys_add($uid, $time, $type, $text, $data, $time_see)
{
- /*if(mysql_query('INSERT INTO `a_system` (`uid`,`time`,`type`,`text`,`data`,`time_see`) VALUES ("'.$uid.'","'.$time.'","'.$type.'","'.$text.'","'.$data.'","'.$time_see.'")')){
-
- }else{
- echo '.';
- }
- */
}
public function repexp_add($id, $val)
@@ -165,12 +150,8 @@ class user
$r = 1;
if (floor($an) > 0) {
$a = mysql_fetch_array(mysql_query('SELECT * FROM `users_align` WHERE `uid` = "' . $uid . '" AND (`delete` = "0" OR `delete` > "' . time() . '") LIMIT 1'));
- if (isset($a['id'])) {
- if (floor($a['align']) > 0) {
- if (floor($a['align']) != $an) {
- $r = 0;
- }
- }
+ if (isset($a['id']) && floor($a['align']) > 0 && floor($a['align']) != $an) {
+ $r = 0;
}
}
return $r;
@@ -361,99 +342,18 @@ class user
public function add_buf($id, $tp, $uid = null, $mod = null)
{
- /*if($this->info['admin'] > 0) {
- if($tp == 1) {
-
- $cache = ob_get_contents();
- ob_end_clean ();
-
- //Добавляем новый
- if($uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m';
- }
-
- //Проверяем существование первой директории
- if(!is_dir($id.'~a/'.$uid_f.'/') ) {
- //создаем
- mkdir($id.'~a/'.$uid_f.'/', 0700);
- }
-
- //Проверяем существование второй директории
- if(!is_dir($id.'~a/'.$uid_f.'/'.$uid.'/') ) {
- //создаем
- mkdir($id.'~a/'.$uid_f.'/'.$uid.'/', 0700);
- }
-
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
-
- //Удаляем предыдущий экземпляр
- if(file_exists($id)) {
- $this->del_buf($id);
- }
-
- //Создаем файл
- $fp = @fopen ($id, "w");
- @fwrite($fp, $cache);
- @fclose($fp);
-
- }elseif($tp == 0) {
- ob_start();
- }
- }*/
}
public function del_buf($id, $uid = null, $mod = null)
{
- /*if($uid != NULL && $mod != NULL) {
- //генерируем ссылку
- if((int)$uid > 0 && $uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m_'.$uid;
- }
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
- }
- if(file_exists($id)) {
- unlink($id);
- }*/
}
public function see_buf($id, $uid = null, $mod = null)
{
- /*if(file_exists($id)) {
- if($uid != NULL && $mod != NULL) {
- //генерируем ссылку
- if($uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m';
- }
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
- }
- return file_get_contents($id);
- }else{
- return false;
- }*/
}
public function sys_see($type)
{
- /*
- $r = ''; $lid = $this->info['sys'];
- $sp = mysql_query('SELECT `id`,`uid`,`time`,`type`,`text`,`data`,`time_see` FROM `a_system` WHERE `uid` = "'.$this->info['id'].'" AND `id` > "'.$this->info['sys'].'" ORDER BY `time` DESC LIMIT 20');
- while($pl = mysql_fetch_array($sp)) {
- $r .= 'top.tow('.$pl['id'].',"'.$pl['text'].'",'.$pl['time_see'].','.$pl['data'].');';
- if($pl['id'] > $lid) {
- $lid = $pl['id'];
- }
- }
- if($lid > $this->info['sys']) {
- mysql_query('UPDATE `users` SET `sys` = "'.$lid.'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- return $r;
- */
}
public static function start()
@@ -519,14 +419,9 @@ class user
while ($pl = mysql_fetch_array($sp)) {
$ur = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
$ub = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $ur['inUser'] . '" LIMIT 1'));
- if (isset($ur['id']) && isset($ub['id'])) {
- if ($ub['lose'] > 0 || $ub['nich'] > 0) {
- //выкидываем из БС
-
- } else {
- $win = $ub;
- $winr = $ur;
- }
+ if (isset($ur['id']) && isset($ub['id']) && $ub['lose'] <= 0 && $ub['nich'] <= 0) {
+ $win = $ub;
+ $winr = $ur;
}
}
@@ -757,24 +652,13 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$bn = $st['a5'];
}
//Мощнность
- //if( $x < 5 ) {
- //$p['M'] = $st['pa'.$x];
- //}else{
- // $p['M'] = $st['pm'.($x-4)];
- //}
+
$min = (($p['B'][0] + $sss + $p['W'][0]) * $p['T'] * (1 + 0.005 * $bn)) * (1 + $p['M'] / 100);
$max = (($p['B'][1] + $sss + $p['W'][1]) * $p['T'] * (1 + 0.005 * $bn)) * (1 + $p['M'] / 100);
//
$kmin = ceil((2 * (1 + $st['m3'] / 100)) * $min);
$kmax = ceil((2 * (1 + $st['m3'] / 100)) * $max);
- /*
- $r['Kmin'] = ceil( ( 2 * ( 1 + $p['K']/100 ) ) * $r['min']);
- $r['Kmax'] = ceil( ( 2 * ( 1 + $p['K']/100 ) ) * $r['max']);
- */
- //
- //$min = $min*0.8;
- //$max = $max*0.8;
- //}
+
$tp = [0 => ceil($min), 1 => ceil($max), 2 => ceil($kmin), 3 => ceil($kmax)];
}
return $tp;
@@ -1159,11 +1043,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function getInfoById($id)
{
- $ch = mysql_fetch_array(mysql_query("SELECT `users`.*,`stats`.* FROM `users` INNER JOIN `stats` ON (`stats`.`id`=`users`.`id`) WHERE `users`.`id`='" . $id . "' OR
+ return mysql_fetch_array(mysql_query("SELECT `users`.*,`stats`.* FROM `users` INNER JOIN `stats` ON (`stats`.`id`=`users`.`id`) WHERE `users`.`id`='" . $id . "' OR
`users`.`login`= '" . mysql_real_escape_string($id) . "'"));
-
-
- return $ch;
}
public function addItem($id, $uid, $md = null, $dn = null, $mxiznos = null, $nosudba = null, $plavka = null)
@@ -1187,11 +1068,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
}
- if ($dn != null) {
- //предмет с настройками из подземелья
- if ($dn['dn_delete'] > 0) {
- $i['dn_delete'] = 1;
- }
+ //предмет с настройками из подземелья
+ if ($dn != null && $dn['dn_delete'] > 0) {
+ $i['dn_delete'] = 1;
}
if ($mxiznos > 0) {
$i['iznosMAXi'] = $mxiznos;
@@ -1385,19 +1264,15 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
define('IP', $dip);
}
- if (isset($this->info['id']) && ($this->info['ip'] != IP || $this->info['banned'] > 0)) {
- if ($_SERVER['REQUEST_URI'] != '/') {
- unset($this->info, $_COOKIE['login'], $_COOKIE['pass']);
- die('');
- }
+ if (isset($this->info['id']) && ($this->info['ip'] != IP || $this->info['banned'] > 0) && $_SERVER['REQUEST_URI'] != '/') {
+ unset($this->info, $_COOKIE['login'], $_COOKIE['pass']);
+ die('');
}
}
- if (isset($this->info['id'])) {
- if ($this->info['exp'] > 300000 && $this->info['twink'] > 0) {
- $this->info['exp'] = 300000;
- mysql_query('UPDATE `users` SET `exp` = ' . $this->info['exp'] . ' WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
- }
+ if (isset($this->info['id']) && $this->info['exp'] > 300000 && $this->info['twink'] > 0) {
+ $this->info['exp'] = 300000;
+ mysql_query('UPDATE `users` SET `exp` = ' . $this->info['exp'] . ' WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
}
if (isset($this->info['id']) && $this->info['inUser']) {
@@ -1652,20 +1527,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
mysql_query('UPDATE `items_users` SET `inTransfer` = "0" WHERE (`uid` = "' . $this->tfer['uid1'] . '" OR `uid` = "' . $this->tfer['uid2'] . '") AND `inTransfer` > 0');
//Добавляем сообщение в чат
- if ($this->tfer['start2'] > 0) {
-
-
- }
unset($this->tfer, $upd);
}
- } else {
- if ($this->tfer['uid1'] == $this->info['id']) {
- //Передаем предметы другому игроку
-
- } elseif ($this->tfer['uid2'] == $this->info['id']) {
- //Принимаем передачу от другого игрока
-
- }
}
}
}
@@ -1931,73 +1794,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function onlineBonus()
{
- /*if( $this->info['inTurnir'] == 0 ){
- $ts = mysql_fetch_array(mysql_query('SELECT `time_all`,`time_today` FROM `online` WHERE `uid` = "'.$this->info['id'].'" LIMIT 1'));
- $tf = mysql_fetch_array(mysql_query('SELECT `id`,`time`,`vars`,`vals` FROM `actions` WHERE `uid` = "'.$this->info['id'].'" AND `vars` = "online_bonus_time" LIMIT 1'));
- $m = floor(($ts['time_all']-$tf['vals'])/60);
- $h = floor($m/60);
-
- if($h > 0 ) {
- $ekr_add = round($h*0.45,2);
- $bnks = mysql_fetch_array(mysql_query('SELECT `id`,`money2` FROM `bank` WHERE `uid` = "'.$this->info['id'].'" AND `block` = "0" ORDER BY `id` DESC LIMIT 1'));
- if( isset($bnks['id']) ) {
- $r .= ' Вы получили '.$ekr_add.' екр. (Банк №'.$bnks['id'].') за '.$h.' ч. в онлайне!';
- $this->info['catch'] += $ekr_add;
- $bnks['money2'] += $ekr_add;
- mysql_query('UPDATE `users` SET `catch` = "'.$this->info['catch'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- mysql_query('UPDATE `bank` SET `money2` = "'.$bnks['money2'].'" WHERE `id` = "'.$bnks['id'].'" LIMIT 1');
- if(!isset($tf['id'])) {
- $this->addAction(time(),'online_bonus_time',$ts['time_all']);
- }elseif($tf['vals'] < $ts['time_all']) {
- mysql_query('UPDATE `actions` SET `vals` = "'.$ts['time_all'].'" WHERE `id` = "'.$tf['id'].'" LIMIT 1');
- }
- mysql_query("INSERT INTO `chat` (`typeTime`,`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('2','1','".$this->info['city']."','".$this->info['room']."','','".$this->info['login']."','".$r."','".time()."','6','0')");
- }
- }
- }
- /*$ts = mysql_fetch_array(mysql_query('SELECT `time_all`,`time_today` FROM `online` WHERE `uid` = "'.$this->info['id'].'" LIMIT 1'));
- $tf = mysql_fetch_array(mysql_query('SELECT `id`,`time`,`vars`,`vals` FROM `actions` WHERE `uid` = "'.$this->info['id'].'" AND `vars` = "online_bonus_time" LIMIT 1'));
- $m = floor(($ts['time_all']-$tf['vals'])/60);
- $h = floor($m/60);
-
- if($m > 0)
- {
- $this->stats = $this->getStats($this->info,0);
- $r = '';
- if(!isset($tf['id']))
- {
- $this->addAction(time(),'online_bonus_time',$ts['time_all']);
- }elseif($tf['vals'] < $ts['time_all'])
- {
- mysql_query('UPDATE `actions` SET `vals` = "'.$ts['time_all'].'" WHERE `id` = "'.$tf['id'].'" LIMIT 1');
- }
-
- //Выдаем $m шт. предметов награды за онлайн
- if($m > 0) {
- $hrg = 1;
- //$this->addItem(2130,$this->info['id'],'noodet=1|noremont=1');
- $this->stats['enNow'] = $this->info['enNow'];
- $enreg = round($m*(@$this->stats['enAll']/(60*$hrg)),7);
- if($this->info['admin'] > 0) {
- //
- }
-
- $this->stats['enNow'] += $enreg;
- if($this->stats['enNow'] > $this->stats['enAll']) {
- $this->stats['enNow'] = $this->stats['enAll'];
- $enreg = 0;
- }
- $this->info['enNow'] = $this->stats['enNow'];
- mysql_query('UPDATE `stats` SET `enNow` = "'.$this->stats['enNow'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
-
- /*if($this->info['id'] == 285838 || $this->info['admin'] > 0) {
- $r .= 'Внимание! восстановлено энергии: '.$enreg.' ед. ['.$this->stats['enNow'].'/'.$this->stats['enAll'].']';
-
- //Отправляем сообщение в чат
- mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$this->info['city']."','".$this->info['room']."','','".$this->info['login']."','".$r."','-1','5','0')");
- }*/
- //}
return null;
}
@@ -2006,15 +1802,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($uid == null) {
$uid = $this->info['id'];
}
- //mysql_query('LOCK TABLES actions WRITE');
$ins = mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`,`vals`) VALUES ("' . $uid . '","' . $time . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . mysql_real_escape_string($vars) . '","' . mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']) . '","' . mysql_real_escape_string($vls) . '")');
- //mysql_query('UNLOCK TABLES');
- if ($ins) {
- return true;
- } else {
- return false;
- }
+ return (bool)$ins;
}
public function testAction($filter, $tp)
@@ -2031,11 +1821,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function takePersInfo($whr)
{
- $inf = mysql_fetch_array(mysql_query('SELECT
+ return mysql_fetch_array(mysql_query('SELECT
`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`city_real`,`u`.`icq`,`u`.`icq_hide`,`u`.`homepage`,`u`.`deviz`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`win_bs`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`,
`st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`
FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE ' . $whr . ' LIMIT 1'));
- return $inf;
}
public function addNewbot($id, $botDate, $clon, $logins_bot = null, $luser = null, $round = null)
@@ -2117,9 +1906,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$statss['m5'] = ceil($statss['m5'] * 0.75);
$statss['za'] = ceil($statss['za'] * 0.25);
- //$statss['yron_min'] -= $clon['level'] * 7;
- //$statss['yron_max'] -= $clon['level'] * 12;
-
$clon['stats'] = $this->impStats($statss);
unset($statss);
}
@@ -2776,9 +2562,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if (isset($itm['data']) && $itm['data'] != '' && $c_itm == 0) {
$po = $this->lookStats($itm['data']);
- //if(isset($po['complect'])) {
- // if(isset($po['complect'])) $c_itm_data_a['complect'] = $po['complect'];
- //}
+
if (isset($po['sudba'])) {
if (isset($po['sudba'])) $c_itm_data_a['sudba'] = $po['sudba'];
}
@@ -2934,17 +2718,13 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
}
//Скидка в государственный магазин 5%
- if ($this->stats['silver'] >= 1) {
- if ($sid == 1) {
- $i['price_1'] = round($i['price_1'] / 100 * 95, 2);
- }
+ if ($this->stats['silver'] >= 1 && $sid == 1) {
+ $i['price_1'] = round($i['price_1'] / 100 * 95, 2);
}
//Скидка в березку магазин 5%
- if ($this->stats['silver'] >= 5) {
- if ($sid == 2) {
- $i['price_2'] = round($i['price_2'] / 100 * 95, 2);
- }
+ if ($this->stats['silver'] >= 5 && $sid == 2) {
+ $i['price_2'] = round($i['price_2'] / 100 * 95, 2);
}
$price = $i['price_1'] * $x;
@@ -3189,48 +2969,30 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
public function takeBonus()
{
- if (!isset($_GET['getb1w'])) {
- /*$this->info['money'] += 25;
- mysql_query('UPDATE `users` SET `money` = "'.$this->info['money'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- mysql_query('INSERT INTO `aaa_bonus` (`uid`,`time`) VALUES (
- "'.$this->info['id'].'","'.(time()+1*3600).'"
- )');
- $this->error = 'Вам зачислено 25 кр.';*/
- } else {
- if ($_GET['getb1w'] == 3) {
- $pensia1 = $this->pensia(false);
- $pensia2 = $this->pensia(true);
- if ($this->info['timeMain'] < time() - 15 * 60) {
- $afk = 1;
- } else {
- $afk = 0;
- }
- if ($pensia2[0] == 1) {
- $this->info['money'] += $pensia2[1];
- mysql_query('UPDATE `users` SET `money` = `money` + "' . $pensia2[1] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
- } else {
- $this->info['money2'] += $pensia2[1];
- mysql_query('UPDATE `users` SET `money2` = `money2` + "' . $pensia2[1] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
- }
- $this->error = 'Вам начислен бонус в размере ' . $pensia1 . '! ';
- mysql_query('INSERT INTO `aaa_bonus` (
- `uid`,`time`,`afk`,`type`,`money`
- ) VALUES (
- "' . $this->info['id'] . '","' . (time() + 1 * 3600) . '","' . $afk . '","' . $pensia2[0] . '","' . $pensia2[1] . '"
- )');
-
+ if (isset($_GET['getb1w']) && $_GET['getb1w'] == 3) {
+ $pensia1 = $this->pensia(false);
+ $pensia2 = $this->pensia(true);
+ $afk = $this->info['timeMain'] < time() - 15 * 60 ? 1 : 0;
+ if ($pensia2[0] == 1) {
+ $this->info['money'] += $pensia2[1];
+ mysql_query('UPDATE `users` SET `money` = `money` + "' . $pensia2[1] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
+ } else {
+ $this->info['money2'] += $pensia2[1];
+ mysql_query('UPDATE `users` SET `money2` = `money2` + "' . $pensia2[1] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
}
+ $this->error = 'Вам начислен бонус в размере ' . $pensia1 . '! ';
+ mysql_query('INSERT INTO `aaa_bonus` (
+ `uid`,`time`,`afk`,`type`,`money`
+ ) VALUES (
+ "' . $this->info['id'] . '","' . (time() + 1 * 3600) . '","' . $afk . '","' . $pensia2[0] . '","' . $pensia2[1] . '"
+ )');
+
}
}
public function addDelo($tp, $uid, $txt, $tm, $ct, $frm, $mo, $mi, $vvv = false)
{
- $inc = mysql_query("INSERT INTO `users_delo` (`dop`,`moneyOut`,`moneyIn`,`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . mysql_real_escape_string($vvv) . "','" . mysql_real_escape_string($mo) . "','" . mysql_real_escape_string($mi) . "','" . mysql_real_escape_string($uid) . "','" . $_SERVER['HTTP_X_REAL_IP'] . "','" . $ct . "','" . $tm . "','" . mysql_real_escape_string($txt) . "','" . mysql_real_escape_string($frm) . "'," . $tp . ")");
- if ($inc) {
- return true;
- } else {
- return false;
- }
+ return mysql_query("INSERT INTO `users_delo` (`dop`,`moneyOut`,`moneyIn`,`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . mysql_real_escape_string($vvv) . "','" . mysql_real_escape_string($mo) . "','" . mysql_real_escape_string($mi) . "','" . mysql_real_escape_string($uid) . "','" . $_SERVER['HTTP_X_REAL_IP'] . "','" . $ct . "','" . $tm . "','" . mysql_real_escape_string($txt) . "','" . mysql_real_escape_string($frm) . "'," . $tp . ")");
}
public function newAct($test)
@@ -3267,7 +3029,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($UpdMoney) {
$this->info['money'] -= $price;
$UpMoney2 = mysql_query('UPDATE `users` SET `money` = `money` + ' . $price . ' WHERE `id` = ' . $i2['uid'] . ' LIMIT 1');
- #$UpItems = mysql_query('UPDATE `items_users` SET `uid` = '.$this->info['id'].', `1price` = "'.$i1['price1'].'", `lastUPD` = "'.time().'", `inShop` = 0 WHERE `id` = '.$iid.' and `inShop` = 30 LIMIT 1');
$col = $this->itemsX($iid);
if ($col > 1) {
@@ -3348,119 +3109,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
return $r;
}
- /*public function commisionShop($sid,$preview = "full"){
- global $c,$code,$sid;
-
- switch ((int)$_GET['otdel']) {
- case 1:$typeOtdel = 18; break;
- case 2:$typeOtdel = 19; break;
- case 3:$typeOtdel = 20; break;
- case 4:$typeOtdel = 21; break;
- case 5:$typeOtdel = 22; break;
- case 6:$typeOtdel = 15; break;
- case 7:$typeOtdel = 12; break;
- case 8:$typeOtdel = 4; break;
- case 9:$typeOtdel = 5; break;
- case 10:$typeOtdel = 6; break;
- case 11:$typeOtdel = 1; break;
- case 12:$typeOtdel = 3; break;
- case 13:$typeOtdel = 8; break;
- case 14:$typeOtdel = 14; break;
- case 15:$typeOtdel = 13; break;
- case 16:$typeOtdel = 9; break;
- case 17:$typeOtdel = 10; break;
- case 18:$typeOtdel = 11; break;
- case 19:$typeOtdel = 29; break;
- case 20:$typeOtdel = 30; break;
- case 1050:$typeOtdel = 1050; break;
- default :$typeOtdel = 18;
- }
-
-
- //
-
- if( $typeOtdel == 1050 ) {
- //Просмотр прочего
- if($preview == "full") {
-
- }else{
- $sp = mysql_query('SELECT `a`.*,`b`.* FROM `items_users` AS `a` LEFT JOIN `items_main` AS `b` ON `a`.`item_id` = `b`.`id` WHERE `a`.`inShop` = "30" AND
- `b`.`type` != "18" AND
- `b`.`type` != "19" AND
- `b`.`type` != "20" AND
- `b`.`type` != "21" AND
- `b`.`type` != "22" AND
- `b`.`type` != "15" AND
- `b`.`type` != "12" AND
- `b`.`type` != "4" AND
- `b`.`type` != "5" AND
- `b`.`type` != "6" AND
- `b`.`type` != "1" AND
- `b`.`type` != "3" AND
- `b`.`type` != "8" AND
- `b`.`type` != "14" AND
- `b`.`type` != "13" AND
- `b`.`type` != "9" AND
- `b`.`type` != "10" AND
- `b`.`type` != "11" AND
- `b`.`type` != "29" AND
- `b`.`type` != "30"
-
- GROUP BY `b`.`name`
-
- ');
- }
- }else{
- //Вывод общего списка предметов
- if($preview == "full") {
-
- }else{
- $sp = mysql_query('SELECT `a`.*,`b`.* FROM `items_users` AS `a` LEFT JOIN `items_main` AS `b` ON `a`.`item_id` = `b`.`id` WHERE `a`.`inShop` = "30" AND `b`.`type` = "'.mysql_real_escape_string($typeOtdel).'" GROUP BY `b`.`name` ORDER BY `b`.`name` DESC');
- }
- //
- }
- $cr = 'c8c8c8';
- $i = 0;
- $steckCikl = 1;
- while($pl = mysql_fetch_array($sp)) {
- //
- $is1 = '';
- $is2 = '';
- //
- if($preview == "full") {
-
- }else{
- //Отоюражение в разделах
- //$pvr1 = mysql_fetch_array(mysql_query('SELECT `1price` FROM `items_users` WHERE `inShop` = 30 AND `item_id` = "'.$pl['item_id'].'" ORDER BY `1price` ASC LIMIT 1'));
- //$pvr2 = mysql_fetch_array(mysql_query('SELECT `1price` FROM `items_users` WHERE `inShop` = 30 AND `item_id` = "'.$pl['item_id'].'" ORDER BY `1price` DESC LIMIT 1'));
- //
- $is2 .= ''.$pl['name'].' (Масса: '.$pl['massa'].')';
- //$is2 .= '
Цена: '.$pvr1[0].'-'.$pvr2[0].' кр. (количество: 0)';
- //
- //$pvr1 = mysql_fetch_array(mysql_query('SELECT `iznosNOW`,`iznosMAX` FROM `items_users` WHERE `inShop` = 30 AND `item_id` = "'.$pl['item_id'].'" ORDER BY `iznosNOW` ASC LIMIT 1'));
- //$pvr2 = mysql_fetch_array(mysql_query('SELECT `iznosNOW`,`iznosMAX` FROM `items_users` WHERE `inShop` = 30 AND `item_id` = "'.$pl['item_id'].'" ORDER BY `iznosNOW` DESC LIMIT 1'));
- //
- //$is2 .= '
Долговечность: '.floor($pvr1[0]).'-'.floor($pvr1[1]).'/'.floor($pvr2[0]).'-'.floor($pvr2[1]).'';
- //
- $is1 .= '
';
- $is1 .= 'подробнее
';
- }
- echo '
'.$is1.' | '.$is2.' |
';
- if( $cr == 'c8c8c8' ) {
- $cr = 'd4d4d4';
- }else{
- $cr = 'c8c8c8';
- }
- $i++;
- }
- //
- if( $i == 0 ) {
- echo 'Прилавок магазина пуст |
';
- }
- //
- //* * * * * * * * * * *
- }*/
-
public function commisionShop($sid, $preview = "full")
{
global $c, $code, $sid;
@@ -3829,67 +3477,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
$is2 .= '
Свойства предмета:' . $tr;
}
- //Особенности
- /*
- $tr = '';
- $x = 1;
- while($x<=4){
- if($po['tya'.$x]>0){
- $tyc = 'Ничтожно редки';
- if($po['tya'.$x]>6){
- $tyc = 'Редки';
- }
- if($po['tya'.$x]>14){
- $tyc = 'Малы';
- }
- if($po['tya'.$x]>34){
- $tyc = 'Временами';
- }
- if($po['tya'.$x]>79){
- $tyc = 'Регулярны';
- }
- if($po['tya'.$x]>89){
- $tyc = 'Часты';
- }
- if($po['tya'.$x]>=100){
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tya'.$x].': '.$tyc.' ('.$po['tya'.$x].'%)';
- }
- $x++;
- }
- $x = 1;
- while($x<=7){
- if($po['tym'.$x]>0){
- $tyc = 'Ничтожно редки';
- if($po['tym'.$x]>6){
- $tyc = 'Редки';
- }
- if($po['tym'.$x]>14){
- $tyc = 'Малы';
- }
- if($po['tym'.$x]>34){
- $tyc = 'Временами';
- }
- if($po['tym'.$x]>79){
- $tyc = 'Регулярны';
- }
- if($po['tym'.$x]>89){
- $tyc = 'Часты';
- }
- if($po['tym'.$x]>=100){
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tym'.$x].': '.$tyc.' ('.$po['tym'.$x].'%)';
- }
- $x++;
- }
-
- if($tr!=''){
- $is2 .= '
Особенности:'.$tr;
- }
- */
-
$tr = '';
if (isset($po['imposed']) && $po['imposed'] > 0) {
@@ -4081,13 +3668,9 @@ ORDER BY `1price`ASC , inGroupCount DESC');
if ($this->info['admin'] > 0) {
$ishp = mysql_fetch_array(mysql_query('SELECT * FROM `items_shop` WHERE `sid` = "' . mysql_real_escape_string($sid) . '" AND `r` = "' . mysql_real_escape_string($_GET['otdel']) . '" AND `item_id` = "' . mysql_real_escape_string($_GET['itmid']) . '" AND `kolvo` > 0 LIMIT 1'));
if (isset($_GET['itmup'])) {
- //mysql_query('UPDATE `items_shop` SET `pos` = "'.($ishp['pos']+1).'" WHERE `sid` = "'.mysql_real_escape_string($sid).'" AND `r` = "'.mysql_real_escape_string($_GET['otdel']).'" AND `pos` = "'.($ishp['pos']-1).'" LIMIT 1');
mysql_query('UPDATE `items_shop` SET `pos` = "' . ($ishp['pos'] - 1) . '" WHERE `sid` = "' . mysql_real_escape_string($sid) . '" AND `r` = "' . mysql_real_escape_string($_GET['otdel']) . '" AND `item_id` = "' . mysql_real_escape_string($_GET['itmid']) . '" AND `kolvo` > 0 LIMIT 1');
} elseif (isset($_GET['itmdown'])) {
- //mysql_query('UPDATE `items_shop` SET `pos` = "'.($ishp['pos']-1).'" WHERE `sid` = "'.mysql_real_escape_string($sid).'" AND `r` = "'.mysql_real_escape_string($_GET['otdel']).'" AND `pos` = "'.($ishp['pos']+1).'" LIMIT 1');
mysql_query('UPDATE `items_shop` SET `pos` = "' . ($ishp['pos'] + 1) . '" WHERE `sid` = "' . mysql_real_escape_string($sid) . '" AND `r` = "' . mysql_real_escape_string($_GET['otdel']) . '" AND `item_id` = "' . mysql_real_escape_string($_GET['itmid']) . '" AND `kolvo` > 0 LIMIT 1');
- } elseif (isset($_GET['itmid'])) {
- //mysql_query('UPDATE `items_shop` SET `pos` = "'.mysql_real_escape_string($_GET['itmpos']).'" WHERE `sid` = "'.mysql_real_escape_string($sid).'" AND `r` = "'.mysql_real_escape_string($_GET['otdel']).'" AND `item_id` = "'.mysql_real_escape_string($_GET['itmid']).'" LIMIT 1');
}
}
@@ -4097,38 +3680,13 @@ ORDER BY `1price`ASC , inGroupCount DESC');
`ish`.`iid`,`ish`.`item_id`,`ish`.`data2`,`ish`.`iznos`,`ish`.`pos`,`ish`.`cantBuy`,`ish`.`kolvo`,`ish`.`geniration`,`ish`.`magic_inc`,`ish`.`timeOver`,`ish`.`overType`,`ish`.`secret_id`,`ish`.`sid`,`ish`.`r`,`ish`.`price_1`,`ish`.`price_2`,`ish`.`price_3`,`ish`.`level`,`ish`.`tr_items`,`ish`.`max_buy`,`ish`.`real`,`ish`.`nozuby`
FROM `items_shop` AS `ish` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `ish`.`item_id`) WHERE `ish`.`sid` = "' . mysql_real_escape_string($sid) . '" AND `ish`.`r` = "' . mysql_real_escape_string($_GET['otdel']) . '" ORDER BY `ish`.`pos` ASC');
-
- /*
- $cl = mysql_query('SELECT
- `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
- `ish`.`iid`,`ish`.`item_id`,`ish`.`data2`,`ish`.`iznos`,`ish`.`pos`,`ish`.`cantBuy`,`ish`.`kolvo`,`ish`.`geniration`,`ish`.`magic_inc`,`ish`.`timeOver`,`ish`.`overType`,`ish`.`secret_id`,`ish`.`sid`,`ish`.`r`,`ish`.`price_1`,`ish`.`price_2`,`ish`.`price_3`,`ish`.`level`,`ish`.`tr_items`,`ish`.`max_buy`,`ish`.`real`,`ish`.`nozuby`
- FROM `items_shop` AS `ish` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `ish`.`item_id`) WHERE `ish`.`sid` = "'.mysql_real_escape_string($sid).'" AND `ish`.`r` = "'.mysql_real_escape_string($_GET['otdel']).'" ORDER BY `ish`.`pos` ASC');
- */
-
$cr = 'c8c8c8';
$i = 0;
$jid = 0;
while ($pl = mysql_fetch_array($cl)) {
- /*if($pl['price_1']==0 && $pl['price1']>0)
- {
- mysql_query('UPDATE `items_shop` SET `price_1` = "'.$pl['price1'].'" WHERE `iid` = "'.$pl['iid'].'" LIMIT 1');
- }
- if($pl['price_2']==0 && $pl['price2']>0)
- {
- mysql_query('UPDATE `items_shop` SET `price_2` = "'.$pl['price2'].'" WHERE `iid` = "'.$pl['iid'].'" LIMIT 1');
- }*/
-
if ($pl['kolvo'] > 0) {
$jid++;
- //if( $pl['pos'] != $jid ) {
- // $pl['pos'] = $jid;
- // mysql_query('UPDATE `items_shop` SET `pos` = "'.($jid).'" WHERE `sid` = "'.mysql_real_escape_string($sid).'" AND `r` = "'.mysql_real_escape_string($_GET['otdel']).'" AND `item_id` = "'.$pl['id'].'" AND `kolvo` > 0 LIMIT 1');
- //}
- if ($cr == 'd4d4d4') {
- $cr = 'c8c8c8';
- } else {
- $cr = 'd4d4d4';
- }
+ $cr = $cr == 'd4d4d4' ? 'c8c8c8' : 'd4d4d4';
if ($pl['price_1'] < 0.01 && $pl['tr_items'] == '') {
$pl['price_1'] = $pl['price1'];
}
@@ -4149,13 +3707,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
$po['icos'] = 'WL';
}
- /*
- if($pl['level']==0 && $po['tr_lvl']>0)
- {
- mysql_query('UPDATE `items_shop` SET `level` = "'.$po['tr_lvl'].'" WHERE `iid` = "'.$pl['iid'].'" LIMIT 1');
- mysql_query('UPDATE `items_main` SET `level` = "'.$po['tr_lvl'].'" WHERE `iid` = "'.$pl['id'].'" LIMIT 1');
- }*/
-
if (($pl['type'] >= 18 && $pl['type'] <= 24) || $pl['type'] == 26 || $pl['type'] == 27) {
//Зоны блока +
$po['zonb']++;
@@ -4178,76 +3729,12 @@ ORDER BY `1price`ASC , inGroupCount DESC');
$is1 .= 'купить ';
}
//}
- if ($sid == 777 && $this->stats['silver'] > 1) {
- //$is1 .= '
VIP покупка ('.round($pl['price_2']/20,2).' екр.) ';
+
+ if ($pl['nozuby'] == 0 && $this->info['level'] > 0 && $this->info['level'] < 8 && $pl['level'] < 8 && $sid_zuby == 1 && $c['zuby']) {
+ $is1 .= '
купить за зубы';
}
- if ($pl['nozuby'] == 0) {
- if ($this->info['level'] > 0 && $this->info['level'] < 8) {
- if ($pl['level'] < 8 && $sid_zuby == 1 && $pl['nozuby'] == 0 && $c['zuby'] == true) {
- $is1 .= '
купить за зубы';
- /*if( $this->info['admin'] > 0 ) {
- if( isset($_GET['nozbpl']) && $pl['iid'] == $_GET['nozbpl'] ) {
- mysql_query('UPDATE `items_shop` SET `nozuby` = 1 WHERE `iid` = "'.$pl['iid'].'" LIMIT 1');
- }
- $is1 .= '
(Запретить продажу за зубы)';
- }*/
- }
- }
- }/*elseif( $this->info['admin'] > 0 ) {
- if( isset($_GET['nozbpl']) && $pl['iid'] == $_GET['nozbpl'] ) {
- mysql_query('UPDATE `items_shop` SET `nozuby` = 0 WHERE `iid` = "'.$pl['iid'].'" LIMIT 1');
- }
- $is1 .= '
(Разрешить продажу за зубы)';
- }*/
}
- /*
- if($this->info['admin'] > 0) {
- $is1 .= '
Выберите тип предмета:
'.
- ' Отсутствует'.
- ', Танк'.
- ', Уворот'.
- ', Крит'.
- ', Силовик'.
- ', Универсал'.
- ', Маг';
- }
- if($this->info['admin'] > 0) {
- $is1 .= '
Выберите тип доминирования:
'.
- ' Отсутствует'.
- ', над Танком'.
- ', над Уворотом'.
- ', над Критом'.
- ', над Силовиком'.
- ', над Универсалом'.
- ', над Магом';
- //уровень доминирования
-
- }
-
- if($this->info['admin']>0) {
- if(isset($_GET['add_class']) && isset($_GET['itm_id']) && $_GET['itm_id'] == $pl['id']) {
- mysql_query('UPDATE `items_main` SET `class` = "'.mysql_real_escape_string($_GET['add_class']).'" WHERE `id` = "'.$pl['item_id'].'" LIMIT 1');
- $pl['class'] = $_GET['add_class'];
- }
- if(isset($_GET['add_aclass']) && isset($_GET['itm_id']) && $_GET['itm_id'] == $pl['id']) {
- mysql_query('UPDATE `items_main` SET `anti_class` = "'.mysql_real_escape_string($_GET['add_aclass']).'" WHERE `id` = "'.$pl['item_id'].'" LIMIT 1');
- $pl['anti_class'] = $_GET['add_aclass'];
- }
-
- if($pl['class'] > 0) {
- $clnm = array('Отсутствует','Танк','Уворот','Крит','Силовик','Универсал','Маг');
- $is1 .= '
Предмет для '.$clnm[$pl['class']].'а';
- unset($clnm);
- }
-
- if($pl['anti_class'] > 0) {
- $clnm = array('Отсутствует','Танк','Уворот','Крит','Силовик','Универсал','Маг');
- $is1 .= '
Доминирует над '.$clnm[$pl['anti_class']].'ом';
- unset($clnm);
- }
- }
- */
//название
if (isset($po['tr_align']) && !isset($po['tr_align_bs'])) {
@@ -4260,9 +3747,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
}
}
- if (isset($po['tr_rep']) && isset($po['tr_dungeon'])) {
- //$pl['name'] .= '';
- }
if (isset($po['renameadd']) && $po['renameadd'] != '') {
$pl['name'] .= ' (Предмет: ' . $po['renameadd'] . ')';
}
@@ -4573,79 +4057,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
}
//Особенности
- /*$tr = '';
- $x = 1;
- while($x<=4)
- {
- if($po['tya'.$x]>0)
- {
- $tyc = 'Ничтожно редки';
- if($po['tya'.$x]>6)
- {
- $tyc = 'Редки';
- }
- if($po['tya'.$x]>14)
- {
- $tyc = 'Малы';
- }
- if($po['tya'.$x]>34)
- {
- $tyc = 'Временами';
- }
- if($po['tya'.$x]>79)
- {
- $tyc = 'Регулярны';
- }
- if($po['tya'.$x]>89)
- {
- $tyc = 'Часты';
- }
- if($po['tya'.$x]>=100)
- {
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tya'.$x].': '.$tyc.' ('.$po['tya'.$x].'%)';
- }
- $x++;
- }
- $x = 1;
- while($x<=7)
- {
- if(@$po['tym'.$x]>0)
- {
- $tyc = 'Ничтожно редки';
- if($po['tym'.$x]>6)
- {
- $tyc = 'Редки';
- }
- if($po['tym'.$x]>14)
- {
- $tyc = 'Малы';
- }
- if($po['tym'.$x]>34)
- {
- $tyc = 'Временами';
- }
- if($po['tym'.$x]>79)
- {
- $tyc = 'Регулярны';
- }
- if($po['tym'.$x]>89)
- {
- $tyc = 'Часты';
- }
- if($po['tym'.$x]>=100)
- {
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tym'.$x].': '.$tyc.' ('.$po['tym'.$x].'%)';
- }
- $x++;
- }
- if($tr!='')
- {
- $is2 .= '
Особенности:'.$tr;
- }*/
$tr = '';
@@ -4754,10 +4165,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
$is2 .= '' . $po['info'] . '
';
}
- if ($pl['maidin'] != '') {
- // $is2 .= 'Сделано в '.$this->city_name[$pl['maidin']].'
';
- }
-
if (isset($po['noremont'])) {
$is2 .= 'Предмет не подлежит ремонту
';
}
@@ -4802,8 +4209,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
$is2 .= 'Предмет куплен за зубы
';
}
- //$is2 .= 'Сделано в '.$this->city_name[$this->info['city']].'
';
-
$is2 .= '';
$crd = '';
@@ -4991,11 +4396,7 @@ ORDER BY `1price`ASC , inGroupCount DESC');
FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`id` = "' . ((int)$id) . '" AND `iu`.`uid` = "' . $uid . '" AND `iu`.`delete` = "0" AND `iu`.`inShop` = "0" AND `iu`.`inOdet` = "0" LIMIT 1'));
if (isset($itm['id'])) {
$po = $this->lookStats($itm['data']);
- /*
- mf_stats
- mf_mod
- mf_mib
-*/
+
//статы
if ($_GET['mf'] == 's1' || $_GET['mf'] == 's2' || $_GET['mf'] == 's3' || $_GET['mf'] == 's5') {
if (isset($po['mf_stats']) && $po['mf_stats'] > 0 && isset($po['add_' . $_GET['mf']])) {
@@ -5033,7 +4434,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
mysql_query('UPDATE `items_users` SET `data` = "' . $po . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
}
}
-
}
}
@@ -5156,13 +4556,6 @@ ORDER BY `1price`ASC , inGroupCount DESC');
} else {
$upd = mysql_query('UPDATE `items_users` SET `inShop` = 1 WHERE `uid` = "' . $this->info['id'] . '" AND `inShop` != "30" AND `id` = "' . $id . '" AND `inOdet` = "0" AND `delete` = "0" ');
}
- if ($upd) { /*
- if($col>1) { $col = ' (x'.$col.')'; }else{ $col = ''; }
- $this->info['transfers']--;
- mysql_query('UPDATE `stats` SET `transfers` = "'.$this->info['transfers'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- $this->error = 'Предмет "'.$itm['name'].''.$col.'" перенесен из инвентаря';
- */
- }
} else {
$this->error = 'Предмет не найден в рюкзаке';
}
@@ -5185,13 +4578,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
} else {
$upd = mysql_query('UPDATE `items_users` SET `inShop` = 0 WHERE `uid` = "' . $this->info['id'] . '" AND `id` = "' . $id . '" AND `inShop` != "30" AND `inOdet` = "0" AND `delete` = "0" ');
}
- if ($upd) { /*
- if($col>1) { $col = ' (x'.$col.')'; }else{ $col = ''; }
- $this->error = 'Предмет "'.$itm['name'].''.$col.'" перенесен в инвентаря';
- $this->info['transfers']--;
- mysql_query('UPDATE `stats` SET `transfers` = "'.$this->info['transfers'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- */
- }
} else {
$this->error = 'Предмет не найден в сундуке';
}
@@ -5361,11 +4747,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($rune['type'] == 5) {
$type_rune['мо'] = 5;
}
- //
- //$idt = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img`,`type`,`inslot`,`2h`,`2too`,`iznosMAXi`,`inRazdel`,`price1`,`price2`,`price3`,`magic_chance`,`info`,`massa`,`level`,`magic_inci`,`overTypei`,`group`,`group_max`,`geni`,`ts`,`srok`,`class`,`class_point`,`anti_class`,`anti_class_point`,`max_text`,`useInBattle`,`lbtl`,`lvl_itm`,`lvl_exp`,`lvl_aexp` FROM `items_main` WHERE `id` = "'.$id['item_id'].'" LIMIT` 1'));
- //if( $idt['type'] == 5 ){ $idt['type'] = 6; }
- //$id['type'] = $idt['type'];
- //
+
$type_rune = $type_rune[substr($rune['name'], -2, 2)];
if ($type_rune != $id['type'] && $type_rune != '') {
$type_rune2 = [
@@ -5410,9 +4792,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
}
$i++;
}
- //if( $rune['level'] > $data['tr_lvl'] ) {
- // $data['tr_lvl'] = $rune['level'];
- //}
+
$data = $this->impStats($data);
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `items_users` SET `data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1');
@@ -5648,8 +5028,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
unset($this->items['add'][$delk + $i]);
$i++;
}
- //$i++;
- //}
+
}
}
//Новая чарка
@@ -5705,15 +5084,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($rnda == 'mab1' || $rnda == 'mab2' || $rnda == 'mab3' || $rnda == 'mab4') {
$data['add_' . str_replace('mab', 'mib', $rnda)] += $add[$tw . 'add' . $utp[$i] . '_' . $rnda];
}
- /*$jkh = 1;
- while( $jkh <= 4 ) {
- if($rnda == 'mib'.$jkh) {
- $data['add_mab'.$jkh] += $add['add'.$utp[$i].'_'.$rnda];
- }elseif($rnda == 'mab'.$jkh) {
- $data['add_mib'.$jkh] += $add['add'.$utp[$i].'_'.$rnda];
- }
- $jkh++;
- }*/
$data['spell'] = $rune['id'];
if (!isset($data['sudba'])) {
@@ -5725,19 +5095,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($data['spell_st_name'] == 'mab1' || $data['spell_st_name'] == 'mab2' || $data['spell_st_name'] == 'mab3' || $data['spell_st_name'] == 'mab4') {
$data['add_' . str_replace('mab', 'mib', $data['spell_st_name'])] -= $data['spell_st_val'];
}
- /*$jkh = 1;
- while( $jkh <= 4 ) {
- if( $data['spell_st_name'] == 'mib'.$jkh ) {
- $data['add_' . str_replace('mib','mab',$data['spell_st_name'])] -= $data['spell_st_val'];
- }elseif( $data['spell_st_name'] == 'mab'.$jkh ) {
- $data['add_' . str_replace('mab','mib',$data['spell_st_name'])] -= $data['spell_st_val'];
- }
- $jkh++;
- }*/
+
if ($data['add_' . $data['spell_st_name']] == 0) {
unset($data['add_' . $data['spell_st_name']]);
}
- //die('Прошлое усиление: '.$data['spell_st_name'].' +'.$data['spell_st_val'].'
Попробуйте позже...');
}
$data['spell_id'] = $rune['item_id'];
@@ -5759,7 +5120,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$this->is['mab4'] = 'Броня ног';
$this->error = 'Увеличина характеристика предмета "' . $id['name'] . '", ' . $this->is[$rnda] . ': +' . $add[$tw . 'add' . $utp[$i] . '_' . $rnda];
- //$this->error = '
Увеличина характеристика предмета "'.$id['name'].'", '.$this->is[$rnda].': +'.$add['add'.$utp[$i].'_'.$rnda]."
$:".$idt['2h']."<";
unset($this->is['mab1'], $this->is['mab2'], $this->is['mab3'], $this->is['mab4']);
@@ -5865,10 +5225,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$data['upatack_name'] = $rune['name'];
$data['upatack_lvl'] = $add['upatack'];
$data['upatack_lvl'] = $add['upatack'];
- if (!isset($data['base_price1'])) {
- //$data['base_price1'] = $id['1price'];
- //$data['base_price2'] = $id['2price'];
- }
//Добавляем характеристики руны
$i = 0;
@@ -5879,31 +5235,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$i++;
}
- if ($id_type == 22) {
- /*if (isset($add['add_m11']))
- {
- $data['add_m11'] += $add['add_m11'];
- }*/
- $data['sv_yron_min'] += $add['upatack'];
- $data['sv_yron_max'] += $add['upatack'];
- //print_r($data);
- //die('Посохи временно не точатся.');
- } elseif ($id['2h'] == 1) {
- $data['sv_yron_min'] += $add['upatack'];
- $data['sv_yron_max'] += $add['upatack'];
- } else {
- $data['sv_yron_min'] += $add['upatack'];
- $data['sv_yron_max'] += $add['upatack'];
- }
-
- if (!isset($add['nosale']) && !isset($add['frompisher'])) {
- //$id['1price'] = $data['base_price1']+$rune['1price'];
- //$id['2price'] = $data['base_price2']+$rune['2price'];
- }
+ $data['sv_yron_min'] += $add['upatack'];
+ $data['sv_yron_max'] += $add['upatack'];
$this->addDelo(2, $this->info['id'], '"System.remont.upatack": Заточка "' . $data['upatack_name'] . '" была успешно встроена в предмет "' . $id['name'] . '" [itm:' . $id['id'] . ']', time(), $this->info['city'], 'System.remont.upatack', 0, 0);
-
$data = $this->impStats($data);
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1');
@@ -5960,14 +5296,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$data = $this->impStats($data);
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $rune['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `items_users` SET `1price` = "' . $id['1price'] . '",`2price` = "' . $id['2price'] . '",`data` = "' . $data . '" WHERE `id` = "' . $id['id'] . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1');
- //$this->error = 'Заточка "'.$id['name'].'" прошла успешно! Колка:'.$data['tya1'].' Руб:'.$data['tya2'].' Дробь:'.$data['tya3'].' Реж:'.$data['tya4'].' ';
}
} elseif ($rune['type'] == 50) {
//Страничка саныча
- //$id['data'];
- //$rune['data'];
- //$id['item_id']
if ($id['item_id'] == 3196 || $id['item_id'] == 3197 || $id['item_id'] == 3198) {
@@ -6073,10 +5405,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$r = false;
} else {
$btla = mysql_fetch_array(mysql_query('SELECT `id`,`team_win` FROM `battle` WHERE `id` = "' . mysql_real_escape_string($id) . '" LIMIT 1'));
- if (isset($btla['id'])) {
- if ($btla['team_win'] > -1) {
- $r = false;
- }
+ if (isset($btla['id']) && $btla['team_win'] > -1) {
+ $r = false;
}
}
return $r;
@@ -6117,8 +5447,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($j > 9 || $l > 2 || $v > 2) {
$r = false;
}
- } elseif ($this->stats['silver'] == 5) {
- // сколько угодно
}
return $r;
}
@@ -6267,9 +5595,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if ($po['toclan1'] > 0) {
$see1 = 0;
}
- if ($this->itemsX($pl['id']) > 1) {
- #$see1 = 0;
- }
if ($po['frompisher'] > 0) {
$see1 = 0;
}
@@ -6424,17 +5749,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
} elseif ($po['tr_' . $n] > $this->stats[$n]) {
if ($n == 'align_bs' && $this->info['inTurnir'] > 0) {
if ($po['tr_align_bs'] == '1') {
- if ($this->info['align_real'] <= 1 || $this->info['align_real'] >= 2) {
- $pal = false;
- } else {
- $pal = true;
- }
+ $pal = !($this->info['align_real'] <= 1 || $this->info['align_real'] >= 2);
} elseif ($po['tr_align_bs'] == '3') {
- if ($this->info['align_real'] <= 3 || $this->info['align_real'] >= 4) {
- $tar = false;
- } else {
- $tar = true;
- }
+ $tar = !($this->info['align_real'] <= 3 || $this->info['align_real'] >= 4);
}
}
if ($n == 'rep') {
@@ -6509,15 +5826,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$z = '';
}
$tr .= '
• ' . $this->is[$n] . ': ' . $z . '' . $po['add_' . $n];
- if (isset($po['mf_stats']) && $po['mf_stats'] > 0) {
- if ($n == 's1' || $n == 's2' || $n == 's3' || $n == 's5') {
- $tr .= ' ';
- }
+ if (isset($po['mf_stats']) && $po['mf_stats'] > 0 && ($n == 's1' || $n == 's2' || $n == 's3' || $n == 's5')) {
+ $tr .= ' ';
}
- if (isset($po['mf_mod']) && $po['mf_mod'] > 0) {
- if ($n == 'm1' || $n == 'm2' || $n == 'm4' || $n == 'm5') {
- $tr .= ' ';
- }
+ if (isset($po['mf_mod']) && $po['mf_mod'] > 0 && ($n == 'm1' || $n == 'm2' || $n == 'm4' || $n == 'm5')) {
+ $tr .= ' ';
}
}
$x++;
@@ -6586,63 +5899,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$is2 .= '
Свойства предмета:' . $tr;
}
- //Особенности
- /*$tr = '';
- $x = 1;
- while($x<=4){
- if(isset($po['tya'.$x]) && $po['tya'.$x]>0){
- $tyc = 'Ничтожно редки';
- if($po['tya'.$x]>6){
- $tyc = 'Редки';
- }
- if($po['tya'.$x]>14){
- $tyc = 'Малы';
- }
- if($po['tya'.$x]>34){
- $tyc = 'Временами';
- }
- if($po['tya'.$x]>79){
- $tyc = 'Регулярны';
- }
- if($po['tya'.$x]>89){
- $tyc = 'Часты';
- }
- if($po['tya'.$x]>=100){
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tya'.$x].': '.$tyc.' ('.$po['tya'.$x].'%)';
- }
- $x++;
- }
- $x = 1;
- while($x<=7){
- if(isset($po['tym'.$x]) && $po['tym'.$x]>0){
- $tyc = 'Ничтожно редки';
- if($po['tym'.$x]>6){
- $tyc = 'Редки';
- }
- if($po['tym'.$x]>14){
- $tyc = 'Малы';
- }
- if($po['tym'.$x]>34){
- $tyc = 'Временами';
- }
- if($po['tym'.$x]>79){
- $tyc = 'Регулярны';
- }
- if($po['tym'.$x]>89){
- $tyc = 'Часты';
- }
- if($po['tym'.$x]>=100){
- $tyc = 'Всегда';
- }
- $tr .= '
• '.$this->is['tym'.$x].': '.$tyc.' ('.$po['tym'.$x].'%)';
- }
- $x++;
- }
- if($tr!=''){
- $is2 .= '
Особенности:'.$tr;
- }*/
+
if ($notr == 0) {
$d[0] = 1;
if ($pl['magic_inci'] != '' || $pl['magic_inc'] != '') {
@@ -6731,43 +5988,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$is2 .= $tr;
}
- /*
- if($pl['lvl_itm']>0) {
- $is2 .= '
Уровень развития: ['.$pl['blvl'].'/100]';
- }
-
- if($pl['so']>0) {
- $is2 .= '
• Очки развития предмета:';
-
- $is2 .= '
-
-Сила: '.(0+$po['add_s1']).' '.(10+25*$po['add_s1']).' ОР
-
Ловкость: '.$po['add_s2'].' '.(10+25*$po['add_s2']).' ОР
-
Интуиция: '.$po['add_s3'].' '.(10+25*$po['add_s3']).' ОР
-
Интеллект: '.$po['add_s5'].' '.(10+25*$po['add_s5']).' ОР
-
-
Мф. крит. удара: '.$po['add_m1'].' '.(1+2*$po['add_m1']).' ОР
-
Мф. против крит. удара: '.$po['add_m2'].' '.(1+2*$po['add_m2']).' ОР
-
Мф. увертывания: '.$po['add_m4'].' '.(1+2*$po['add_m4']).' ОР
-
Мф. против увертывания: '.$po['add_m5'].' '.(1+2*$po['add_m5']).' ОР
-
-
Броня головы: '.(0+$po['add_mib1']).'-'.(0+$po['add_mab1']).' '.(5+5*$po['add_mab1']).' ОР
-
Броня головы: '.(0+$po['add_mib2']).'-'.(0+$po['add_mab2']).' '.(5+5*$po['add_mab2']).' ОР
-
Броня головы: '.(0+$po['add_mib3']).'-'.(0+$po['add_mab3']).' '.(5+5*$po['add_mab3']).' ОР
-
Броня головы: '.(0+$po['add_mib4']).'-'.(0+$po['add_mab4']).' '.(5+5*$po['add_mab4']).' ОР
-
-
Мощность урона: '.$po['add_m10'].' '.(4+4*$po['add_m10']).' ОР
-
Мощность магии: '.$po['add_m11a'].' '.(5+5*$po['add_m11a']).' ОР
-
-
Защита от урона: '.$po['add_za'].' '.(5+5*$po['add_za']).' ОР
-
Защита от магии: '.$po['add_zm'].' '.(4+4*$po['add_zm']).' ОР
-
- ';
-
- $is2 .= '• Осталось очков развития: '.$pl['so'].'';
- }
- */
-
if (isset($po['free_stats']) && $po['free_stats'] > 0) {
$is2 .= '
Распределение статов:';
$is2 .= 'Сила: ' . $po['add_s1'] . '
Ловкость: ' . $po['add_s2'] . '
Интуиция: ' . $po['add_s3'] . '
Интеллект: ' . $po['add_s5'] . ' ';
@@ -6969,10 +6189,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$is2 .= '' . $po['info'] . '
';
}
- if ($pl['maidin'] != '') {
- //$is2 .= 'Сделано в '.$this->city_name[$pl['maidin']].'
';
- }
-
if (isset($po['toclan'])) {
$po['toclan1'] = explode('#', $po['toclan']);
$clpo = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $po['toclan1'][0] . '" LIMIT 1'));
@@ -7025,7 +6241,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
mysql_query('UPDATE `items_users` SET `time_create` = "' . $pl['time_create'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
}
$is2 .= 'Предмет будет недоступен через ' . $this->timeOut($pl['time_create'] - time()) . '
';
- //$is2 .= 'Предмет исчезнет через '.$this->timeOut($pl['time_create']-time()+86400*30).'
';
} else {
$is2 .= 'Предмет недоступен, приобретите конкретный VIP
';
if (($pl['time_create'] - time() + 86400 * 30) < 1) {
@@ -7064,8 +6279,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
$is1 .= '';
}
- //$is1 .= '
(id'.$pl['id'].')
';
-
$is1 .= '
';
if ($type == 81) {
@@ -7573,10 +6786,6 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
}
//$grp = ' LIMIT 1';
$r = mysql_num_rows(mysql_query('SELECT `iu`.`id` FROM `items_users` AS `iu` WHERE `iu`.`inShop` = "' . $item['inShop'] . '" AND `iu`.`item_id` = "' . $item['item_id'] . '" AND `iu`.`uid` = "' . ($item['uid']) . '" AND `iu`.`delete` = "0" AND `iu`.`inGroup` = "' . ($item['inGroup']) . '" ' . $grp . ' '));
- /*
- $r = mysql_fetch_array(mysql_query('SELECT COUNT(`iu`.`id`) FROM `items_users` AS `iu` WHERE `iu`.`inShop` = "'.$item['inShop'].'" AND `iu`.`item_id` = "'.$item['item_id'].'" AND `iu`.`uid` = "'.($item['uid']).'" AND `iu`.`delete` = "0" AND `iu`.`inGroup` = "'.($item['inGroup']).'" '.$grp.' '));
- $r = $r[0];
- */
unset($item);
return $r;
}
@@ -7999,22 +7208,6 @@ LIMIT 1'));
$lvar = '';
$td = $this->lookStats($pl['data']);
- /*if(isset($td['add_hpAll']) && $td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $lvar .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if(isset($td['add_mpAll']) && $td['add_mpAll']!=0)
- {
- if($td['add_mpAll']>0)
- {
- $td['add_mpAll'] = '+'.$td['add_mpAll'];
- }
- $lvar .= '
Уровень маны: '.$td['add_mpAll'].'';
- }*/
if (isset($td['sv_yron_max']) && $td['sv_yron_max'] > 0) {
$lvar .= '
Урон: ' . $td['sv_yron_min'] . '-' . $td['sv_yron_max'] . '';
}
@@ -8109,11 +7302,7 @@ LIMIT 1'));
}
}
if ($pl['iznosMAX'] > 0) {
- if ($pl['iznosMAXi'] >= 909999999) {
- //$lvar .= '
Долговечность: неразрушимо ';
- } else {
- $lvar .= '
Долговечность: ' . floor($pl['iznosNOW']) . '/' . ceil($pl['iznosMAX']);
- }
+ $lvar .= '
Долговечность: ' . floor($pl['iznosNOW']) . '/' . ceil($pl['iznosMAX']);
}
if ($po['battleUseZd'] > 0) {
@@ -8230,104 +7419,6 @@ LIMIT 1'));
$pl['name'] = $this->nameItemMf($pl, $td);
- $lvar = '';
- /*if(isset($td['add_hpAll']) && $td['add_hpAll']!=0)
- {
- if($td['add_hpAll']!=0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $lvar .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if(isset($td['sv_yron_max']) && $td['sv_yron_max']>0)
- {
- $lvar .= '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].'';
- }
- if(isset($td['add_mab1']) && $td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $pl['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $lvar .= '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).'';
- }else{
- $lvar .= '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).'';
- }
- }
- if(isset($td['add_mab2']) && $td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $pl['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $lvar .= '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).'';
- }else{
- $lvar .= '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).'';
- }
- }
- if(isset($td['add_mab3']) && $td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $pl['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $lvar .= '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).'';
- }else{
- $lvar .= '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).'';
- }
- }
- if(isset($td['add_mab4']) && $td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $pl['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $lvar .= '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).'';
- }else{
- $lvar .= '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).'';
- }
- }
- if($pl['iznosMAX']>0)
- {
- if($pl['iznosMAXi'] == 999999999) {
- $lvar .= '
Долговечность: неразрушимо ';
- }else{
- $lvar .= '
Долговечность: '.floor($pl['iznosNOW']).'/'.ceil($pl['iznosMAX']);
- }
- }
-
- if( $po['battleUseZd'] > 0 ) {
- $is2 .= '
Задержка использования: '.$this->timeOut($po['battleUseZd']).'';
- }
-
- if(isset($td['gravi'])) {
- $td['gravitp'] = array(
- 18 => 'кинжале',
- 19 => 'топоре',
- 20 => 'молоте',
- 21 => 'клинке',
- 22 => 'посохе',
- 23 => 'луке',
- 24 => 'арбалете',
- 26 => 'рукоятке',
- 27 => 'предмете',
- 28 => 'предмете'
- );
- $lvar .= '
На '.$td['gravitp'][$pl['type']].' выгравирована надпись: '.$td['gravi'].'';
- unset($td['gravitp']);
- }*/
-
- /*
- if( $pl['inOdet'] == 3 ) {
- if( $pl['2h'] == 1 ) {
- if(@isset($sn['items_img'][$tp_img[14]])) {
- $uimg2 = 'rimg/r'.$sn['items_img'][$tp_img[14]];
- $witm[14] = '';
- }else{
- $uimg2 = 'i/items/'.$pl['img'].'';
- $witm[14] = '';
- }
- unset($uimg2);
- }
- }
- */
-
$lvar = $this->getInfoItemInfo($pl);
if (@isset($sn['items_img'][$tp_img[$pl['inOdet']]])) {
@@ -8386,140 +7477,11 @@ LIMIT 1'));
$wj[1]['name'] = $this->nameItemMf($wj[1], $td);
$wj1i .= '' . $wj[1]['name'] . '';
$wj1i .= $this->getInfoItemInfo($wj[1]);
- /*
- if(isset($td['add_hpAll']) && $td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $wj1i .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if(isset($td['sv_yron_max']) && $td['sv_yron_max']>0)
- {
- $wj1i .= '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].'';
- }
- if(isset($td['add_mab1']) && $td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $wj1i .= '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).'';
- }else{
- $wj1i .= '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).'';
- }
- }
- if(isset($td['add_mab2']) && $td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $wj1i .= '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).'';
- }else{
- $wj1i .= '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).'';
- }
- }
- if(isset($td['add_mab3']) && $td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $wj1i .= '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).'';
- }else{
- $wj1i .= '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).'';
- }
- }
- if(isset($td['add_mab4']) && $td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $wj1i .= '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).'';
- }else{
- $wj1i .= '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).'';
- }
- }
- if($wj[1]['iznosMAX']>0)
- {
- if($wj[1]['iznosMAXi'] == 999999999) {
- $wj1i .= '
Долговечность: неразрушимо ';
- }else{
- $wj1i .= '
Долговечность: '.floor($wj[1]['iznosNOW']).'/'.ceil($wj[1]['iznosMAX']).'';
- }
- }*/
}
if (isset($wj[52]) && $wj[52] != false) {
$td = $this->lookStats($wj[52]['data']);
$wj[52]['name'] = $this->nameItemMf($wj[52], $td);
- /*$wj1i = $wj1i;
-
- if($wj[52]['iznosMAX']>0)
- {
- if($wj[52]['iznosMAXi'] == 999999999) {
- $wj1i = '
Долговечность: неразрушимо
'.$wj1i;
- }else{
- $wj1i = '
Долговечность: '.floor($wj[52]['iznosNOW']).'/'.ceil($wj[52]['iznosMAX']).''.$wj1i;
- }
- }
-
- if(isset($td['add_mab4']) && $td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $wj1i = '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).''.$wj1i;
- }else{
- $wj1i = '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).''.$wj1i;
- }
- }
-
- if(isset($td['add_mab3']) && $td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $wj1i = '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).''.$wj1i;
- }else{
- $wj1i = '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).''.$wj1i;
- }
- }
-
- if(isset($td['add_mab2']) && $td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $wj1i = '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).''.$wj1i;
- }else{
- $wj1i = '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).''.$wj1i;
- }
- }
-
- if(isset($td['add_mab1']) && $td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $wj[1]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $wj1i = '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).''.$wj1i;
- }else{
- $wj1i = '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).''.$wj1i;
- }
- }
-
- if(isset($td['add_hpAll']) && $td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $wj1i = '
Уровень жизни: '.$td['add_hpAll'].''.$wj1i;
- }
-
- if(isset($td['sv_yron_max']) && $td['sv_yron_max']>0)
- {
- $wj1i = '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].''.$wj1i;
- }*/
$wj1i = '' . $wj[52]['name'] . '' . $wj1i;
@@ -8536,67 +7498,7 @@ LIMIT 1'));
$td = $this->lookStats($wj[6]['data']);
$wj[6]['name'] = $this->nameItemMf($wj[6], $td);
$wj4i .= '' . $wj[6]['name'] . '';
- /*if($td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $wj4i .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if($td['sv_yron_max']>0)
- {
- $wj4i .= '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].'';
- }
- if($td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $wj[6]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $wj4i .= '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).'';
- }else{
- $wj4i .= '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).'';
- }
- }
- if($td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $wj[6]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $wj4i .= '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).'';
- }else{
- $wj4i .= '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).'';
- }
- }
- if($td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $wj[6]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $wj4i .= '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).'';
- }else{
- $wj4i .= '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).'';
- }
- }
- if($td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $wj[6]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $wj4i .= '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).'';
- }else{
- $wj4i .= '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).'';
- }
- }
- if($wj[6]['iznosMAX']>0)
- {
- if($wj[6]['iznosMAXi'] == 999999999) {
- $wj4i .= '
Долговечность: неразрушимо ';
- }else{
- $wj4i .= '
Долговечность: '.floor($wj[6]['iznosNOW']).'/'.ceil($wj[6]['iznosMAX']).'';
- }
- }*/
$wj4i .= $this->getInfoItemInfo($wj[6]);
if ($wj[5] != false || $wj[4] != false) {
$wj4i .= $br;
@@ -8607,68 +7509,7 @@ LIMIT 1'));
$td = $this->lookStats($wj[5]['data']);
$wj[5]['name'] = $this->nameItemMf($wj[5], $td);
$wj4i .= '' . $wj[5]['name'] . '';
- /*if($td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $wj4i .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if(isset($td['sv_yron_max']) && $td['sv_yron_max']>0)
- {
- $wj4i .= '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].'';
- }
- if(isset($td['add_mab1']) && $td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $wj[5]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $wj4i .= '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).'';
- }else{
- $wj4i .= '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).'';
- }
- }
- if(isset($td['add_mab2']) && $td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $wj[5]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $wj4i .= '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).'';
- }else{
- $wj4i .= '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).'';
- }
- }
- if(isset($td['add_mab3']) && $td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $wj[5]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $wj4i .= '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).'';
- }else{
- $wj4i .= '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).'';
- }
- }
- if(isset($td['add_mab4']) && $td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $wj[5]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $wj4i .= '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).'';
- }else{
- $wj4i .= '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).'';
- }
- }
- if($wj[5]['iznosMAX']>0)
- {
- if($wj[5]['iznosMAXi'] == 999999999) {
- $wj4i .= '
Долговечность: неразрушимо ';
- }else{
- $wj4i .= '
Долговечность: '.floor($wj[5]['iznosNOW']).'/'.ceil($wj[5]['iznosMAX']).'';
- }
- }
- */
$wj4i .= $this->getInfoItemInfo($wj[5]);
if ($wj[4] != false) {
$wj4i .= $br;
@@ -8679,90 +7520,15 @@ LIMIT 1'));
$td = $this->lookStats($wj[4]['data']);
$wj[4]['name'] = $this->nameItemMf($wj[4], $td);
$wj4i .= '' . $wj[4]['name'] . '';
- /*if(isset($td['add_hpAll']) && $td['add_hpAll']!=0)
- {
- if($td['add_hpAll']>0)
- {
- $td['add_hpAll'] = '+'.$td['add_hpAll'];
- }
- $wj4i .= '
Уровень жизни: '.$td['add_hpAll'].'';
- }
- if(isset($td['sv_yron_max']) && $td['sv_yron_max']>0)
- {
- $wj4i .= '
Урон: '.$td['sv_yron_min'].'-'.$td['sv_yron_max'].'';
- }
- if(isset($td['add_mab1']) && $td['add_mab1']>0)
- {
- if($td['add_mib1']==$td['add_mab1'] && $wj[4]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab1']<0){ $m1l = ''; }
- $wj4i .= '
Броня головы: '.$m1l.''.(0+$td['add_mab1']).'';
- }else{
- $wj4i .= '
Броня головы: '.(0+$td['add_mib1']).'-'.(0+$td['add_mab1']).'';
- }
- }
- if(isset($td['add_mab2']) && $td['add_mab2']>0)
- {
- if($td['add_mib2']==$td['add_mab2'] && $wj[4]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab2']<0){ $m1l = ''; }
- $wj4i .= '
Броня корпуса: '.$m1l.''.(0+$td['add_mab2']).'';
- }else{
- $wj4i .= '
Броня корпуса: '.(0+$td['add_mib2']).'-'.(0+$td['add_mab2']).'';
- }
- }
- if(isset($td['add_mab3']) && $td['add_mab3']>0)
- {
- if($td['add_mib3']==$td['add_mab3'] && $wj[4]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab3']<0){ $m1l = ''; }
- $wj4i .= '
Броня пояса: '.$m1l.''.(0+$td['add_mab3']).'';
- }else{
- $wj4i .= '
Броня пояса: '.(0+$td['add_mib3']).'-'.(0+$td['add_mab3']).'';
- }
- }
- if(isset($td['add_mab4']) && $td['add_mab4']>0)
- {
- if($td['add_mib4']==$td['add_mab4'] && $wj[4]['geniration']==1)
- {
- $m1l = '+'; if($td['add_mab4']<0){ $m1l = ''; }
- $wj4i .= '
Броня ног: '.$m1l.''.(0+$td['add_mab4']).'';
- }else{
- $wj4i .= '
Броня ног: '.(0+$td['add_mib4']).'-'.(0+$td['add_mab4']).'';
- }
- }
- if($wj[4]['iznosMAX']>0)
- {
- if($wj[4]['iznosMAXi'] == 999999999) {
- $wj4i .= '
Долговечность: неразрушимо ';
- }else{
- $wj4i .= '
Долговечность: '.floor($wj[4]['iznosNOW']).'/'.ceil($wj[4]['iznosMAX']).'';
- }
- }*/
$wj4i .= $this->getInfoItemInfo($wj[4]);
}
- /*if($wj[6]!=false)
- {
- $wj[4]['img'] = $wj[6]['img'];
- $wj[4]['id'] = $wj[6]['id'];
- $wj[4]['inRazdel'] = $wj[6]['inRazdel'];
- }elseif($wj[5]!=false)
- {
- $wj[4]['img'] = $wj[5]['img'];
- $wj[4]['id'] = $wj[5]['id'];
- $wj[4]['inRazdel'] = $wj[5]['inRazdel'];
- }elseif($wj[4]!=false)
- {
- }*/
if ( /*$i1 == 1 &&*/ (($this->info['noplaw'] == 1 && !isset($_GET['hide_plaw'])) || ($this->info['noplaw'] == 0 && isset($_GET['hide_plaw'])))) {
if ($wj[5] != false) {
$wj[4]['img'] = $wj[5]['img'];
$wj[4]['id'] = $wj[5]['id'];
$wj[4]['inRazdel'] = $wj[5]['inRazdel'];
- } elseif ($wj[4] != false) {
-
}
} else {
if ($wj[6] != false) {
@@ -8773,8 +7539,6 @@ LIMIT 1'));
$wj[4]['img'] = $wj[5]['img'];
$wj[4]['id'] = $wj[5]['id'];
$wj[4]['inRazdel'] = $wj[5]['inRazdel'];
- } elseif ($wj[4] != false) {
-
}
}
if ($wj[1] != false || $wj[2] != false) {
@@ -8842,13 +7606,6 @@ LIMIT 1'));
if ($u['animal'] > 0) {
$an = mysql_fetch_array(mysql_query('SELECT `id`,`type`,`name`,`uid`,`delete`,`inBattle`,`eda`,`exp`,`obraz`,`stats`,`level`,`sex`,`levelUp`,`pet_in_cage`,`max_exp`,`priems`,`bonus` FROM `users_animal` WHERE `id` = "' . $u['animal'] . '" AND `pet_in_cage` = 0 AND `delete` = "0" LIMIT 1'));
if (isset($an['id'])) {
- if ($i1 != 1) {
- //$anml = '';
- } else {
- if ($an['eda'] > 0) {
- //$anml = '';
- }
- }
$petimg = mysql_fetch_array(mysql_query('SELECT `id`,`img` FROM `obraz_pet` WHERE `uid` = "' . $u['id'] . '" AND `use` = 1 LIMIT 1'));
if (isset($petimg['id'])) {
$anml = '';
@@ -9019,11 +7776,6 @@ LIMIT 1'));
}
}
- if ($sn['itmslvl'] == 0) {
- //$ei = 'Легкое вооружение (Эффект)
Осталось: Бесконечно';
- //$eff .= '';
- }
-
//здоровье
if ($type_info == 1) {
$hptop = 0;
@@ -9175,30 +7927,13 @@ LIMIT 1'));
$rt[0] .= '';
$zag = '';
- /*
- $witmn[1] = '';
- $witmn[2] = '';
- $witmn[3] = '';
- $witmn[4] = '';
- $witmn[7] = '';
- $witmn[8] = '';
- $witmn[9] = '';
- $witmn[10] = '';
- $witmn[11] = '';
- $witmn[12] = '';
- $witmn[13] = '';
- $witmn[14] = '';
- $witmn[16] = '';
- $witmn[17] = '';
-*/
+
$j2 = 0;
while ($j2 <= 17) {
$witm[$j2] = '' . $witm[$j2] . '
';
$j2++;
}
- $eff = $eff;
-
}
//
if ($type_info == 1) {
@@ -9556,16 +8291,6 @@ LIMIT 1'));
if ($itm['group'] == 1) {
if ($this->itemsX($itm['id']) > 1) {
$this->unstack($itm['id'], 1);
- /*$itm = mysql_fetch_array(mysql_query('SELECT
- `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
- `iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl`
- FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`inOdet`="0" AND `iu`.`inShop`="0" '.$au.' AND `iu`.`delete`="1000" AND `iu`.`inGroup` = "'.$itm['id'].'" LIMIT 1'));
- if(!isset($itm['id'])) {
- $this->error = 'Группа предметов ошибочна...';
- $notr++;
- } else {
- $itm['delete'] = 0;
- }*/
}
}
@@ -9999,25 +8724,6 @@ LIMIT 1'));
$u = $this->info;
}
- /*if( $btl_cache == true ) {
- $cache = $this->get_battle_cache( $u['id'],$u['battle'] );
- if( $cache == false ) {
- unset($cache);
- }else{
- $cache['st'] = $u + $cache['st'];
- }
- }*/
-
- /*if( $u['battle'] > 0 ) {
- $cache_items = $this->get_battle_cache( $u['id'],$u['battle'] );
- if( $cache_items == false ) {
- unset($cache_items);
- }else{
- $cache_items['st']['hpNow'] = $u['hpNow'];
- $cache_items['st']['mpNow'] = $u['mpNow'];
- }
- }*/
-
if (isset($u['id'], $u['stats']) && !isset($cache)) {
$st = [];
$s_vi = [];
@@ -10032,9 +8738,7 @@ LIMIT 1'));
}
if (!isset($cache_items)) {
- //
- //$st = new SplFixedArray(1024000);
- //
+
$lvl = mysql_fetch_array(mysql_query('SELECT `bprice`,`upLevel`,`nextLevel`,`exp`,`money`,`money_bonus1`,`money_bonus2`,`ability`,`skills`,`nskills`,`sskills`,`expBtlMax`,`hpRegen`,`mpRegen`,`money2` FROM `levels` WHERE `upLevel` = "' . $u['upLevel'] . '" LIMIT 1'));
if (isset($lvl['upLevel'])) {
$st['levels'] = $lvl;
@@ -10141,21 +8845,6 @@ LIMIT 1'));
$st['irka'] += $pl['price1'];
}
}
- /* Доминирование */
- //$dom[count($dom)] = array($pl['inOdet'],$pl['class'],$pl['class_point'],$pl['anti_class'],$pl['anti_class_point'],$pl['level'],$u['level'],$pl['price2']);
-
-
- if ($pl['inOdet'] <= 18 && $pl['inOdet'] > 0) {
- /*if( $pl['2price'] > 0 ) {
- $st['reting'] += $pl['2price']*12.5;
- }elseif( $pl['price2'] > 0 ) {
- $st['reting'] += $pl['price2']*12.5;
- }elseif( $pl['1price'] > 0 ) {
- $st['reting'] += $pl['1price'];
- }elseif( $pl['price1'] > 0 ) {
- $st['reting'] += $pl['price1'];
- }*/
- }
$st['wp' . $pl['inOdet'] . 'id'] = $h;
@@ -10204,16 +8893,6 @@ LIMIT 1'));
}
}
}
- } else {
- if ($pl['inOdet'] < 18 && $pl['inOdet'] > 0) {
- if ($pl['2price'] == 0 && $pl['price2'] == 0) {
- if ($pl['1price'] > 0) {
- //$st['prckr'] += round($pl['1price']/3);
- } else {
- //$st['prckr'] += round($pl['price1']/3);
- }
- }
- }
}
if ($pl['inOdet'] <= 18 && $pl['inOdet'] > 0) {
@@ -10221,10 +8900,6 @@ LIMIT 1'));
$st['reting'] += 1;
}
- if (isset($sti['add_oza'])) {
-
- }
-
$ko = 1;
while ($ko <= 4) {
if (isset($sti['add_oza' . $ko])) {
@@ -10499,27 +9174,6 @@ LIMIT 1'));
$i++;
}
}
- /*if( $u['battle'] > 0 ) {
- //Кэшируем
- $cache_items = array(
- 'st' => $st,
- 'sti' => $sti,
- 's_v' => $s_v,
- 's_vi' => $s_vi
- );
- $cache_items = json_encode($cache_items);
- mysql_query('INSERT INTO `battle_cache` (`uid`,`battle`,`data`,`time`) VALUES ("'.$u['id'].'","'.$u['battle'].'","'.mysql_real_escape_string($cache_items).'","'.time().'")');
- unset($cache_items);
- }*/
- } else {
- /*$st = $cache_items['st'];
- unset($cache_items['st']);
- $sti = $cache_items['sti'];
- unset($cache_items['sti']);
- $s_v = $cache_items['s_v'];
- unset($cache_items['s_v']);
- $s_vi = $cache_items['s_vi'];
- unset($cache_items);*/
}
//
@@ -10558,12 +9212,7 @@ LIMIT 1'));
}
}
}
- //echo '['.date( 'd.m.Y H:i:s' , time() + round((($e['timeUse']+$e['timeAce']+$e['actionTime'])-time())/$c['effz'])*$c['effz']).']';
- if (true == false && $test_btl_info['noeff'] == 1 && isset($this->ekrcast[$e['id_eff']])) {
- //эффекты не действуют
- } elseif ($e['sleeptime'] != 0 && substr_count($e['v1'], 'pgb') > 0) {
- //Не отображаем действие пристрастия во время сна
- } elseif (($e['timeUse'] + $e['timeAce'] + $e['actionTime'] > time() || $e['timeUse'] == 77)) {
+ if (($e['timeUse'] + $e['timeAce'] + $e['actionTime'] > time() || $e['timeUse'] == 77)) {
if ($e['v1'] == 'priem') {
$prsu[$e['v2']] = 0 + $prsu['x'];
}
@@ -10811,47 +9460,6 @@ LIMIT 1'));
}
}
- //Бонус покупателя
- /*$bl = mysql_fetch_array(mysql_query('SELECT `id`,`level` FROM `users_paybonus` WHERE `id` = "'.$u['id'].'" LIMIT 1'));
- $st['pbe'] = 0+$bl['level'];
- if( $st['pbe'] > 1000 ) {
- $st['pbe'] = 1000;
- }
- unset($bl);*/
-
- //Клан абилки
- /*
- if( $st['clanpos'] > 0 ) {
- if( $st['clanpos'] == 1 ) {
- $st['s1'] += 5;
- $st['s2'] += 5;
- $st['s3'] += 5;
- $st['s4'] += 0;
- $st['s5'] += 5;
- $st['s6'] += 0;
- $st['m10'] += 10;
- $st['m11'] += 10;
- }elseif( $st['clanpos'] == 2 ) {
- $st['s1'] += 3;
- $st['s2'] += 3;
- $st['s3'] += 3;
- $st['s4'] += 0;
- $st['s5'] += 3;
- $st['s6'] += 0;
- $st['m10'] += 5;
- $st['m11'] += 5;
- }elseif( $st['clanpos'] == 3 ) {
- $st['s1'] += 1;
- $st['s2'] += 1;
- $st['s3'] += 1;
- $st['s4'] += 0;
- $st['s5'] += 1;
- $st['s6'] += 0;
- $st['m10'] += 3;
- $st['m11'] += 3;
- }
- }*/
-
//Характеристики от статов
if (!isset($st['hpAll'])) {
@@ -10859,10 +9467,6 @@ LIMIT 1'));
}
$st['hpAll'] += $st['s4'] * 5;
- //$st['enAll'] += 10;
- //$st['enAll'] += floor($st['s11']*10);
- //$st['enAll'] += round($st['s4']*0.09);
-
if (!isset($st['mpAll'])) {
$st['mpAll'] = 0;
}
@@ -10903,26 +9507,6 @@ LIMIT 1'));
}
$st['zm'] += $st['s4'] * 1.0;
- /*if(!isset($st['pa1'])) {
- $st['pa1'] = 0;
- }
- $st['pa1'] += $st['s2']*0.1;
-
- if(!isset($st['pa4'])) {
- $st['pa4'] = 0;
- }
- $st['pa4'] += $st['s3']*0.1;
-
- if(!isset($st['pa3'])) {
- $st['pa3'] = 0;
- }
- $st['pa3'] += $st['s4']*0.1;
-
- if(!isset($st['pa2'])) {
- $st['pa2'] = 0;
- }
- $st['pa2'] += $st['s1']*0.1;*/
-
if (!isset($st['zaproc'])) { //Тут зм 'zaproc'=>'Защита от урона (%)','zmproc'=>'Защита от магии стихий (%)
$st['zaproc'] = 0;
}
@@ -11038,13 +9622,6 @@ LIMIT 1'));
//Бонусы статов
//ТУТ
//сила
- /*if($st['s1']>24 && $st['s1']<50){ $st['m10'] += 5; }
- if($st['s1']>49 && $st['s1']<75){ $st['m10'] += 10; }
- if($st['s1']>74 && $st['s1']<100){ $st['m10'] += 17; }
- if($st['s1']>99 && $st['s1']<125){ $st['m10'] += 25; }
- if($st['s1']>124 && $st['s1']<150){ $st['m10'] += 25; $st['minAtack'] += 10; $st['maxAtack'] += 10; }
- if($st['s1']>149 && $st['s1']<175){ $st['m10'] += 30; $st['minAtack'] += 10; $st['maxAtack'] += 10; }
- if($st['s1']>174){ $st['m10'] += 30; $st['minAtack'] += 15; $st['maxAtack'] += 15; }*/
if ($st['s1'] > 24 && $st['s1'] < 50) {
$st['m2'] += 15;
@@ -11079,13 +9656,6 @@ LIMIT 1'));
}
//ловкость $st[1]['pa1'] += 2; $st['m7'] += 35;
- /*if($st['s2']>24 && $st['s2']<50){ $st[1]['pa1'] += 2; }
- if($st['s2']>49 && $st['s2']<75){ $st['m7'] += 5; $st['m4'] += 35; $st['m2'] += 15; }
- if($st['s2']>74 && $st['s2']<100){ $st['m7'] += 15; $st['m4'] += 35; $st['m2'] += 15; }
- if($st['s2']>99 && $st['s2']<125){ $st['m7'] += 15; $st['m4'] += 105; $st['m2'] += 40; }
- if($st['s2']>124 && $st['s2']<150) { $st['m7'] += 15; $st['m4'] += 105; $st['m2'] += 40; $st['m15'] += 5; }
- if($st['s2']>149 && $st['s2']<175){ $st['m7'] += 20; $st['m4'] += 115; $st['m2'] += 40; $st['m15'] += 5; }
- if($st['s2']>174){ $st['m7'] += 20; $st['m4'] += 120; $st['m2'] += 50; $st['m15'] += 7; }*/
if ($st['s2'] > 24 && $st['s2'] < 50) {
$st['pa1'] += 2;
@@ -11132,13 +9702,7 @@ LIMIT 1'));
}
//интуиция
- /*if($st['s3']>24 && $st['s3']<50){ $st['m3'] += 10; }
- if($st['s3']>49 && $st['s3']<75){ $st['m3'] += 10; $st['m1'] += 35; $st['m5'] += 15; }
- if($st['s3']>74 && $st['s3']<100){ $st['m3'] += 25; $st['m1'] += 35; $st['m5'] += 15; }
- if($st['s3']>99 && $st['s3']<125){ $st['m3'] += 25; $st['m1'] += 105; $st['m5'] += 45; }
- if($st['s3']>124 && $st['s3']<150){ $st['m3'] += 25; $st['m1'] += 105; $st['m5'] += 45; $st['m14'] += 5; }
- if($st['s3']>149 && $st['s3']<175){ $st['m3'] += 30; $st['m1'] += 105; $st['m5'] += 45; $st['m14'] += 5; }
- if($st['s3']>174){ $st['m3'] += 30; $st['m1'] += 120; $st['m5'] += 45; $st['m14'] += 7; }*/
+
if ($st['s3'] > 24 && $st['s3'] < 50) {
$st['pa4'] += 2;
$st['m3'] += 2;
@@ -11191,14 +9755,7 @@ LIMIT 1'));
}
//выносливость
- /*if($st['s4']>0){ $st['hpAll'] += 30; }
- if($st['s4']>24 && $st['s4']<50){ $st['hpAll'] += 50; }
- if($st['s4']>49 && $st['s4']<75){ $st['hpAll'] += 100; }
- if($st['s4']>74 && $st['s4']<100){ $st['hpAll'] += 175; }
- if($st['s4']>99 && $st['s4']<125){ $st['hpAll'] += 250; }
- if($st['s4']>124 && $st['s4']<150){ $st['hpAll'] += 250; $st['za'] += 25; }
- if($st['s4']>149 && $st['s4']<175){ $st['hpAll'] += 350; $st['za'] += 50; }
- if($st['s4']>174){ $st['hpAll'] += 400; $st['za'] += 100; }*/
+
if ($st['s4'] > 0) {
$st['hpAll'] += 30;
}
@@ -11237,13 +9794,7 @@ LIMIT 1'));
$st['zm'] += 125;
}
//интелект
- /*if($st['s5']>24 && $st['s5']<50){ $st['m11'] += 5; }
- if($st['s5']>49 && $st['s5']<75){ $st['m11'] += 10; }
- if($st['s5']>74 && $st['s5']<100){ $st['m11'] += 17; }
- if($st['s5']>99 && $st['s5']<125){ $st['m11'] += 25; }
- if($st['s5']>124 && $st['s5']<150){ $st['m11'] += 35; }
- if($st['s5']>149 && $st['s5']<175){ $st['m11'] += 45; }
- if($st['s5']>174){ $st['m11'] += 60; }*/
+
if ($st['s5'] > 24 && $st['s5'] < 50) {
$st['m11'] += 10;
}
@@ -11270,13 +9821,7 @@ LIMIT 1'));
$st['pzm'] += 5;
}
//мудрость
- /*if($st['s6']>24 && $st['s6']<50){ $st['mpAll'] += 50; $st['speedmp'] +=100; }
- if($st['s6']>49 && $st['s6']<75){ $st['mpAll'] += 100; $st['speedmp'] +=200; }
- if($st['s6']>74 && $st['s6']<100){ $st['mpAll'] += 175; $st['speedmp'] += 350; }
- if($st['s6']>99 && $st['s6']<125){ $st['mpAll'] += 250; $st['speedmp'] += 500; }
- if($st['s6']>124 && $st['s6']<150) { $st['mpAll'] += 250; $st['speedmp'] += 500; $st['pzm'] += 3; }
- if($st['s6']>149 && $st['s6']<175){ $st['mpAll'] += 300; $st['speedmp'] += 600; $st['pzm'] += 3; }
- if($st['s6']>174){ $st['mpAll'] += 450; $st['speedmp'] += 700; $st['pzm'] += 5; }*/
+
if ($st['s6'] > 24 && $st['s6'] < 50) {
$st['mpAll'] += 150;
$st['speedmp'] += 100;
@@ -11323,9 +9868,6 @@ LIMIT 1'));
$st['zonb']++;
}
- //$st['speedhp'] += $st['pbe'];
- //$st['speedmp'] += $st['pbe'];
-
/* Владения */
$i = 1;
while ($i <= 7) {
@@ -11440,10 +9982,7 @@ LIMIT 1'));
}
//Реген. - 250 ед.
- /*if( $u['level'] > 7 ) {
- $st['speedhp'] -= 240;
- $st['speedmp'] -= 240;
- }*/
+
//конец бонусов
if ($st['hpNow'] < 0) {
@@ -11485,62 +10024,6 @@ LIMIT 1'));
$st['y'] = $u['y'];
$st['s'] = $u['s'];
- //Собираем рейтинг
- /*$st['reting'] = 0;
- //
- $st['reting'] += $st['hpAll'];
- $st['reting'] += $st['mpAll'];
- //
- $st['reting'] += $st['m1'];
- $st['reting'] += $st['m2'];
- $st['reting'] += $st['m4'];
- $st['reting'] += $st['m5'];
- //
- $st['reting'] += $st['m6']*10;
- $st['reting'] += $st['m7']*10;
- $st['reting'] += $st['m8']*10;
- $st['reting'] += $st['m9']*10;
- //
- $st['reting'] += $st['a1']*7;
- $st['reting'] += $st['a2']*7;
- $st['reting'] += $st['a3']*7;
- $st['reting'] += $st['a4']*7;
- $st['reting'] += $st['a5']*7;
- $st['reting'] += $st['a6']*7;
- $st['reting'] += $st['a7']*7;
- //
- $st['reting'] += $st['mg1']*7;
- $st['reting'] += $st['mg2']*7;
- $st['reting'] += $st['mg3']*7;
- $st['reting'] += $st['mg4']*7;
- $st['reting'] += $st['mg5']*7;
- $st['reting'] += $st['mg6']*7;
- $st['reting'] += $st['mg7']*7;
- //
- $st['reting'] += $st['m3']*5;
- $i8 = 1;
- $st['reting'] += $st['za']*5;
- $st['reting'] += $st['zm']*5;
- //
- $st['reting'] += $st['s5']*5;
- $st['reting'] += $st['s6']*5;
- //
- while( $i8 < 8 ) {
- $st['reting'] += $st['pa'.$i]*5;
- $st['reting'] += $st['pm'.$i]*5;
- //
- $st['reting'] += $st['za'.$i]*10;
- $st['reting'] += $st['zm'.$i]*10;
- $i8++;
- }
- //
- $i8 = 1;
- while( $i8 < 5 ) {
- $st['reting'] += $st['mib'.$i];
- $st['reting'] += $st['mab'.$i];
- $i8++;
- }*/
-
$st['reting'] = 1 + ceil($st['reting']);
$st['reting'] = 1 + $st['irka'];
@@ -11626,21 +10109,14 @@ LIMIT 1'));
$st['speed_dungeon'] += 1000;
$st['speedhp'] += 1000000000000000;
}
- /*if( date('H') >= 22 && date('H') <= 24 ) {
- if($u['room']==9 && $u['room']==323 && $u['room']==1) {
- $st['exp'] +=150;
- }
- }else*/
+
if (date('H') >= 22 && date('H') <= 10) {
$st['exp'] += 25;
}
//Сохраняем рейтинг игрока
$st['reting'] = floor($st['reting']);
- //if(@$st['btl_cof'] != @$st['reting']) {
- //$st['btl_cof'] = $st['reting'];
- //mysql_query('UPDATE `stats` SET `btl_cof` = "'.$st['reting'].'" WHERE `id` = "'.$st['id'].'" LIMIT 1');
- //}
+
if (@$st['btl_cof'] != @$st['prckr']) {
$st['btl_cof'] = $st['prckr'];
mysql_query('UPDATE `stats` SET `btl_cof` = "' . $st['prckr'] . '" WHERE `id` = "' . $st['id'] . '" LIMIT 1');
@@ -11774,20 +10250,7 @@ LIMIT 1'));
}
if ($this->info['exp'] >= $lvl['exp'] && isset($lvln['upLevel'])) {
if ($lvl['nextLevel'] > $this->info['level']) {
- /*Выдаем бонусные предметы
- if($lvl['nextLevel']==9){
- $this->addItem(5021,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==10){
- $this->addItem(5022,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==11){
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==12){
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- }*/
+
//повышаем выносливость
$a4 = 1;
if ($lvl['nextLevel'] == 9) {
@@ -11916,22 +10379,8 @@ LIMIT 1'));
$this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '!
(Персонаж не активирован, либо у вас совпадают IP! Разрешено не более 1 такого реферала!)', -1, 6, 0, 0, 0, 1);
}
}
-
-
- /*
- $tst = $this->lookStats($this->info['stats']);
- $tst['s4'] += $a4;
- $tst['s7'] += $lvl['duh'];
- $this->info['stats'] = $this->impStats($tst);
- */
}
- /*if( $this->info['twink'] == 0 ) {
- if( $this->info['exp'] >= 300000 ) {
- $this->send('',$this->info['room'],$this->info['city'],'',$this->info['login'],'За достижение нового уровня/аппа, Вы получаете:
'.$lvl['money'].' кр.',-1,6,0,0,0,1);
- }
- }*/
-
$tst = $this->lookStats($this->info['stats']);
$tst['s4'] += $lvl['vinos'];
$tst['s7'] += $lvl['duh'];
@@ -11944,10 +10393,6 @@ LIMIT 1'));
$this->info['sskills'] += $lvl['sskills'];
$this->info['nskills'] += $lvl['nskills'];
if ($this->info['twink'] == 0) {
- //if( $this->info['level'] < 8 ) {
- //Выдаем за аппы зубы 0-7 лвл
- //$this->info['money4'] = $lvl['money']+$this->info['money4'];
- //}else{
$this->info['money'] = $lvl['money'] + $this->info['money'];
$this->info['money2'] = $lvl['money2'] + $this->info['money2'];
//}
@@ -11966,24 +10411,7 @@ LIMIT 1'));
mysql_query('DELETE FROM `actions` WHERE `uid` = "' . $this->info['id'] . '" AND `vars` LIKE "psh%"');
$this->send('', $this->info['room'], $this->info['city'], '', $this->info['login'], 'Обязательно используйте свитки и эликсиры в своем инвентаре!!!!!!!!!!!!!!!.', -1, 6, 0, 0, 0, 1);
}
- /*if( $this->info['level'] > 0 && $this->info['level'] <= 5 ) {
- $this->info['money4'] += 100;
- mysql_query('UPDATE `users` SET `money4` = "'.$this->info['money4'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- $this->send('',$this->info['room'],$this->info['city'],'',$this->info['login'],'За достижение нового уровня вы получаете '.$this->zuby(100,1).'',-1,6,0,0,0,1);
- }*/
- //if( isset($itm['id']) || $lvl['nextLevel'] != 6 ) {
- //
- /*$txti = 'Достиг';
- if( $this->info['sex'] == 1 ) {
- $txti .= 'ла';
- }
- $txti .= ' '.$this->info['level'].' уровня!
'.date('d.m.Y H:i').'';
- //
- mysql_query('INSERT INTO `users_ico` (
- `uid`,`time`,`text`,`img`,`type`,`x`,`see`
- ) VALUES (
- "'.$this->info['id'].'","'.time().'","'.$txti.'","pod_lvl'.$this->info['level'].'.gif","2","1","1"
- )');*/
+
//
$this->send('', $this->info['room'], $this->info['city'], '', '', '
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $this->info['level'] . '!', time(), 6, 0, 0, 0, 1, 2); // Наверно тут
//}
@@ -11996,7 +10424,6 @@ LIMIT 1'));
} else {
$this->info['stopexp'] = 0;
}
- $upd = mysql_query('UPDATE `users` SET `stopexp` = "' . $this->info['stopexp'] . '" , `level` = "' . $this->info['level'] . '",`money` = "' . $this->info['money'] . '",`money2` = "' . $this->info['money2'] . '",`money4` = "' . $this->info['money4'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
$upd = mysql_query('UPDATE `users_twink` SET `stopexp` = "' . $this->info['stopexp'] . '" WHERE `uid` = "' . $this->info['id'] . '" LIMIT 1');
if ($upd) {
mysql_query('UPDATE `stats` SET `ability` = "' . $this->info['ability'] . '",`skills` = "' . $this->info['skills'] . '",`nskills` = "' . $this->info['nskills'] . '",`sskills` = "' . $this->info['sskills'] . '",`stats` = "' . $this->info['stats'] . '",`upLevel` = "' . $this->info['upLevel'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
@@ -12084,16 +10511,12 @@ LIMIT 1'));
$u = $this->info;
if (isset($this->stats['hpAll'])) {
$st = $this->stats;
- } elseif ($st != 0) {
-
} else {
$st = $this->getStats($uid, $i1);
}
}
$btl = 0;
- if ($u['battle'] > 0) {
- //$btl = mysql_fetch_array(mysql_query('SELECT `id`,`time_start` FROM `battle` WHERE `id` = "'.$u['battle'].'" AND `team_win` = "-1" LIMIT 1'));
- }
+
if ($u['battle'] == 0 || (isset($btl['id']) && $btl['time_start'] > $this->info['timereg'])) {
$sth = $u['minHP']; //Стандартное время восстановления в минутах HP
$stm = $u['minMP']; //Стандартное время восстановления в минутах MP
@@ -12165,38 +10588,6 @@ LIMIT 1'));
}
}
- public function send_mime_mail($name_from, // имя отправителя
- $email_from, // email отправителя
- $name_to, // имя получателя
- $email_to, // email получателя
- $data_charset, // кодировка переданных данных
- $send_charset, // кодировка письма
- $subject, // тема письма
- $body // текст письма
- )
- {
- $to = $this->mime_header_encode($name_to, $data_charset, $send_charset)
- . ' <' . $email_to . '>';
- $subject = $this->mime_header_encode($subject, $data_charset, $send_charset);
- $from = $this->mime_header_encode($name_from, $data_charset, $send_charset)
- . ' <' . $email_from . '>';
- if ($data_charset != $send_charset) {
- $body = iconv($data_charset, $send_charset, $body);
- }
- $headers = "From: $from\r\n";
- $headers .= "Content-type: text/html; charset=$send_charset\r\n";
-
- return mail($to, $subject, $body, $headers);
- }
-
- public function mime_header_encode($str, $data_charset, $send_charset)
- {
- if ($data_charset != $send_charset) {
- $str = iconv($data_charset, $send_charset, $str);
- }
- return '=?' . $send_charset . '?B?' . base64_encode($str) . '?=';
- }
-
public function set_cl_item($id, $user, $cl)
{
$item_ = mysql_fetch_array(mysql_query('SELECT `iu`.*, `im`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `iu`.`item_id` = `im`.`id` WHERE `iu`.`uid` = "' . $user['id'] . '" AND `iu`.`delete` = 0 AND `iu`.`inOdet` = 0 AND `iu`.`inShop` = 0 AND `im`.`inslot` > 0 AND `iu`.`gift` = "" AND `iu`.`data` NOT LIKE "%frompisher=%" AND `iu`.`id` = "' . $id . '" LIMIT 1'));
@@ -12325,25 +10716,9 @@ LIMIT 1'));
}
}
- public function send_mail($to, $to_name, $from = 'support@new-combats.com', $name = '
Бойцовский Клуб 2', $title, $text)
- {
- $this->send_mime_mail($name,
- $from,
- $to_name,
- $to,
- 'CP1251', // кодировка, в которой находятся передаваемые строки
- 'KOI8-R', // кодировка, в которой будет отправлено письмо
- $title,
- $text); // \r\n
- }
-
public function roomInfo($id, $short = false)
{
- if ($short == true) {
- $select = ' `id`, `name`, `code`, `city`, `timeGO`, `level`,`roomGo` ';
- } else {
- $select = ' * ';
- }
+ $select = $short ? ' `id`, `name`, `code`, `city`, `timeGO`, `level`,`roomGo` ' : ' * ';
$roomInfo = mysql_fetch_array(mysql_query('SELECT ' . $select . ' FROM `room` WHERE `id` = "' . $id . '" LIMIT 1'));
if ($roomInfo['roomGo']) $roomInfo['roomGo'] = explode(',', $roomInfo['roomGo']);
if ($roomInfo['level']) $roomInfo['level'] = explode('-', $roomInfo['level']);
@@ -12364,6 +10739,4 @@ LIMIT 1'));
}
-
$u = user::start();
-?>
\ No newline at end of file
diff --git a/buttons.php b/buttons.php
index f7ef322d..5d6a6084 100644
--- a/buttons.php
+++ b/buttons.php
@@ -1,28 +1,24 @@
: '.$e.'
(c) '.$c[1].'