game/_incl_data/class/magic/yarostzvezd.php

50 lines
2.0 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
2022-12-19 18:26:14 +00:00
if(!defined('GAME'))
{
die();
2022-06-06 21:30:34 +00:00
}
2022-12-19 18:26:14 +00:00
if( $itm['magic_inci'] == 'yarostzvezd' ) {
$pvr = array();
2023-01-10 16:29:32 +00:00
//Действие при клике
2022-12-19 18:26:14 +00:00
$pvr['trs7'] = 5;
if( $u->stats['hpNow'] < 1 ) {
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>';
2022-12-19 18:26:14 +00:00
}elseif( $u->info['tactic7'] < $pvr['trs7'] ) {
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Недостаточно духа, необходимо '.$pvr['trs7'].'...</b></font>';
2022-12-19 18:26:14 +00:00
}elseif( isset($btl->info['id']) ) {
/*
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'',
2023-01-10 16:29:32 +00:00
'{tm1} {u1} использовал заклятие &quot;<b>'.$itm['name'].'</b>&quot;.',
2022-12-19 18:26:14 +00:00
($btl->hodID)
);
*/
mysql_query('UPDATE `stats` SET `tactic7` = `tactic7` - "'.$pvr['trs7'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->info['tactic7'] = $u->info['tactic7']-$pvr['trs7'];
$u->stats['tactic7'] = $u->stats['tactic7']-$pvr['trs7'];
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 22 AND `v1` = "priem" AND `v2` = 325');
mysql_query("
INSERT INTO `eff_users` ( `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `timeAce`, `user_use`, `delete`, `v1`, `v2`, `img2`, `x`, `hod`, `bj`, `sleeptime`, `no_Ace`, `file_finish`, `tr_life_user`, `deactiveTime`, `deactiveLast`, `mark`, `bs`) VALUES
2023-01-10 16:29:32 +00:00
( 22, '".$u->info['id']."', 'Ярость Холодных Звезд', 'add_acestar=1', 0, 77, 0, '".$u->info['id']."', 0, 'priem', 325, 'elementalcrit.gif', 1, -1, 'яростьхолодныхзвезд', 0, 0, '', 0, 0, 0, 1, 0);
2022-06-06 21:30:34 +00:00
");
2022-12-19 18:26:14 +00:00
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Вы почувствовали силу... </b></font>';
2022-12-19 18:26:14 +00:00
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
}else{
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Свиток возможно использовать только в бою</b></font>';
2022-12-19 18:26:14 +00:00
}
2023-01-10 16:29:32 +00:00
//Отнимаем тактики
2022-12-19 18:26:14 +00:00
//$this->mintr($pl);
unset($pvr);
2022-06-06 21:30:34 +00:00
}
?>