56 lines
4.4 KiB
PHP
56 lines
4.4 KiB
PHP
<?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'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
} else {
|
|
$this->add_eff($u->info['id'], $itm['magic_inc']);
|
|
$u->addDelo(1,$u->info['id'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
}
|
|
} 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'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
} else {
|
|
$this->add_eff($u->info['id'], $itm['magic_inc']);
|
|
$u->addDelo(1,$u->info['id'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
}
|
|
} 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'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
} else {
|
|
$this->add_eff($u->info['id'], $itm['magic_inc']);
|
|
$u->addDelo(1,$u->info['id'], '"<font color="maroon">System.inventory</font>": Персонаж использовал эликсир "'.$itm['name'].'" ('.$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 = 'Вы успешно использовали эликсир "'.$itm['name'].'"';
|
|
}
|
|
}
|
|
|
|
?>
|