game/_incl_data/class/magic/396.php

56 lines
4.4 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
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']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
}
} 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']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
}
} 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']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
2023-01-10 16:29:32 +00:00
$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);
2022-06-06 21:30:34 +00:00
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
2023-01-10 16:29:32 +00:00
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
2022-06-06 21:30:34 +00:00
}
}
?>