game/_incl_data/class/magic/antipropuskpsh.php

61 lines
2.7 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
if(!defined('GAME'))
{
die();
}
if( $itm['magic_inci'] == 'antipropuskpsh' ) {
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$usr['id'].'" AND `vars` = "psh0" AND `time` > "'.time().'" LIMIT 1'));
if(!isset($usr['id']) || $usr['room'] != $u->info['room']) {
$u->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;'.htmlspecialchars($_GET['login']).'&quot; <20><><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
}elseif( $usr['admin'] > 0 || ($usr['align'] > 3 && $usr['align'] < 4) || ($usr['align'] > 1 && $usr['align'] < 2)) {
$u->error = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;'.htmlspecialchars($_GET['login']).'&quot; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
}elseif( $u->info['align'] != 2 ) {
if ($u->info['money']>100)
{
if( !isset($test['id']) ) {
$u->addAction( time()+300 ,'psh0',$usr['id'],$usr['id']);
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$usr['id'].'" AND `vars` = "psh0" AND `time` > "'.time().'" LIMIT 1'));
}
$u->addAction(time(),'propuskpsh','',$usr['id']);
$u->error = '<27><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 24 <20><><EFBFBD><EFBFBD> <20><><EFBFBD> &quot;'.$usr['login'].'&quot;.';
$u->addDelo(4,$usr['id'],'&quot;<font color="olive">System.magic</font>&quot;: <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$u->info['login'],time(),$usr['id'],'System.magic',0,0);
$u->info['money'] = $u->info['money'] - 100;
mysql_query('UPDATE `users` SET `money` = `money` -100 WHERE `id` = '.$u->info['id'].' LIMIT 1');
/*if($test['time'] < time()) {
$test['time'] = time();
}
$test['time'] += 86400;*/
$test['time'] = time() + 86400;
mysql_query('UPDATE `actions` SET `time` = "'.$test['time'].'" WHERE `uid` = '.$usr['id'].' AND `id` = "'.$test['id'].'" LIMIT 1');
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$usr['id'].'" LIMIT 1'));
if(isset($eff['id']))
{
mysql_query('DELETE FROM `eff_users` WHERE `id` = '.$eff['id'].' AND `id_eff` = 476');
$this->add_eff($usr['id'],476);
mysql_query('UPDATE `eff_users` SET `name` = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>'.$u->info['login'].'<27>" WHERE `uid` = '.$usr['id'].' AND `uid` = "'.$usr['id'].'" AND `delete` = 0 AND `id_eff`= "476" LIMIT 1');
}
else
{
$this->add_eff($usr['id'],476);
mysql_query('UPDATE `eff_users` SET `name` = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>'.$u->info['login'].'<27>" WHERE `uid` = '.$usr['id'].' AND `uid` = "'.$usr['id'].'" AND `delete` = 0 AND `id_eff`= "476" LIMIT 1');
}
}
else
{
$u->error = '<27> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 100<30><30>.';
}
}else{
$u->error = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!';
}
}
?>