game/_incl_data/class/Magic/undie.php

53 lines
2.1 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'] == 'undie' ) {
$pvr = array();
2023-01-10 16:29:32 +00:00
//Действие при клике
2022-06-06 21:30:34 +00:00
$pvr['trs7'] = 10;
if( $u->stats['s7'] > 74 ) {
$pvr['trs7'] = round($pvr['trs7']/2,2);
}
if( $u->stats['hpNow'] < 1 ) {
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>';
2022-06-06 21:30:34 +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>';
2024-01-06 15:30:34 +00:00
}elseif( isset($btl->i->id) ) {
2022-06-06 21:30:34 +00:00
/*
$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-06-06 21:30:34 +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` = 324');
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_spasenie=1', 0, 77, 0, '".$u->info['id']."', 0, 'priem', 324, 'preservation.gif', 1, -1, 'спасение', 0, 0, '', 0, 0, 0, 1, 0);
2022-06-06 21:30:34 +00:00
");
2023-01-10 16:29:32 +00:00
$u->error = '<font color=red><b>Вы почувствовали защищенность... </b></font>';
2022-06-06 21:30:34 +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-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Отнимаем тактики
2022-06-06 21:30:34 +00:00
//$this->mintr($pl);
unset($pvr);
}
?>