game/_incl_data/class/magic/sunduk_80.php

58 lines
3.0 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($tr['var_id'] != '') {
$io = '';
/*
2023-01-10 16:29:32 +00:00
1. Требует 4 любых ключа
2022-06-06 21:30:34 +00:00
*/
$trgos = false;
/*
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
*/
$keyall = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
if( $keyall[0] >= 4 ) {
mysql_query('DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 4');
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4');
$trgos = true;
}
if( $trgos == true ) {
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Целебный пирог (х2)</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Запас маны (х2)</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Восстановление энергии 900HP</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(2710,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Восстановление энергии 1000MP</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(4030,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Зелье Жизни</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(724,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
2023-01-10 16:29:32 +00:00
$io .= '<i>Зелье Маны</i>, ';
2022-06-06 21:30:34 +00:00
$this->addItem(1187,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
}else{
$no_open_itm = true;
2023-01-10 16:29:32 +00:00
$this->error = 'Требуется 4 ключа с поля битвы.';
2022-06-06 21:30:34 +00:00
}
}
unset($i5,$i3,$i4);
?>