2023-03-31 21:42:06 +03:00
< ? php
2022-06-07 00:30:34 +03:00
if ( ! defined ( 'GAME' ))
{
die ();
}
if ( $u -> room [ 'file' ] == 'novich' )
{
$tst = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `dialog_act` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `var` = "noobqst1" LIMIT 1' ));
if ( ! isset ( $tst [ 'id' ])) {
if ( isset ( $_GET [ 'noobgo' ]) || $c [ 'noobgade' ] == false ) {
if ( $_GET [ 'noobgo' ] == 1 && $c [ 'noobgade' ] == true ) {
2023-01-10 18:29:32 +02:00
//Согласился (создаем пещеру и телепортируем туда
2022-06-07 00:30:34 +03:00
$ins = mysql_query ( 'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
2023-01-10 18:29:32 +02:00
VALUES ("' . $u -> info [ 'city' ] . '","' . $u -> info [ 'id' ] . '","106","Академия Новичков","' . time () . '")' );
2022-06-07 00:30:34 +03:00
if ( $ins ){
$zid = mysql_insert_id ();
2023-01-10 18:29:32 +02:00
//обновляем пользователей
2022-06-07 00:30:34 +03:00
$su = mysql_query ( 'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`id`="' . $u -> info [ 'id' ] . '"' );
$ids = '' ;
$map_locs = array ();
$spm2 = mysql_query ( 'SELECT `id`,`x`,`y` FROM `dungeon_map` WHERE `id_dng` = "106"' );
while ( $plm2 = mysql_fetch_array ( $spm2 ) ) {
$map_locs [] = array ( $plm2 [ 'x' ], $plm2 [ 'y' ]);
}
unset ( $spm2 , $plm2 );
$pxd = 0 ;
while ( $pu = mysql_fetch_array ( $su ) ) {
$pxd ++ ;
$ids .= ' `id` = "' . $pu [ 'id' ] . '" OR' ;
}
$ids = rtrim ( $ids , 'OR' );
$snew = 0 ;
$upd1 = mysql_query ( 'UPDATE `stats` SET `s`="4",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . '' );
if ( $upd1 ){
$upd2 = mysql_query ( 'UPDATE `users` SET `room` = "391" WHERE ' . $ids . '' );
2023-01-10 18:29:32 +02:00
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
//Добавляем ботов
2022-06-07 00:30:34 +03:00
$vls = '' ;
$sp = mysql_query ( 'SELECT * FROM `dungeon_bots` WHERE `for_dn` = "106"' );
while ( $pl = mysql_fetch_array ( $sp ) ) {
if ( $pl [ 'id_bot' ] == 0 && $pl [ 'bot_group' ] != '' ){
$bots = explode ( ',' , $pl [ 'bot_group' ] );
$pl [ 'id_bot' ] = ( int ) $bots [ rand ( 0 , count ( $bots ) - 1 )];
}
if ( $pl [ 'id_bot' ] > 0 ) $vls .= '("' . $zid . '","' . $pl [ 'id_bot' ] . '","' . $pl [ 'colvo' ] . '","' . $pl [ 'items' ] . '","' . $pl [ 'x' ] . '","' . $pl [ 'y' ] . '","' . $pl [ 'dialog' ] . '","' . $pl [ 'items' ] . '","' . $pl [ 'go_bot' ] . '","' . $pl [ 'noatack' ] . '"),' ;
unset ( $bots );
}
$vls = rtrim ( $vls , ',' );
$ins1 = mysql_query ( 'INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`,`go_bot`,`noatack`) VALUES ' . $vls . '' );
2023-01-10 18:29:32 +02:00
//Добавляем обьекты
2022-06-07 00:30:34 +03:00
$vls = '' ;
$sp = mysql_query ( 'SELECT * FROM `dungeon_obj` WHERE `for_dn` = "106"' );
while ( $pl = mysql_fetch_array ( $sp ))
{
$vls .= '("' . $zid . '","' . $pl [ 'name' ] . '","' . $pl [ 'img' ] . '","' . $pl [ 'x' ] . '","' . $pl [ 'y' ] . '","' . $pl [ 'action' ] . '","' . $pl [ 'type' ] . '","' . $pl [ 'w' ] . '","' . $pl [ 'h' ] . '","' . $pl [ 's' ] . '","' . $pl [ 's2' ] . '","' . $pl [ 'os1' ] . '","' . $pl [ 'os2' ] . '","' . $pl [ 'os3' ] . '","' . $pl [ 'os4' ] . '","' . $pl [ 'type2' ] . '","' . $pl [ 'top' ] . '","' . $pl [ 'left' ] . '","' . $pl [ 'date' ] . '"),' ;
}
//
$vls = rtrim ( $vls , ',' );
if ( $vls != '' ) {
$ins2 = mysql_query ( 'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . '' );
} else {
$ins2 = true ;
}
if ( $upd2 && $ins1 && $ins2 ){
die ( '<script>location="main.php?rnd=' . $code . '";</script>' );
} else {
2023-01-10 18:29:32 +02:00
$error = 'Ошибка перехода в подземелье...' ;
2022-06-07 00:30:34 +03:00
}
} else {
2023-01-10 18:29:32 +02:00
$error = 'Ошибка перехода в подземелье...' ;
2022-06-07 00:30:34 +03:00
}
} else {
2023-01-10 18:29:32 +02:00
$error = 'Ошибка перехода в подземелье...' ;
2022-06-07 00:30:34 +03:00
}
//
//header('location: main.php');
die ();
} else {
2023-01-10 18:29:32 +02:00
//Отказался (добавляем квест, системку и пошел нах)
2022-06-07 00:30:34 +03:00
mysql_query ( 'INSERT INTO `dialog_act` (
`uid`,`var`,`time`
) VALUES (
"' . $u -> info [ 'id' ] . '","noobqst1","' . time () . '"
)' );
2023-01-10 18:29:32 +02:00
//Начало обучения
2022-06-07 00:30:34 +03:00
$humor = array (
0 => array (
''
),
1 => array (
''
)
);
$humor = $humor [ $u -> info [ 'sex' ]];
//$u->info['fnq'] = 1;
//mysql_query('UPDATE `users` SET `fnq` = "'.$u->info['fnq'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
2023-01-10 18:29:32 +02:00
//Отправляем сообщение в чат о новичке
2022-06-07 00:30:34 +03:00
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = 0 AND `item_id` = 4703');
//mysql_query('UPDATE `users` SET `room` = 4 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//mysql_query('UPDATE `stats` SET `hpNow` = 1000,`mpNow` = 1000,`dn` = 0 , `dnow` = 0 , `x` = 0 , `y` = 0 , `s` = 0 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
2023-01-10 18:29:32 +02:00
//$u->send('','','','','','В нашем мире появился новый игрок "<b>' . $u->info['login'] . '</b>"! '.$humor[rand(0,count($humor)-1)].'',time(),6,0,0,0,1,0);
2022-06-07 00:30:34 +03:00
2023-01-10 18:29:32 +02:00
//echo '<div><font color=red><b>Вы отказались от обучения, второй попытки больше не будет!</b></font></div>';
2022-06-07 00:30:34 +03:00
}
} else {
echo '<script>
function qstnoobsstart() {
2023-01-10 18:29:32 +02:00
top.win.add(\'qstnoobsstart\',\'Вы хотите пройти обучение?\',\'\',{\'a1\':\'top.frames[\\\'main\\\'].location.href=\\\'main.php?noobgo=1\\\';\',\'a2\':\'top.frames[\\\'main\\\'].location.href=\\\'main.php?noobgo=2\\\';\',\'n\':\'<center><small>Отказавшись вы не получите награду!</small></center>\'},2,1,\'width:300px;\');
2022-06-07 00:30:34 +03:00
}
qstnoobsstart();
</script>' ;
}
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" valign="top">
2023-03-31 19:54:33 +03:00
<?php $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
2022-06-07 00:30:34 +03:00
</td>
2023-03-31 19:54:33 +03:00
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules_data/stats_loc.php'); ?></td>
2022-06-07 00:30:34 +03:00
<td valign="top"><div align="right">
<table width="510" border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
2023-03-31 19:54:33 +03:00
<?php if($re!=''){ echo '<font color="red"><b>'.$re.'</b></font>'; } ?>
2022-06-07 00:30:34 +03:00
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
2023-03-31 21:30:14 +03:00
<div style="position:relative; cursor: pointer; width: 500px;" id="ione"><img src="//img.new-combats.tech/i/images/300x225/club/navig2.jpg" id="img_ione" width="500" height="240" border="1"/>
<div style="position:absolute; left:264px; top:106px; width:175px; height:37px; z-index:90;"><img src="//img.new-combats.tech/i/images/subimages/map_zal2.gif" width="175" height="37" id="mo_1.180.0.0" /></div>
<div style="position:absolute; left:47px; top:120px; width:135px; height:29px; z-index:90;"><img <?php thisInfRm('1.180.0.1'); ?> src="//img.new-combats.tech/i/images/subimages/map_zal3.gif" width="135" height="29" class="aFilter" id="mo_1.180.0.1" /></div>
<div style="position:absolute; left:81px; top:102px; width:88px; height:15px; z-index:90;"><img src="//img.new-combats.tech/i/images/subimages/map_zal1.gif" width="88" height="15" title="Вход через Комнату Перехода" id="mo_1.180.0.2" class="aFilter" onclick="alert('Вход через Комнату Перехода')" /></div>
<div style="position:absolute; left:349px; top:139px; width:16px; height:18px; z-index:90;"><img src="//img.new-combats.tech/i/images/subimages/fl1.gif" width="16" height="18" title="Вы находитесь в Комнате для Новичков" /></div>
2022-06-07 00:30:34 +03:00
<div id="snow"></div>
2023-03-31 19:54:33 +03:00
<?= $goline; ?>
2022-06-07 00:30:34 +03:00
</div>
</td>
</tr>
</table>
<div style="display:none; height:0px " id="moveto"></div>
2023-01-10 18:29:32 +02:00
Чтобы начать играть,<b>Вам нужно прочесть подсказку ( ниже )</b>.<br />
После прочтения,ниже,воспользуйтесь кнопкой<b>"Возврат"</b><br />
2023-03-31 19:54:33 +03:00
<?php $hgo = $u->testHome(); if(!isset($hgo['id'])){ ?><INPUT onclick="location.href='main.php?homeworld=<?= $code; ?>';" class="btn" value="Возврат" type="button" name="combats2"><?php } unset($hgo); ?>
2023-01-10 18:29:32 +02:00
<INPUT class="btn" onclick="window.open('/forum/?read=845&rnd=1', 'help', 'height=500,width=1200,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка для новичков" style="color:red;" type="button">
2022-06-07 00:30:34 +03:00
<br />
</small></div></td>
<td>
2023-01-10 18:29:32 +02:00
<!-- <br /><span class="menutop"><nobr>Комната для новичков</nobr></span>-->
2022-06-07 00:30:34 +03:00
</td>
</tr>
</table>
<small>
<HR>
<br />
2023-01-10 18:29:32 +02:00
<strong>Внимание!Смените пароль на уникальный,который не использовался ранее в подобных проектах,это обезопасит вашего персонажа от взлома.<BR>
<em>Администрация.</strong> </em></small> <BR>
2023-03-31 19:54:33 +03:00
<?= $rowonmax; ?><BR>
2022-06-07 00:30:34 +03:00
</div></td>
</tr>
</table>
2023-03-31 21:42:06 +03:00
<?php
2022-06-07 00:30:34 +03:00
}
?>