game/_incl_data/class/priems/pirogi2.php
2022-06-07 00:30:34 +03:00

193 lines
9.3 KiB
PHP

<?
if(!defined('GAME'))
{
die();
}
if($st['usefromfile']=='pirogi2' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1)
{
if($btl->info['team_win'] != -1 ) {
$u->error = 'Èñïîëüçîâàòü ïèðîæêè âîçìîæíî òîëüêî âî âðåìÿ áîÿ';
}else{
$bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
if(isset($bu['id'])) {
$u->error = 'Íåëüçÿ èñïîëüçîâàòü ïèðîæêè òàê ÷àñòî! Îñòàëîñü õîäîâ: '.$bu['hod'].'';
}else{
if( $itm['magic_inci'] == 446 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Æèâàÿ Âîäà</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"10", "327", "invoke_kar3_lifew.gif", 22, "'.$u->info['id'].'", "Æèâàÿ Âîäà", "atgm=30", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","25")');
}
}elseif( $itm['magic_inci'] == 449 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Ñóøåíûé Ìóõîìîð</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"5", "328", "invoke_kar3_mush.gif", 22, "'.$u->info['id'].'", "Ñóøåíûé Ìóõîìîð", "add_m10=25|add_m11=25", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","10")');
}
}elseif( $itm['magic_inci'] == 450 ) {
$txt = '  ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Ìåøî÷åê Ïûëè</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"5", "329", "invoke_kar3_dust.gif", 22, "'.$u->info['id'].'", "Ìåøî÷åê Ïûëè", "add_m5=300|add_m4=300", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","10")');
}
}elseif( $itm['magic_inci'] == 451 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Îòâàð êîãòåé ÏÃ</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"5", "330", "invoke_kar3_potpg.gif", 22, "'.$u->info['id'].'", "Îòâàð êîãòåé ÏÃ", "add_za=200|add_zma=200", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","10")');
}
}elseif( $itm['magic_inci'] == 482 ) {
$txt = '  ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Òî÷èëüíûé Êàìåíü</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"10", "332", "invoke_kar3_mush.gif", 22, "'.$u->info['id'].'", "Òî÷èëüíûé Êàìåíü", "add_m10=75", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","20")');
}
}elseif( $itm['magic_inci'] == 483 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Âîëøåáíûé Ýëèêñèð</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"5", "333", "vampiric_potion.gif", 22, "'.$u->info['id'].'", "Âîëøåáíûé Ýëèêñèð", "atgm=100", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","20")');
}
}elseif( $itm['magic_inci'] == 484 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Öåïü Çàùèòíèêà</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"2", "334", "effcep.gif", 22, "'.$u->info['id'].'", "Öåïü Çàùèòíèêà", "add_zaproc=100|add_zmproc=100", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","20")');
}
}elseif( $itm['magic_inci'] == 485 ) {
$txt = ' Â ðåçóëüòàòå ïåðñîíàæ &quot;{u2}&quot; áûë ïîäâåðæåí äåéñòâèþ &quot;<b>Ýëèêñèð Áåçóìíîãî Êðèòîâèêà</b>&quot;.';
//
$txt = '';
if( isset($mgp['id']) ) {
$mgp['x']++;
$mgp['hod']++;
$txt = ' (x'.$mgp['x'].')';
}
if(isset($mgp['id'])) {
mysql_query('UPDATE `eff_users` SET `hod` = "'.$mgp['hod'].'", `x` = "'.$mgp['x'].'" WHERE `id` = "'.$mgp['id'].'" LIMIT 1');
}else{
mysql_query('INSERT INTO `eff_users` (
`hod`, `v2`, `img2`, `id_eff`, `uid`, `name`, `data`, `overType`, `timeUse`, `v1`, `user_use`
) VALUES (
"10", "335", "raaage.gif", 22, "'.$u->info['id'].'", "Ýëèêñèð Áåçóìíîãî Êðèòîâèêà", "add_m3=75", 0, "77", "priem", "'.$u->info['id'].'"
)');
mysql_query('INSERT INTO `pirogi` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","20")');
}
}
if($u->info['sex']==1) {
$txt = '{u1} ïðèìåíèëà çàêëèíàíèå &quot;<b>'.$itm['name'].'</b>&quot;. '.$txt.'';
}else{
$txt = '{u1} ïðèìåíèë çàêëèíàíèå &quot;<b>'.$itm['name'].'</b>&quot;. '.$txt.'';
}
$lastHOD = mysql_fetch_array(mysql_query('SELECT * FROM `battle_logs` WHERE `battle` = "'.$u->info['battle'].'" ORDER BY `id_hod` DESC LIMIT 1'));
$id_hod = $lastHOD['id_hod'];
if($lastHOD['type']!=6) {
$id_hod++;
}
//
mysql_query('INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("'.time().'","'.$u->info['battle'].'","'.($id_hod).'","{tm1} '.$txt.'","login1='.$u->info['login'].'||t1='.$u->info['team'].'||time1='.time().'||login2='.$u->info['login'].'||t2='.$u->info['team'].'||time2='.time().'","","","","","6")');
//
mysql_query('UPDATE `items_users` SET `iznosNow` = `iznosNow` + 1 WHERE `id` = "'.$itm['id'].'" LIMIT 1');
mysql_query('DELETE FROM `items_users` WHERE `iznosNOW` >= `iznosMAX` AND `id` = "'.$itm['id'].'" LIMIT 1');
}
}
}
?>