game/_incl_data/class/dnaction/106/door1.php

27 lines
974 B
PHP
Raw Permalink Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
if( isset($s[1]) && $s[1] == '106/door1' ) {
/*
2023-01-10 16:29:32 +00:00
Сундук: Кровавый подземник (4561)
2022-06-06 21:30:34 +00:00
*/
2023-01-10 16:29:32 +00:00
//Все переменные сохранять в массиве $vad !
2022-06-06 21:30:34 +00:00
$vad = array(
'go' => true
);
if( $vad['go'] == true ) {
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES (
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","'.$vad['bad'].'"
)');
$vad['qst'] = mysql_fetch_array(mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "'.$u->info['id'].'" AND `var` = "noobqst1" AND `val` = 1 LIMIT 1'));
if(!isset($vad['qst']['id'])) {
2023-01-10 16:29:32 +00:00
$r = 'Дверь закрыта. Сначала выполните задания Учителя.';
2022-06-06 21:30:34 +00:00
}else{
mysql_query('UPDATE `stats` SET `x` = -2,`y` = 6,`s` = 1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
die();
}
}
unset($vad);
}
?>