game/_incl_data/class/dnaction/12/fontan1.php
2022-06-07 00:30:34 +03:00

29 lines
1.5 KiB
PHP

<?
if(isset($s[1]) && $s[1] == '12/fontan1') {
$vad = array('go' => false);
$vad['use_fontan'] = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `uid` = "'.$u->info['id'].'" AND `dn` = "'.$u->info['dnow'].'" AND `vars` = "use_fontan" AND `vals` = "2" LIMIT 1'));
if(!isset($vad['use_fontan']['id'])) {
$vad['key'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "1174" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['key']['id'])) {
$vad['bottle'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "2" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `inOdet` = "0" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if(isset($vad['bottle']['id'])) {
$vad['go'] = true;
} else {
$r = 'Äëÿ èñïîëüçîâàíèÿ òðåáóåòñÿ &quot;Ïóñòàÿ Áóòûëêà&quot;';
}
} else {
$r = 'Äëÿ èñïîëüçîâàíèÿ òðåáóåòñÿ &quot;Ìåðöàþùèé Êëþ÷ ¹1&quot;';
}
} else {
if($u->info['sex'] == 1) { $a = 'à'; } else { $a = ''; }
$r = 'Ìíå êàæåòñÿ, ÷òî çäåñü ÿ óæå áûë'.$a.'..';
}
if($vad['go'] == true) {
$r = 'Âû âîñïîëüçîâàëèñü &quot;Êëþ÷ ¹1&quot;. Îïóñòèâ ïóñòóþ áóòûëêó â ôîíòàí âû íàïîëíèëè å¸.';
$u->deleteItem(intval($vad['key']['id']), $u->info['id'], 1);
$u->deleteItem(intval($vad['bottle']['id']), $u->info['id'], 1);
$u->addItem(round(4403), $u->info['id'], '|musor=2|noremont=1|nosale=1',12);
}
unset($vad);
}
?>