2023-03-31 18:42:06 +00:00
< ? php
2023-12-01 19:27:28 +00:00
use User\ItemsModel ;
if ( ! defined ( 'GAME' )) {
die ();
}
if ( $tr [ 'var_id' ] != '' ) {
$io = '' ;
/*
1. Требует 8 любых ключа
*/
$trgos = false ;
$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 ] >= 8 ) {
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 8'
);
$trgos = true ;
}
if ( $trgos ) {
$io .= '<i>Целебный пирог (х 3)</i>, ' ;
ItemsModel :: addItem ( 1028 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
ItemsModel :: addItem ( 1028 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Запас маны (х 3)</i>, ' ;
ItemsModel :: addItem ( 1029 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
ItemsModel :: addItem ( 1029 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Восстановление энергии 1500HP</i>, ' ;
ItemsModel :: addItem ( 4022 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Восстановление энергии 1500MP</i>, ' ;
ItemsModel :: addItem ( 4034 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Пропуск Забытых</i>, ' ;
ItemsModel :: addItem ( 2412 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Нападение</i>, ' ;
ItemsModel :: addItem ( 865 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Зелье Жизни</i>, ' ;
ItemsModel :: addItem ( 724 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Зелье Маны</i>, ' ;
ItemsModel :: addItem ( 1187 , $this -> info [ 'id' ], '|nosale=1|sudba=' . $this -> info [ 'login' ]);
$io .= '<i>Звездное Сияние</i>, ' ;
$iidtm = ItemsModel :: addItem ( 1463 , $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 ;
$this -> error = 'Требуется 8 ключей с поля битвы.' ;
}
}
unset ( $i5 , $i3 , $i4 );