84 lines
3.3 KiB
PHP
84 lines
3.3 KiB
PHP
|
<?
|
|||
|
if(!defined('GAME'))
|
|||
|
{
|
|||
|
die();
|
|||
|
}
|
|||
|
if($u->info['admin']>0 || ($u->info['align']>=3 && $u->info['align']<4))
|
|||
|
{
|
|||
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|||
|
$ust = $u->getStats($uu['id'],0);
|
|||
|
if(isset($uu['id']))
|
|||
|
{
|
|||
|
if($uu['id'] == $u->info['id'])
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>';
|
|||
|
}elseif($u->info['battle']>0)
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>';
|
|||
|
}elseif($ust['hpNow']<($ust['hpAll']/100*15))
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($uu['level']>$u->info['level'])
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif(date('H',time())>6 && date('H',time())<21 && $u->info['admin']==0)
|
|||
|
{
|
|||
|
$uer = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>';
|
|||
|
}elseif($u->stats['hpNow'] >= ($u->stats['hpAll']/100*67) && $u->info['admin']==0)
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ...';
|
|||
|
}elseif(floor($uu['align'])==3 && $u->info['admin']==0)
|
|||
|
{
|
|||
|
$uer = '<27><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($uu['online']<time()-120)
|
|||
|
{
|
|||
|
$uer = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($uu['room']!=$u->info['room'])
|
|||
|
{
|
|||
|
$uer = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}elseif($uu['battle']>0)
|
|||
|
{
|
|||
|
$uer = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>';
|
|||
|
}else{
|
|||
|
$sx = '';
|
|||
|
if($u->info['sex']==1)
|
|||
|
{
|
|||
|
$sx = '<27>';
|
|||
|
}
|
|||
|
$itm1 = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "'.$uu['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1164 LIMIT 1'));
|
|||
|
if(isset($itm1['id']))
|
|||
|
{
|
|||
|
$uer = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$uu['login'].'", <20> '.$uu.' <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> "'.$itm1['name'].'".<br>';
|
|||
|
}else{
|
|||
|
$itm2 = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "'.$uu['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1163 LIMIT 1'));
|
|||
|
if(isset($itm2['id']))
|
|||
|
{
|
|||
|
$sx = '<27><><EFBFBD><EFBFBD>';
|
|||
|
if($uu['sex']==1)
|
|||
|
{
|
|||
|
$sx = '<27><><EFBFBD>';
|
|||
|
}
|
|||
|
$uer = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$uu['login'].'", <20> '.$uu.' <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> "'.$itm2['name'].'".<br>';
|
|||
|
$rtxt = '[img[items/chesnok2.gif]] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$u->info['login'].'" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sx.' <20>.<2E>. <20> "'.$uu['login'].'" <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}else{
|
|||
|
$rtxt = '[img[items/vampir.gif]] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$u->info['login'].'" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.$sx.' <20> <20><><EFBFBD><EFBFBD><EFBFBD>'.$sx.' <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$uu['login'].'"';
|
|||
|
$u->stats['hpNow'] += $ust['hpNow'];
|
|||
|
if($u->stats['hpNow']>$u->stats['hpAll'])
|
|||
|
{
|
|||
|
$u->stats['hpNow'] = $u->stats['hpAll'];
|
|||
|
}
|
|||
|
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpAll'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `stats` SET `hpNow` = "0" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|||
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','11','0','1')");
|
|||
|
$uer = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "'.$uu['login'].'".<br>';
|
|||
|
}
|
|||
|
}
|
|||
|
unset($itm1,$itm2);
|
|||
|
}
|
|||
|
}else{
|
|||
|
$uer = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
}else{
|
|||
|
$uer = '<27> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
?>
|