2023-01-28 02:24:37 +00:00
< ? php
2023-12-01 21:27:45 +00:00
use Helper\Conversion ;
2022-08-25 11:23:36 +00:00
if ( ! defined ( 'GAME' )) {
die ();
2022-06-06 21:30:34 +00:00
}
2023-01-28 02:24:37 +00:00
if ( $u -> room [ 'file' ] != 'dragopsh' ) {
return ;
}
$d = new Dungeon ;
2023-12-01 21:27:45 +00:00
function sendSysChat ( string $message , bool $hasDn = false , bool $hasReceiver = false )
{
2023-01-28 02:24:37 +00:00
global $u ;
$cmsg = new ChatMessage ();
$cmsg -> setCity ( $u -> info [ 'city' ]);
$cmsg -> setRoom ( $u -> info [ 'room' ]);
$cmsg -> setText ( $message );
$cmsg -> setType ( 6 );
$cmsg -> setTypeTime ( 1 );
if ( $hasDn ) {
$cmsg -> setDn ( $u -> info [ 'dnow' ]);
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
if ( $hasReceiver ) {
$cmsg -> setTo ( $u -> info [ 'login' ]);
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
( new Chat ()) -> sendMsg ( $cmsg );
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$lab = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `laba_now` WHERE `id` = "' . $u -> info [ 'dnow' ] . '" LIMIT 1' ));
if ( ! isset ( $lab [ 'id' ])) {
die ( 'Поход в подземелье не найден...' );
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$varsitmsund = [ //Вещи в сундуках
[ 4391 , 1 ], [ 1043 , 1 ], [ 3106 , 1 ], [ 2544 , 2 ], //array(2545,1),
[ 724 , 1 ], [ 1187 , 1 ], [ 1043 , 1 ], [ 3106 , 1 ], [ 2544 , 2 ], //array(2545,1),
[ 724 , 1 ], [ 1187 , 1 ], [ 1043 , 1 ], [ 3106 , 1 ], [ 2544 , 2 ], //array(2545,1),
[ 724 , 1 ], [ 1187 , 1 ], [ 1043 , 1 ], [ 3106 , 1 ], [ 2544 , 2 ], //array(2545,1),
[ 724 , 1 ], [ 1187 , 1 ]];
$varsitm = [ //Слабые ресурсы
[ 4373 , 1 ], [ 4374 , 1 ], [ 4375 , 1 ], [ 4376 , 1 ], [ 4377 , 1 ], [ 4378 , 1 ], [ 4379 , 1 ], [ 4380 , 1 ], [ 4381 , 1 ], [ 4382 , 1 ], [ 4383 , 1 ], [ 4384 , 1 ], [ 4385 , 1 ], //
[ 4373 , 1 ], [ 4374 , 1 ], [ 4375 , 1 ], [ 4376 , 1 ], [ 4377 , 1 ], [ 4378 , 1 ], [ 4379 , 1 ], [ 4380 , 1 ], [ 4381 , 1 ], [ 4382 , 1 ], [ 4383 , 1 ], [ 4384 , 1 ], [ 4385 , 1 ], //
[ 4373 , 1 ], [ 4374 , 1 ], [ 4375 , 1 ], [ 4376 , 1 ], [ 4377 , 1 ], [ 4378 , 1 ], [ 4379 , 1 ], [ 4380 , 1 ], [ 4381 , 1 ], [ 4382 , 1 ], [ 4383 , 1 ], [ 4384 , 1 ], [ 4385 , 1 ]];
$varsitmart = [ //Артефакты
[ 2109 , 1 ], [ 2111 , 1 ], [ 2099 , 1 ], [ 2105 , 1 ], [ 2122 , 1 ], [ 2101 , 1 ], [ 2114 , 1 ], [ 2107 , 1 ], [ 2108 , 1 ]];
$map = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`data`,`update` FROM `laba_map` WHERE `id` = "' . $u -> info [ 'dnow' ] . '" LIMIT 1' ));
if ( ! isset ( $map [ 'id' ])) {
die ( 'Карта подземелий не найдена...' );
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$dies = mysql_fetch_array ( mysql_query ( 'SELECT COUNT(`id`) FROM `dungeon_actions` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `dn` = "' . $u -> info [ 'dnow' ] . '" AND `vars` = "dielaba" LIMIT 1' ));
$dies = $dies [ 0 ];
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$map_d = json_decode ( $map [ 'data' ]);
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$varos = [];
2023-12-01 21:27:45 +00:00
$varos [ 'trap1' ] = mysql_fetch_array (
mysql_query (
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `lib` = "' . $lab [ 'id' ] . '" AND `time` > "' . time () . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
2023-01-28 02:24:37 +00:00
$errors = '' ;
$effed = '' ;
if ( isset ( $_GET [ 'takeitm' ])) {
2023-12-01 21:27:45 +00:00
$var = [ 'obj' => mysql_fetch_array (
mysql_query (
'SELECT `i`.*,`m`.`name`,`m`.`inslot` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`id` = "' . mysql_real_escape_string (
$_GET [ 'takeitm' ]
) . '" AND `i`.`lib` = "' . $lab [ 'id' ] . '" AND `i`.`x` = "' . $u -> info [ 'x' ] . '" AND `i`.`y` = "' . $u -> info [ 'y' ] . '" LIMIT 1'
)
)];
2023-01-28 02:24:37 +00:00
if ( isset ( $var [ 'obj' ][ 'id' ])) {
if ( $var [ 'obj' ][ 'take' ] == 0 ) {
$var [ 'sex' ] = '' ;
if ( $u -> info [ 'sex' ] == 1 ) {
$var [ 'sex' ] = 'а ' ;
}
$var [ 'text' ] = '<b>' . $u -> info [ 'login' ] . '</b> поднял' . $var [ 'sex' ] . ' предмет "' . $var [ 'obj' ][ 'name' ] . '"' ;
$errors .= '<b style="color: red">Вы подняли предмет "' . $var [ 'obj' ][ 'name' ] . '"</b>' ;
mysql_query ( 'UPDATE `laba_itm` SET `take` = "' . $u -> info [ 'id' ] . '" WHERE `id` = "' . $var [ 'obj' ][ 'id' ] . '" LIMIT 1' );
if ( $var [ 'obj' ][ 'inslot' ] > 0 ) {
2023-04-15 23:54:34 +00:00
\User\ItemsModel :: addItem ( $var [ 'obj' ][ 'itm' ], $u -> info [ 'id' ], '|fromlaba=1|nosavelaba=1|nosale=1' );
2022-08-25 11:23:36 +00:00
} else {
2023-04-15 23:54:34 +00:00
\User\ItemsModel :: addItem ( $var [ 'obj' ][ 'itm' ], $u -> info [ 'id' ], '|fromlaba=1' );
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
sendSysChat ( $var [ 'text' ], true );
2022-08-25 11:23:36 +00:00
} else {
2023-01-28 02:24:37 +00:00
$errors .= '<b style="color: red">Предмет кто-то поднял раньше В а с ...</b>' ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
} else {
$errors = '<b style="color: red">Предмет не найден...</b>' ;
}
} elseif ( isset ( $_GET [ 'useobj' ])) {
2023-12-01 21:27:45 +00:00
$var = [ 'obj' => mysql_fetch_array (
mysql_query (
'SELECT * FROM `laba_obj` WHERE `id` = "' . mysql_real_escape_string (
$_GET [ 'useobj' ]
) . '" AND `lib` = "' . $lab [ 'id' ] . '" AND `x` = "' . $u -> info [ 'x' ] . '" AND `y` = "' . $u -> info [ 'y' ] . '" LIMIT 1'
)
)];
2023-01-28 02:24:37 +00:00
if ( isset ( $var [ 'obj' ][ 'id' ])) {
if ( $var [ 'obj' ][ 'use' ] == 0 ) {
if ( $var [ 'obj' ][ 'type' ] == 1 ) {
//сунудук
$var [ 'sex' ] = '' ;
if ( $u -> info [ 'sex' ] == 1 ) {
$var [ 'sex' ] = 'а ' ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
//Выдаем ресурсы, свитки
if ( rand ( 0 , 100 ) < 25 ) {
//Выдаем арт varsitmart
$var [ 'itm' ] = $varsitm [ mt_rand ( 0 , count ( $varsitm ) - 1 )];
2022-08-25 11:23:36 +00:00
$var [ 'itm' ] = $var [ 'itm' ][ 0 ];
$var [ 'itm' ] = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var [ 'itm' ] . '" LIMIT 1' ));
if ( isset ( $var [ 'itm' ][ 'id' ])) {
2023-12-01 21:27:45 +00:00
mysql_query (
' INSERT INTO `laba_itm` ( `uid` , `lib` , `time` , `itm` , `x` , `y` , `take` ) VALUES (
2023-01-28 02:24:37 +00:00
" ' . $u->info ['id'] . ' " , " ' . $lab['id'] . ' " , " ' . time() . ' " , " ' . $var['itm'] ['id'] . ' " , " ' . $u->info ['x'] . ' " , " ' . $u->info ['y'] . ' " , " 0 "
2023-12-01 21:27:45 +00:00
) '
);
2022-08-25 11:23:36 +00:00
} else {
2023-01-10 16:29:32 +00:00
$var [ 'itm' ][ 'name' ] = 'Предмет рассыпался на глазах...' ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
}
//Выдаем ресурсы, свитки
$var [ 'itm' ] = $varsitmsund [ rand ( 0 , count ( $varsitmsund ) - 1 )];
$var [ 'itm' ] = $var [ 'itm' ][ 0 ];
$var [ 'itm' ] = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var [ 'itm' ] . '" LIMIT 1' ));
if ( isset ( $var [ 'itm' ][ 'id' ])) {
2023-04-15 23:54:34 +00:00
\User\ItemsModel :: addItem ( $var [ 'itm' ][ 'id' ], $u -> info [ 'id' ], '|fromlaba=1' );
2023-01-28 02:24:37 +00:00
} else {
$var [ 'itm' ][ 'name' ] = 'Предмет рассыпался на глазах...' ;
}
2023-03-31 18:30:14 +00:00
$var [ 'text' ] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_sunduk.gif> <b>' . $u -> info [ 'login' ] . '</b> открыл' . $var [ 'sex' ] . ' сундук...и забрал "' . $var [ 'itm' ][ 'name' ] . '"' ;
2023-01-28 02:24:37 +00:00
sendSysChat ( $var [ 'text' ], true );
2023-03-31 18:30:14 +00:00
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_sunduk.gif"> ' . $u -> info [ 'login' ] . ' открыл' . $var [ 'sex' ] . ' сундук...и забрал "' . $var [ 'itm' ][ 'name' ] . '"' ;
2023-01-28 02:24:37 +00:00
$var [ 'obj' ][ 'use' ] = $u -> info [ 'id' ];
} elseif ( $var [ 'obj' ][ 'type' ] == 5 ) {
//Пандору
$var [ 'sex' ] = '' ;
if ( $u -> info [ 'sex' ] == 1 ) {
$var [ 'sex' ] = 'а ' ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
//Выдаем ресурсы, свитки
if ( rand ( 0 , 100 ) < 70 ) {
//Выдаем арт varsitmart
$var [ 'itm' ] = $varsitmart [ rand ( 0 , count ( $varsitmart ) - 1 )];
2022-08-25 11:23:36 +00:00
$var [ 'itm' ] = $var [ 'itm' ][ 0 ];
$var [ 'itm' ] = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var [ 'itm' ] . '" LIMIT 1' ));
if ( isset ( $var [ 'itm' ][ 'id' ])) {
2023-12-01 21:27:45 +00:00
mysql_query (
' INSERT INTO `laba_itm` ( `uid` , `lib` , `time` , `itm` , `x` , `y` , `take` ) VALUES (
2023-01-28 02:24:37 +00:00
" ' . $u->info ['id'] . ' " , " ' . $lab['id'] . ' " , " ' . time() . ' " , " ' . $var['itm'] ['id'] . ' " , " ' . $u->info ['x'] . ' " , " ' . $u->info ['y'] . ' " , " 0 "
2023-12-01 21:27:45 +00:00
) '
);
2022-08-25 11:23:36 +00:00
} else {
2023-01-10 16:29:32 +00:00
$var [ 'itm' ][ 'name' ] = 'Предмет рассыпался на глазах...' ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
$var [ 'itm' ] = $varsitm [ rand ( 0 , count ( $varsitm ) - 1 )];
$var [ 'itm' ] = $var [ 'itm' ][ 0 ];
$var [ 'itm' ] = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var [ 'itm' ] . '" LIMIT 1' ));
if ( isset ( $var [ 'itm' ][ 'id' ])) {
2023-12-01 21:27:45 +00:00
mysql_query (
' INSERT INTO `laba_itm` ( `uid` , `lib` , `time` , `itm` , `x` , `y` , `take` ) VALUES (
2023-01-28 02:24:37 +00:00
" ' . $u->info ['id'] . ' " , " ' . $lab['id'] . ' " , " ' . time() . ' " , " ' . $var['itm'] ['id'] . ' " , " ' . $u->info ['x'] . ' " , " ' . $u->info ['y'] . ' " , " 0 "
2023-12-01 21:27:45 +00:00
) '
);
2023-01-28 02:24:37 +00:00
} else {
$var [ 'itm' ][ 'name' ] = 'Предмет рассыпался на глазах...' ;
2022-08-25 11:23:36 +00:00
}
2023-03-31 18:30:14 +00:00
$var [ 'text' ] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_pandbox.gif> <b>' . $u -> info [ 'login' ] . '</b> открыл' . $var [ 'sex' ] . ' Ящик Пандоры...' ;
2023-01-28 02:24:37 +00:00
sendSysChat ( $var [ 'text' ], true );
2023-03-31 18:30:14 +00:00
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_pandbox.gif"> ' . $u -> info [ 'login' ] . ' открыл' . $var [ 'sex' ] . ' Ящик Пандоры...' ;
2023-01-28 02:24:37 +00:00
$var [ 'obj' ][ 'use' ] = $u -> info [ 'id' ];
} elseif ( $var [ 'obj' ][ 'type' ] == 3 ) {
//Хилка
$var [ 'sex' ] = '' ;
if ( $u -> info [ 'sex' ] == 1 ) {
$var [ 'sex' ] = 'а ' ;
}
$var [ 'hpp' ] = rand ( 2 , 5 ) * 10 ;
$var [ 'hp' ] = round ( $u -> stats [ 'hpAll' ] / 100 * $var [ 'hpp' ]);
$u -> stats [ 'hpNow' ] += $var [ 'hp' ];
if ( $u -> stats [ 'hpNow' ] > $u -> stats [ 'hpAll' ]) {
$u -> stats [ 'hpNow' ] = $u -> stats [ 'hpAll' ];
}
2023-03-31 18:30:14 +00:00
$var [ 'text' ] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_heal.gif> <b>' . $u -> info [ 'login' ] . '</b> пополнил' . $var [ 'sex' ] . ' здоровье, Уровень Жизни +' . $var [ 'hpp' ] . '% (+' . $var [ 'hp' ] . 'HP)' ;
2023-01-28 02:24:37 +00:00
mysql_query ( 'UPDATE `stats` SET `hpNow` = "' . $u -> stats [ 'hpNow' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
sendSysChat ( $var [ 'text' ], true );
2023-03-31 18:30:14 +00:00
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_heal.gif"> ' . $u -> info [ 'login' ] . ' пополнил' . $var [ 'sex' ] . ' здоровье, Уровень Жизни +' . $var [ 'hpp' ] . '% (+' . $var [ 'hp' ] . 'HP)' ;
2023-01-28 02:24:37 +00:00
$var [ 'obj' ][ 'use' ] = $u -> info [ 'id' ];
}
if ( $var [ 'obj' ][ 'use' ] > 0 ) {
mysql_query ( 'UPDATE `laba_obj` SET `use` = "' . $var [ 'obj' ][ 'use' ] . '" WHERE `id` = "' . $var [ 'obj' ][ 'id' ] . '" LIMIT 1' );
2022-08-25 11:23:36 +00:00
}
} else {
2023-01-28 02:24:37 +00:00
$errors = '<font color=red><b>Кто-то уже использовал это до В а с ...</b></font>' ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
} else {
$errors = '<font color=red><b>Обьект не найден...</b></font>' ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
unset ( $var );
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
//Генирация карты
$mapsee = '' ;
$real_x = $u -> info [ 'x' ];
$real_y = $u -> info [ 'y' ];
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( $real_y < 6 ) {
$real_y = 6 ;
}
if ( $real_x < 6 ) {
$real_x = 6 ;
}
if ( $real_y > count ( $map_d ) - 7 ) {
$real_y = count ( $map_d ) - 7 ;
}
if ( $real_x > count ( $map_d ) - 7 ) {
$real_x = count ( $map_d ) - 7 ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$objs = [];
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
$sp = mysql_query (
'SELECT * FROM `laba_obj` WHERE `lib` = "' . $lab [ 'id' ] . '" AND `x` > ' . ( $real_x - 7 ) . ' AND `x` < ' . ( $real_x + 7 ) . ' AND `y` > ' . ( $real_y - 12 ) . ' AND `y` < ' . ( $real_y + 12 ) . ' LIMIT 144'
);
2023-01-28 02:24:37 +00:00
while ( $pl = mysql_fetch_array ( $sp )) {
$objs [ $pl [ 'x' ]][ $pl [ 'y' ]] = $pl ;
}
$i = 1 ;
$goodgoo = [ 1 => 0 , 2 => 0 , 3 => 0 , 4 => 0 ];
while ( $i <= 4 ) {
$goto = [ 'x' => $u -> info [ 'y' ], 'y' => $u -> info [ 'x' ]];
if ( $i == 1 ) {
$goto [ 'x' ] -- ;
} elseif ( $i == 2 ) {
$goto [ 'y' ] -- ;
} elseif ( $i == 3 ) {
$goto [ 'x' ] ++ ;
} elseif ( $i == 4 ) {
$goto [ 'y' ] ++ ;
}
if ( $map_d [ $goto [ 'y' ]][ $goto [ 'x' ]] == 0 && $goto [ 'x' ] > 0 && $goto [ 'x' ] < count ( $map_d ) - 1 && $u -> info [ 'timeGo' ] <= time ()) {
$goodgoo [ $i ] = 1 ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
$i ++ ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( isset ( $_GET [ 'goto' ])) {
$goto = [ 'x' => $u -> info [ 'y' ], 'y' => $u -> info [ 'x' ]];
if ( $_GET [ 'goto' ] == 1 ) {
$goto [ 'x' ] -- ;
} elseif ( $_GET [ 'goto' ] == 2 ) {
$goto [ 'y' ] -- ;
} elseif ( $_GET [ 'goto' ] == 3 ) {
$goto [ 'x' ] ++ ;
} elseif ( $_GET [ 'goto' ] == 4 ) {
$goto [ 'y' ] ++ ;
}
if ( $goodgoo [ $_GET [ 'goto' ]] == 1 && $u -> info [ 'timeGo' ] <= time ()) {
//переходим
$u -> info [ 'y' ] = $goto [ 'x' ];
$u -> info [ 'x' ] = $goto [ 'y' ];
$real_x = $u -> info [ 'x' ];
$real_y = $u -> info [ 'y' ];
$varos [ 'timego' ] = 5 ;
if ( isset ( $varos [ 'trap1' ][ 'time' ])) {
$varos [ 'timego' ] += 3 ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
if ( isset ( $u -> stats [ 'speed_dungeon' ])) {
$varos [ 'timego' ] = $varos [ 'timego' ] - floor ( $varos [ 'timego' ] / 100 * $u -> stats [ 'speed_dungeon' ]);
if ( $varos [ 'timego' ] < 1 ) {
$varos [ 'timego' ] = 1 ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
$u -> info [ 'timeGo' ] = time () + $varos [ 'timego' ];
$u -> info [ 'timeGoL' ] = time ();
2023-12-01 21:27:45 +00:00
mysql_query (
'UPDATE `stats` SET `x` = "' . $u -> info [ 'x' ] . '" ,`y` = "' . $u -> info [ 'y' ] . '",`timeGoL` = "' . $u -> info [ 'timeGoL' ] . '",`timeGo` = "' . $u -> info [ 'timeGo' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1'
);
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$tmdg = ( $u -> info [ 'timeGo' ] - time ());
$tmdgl = ( $u -> info [ 'timeGo' ] - $u -> info [ 'timeGoL' ]);
$tmdgp = floor ( 100 - $tmdg / $tmdgl * 100 );
if ( $tmdgp < 1 ) {
$tmdgp = 1 ;
} elseif ( $tmdgp > 100 ) {
$tmdgp = 100 ;
}
$tmdgm = 25 * $tmdgl ;
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$tmdg = floor ( 40 / 100 * $tmdgp );
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( $tmdg < 1 ) {
$tmdg = 1 ;
} elseif ( $tmdg > 40 ) {
$tmdg = 40 ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( $real_y < 6 ) {
$real_y = 6 ;
}
if ( $real_x < 6 ) {
$real_x = 6 ;
}
if ( $real_y > count ( $map_d ) - 7 ) {
$real_y = count ( $map_d ) - 7 ;
}
if ( $real_x > count ( $map_d ) - 7 ) {
$real_x = count ( $map_d ) - 7 ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( isset ( $_POST [ 'exit' ])) {
if ( $lab [ 'users' ] < 2 ) {
//Удаляем подземелье
mysql_query ( 'DELETE FROM `laba_now` WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'DELETE FROM `laba_map` WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'DELETE FROM `laba_obj` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
mysql_query ( 'DELETE FROM `laba_act` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
mysql_query ( 'DELETE FROM `laba_itm` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
} else {
$lab [ 'users' ] -- ;
mysql_query ( 'UPDATE `laba_now` SET `users` = "' . $lab [ 'users' ] . '" WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
mysql_query ( 'UPDATE `items_users` SET `delete` = "' . time () . '" WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%"' );
mysql_query ( 'UPDATE `items_users` SET `delete` = "' . time () . '" WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%nosavelaba=1%"' );
mysql_query ( 'UPDATE `users` SET `room` = "369" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `dnow` = "0",`x`="0",`y`="0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
//Выбрасываем предметы которые из подземелья
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
die ( '<script>location.href="main.php";</script>' );
}
//Предметы в локации
$itms = '' ;
if ( isset ( $objs [ $u -> info [ 'x' ]][ $u -> info [ 'y' ]][ 'id' ])) {
$var = [];
$mitm = $objs [ $u -> info [ 'x' ]][ $u -> info [ 'y' ]];
if ( $mitm [ 'type' ] == 6 ) {
//Случайный предмет
if ( $mitm [ 'vars' ] < 25 ) {
$i = 0 ;
while ( $i < $mitm [ 'vars' ]) {
$var [ 'add' ] = $varsitm [ rand ( 0 , count ( $varsitm ) - 1 )];
if ( $var [ 'add' ][ 1 ] > 0 ) {
$j = 0 ;
while ( $j < $var [ 'add' ][ 1 ]) {
2023-12-01 21:27:45 +00:00
mysql_query (
' INSERT INTO `laba_itm` ( `uid` , `lib` , `time` , `itm` , `x` , `y` , `take` ) VALUES (
2023-01-28 02:24:37 +00:00
" ' . $u->info ['id'] . ' " , " ' . $lab['id'] . ' " , " ' . time() . ' " , " ' . $var['add'] [0] . ' " , " ' . $u->info ['x'] . ' " , " ' . $u->info ['y'] . ' " , " 0 "
2023-12-01 21:27:45 +00:00
) '
);
2023-01-28 02:24:37 +00:00
$j ++ ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
$i ++ ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
} else {
//Конкретный предмет
}
mysql_query ( 'DELETE FROM `laba_obj` WHERE `id` = "' . $mitm [ 'id' ] . '" LIMIT 1' );
} elseif ( $mitm [ 'type' ] == 2 ) {
if ( $mitm [ 'use' ] == 0 ) {
2023-12-01 21:27:45 +00:00
$tbtl = mysql_fetch_array (
mysql_query ( 'SELECT * FROM `battle` WHERE `team_win` = -1 AND `dn_id` = "' . $lab [ 'id' ] . '" AND `x` = "' . $u -> info [ 'x' ] . '" AND `y` = "' . $u -> info [ 'y' ] . '" LIMIT 1' )
);
2023-01-28 02:24:37 +00:00
if ( isset ( $tbtl [ 'id' ])) {
//вступаем в поединок
mysql_query ( 'UPDATE `users` SET `battle` = "' . $tbtl [ 'id' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `team` = "1" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> error = 'Нападаем ... <script>location="main.php?rnd=' . $code . '";</script>' ;
} else {
$var [ 'bots' ] = [[ 357 , 5 ], [ 358 , 5 ], [ 359 , 5 ], [ 360 , 5 ], [ 361 , 3 ], [ 362 , 3 ], [ 363 , 3 ], [ 364 , 2 ], [ 365 , 5 ], [ 366 , 5 ], [ 367 , 3 ]];
//Создаем новый бой
if ( $mitm [ 'vars' ] != null ) {
//Боты уже есть
2022-08-25 11:23:36 +00:00
} else {
2023-01-28 02:24:37 +00:00
//Новый список составляем
$i = 0 ;
while ( $i <= $u -> info [ 'level' ]) {
$var [ 'ab' ] = $var [ 'bots' ][ rand ( 0 , count ( $var [ 'bots' ]) - 1 )];
$mitm [ 'vars' ] .= '|' . $var [ 'ab' ][ 0 ];
$i += $var [ 'ab' ][ 1 ];
2022-08-25 11:23:36 +00:00
}
//
2023-01-28 02:24:37 +00:00
$mitm [ 'vars' ] = ltrim ( $mitm [ 'vars' ], '|' );
2022-08-25 11:23:36 +00:00
//
2023-01-28 02:24:37 +00:00
mysql_query ( 'UPDATE `laba_obj` SET `vars` = "' . $mitm [ 'vars' ] . '" WHERE `id` = "' . $mitm [ 'id' ] . '" LIMIT 1' );
}
//
$mitm [ 'vars' ] = explode ( '|' , $mitm [ 'vars' ]);
//
if ( count ( $mitm [ 'vars' ]) > 0 ) {
$btl_id = 0 ;
$expB = 0 ;
$btld = [ 'players' => '' , 'timeout' => 180 , 'type' => 0 , 'invis' => 0 , 'noinc' => 0 , 'travmChance' => 0 , 'typeBattle' => 0 , 'addExp' => $expB , 'money' => 0 ];
2023-12-01 21:27:45 +00:00
$ins = mysql_query (
' INSERT INTO `battle` ( `dungeon` , `dn_id` , `x` , `y` , `city` , `time_start` , `players` , `timeout` , `type` , `invis` , `noinc` , `travmChance` , `typeBattle` , `addExp` , `money` ) VALUES (
2023-01-28 02:24:37 +00:00
" 102 " ,
" ' . $lab['id'] . ' " ,
" ' . $u->info ['x'] . ' " ,
" ' . $u->info ['y'] . ' " ,
" ' . $u->info ['city'] . ' " ,
" ' . time() . ' " ,
" ' . $btld['players'] . ' " ,
" ' . $btld['timeout'] . ' " ,
" ' . $btld['type'] . ' " ,
" ' . $btld['invis'] . ' " ,
" ' . $btld['noinc'] . ' " ,
" ' . $btld['travmChance'] . ' " ,
" ' . $btld['typeBattle'] . ' " ,
" ' . $btld['addExp'] . ' " ,
2023-12-01 21:27:45 +00:00
" ' . $btld['money'] . ' " ) '
);
2023-01-28 02:24:37 +00:00
$btl_id = mysql_insert_id ();
}
if ( $btl_id > 0 ) {
//
$i = 0 ;
while ( $i < count ( $mitm [ 'vars' ])) {
$k = $u -> addNewbot ( $mitm [ 'vars' ][ $i ], null , null , $logins_bot );
$logins_bot = $k [ 'logins_bot' ];
if ( $k != false ) {
$upd = mysql_query ( 'UPDATE `users` SET `battle` = "' . $btl_id . '",`room` = "-100" WHERE `id` = "' . $k [ 'id' ] . '" LIMIT 1' );
if ( $upd ) {
$upd = mysql_query ( 'UPDATE `stats` SET `x`="' . $u -> info [ 'x' ] . '",`y`="' . $u -> info [ 'y' ] . '",`team` = "2" WHERE `id` = "' . $k [ 'id' ] . '" LIMIT 1' );
2022-08-25 11:23:36 +00:00
if ( $upd ) {
2023-01-28 02:24:37 +00:00
$j ++ ;
2022-08-25 11:23:36 +00:00
}
}
}
2023-01-28 02:24:37 +00:00
$i ++ ;
}
unset ( $logins_bot );
if ( $j > 0 ) {
mysql_query ( 'UPDATE `users` SET `battle` = "' . $btl_id . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `team` = "1" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> error = 'Нападаем ... <script>location="main.php?rnd=' . $code . '";</script>' ;
} else {
$u -> error = 'Н е удалось напасть, ошибка обьекта нападения ...' ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
//
2022-06-06 21:30:34 +00:00
}
2023-01-28 02:24:37 +00:00
}
} elseif ( $mitm [ 'type' ] == 1 ) {
//Сундук
if ( $mitm [ 'use' ] == 0 ) {
2023-03-31 18:30:14 +00:00
$itms .= '<a title="Открыть" href="main.php?useobj=' . $mitm [ 'id' ] . '"><img src="//img.new-combats.tech/i/items/use_sunduk_on.gif" width="60" height="60"></a>' ;
2023-01-28 02:24:37 +00:00
} else {
2023-03-31 18:30:14 +00:00
$itms .= '<img title="Сундук был открыт" src="//img.new-combats.tech/i/items/use_sunduk_off.gif" width="60" height="60">' ;
2023-01-28 02:24:37 +00:00
}
} elseif ( $mitm [ 'type' ] == 3 ) {
//хилка
if ( $mitm [ 'use' ] == 0 ) {
2023-03-31 18:30:14 +00:00
$itms .= '<a title="Выпить" href="main.php?useobj=' . $mitm [ 'id' ] . '"><img src="//img.new-combats.tech/i/items/use_heal_on.gif" width="60" height="60"></a>' ;
2023-01-28 02:24:37 +00:00
} else {
2023-03-31 18:30:14 +00:00
$itms .= '<img title="Эликсир был выпит" src="//img.new-combats.tech/i/items/openHeal.gif" width="60" height="60">' ;
2023-01-28 02:24:37 +00:00
}
} elseif ( $mitm [ 'type' ] == 4 ) {
if ( $mitm [ 'use' ] == 0 ) {
//Ловушка
2023-12-01 21:27:45 +00:00
$var [ 'trap1' ] = mysql_fetch_array (
mysql_query (
'SELECT `id`,`vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `lib` = "' . $lab [ 'id' ] . '" AND `time` > "' . time (
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
2023-01-28 02:24:37 +00:00
$var [ 'time' ] = rand ( 1 , 60 );
if ( isset ( $var [ 'trap1' ][ 'id' ])) {
2023-12-01 21:27:45 +00:00
mysql_query (
'UPDATE `laba_act` SET `vals` = "' . ( $var [ 'trap1' ][ 'vals' ] + $var [ 'time' ]) . '",`time` = "' . ( $var [ 'trap1' ][ 'time' ] + $var [ 'time' ] * 60 ) . '" WHERE `id` = "' . $var [ 'trap1' ][ 'id' ] . '" LIMIT 1'
);
2022-08-25 11:23:36 +00:00
} else {
2023-12-01 21:27:45 +00:00
mysql_query (
' INSERT INTO `laba_act` ( `uid` , `time` , `lib` , `vars` , `vals` ) VALUES (
2023-01-28 02:24:37 +00:00
" ' . $u->info ['id'] . ' " , " ' . (time() + $var['time'] * 60) . ' " , " ' . $lab['id'] . ' " , " trap1 " , " ' . $var['time'] . ' "
2023-12-01 21:27:45 +00:00
) '
);
2022-06-06 21:30:34 +00:00
}
2023-01-28 02:24:37 +00:00
mysql_query ( 'UPDATE `laba_obj` SET `use` = "' . $u -> info [ 'id' ] . '" WHERE `id` = "' . $mitm [ 'id' ] . '" LIMIT 1' );
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$var [ 'sex' ] = '' ;
if ( $u -> info [ 'sex' ] == 1 ) {
$var [ 'sex' ] = 'а ' ;
2022-08-25 11:23:36 +00:00
}
2023-03-31 18:30:14 +00:00
$var [ 'text' ] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> <b>' . $u -> info [ 'login' ] . '</b> угодил' . $var [ 'sex' ] . ' в ловушку...' ;
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
$varos [ 'trap1' ] = mysql_fetch_array (
mysql_query (
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `lib` = "' . $lab [ 'id' ] . '" AND `time` > "' . time (
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
2023-01-28 02:24:37 +00:00
sendSysChat ( $var [ 'text' ], true );
2023-03-31 18:30:14 +00:00
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_timer_trap.gif"> ' . $u -> info [ 'login' ] . ' угодил' . $var [ 'sex' ] . ' в ловушку... Время перехода +3 секунды (Длительность: +' . $var [ 'time' ] . ' мин.)' ;
2023-01-28 02:24:37 +00:00
}
} elseif ( $mitm [ 'type' ] == 5 ) {
//Пандора
if ( $mitm [ 'use' ] == 0 ) {
2023-03-31 18:30:14 +00:00
$itms .= '<a title="Открыть" href="main.php?useobj=' . $mitm [ 'id' ] . '"><img src="//img.new-combats.tech/i/items/panbox_on.gif" width="60" height="60"></a>' ;
2022-08-25 11:23:36 +00:00
} else {
2023-03-31 18:30:14 +00:00
$itms .= '<img title="Сундук был открыт" src="//img.new-combats.tech/i/items/panbox_off.gif" width="60" height="60">' ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
unset ( $var );
}
2023-12-01 21:27:45 +00:00
$sp = mysql_query (
'SELECT `i`.*,`m`.`name`,`m`.`img` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`lib` = "' . $lab [ 'id' ] . '" AND `i`.`x` = "' . $u -> info [ 'x' ] . '" AND `i`.`y` = "' . $u -> info [ 'y' ] . '" AND `i`.`take` = "0"'
);
2023-01-28 02:24:37 +00:00
while ( $pl = mysql_fetch_array ( $sp )) {
2023-03-31 18:30:14 +00:00
$itms .= ' <a href="main.php?takeitm=' . $pl [ 'id' ] . '"><img src="//img.new-combats.tech/i/items/' . $pl [ 'img' ] . '" title="Поднять "' . $pl [ 'name' ] . '""></a>' ;
2023-01-28 02:24:37 +00:00
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
if ( $itms != '' ) {
$itms = '<u>В этой комнате находится:</u><br /><br />' . $itms . '<br />' ;
} elseif ( $u -> info [ 'y' ] == count ( $map_d ) - 2 ) {
//Выход нашелся!
if ( $lab [ 'users' ] < 2 ) {
//Удаляем подземелье
mysql_query ( 'DELETE FROM `laba_now` WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'DELETE FROM `laba_map` WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'DELETE FROM `laba_obj` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
mysql_query ( 'DELETE FROM `laba_act` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
mysql_query ( 'DELETE FROM `laba_itm` WHERE `lib` = "' . $lab [ 'id' ] . '"' );
} else {
$lab [ 'users' ] -- ;
mysql_query ( 'UPDATE `laba_now` SET `users` = "' . $lab [ 'users' ] . '" WHERE `id` = "' . $lab [ 'id' ] . '" LIMIT 1' );
2022-08-25 11:23:36 +00:00
}
2023-04-15 23:54:34 +00:00
\User\ItemsModel :: addItem ( 4392 , $u -> info [ 'id' ], '|fromlaba=1|nosale=1' );
2023-12-01 21:27:45 +00:00
mysql_query (
'UPDATE `items_users` SET `delete` = "' . time (
) . '" WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%" AND `data` LIKE "%nosavelaba=1%"'
);
2023-01-28 02:24:37 +00:00
mysql_query ( 'UPDATE `items_users` SET `delete` = "' . time () . '" WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%nosavelaba=1%"' );
mysql_query ( 'UPDATE `users` SET `room` = "369" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `dnow` = "0",`x`="0",`y`="0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
2023-03-31 18:30:14 +00:00
$r = '<img src=//img.new-combats.tech/i/items/paper100.gif width=40 height=25 /> Вы получили награду "Чек на предъявителя (50кр .)"' ;
2023-01-28 02:24:37 +00:00
sendSysChat ( $r , false , true );
2023-03-31 18:30:14 +00:00
$r = '<img src=//img.new-combats.tech/i/items/lmap.gif width=40 height=25 /> Вы прошли лабиринт "Подземелья Драконов" и сохранили предметы из лабиринта!' ;
2023-01-28 02:24:37 +00:00
sendSysChat ( $r , false , true );
//Выбрасываем предметы которые из подземелья
die ( '<script>location.href="main.php";</script>' );
}
2023-12-01 21:27:45 +00:00
$sp = mysql_query (
'SELECT `s`.`x`,`s`.`y`,`u`.`id`,`u`.`login`,`u`.`level` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $lab [ 'id' ] . '" AND `s`.`id` != "' . $u -> info [ 'id' ] . '" LIMIT 5'
);
2023-01-28 02:24:37 +00:00
$pi = 1 ;
while ( $pl = mysql_fetch_array ( $sp )) {
$objs [ $pl [ 'x' ]][ $pl [ 'y' ]] = [ 2 => '<div title="Игрок: ' . $pl [ 'login' ] . '" class="ddp1ee' . $pi . '"></div>' ]; //Персонаж 1
$pi ++ ;
}
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
$objs [ $u -> info [ 'x' ]][ $u -> info [ 'y' ]] = [ 2 => '<div title="Я" class="ddp1me"></div>' ]; //Персонаж 1
$i = 0 ;
while ( $i <= count ( $map_d )) {
$j = 0 ;
while ( $j < count ( $map_d [ $i ])) {
if ( $i > $real_x - 6 && $i < $real_x + 6 && $j > $real_y - 6 && $j < $real_y + 6 ) {
if ( $map_d [ $i ][ $j ] == 1 ) {
$mapsee .= '<div class="ddp1">' . $objs [ $i ][ $j ][ 2 ] . '</div>' ;
} else {
if ( ! isset ( $objs [ $i ][ $j ][ 'id' ])) {
if ( isset ( $objs [ $i ][ $j ][ 2 ])) {
//
} elseif ( $j == 1 ) {
$objs [ $i ][ $j ][ 2 ] = '<div title="Вход в лабиринт" class="ddpStart"></div>' ;
} elseif ( $j == count ( $map_d ) - 2 ) {
$objs [ $i ][ $j ][ 2 ] = '<div title="Выход из лабиринта!" class="ddpExit"></div>' ;
}
2022-08-25 11:23:36 +00:00
} else {
2023-01-28 02:24:37 +00:00
if ( $objs [ $i ][ $j ][ 'use' ] == 0 ) {
$objs [ $i ][ $j ][ 2 ] = '<div class="' . $objs [ $i ][ $j ][ 'img' ] . '"></div>' ;
2022-08-25 11:23:36 +00:00
} else {
2023-01-28 02:24:37 +00:00
$objs [ $i ][ $j ][ 2 ] = '' ;
2022-08-25 11:23:36 +00:00
}
}
2023-01-28 02:24:37 +00:00
$mapsee .= '<div class="ddp0">' . $objs [ $i ][ $j ][ 2 ] . '</div>' ;
2022-06-06 21:30:34 +00:00
}
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
$j ++ ;
}
if ( $i > $real_x - 6 && $i < $real_x + 6 ) {
$mapsee .= '<br>' ;
2022-08-25 11:23:36 +00:00
}
2023-01-28 02:24:37 +00:00
$i ++ ;
}
$mapsee = '<div style="width:165px;height:165px;padding:10px;">' . $mapsee . '</div>' ;
2022-08-25 11:23:36 +00:00
2023-01-28 02:24:37 +00:00
//Эффекты на персонаже
if ( isset ( $varos [ 'trap1' ][ 'vals' ]) && $varos [ 'trap1' ][ 'vals' ] > 0 ) {
2023-12-01 21:27:45 +00:00
$effed .= '<div><img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> - Время перехода +3 секунды (Осталось: ' . Conversion :: secondsToTimeout (
$varos [ 'trap1' ][ 'time' ] - time ()
) . ')</div>' ;
2023-01-28 02:24:37 +00:00
}
unset ( $varos );
?>
2022-08-25 11:23:36 +00:00
< style >
2023-12-01 21:27:45 +00:00
. ddp0 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/o.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/m.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddpStart {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/os.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddpExit {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/of.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1s {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/s.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1m {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/r.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1h {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/h.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1l {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/b.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1p {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/p.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1me {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/u.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1ee1 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/e1.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1ee2 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/e2.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1ee3 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/e3.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1ee4 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/e4.gif " );
}
2022-08-25 11:23:36 +00:00
2023-12-01 21:27:45 +00:00
. ddp1ee5 {
display : inline - block ;
width : 15 px ;
height : 15 px ;
background - image : url ( " //img.new-combats.tech/drgn/bg/e5.gif " );
2022-08-25 11:23:36 +00:00
}
2023-12-01 21:27:45 +00:00
</ style >
< script type = " text/javascript " src = " js/jquery.js " ></ script >
< script >
$ ( 'body' ) . keydown ( function ( event ) {
if ( event . which == 38 || event . which == 87 ) {
location . href = " main.php?goto=2 " ;
} else if ( event . which == 37 || event . which == 65 ) {
location . href = " main.php?goto=1 " ;
} else if ( event . which == 39 || event . which == 68 ) {
location . href = " main.php?goto=3 " ;
} else if ( event . which == 40 || event . which == 83 ) {
location . href = " main.php?goto=4 " ;
}
});
</ script >
< table width = " 100% " height = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " bgcolor = " #E2E0E0 " >
< tbody >
< tr >
< td ></ td >
< td width = " 307 " ></ td >
< td width = " 300 " ></ td >
</ tr >
< tr >
< td height = " 409 " valign = " top " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tbody >
< tr >
< td width = " 5 " >& nbsp ; </ td >
< td width = " 99% " >
< div >< ? = $u -> error ?> </div>
< div > Карта : < ? = $lab [ 'id' ] ?> </div>
< script language = " javascript " type = " text/javascript " >
function confirmSubmit ( mes ) {
var agree = confirm ( mes );
if ( agree )
return true ;
else
return false ;
}
</ script >
< br />
< form method = " post " >
< div >
< ? = $d -> usersDng ( $lab [ 'id' ]); ?>
2022-08-25 11:23:36 +00:00
</ div >
2023-12-01 21:27:45 +00:00
< input type = " submit " name = " exit " value = " Выйти и потерять все найденное! "
onclick = " return confirmSubmit('Действительно хотите Выйти и потерять все найденное?') " />
</ form >
< br />
< ? php if ( $effed != '' ) {
echo $effed ;
} ?>
2022-08-25 11:23:36 +00:00
< br />
2023-12-01 21:27:45 +00:00
< ? php
2022-08-25 11:23:36 +00:00
if ( $dies > 0 ) {
2023-01-10 16:29:32 +00:00
echo '<b>Кол-во смертей: ' . $dies . '/3</b><br>' ;
2022-08-25 11:23:36 +00:00
}
?>
2023-01-10 16:29:32 +00:00
координаты : X =< ? = $u -> info [ 'y' ] ?> Y=<?= $u->info['x'] ?><br/></td>
2022-08-25 11:23:36 +00:00
< td width = " 5 " >& nbsp ; </ td >
</ tr >
< tr >
< td >& nbsp ; </ td >
2022-06-06 21:30:34 +00:00
< td ></ td >
2022-08-25 11:23:36 +00:00
< td >& nbsp ; </ td >
</ tr >
< tr >
< td >& nbsp ; </ td >
< td >
2023-01-28 02:24:37 +00:00
< ? php if ( $errors != '' ) {
2022-08-25 11:23:36 +00:00
echo $errors . '<br>' ;
} ?>
< ? = $itms ?>
</ td >
< td >& nbsp ; </ td >
</ tr >
</ tbody >
</ table >
</ td >
< td style = " background-repeat:repeat; width:300px; height:410px " align = " right " >& nbsp ; </ td >
< td height = " 409 " width = " 300 " valign = " top " align = " center " >
< table width = " 100% " height = " 396 " border = " 0 " cellpadding = " 0 " cellspacing = " 0 "
2023-03-31 18:30:14 +00:00
style = " background-position: top right; background-repeat: no-repeat; width: 300px; height: 410px; background: url('//img.new-combats.tech/drgn/navbg_big.gif'); " >
2022-08-25 11:23:36 +00:00
< tbody >
< tr >
< td height = " 34 " >
< table align = " center " height = " 25 " border = " 0 "
2023-03-31 18:30:14 +00:00
style = " background:url(//img.new-combats.tech/drgn/bg/ramka_s2.gif); background-repeat:no-repeat; background-position:left; " >
2022-08-25 11:23:36 +00:00
< tbody >
< tr valign = " middle " >
< td >& nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; </ td >
< td >
< div id = " showbar "
style = " font-size: 2pt; padding: 2px; border: 0px solid black; visibility: visible; " >
< span id = " progress1 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress2 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress3 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress4 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress5 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress6 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress7 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress8 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress9 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress10 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress11 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress12 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress13 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress14 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress15 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress16 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress17 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress18 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress19 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress20 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress21 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress22 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress23 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress24 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress25 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress26 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress27 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress28 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress29 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress30 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress31 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress32 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress33 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress34 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress35 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress36 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress37 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress38 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress39 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
< span id = " progress40 " style = " background-color: green; " >& nbsp ; & nbsp ; </ span >
</ div >
</ td >
< td >& nbsp ; & nbsp ; </ td >
</ tr >
</ tbody >
</ table >
< script language = " javascript " >
var progressEnd = 40 ; // set to number of progress <span>'s.
var progressColor = 'green' ; // set to progress bar color
var progressInterval = < ? = $tmdgm ?> ;
var progressAt = < ? = $tmdg ?> ;
var progressTimer ;
function progress_set ( too ) {
for ( var i = 1 ; i <= too ; i ++ ) document . getElementById ( 'progress' + i ) . style . backgroundColor = progressColor ;
}
function progress_none () {
for ( var i = 1 ; i <= 40 ; i ++ ) document . getElementById ( 'progress' + i ) . style . backgroundColor = progressColor ;
}
function progress_clear () {
for ( var i = < ? = $tmdg ?> ; i <= progressEnd; i++) document.getElementById('progress' + i).style.backgroundColor = 'transparent';
progressAt = < ? = $tmdg ?> ;
}
function progress_update () {
document . getElementById ( 'showbar' ) . style . visibility = 'visible' ;
progressAt ++ ;
if ( progressAt > progressEnd ) {
clearTimeout ( progressTimer );
return ;
} else document . getElementById ( 'progress' + progressAt ) . style . backgroundColor = progressColor ;
progressTimer = setTimeout ( 'progress_update()' , progressInterval );
}
progress_clear ();
progress_set ( < ? = $tmdg ?> );
progress_update ();
</ script >
< div align = " right " >& nbsp ; </ div >
</ td >
</ tr >
< tr >
< td height = " 17 " ></ td >
</ tr >
< tr >
< td height = " 102 " valign = " top " align = " center " >
< table width = " 100% " height = " 102 " border = " 0 " cellpadding = " 0 " cellspacing = " 0 " >
< tbody >
< tr >
< td width = " 95 " height = " 102 " ></ td >
< td width = " 103 "
2023-03-31 18:30:14 +00:00
style = " background:url(//img.new-combats.tech/drgn/in_nav_bg.gif); width:103px; height:102px; background-repeat: no-repeat; " >
2022-08-25 11:23:36 +00:00
< table width = " 103 " height = " 102 " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tbody >
< tr >
< td width = " 26 " height = " 26 " ></ td >
< td width = " 12 " ></ td >
< td width = " 26 " height = " 26 " >< a
2023-03-31 18:30:14 +00:00
href = " /main.php?goto=2 " >< img
src = " //img.new-combats.tech/drgn/arr1.gif "
2023-01-10 16:29:32 +00:00
border = " 0 " title = " Вверх " alt = " Вверх " /></ a ></ td >
2022-08-25 11:23:36 +00:00
< td width = " 13 " ></ td >
< td width = " 26 " ></ td >
</ tr >
< tr >
< td ></ td >
< td ></ td >
< td height = " 11 " ></ td >
< td ></ td >
< td ></ td >
</ tr >
< tr >
< td width = " 26 " height = " 26 " >< a
2023-03-31 18:30:14 +00:00
href = " /main.php?goto=1 " >< img
src = " //img.new-combats.tech/drgn/arr4.gif "
2023-01-10 16:29:32 +00:00
border = " 0 " title = " Влево " alt = " Влево " /></ a ></ td >
2022-08-25 11:23:36 +00:00
< td ></ td >
< td width = " 26 " height = " 26 " >< a
2023-03-31 18:30:14 +00:00
href = " /main.php?refresh " >< img
src = " //img.new-combats.tech/drgn/refresh.gif "
2023-01-10 16:29:32 +00:00
border = " 0 " title = " Обновить " alt = " Обновить " /></ a ></ td >
2022-08-25 11:23:36 +00:00
< td ></ td >
< td width = " 26 " height = " 26 " >< a
2023-03-31 18:30:14 +00:00
href = " /main.php?goto=3 " >< img
src = " //img.new-combats.tech/drgn/arr2.gif "
2023-01-10 16:29:32 +00:00
border = " 0 " title = " Вправо " alt = " Вправо " /></ a ></ td >
2022-08-25 11:23:36 +00:00
</ tr >
< tr >
< td ></ td >
< td ></ td >
< td ></ td >
< td ></ td >
< td ></ td >
</ tr >
< tr >
< td height = " 13 " ></ td >
< td height = " 13 " ></ td >
< td height = " 13 " ></ td >
< td height = " 13 " ></ td >
< td height = " 13 " ></ td >
</ tr >
< tr >
< td ></ td >
< td ></ td >
< td width = " 26 " height = " 26 " >< a
2023-03-31 18:30:14 +00:00
href = " /main.php?goto=4 " >< img
src = " //img.new-combats.tech/drgn/arr3.gif "
2023-01-10 16:29:32 +00:00
border = " 0 " title = " Вниз " alt = " Вниз " /></ a ></ td >
2022-08-25 11:23:36 +00:00
< td ></ td >
< td ></ td >
</ tr >
</ tbody >
</ table >
</ td >
< td width = " 105 " height = " 5 " ></ td >
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
< tr >
< td height = " 5 " ></ td >
</ tr >
< tr valign = " top " >
< td height = " 165 " >
< table width = " 303 " height = " 165 " border = " 0 " cellpadding = " 0 " cellspacing = " 0 " >
< tbody >
< tr >
< td width = " 67 " height = " 74 " ></ td >
< td width = " 165 " height = " 165 " >
< div >
2023-12-01 21:27:45 +00:00
< ? = $mapsee ; ?>
2022-08-25 11:23:36 +00:00
</ div >
</ td >
< td width = " 64 " ></ td >
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
< tr >
< td height = " 25 " ></ td >
</ tr >
< tr >
< td height = " 25 " ></ td >
</ tr >
2022-06-06 21:30:34 +00:00
</ tbody >
2022-08-25 11:23:36 +00:00
</ table >
</ td >
</ tr >
2022-06-06 21:30:34 +00:00
</ tbody >
2022-08-25 11:23:36 +00:00
</ table >