game/_incl_data/class/magic/396.php
2022-06-07 00:30:34 +03:00

56 lines
4.1 KiB
PHP

<?
if(!defined('GAME')) {
die();
}
if($itm['magic_inci'] == 396) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 396 LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
}
} elseif($itm['magic_inci'] == 397) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 397 LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
}
} elseif($itm['magic_inci'] == 398) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 398 LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Ïåðñîíàæ èñïîëüçîâàë ýëèêñèð &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Âû óñïåøíî èñïîëüçîâàëè ýëèêñèð &quot;'.$itm['name'].'&quot;';
}
}
?>