game/_incl_data/class/Magic/396.php

25 lines
1.1 KiB
PHP

<?php
if (!defined('GAME')) {
die();
}
if (in_array($itm['magic_inci'], [396, 397, 398])) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "' . $u->info['id'] . '" AND `id_eff` = '. $itm['magic_inci'] .' 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']);
Delo::add(
1,
'System.inventory',
$u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (' . $u->info['id'] . ') [itm:' . $itm['id'] . '].',
);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = ' . $itm['id']);
$u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;';
}