2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' ))
{
die ();
}
if ( $u -> room [ 'file' ] == 'entergrib' )
{
if ( isset ( $_GET [ 'rz' ])) {
$rz = 1 ;
} else {
$rz = 0 ;
}
2023-01-10 16:29:32 +00:00
$dun = 10 ; //для новичков 2-7 лвл
2022-06-06 21:30:34 +00:00
$er = '' ;
$dzs = '' ;
$g111 = 1 ;
2023-01-10 16:29:32 +00:00
//Задержка в Санд
2022-06-06 21:30:34 +00:00
$g11 = $u -> testAction ( '`uid` = "' . $u -> info [ 'id' ] . '" AND `vars` = "psh2" AND `time`>' . ( time () - 7200 ) . ' LIMIT 1' , 1 );
$moder = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `moder` WHERE `align` = "' . $u -> info [ 'align' ] . '" LIMIT 1' ));
if ( $u -> info [ 'dn' ] > 0 )
{
$zv = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `dungeon_zv` WHERE `id`="' . $u -> info [ 'dn' ] . '" AND `delete` = "0" LIMIT 1' ));
if ( ! isset ( $zv [ 'id' ]))
{
mysql_query ( 'UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> info [ 'dn' ] = 0 ;
}
}
if ( isset ( $g11 [ 'id' ]))
{
$g111 = 0 ;
if ( isset ( $_GET [ 'start' ]))
{
2023-01-10 16:29:32 +00:00
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u -> timeOut ( 7200 - time () + $g11 [ 'time' ]);
2022-06-06 21:30:34 +00:00
}
}
if ( isset ( $_GET [ 'start' ]) && $zv [ 'uid' ] == $u -> info [ 'id' ] && $g111 == 1 )
{
2023-01-10 16:29:32 +00:00
//начинаем поход
//начинаем поход
2022-06-06 21:30:34 +00:00
$ig = 1 ;
if ( $ig > 0 )
{
2023-01-10 16:29:32 +00:00
//перемещаем игроков в пещеру
2022-06-06 21:30:34 +00:00
//$u->addAction(time(),'psh2','');
$ins = mysql_query ( ' INSERT INTO `dungeon_now` ( `city` , `uid` , `id2` , `name` , `time_start` )
2023-01-10 16:29:32 +00:00
VALUES ( " '. $zv['city'] .' " , " '. $zv['uid'] .' " , " '. $dun .' " , " Катакомбы " , " '.time().' " ) ' );
2022-06-06 21:30:34 +00:00
if ( $ins )
{
$zid = mysql_insert_id ();
2023-01-10 16:29:32 +00:00
//обновляем пользователей
2022-06-06 21:30:34 +00: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`.`dn`="' . $zv [ 'id' ] . '" LIMIT ' . ( $zv [ 'team_max' ] + 1 ) . '' );
$ids = '' ;
while ( $pu = mysql_fetch_array ( $su ))
{
$ids .= ' `id` = "' . $pu [ 'id' ] . '" OR' ;
$u -> addAction ( time (), 'psh2' , '' , $pu [ 'id' ]);
}
$ids = rtrim ( $ids , 'OR' );
$upd1 = mysql_query ( 'UPDATE `stats` SET `s`="0",`res_s`="0",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ( $zv [ 'team_max' ] + 1 ) . '' );
if ( $upd1 )
{
$upd2 = mysql_query ( 'UPDATE `users` SET `room` = "305" WHERE ' . $ids . ' LIMIT ' . ( $zv [ 'team_max' ] + 1 ) . '' );
2023-01-10 16:29:32 +00:00
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
//Добавляем ботов
2022-06-06 21:30:34 +00:00
$vls = '' ;
$sp = mysql_query ( 'SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"' );
while ( $pl = mysql_fetch_array ( $sp ))
{
$vls .= '("' . $zid . '","' . $pl [ 'id_bot' ] . '","' . $pl [ 'colvo' ] . '","' . $pl [ 'items' ] . '","' . $pl [ 'x' ] . '","' . $pl [ 'y' ] . '","' . $pl [ 'dialog' ] . '","' . $pl [ 'items' ] . '"),' ;
}
$vls = rtrim ( $vls , ',' );
$ins1 = mysql_query ( 'INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '' );
2023-01-10 16:29:32 +00:00
//Добавляем обьекты
2022-06-06 21:30:34 +00:00
$vls = '' ;
$sp = mysql_query ( 'SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"' );
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 )
{
mysql_query ( 'UPDATE `dungeon_zv` SET `delete` = "' . time () . '" WHERE `id` = "' . $zv [ 'id' ] . '" LIMIT 1' );
die ( '<script>location="main.php?rnd=' . $code . '";</script>' );
} else {
2023-01-10 16:29:32 +00:00
$re = 'Ошибка перехода в подземелье...' ;
2022-06-06 21:30:34 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Ошибка перехода в подземелье...' ;
2022-06-06 21:30:34 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Ошибка перехода в подземелье...' ;
2022-06-06 21:30:34 +00:00
}
}
} elseif ( isset ( $_POST [ 'go' ], $_POST [ 'goid' ]) && $g111 == 1 )
{
if ( ! isset ( $zv [ 'id' ]))
{
$zv = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u -> info [ 'city' ] . '" AND `id`="' . mysql_real_escape_string ( $_POST [ 'goid' ]) . '" AND `delete` = "0" LIMIT 1' ));
if ( isset ( $zv [ 'id' ]))
{
if ( $u -> info [ 'level' ] > 7 )
{
$row = 0 ;
if ( 5 > $row )
{
$upd = mysql_query ( 'UPDATE `stats` SET `dn` = "' . $zv [ 'id' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
if ( ! $upd )
{
2023-01-10 16:29:32 +00:00
$re = 'Н е удалось вступить в эту группу' ;
2022-06-06 21:30:34 +00:00
unset ( $zv );
} else {
$u -> info [ 'dn' ] = $zv [ 'id' ];
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'В группе нет места' ;
2022-06-06 21:30:34 +00:00
unset ( $zv );
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Вы не подходите по уровню' ;
2022-06-06 21:30:34 +00:00
unset ( $zv );
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Заявка не найдена' ;
2022-06-06 21:30:34 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Вы уже находитесь в группе' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( isset ( $_POST [ 'leave' ]) && isset ( $zv [ 'id' ]) && $g111 == 1 )
{
if ( $zv [ 'uid' ] == $u -> info [ 'id' ])
{
2023-01-10 16:29:32 +00:00
//ставим в группу нового руководителя
2022-06-06 21:30:34 +00:00
$ld = mysql_fetch_array ( mysql_query ( 'SELECT `id` FROM `stats` WHERE `dn` = "' . $zv [ 'id' ] . '" AND `id` != "' . $u -> info [ 'id' ] . '" LIMIT 1' ));
if ( isset ( $ld [ 'id' ]))
{
$zv [ 'uid' ] = $ld [ 'id' ];
mysql_query ( 'UPDATE `dungeon_zv` SET `uid` = "' . $zv [ 'uid' ] . '" WHERE `id` = "' . $zv [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> info [ 'dn' ] = 0 ;
unset ( $zv );
} else {
2023-01-10 16:29:32 +00:00
//удаляем группу целиком
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `dungeon_zv` SET `delete` = "' . time () . '" WHERE `id` = "' . $zv [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> info [ 'dn' ] = 0 ;
unset ( $zv );
}
} else {
2023-01-10 16:29:32 +00:00
//просто выходим с группы
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
$u -> info [ 'dn' ] = 0 ;
unset ( $zv );
}
} elseif ( isset ( $_POST [ 'add' ]) && $u -> info [ 'level' ] > 1 && $g111 == 1 )
{
if ( $u -> info [ 'dn' ] == 0 )
{
$ins = mysql_query ( ' INSERT INTO `dungeon_zv`
( `city` , `time` , `uid` , `dun` , `pass` , `com` , `lvlmin` , `lvlmax` , `team_max` ) VALUES
( " '. $u->info ['city'].' " , " '.time().' " , " '. $u->info ['id'].' " , " '. $dun .' " ,
" '.mysql_real_escape_string( $_POST['pass'] ).' " ,
" '.mysql_real_escape_string( $_POST['text'] ).' " ,
" 8 " ,
" 21 " ,
" 5 " ) ' );
if ( $ins )
{
$u -> info [ 'dn' ] = mysql_insert_id ();
$zv [ 'id' ] = $u -> info [ 'dn' ];
$zv [ 'uid' ] = $u -> info [ 'id' ];
mysql_query ( 'UPDATE `stats` SET `dn` = "' . $u -> info [ 'dn' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
2023-01-10 16:29:32 +00:00
$re = 'Вы успешно создали группу' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
$re = 'Н е удалось создать группу' ;
2022-06-06 21:30:34 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$re = 'Вы уже находитесь в группе' ;
2022-06-06 21:30:34 +00:00
}
}
2023-01-10 16:29:32 +00:00
//Генерируем список групп
2022-06-06 21:30:34 +00:00
$sp = mysql_query ( 'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u -> info [ 'city' ] . '" AND `dun` = "3" AND `delete` = "0" AND `time` > "' . ( time () - 60 * 60 * 2 ) . '"' );
while ( $pl = mysql_fetch_array ( $sp ))
{
$dzs .= '<div style="padding:2px;">' ;
if ( $u -> info [ 'dn' ] == 0 )
{
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl [ 'id' ] . '" />' ;
}
$dzs .= '<span class="date">' . date ( 'H:i' , $pl [ 'time' ]) . '</span> ' ;
2023-01-10 16:29:32 +00:00
$pus = '' ; //группа
2022-06-06 21:30:34 +00:00
$su = mysql_query ( 'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl [ 'id' ] . '" LIMIT ' . ( $pl [ 'team_max' ] + 1 ) . '' );
while ( $pu = mysql_fetch_array ( $su ))
{
2023-03-31 18:30:14 +00:00
$pus .= '<b>' . $pu [ 'login' ] . '</b> [' . $pu [ 'level' ] . ']<a href="info/' . $pu [ 'id' ] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu [ 'login' ] . '"></a>' ;
2022-06-06 21:30:34 +00:00
$pus .= ', ' ;
}
$pus = trim ( $pus , ', ' );
$dzs .= $pus ;
if ( $pl [ 'com' ] != '' )
{
$dl = '' ;
if (( $moder [ 'boi' ] == 1 || $u -> info [ 'admin' ] > 0 ) && $pl [ 'dcom' ] == 0 )
{
2023-01-10 16:29:32 +00:00
$dl .= ' (<a href="?delcom=' . $pl [ 'id' ] . '&key=' . $u -> info [ 'nextAct' ] . '&rnd=' . $code . '">удалить комментарий</a>)' ;
2022-06-06 21:30:34 +00:00
if ( isset ( $_GET [ 'delcom' ]) && $_GET [ 'delcom' ] == $pl [ 'id' ] && $u -> newAct ( $_GET [ 'key' ]) == true )
{
mysql_query ( 'UPDATE `dungeon_zv` SET `dcom` = "' . $u -> info [ 'id' ] . '" WHERE `id` = "' . $pl [ 'id' ] . '" LIMIT 1' );
$pl [ 'dcom' ] = $u -> info [ 'id' ];
}
}
2023-01-10 17:26:14 +00:00
$pl [ 'com' ] = htmlspecialchars ( $pl [ 'com' ], NULL );
2022-06-06 21:30:34 +00:00
if ( $pl [ 'dcom' ] > 0 )
{
2023-01-10 16:29:32 +00:00
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>' ;
2022-06-06 21:30:34 +00:00
}
if ( $pl [ 'dcom' ] > 0 )
{
if ( $moder [ 'boi' ] == 1 || $u -> info [ 'admin' ] > 0 )
{
$pl [ 'com' ] = '<font color="red">' . $pl [ 'com' ] . '</font>' ;
} else {
$pl [ 'com' ] = '' ;
}
}
$dzs .= '<small> | ' . $pl [ 'com' ] . '' . $dl . '</small>' ;
}
$dzs .= '</div>' ;
}
?>
< style >
body
{
background - color : #E2E2E2;
2023-03-31 18:30:14 +00:00
background - image : url ( //img.new-combats.tech/i/misc/showitems/dungeon.jpg);
2022-06-06 21:30:34 +00:00
background - repeat : no - repeat ; background - position : top right ;
}
</ style >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td >< div style = " padding-left:0px; " align = " center " >
2023-03-31 16:54:33 +00:00
< h3 >< ? = $u -> room [ 'name' ]; ?> </h3>
2022-06-06 21:30:34 +00:00
</ div ></ td >
< td width = " 200 " >< div align = " right " >
< table cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td width = " 100% " >& nbsp ; </ td >
< td >
2023-03-31 16:54:33 +00:00
< ? php if ( $rz == 0 ) { ?>
2022-06-06 21:30:34 +00:00
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " >
< tr align = " right " valign = " top " >
< td ><!-- -->
2023-03-31 16:54:33 +00:00
< ? = $goLis ; ?>
2022-06-06 21:30:34 +00:00
<!-- -->
< table border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td nowrap = " nowrap " >< table width = " 100% " border = " 0 " cellpadding = " 0 " cellspacing = " 1 " bgcolor = " #DEDEDE " >
< tr >
2023-03-31 18:30:14 +00:00
< td bgcolor = " #D3D3D3 " >< img src = " //img.new-combats.tech/i/move/links.gif " width = " 9 " height = " 7 " /></ td >
2023-03-31 16:54:33 +00:00
< td bgcolor = " #D3D3D3 " nowrap = " nowrap " >< a href = " # " id = " greyText " class = " menutop " onclick = " location='main.php?loc=1.180.0.9&rnd=<?= $code ; ?>'; " title = " <?php thisInfRm('1.180.0.9',1); ?> " > Центральная площадь </ a ></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
</ td >
</ tr >
</ table ></ td >
</ tr >
</ table >
2023-03-31 16:54:33 +00:00
< ? php } ?>
2022-06-06 21:30:34 +00:00
</ td >
</ tr >
</ table >
</ div ></ td >
</ tr >
</ table >
2023-03-31 16:54:33 +00:00
< ? php if ( $rz == 1 ) { ?>
2022-06-06 21:30:34 +00:00
< div align = " center " style = " float:right;width:100px; " >
< p >
2023-01-10 16:29:32 +00:00
< input type = 'button' onclick = 'location="main.php?rz=1"' value = " Обновить " />
2022-06-06 21:30:34 +00:00
< br />
2023-01-10 16:29:32 +00:00
< input type = 'button' onclick = 'location="main.php"' value = " Вернуться " />
2022-06-06 21:30:34 +00:00
</ p >
</ div >
2023-03-31 16:54:33 +00:00
< ? php } else { ?>
2022-06-06 21:30:34 +00:00
< div align = " center " style = " float:right;width:100px; " >
< p >
2023-01-10 16:29:32 +00:00
< input type = 'button' onclick = 'location="main.php"' value = " Обновить " />
2022-06-06 21:30:34 +00:00
< br />
2023-01-10 16:29:32 +00:00
< input type = 'button' onclick = 'location="main.php?rz=1"' value = " Задания " />
2022-06-06 21:30:34 +00:00
</ p >
</ div >
2023-03-31 16:54:33 +00:00
< ? php } ?>
2022-06-06 21:30:34 +00:00
< ?
if ( $re != '' )
{
echo '<font color="red"><b>' . $re . '</b></font><br>' ;
}
2023-01-10 16:29:32 +00:00
//отображаем
2022-06-06 21:30:34 +00:00
if ( $dzs == '' )
{
$dzs = '' ;
} else {
if ( ! isset ( $zv [ 'id' ]))
{
if ( $g111 == 1 )
{
2023-01-10 16:29:32 +00:00
$pr = '<input name="go" type="submit" value="Вступить в группу">' ;
2022-06-06 21:30:34 +00:00
}
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>' ;
}
$dzs .= '<hr>' ;
}
if ( $rz == 0 ) { echo $dzs ; }
if ( $rz == 1 ) {
?>
< div >
< form action = '/dungeon.pl' method = " post " name = " F1 " id = " F1 " >
< ?
$qsee = '' ;
$qx = 0 ;
$hgo = $u -> testAction ( '`uid` = "' . $u -> info [ 'id' ] . '" AND `time` >= ' . ( time () - 60 * 60 * 24 ) . ' AND `vars` = "psh_qt_allcity" LIMIT 1' , 1 );
if ( isset ( $_GET [ 'add_quest' ])) {
if ( isset ( $hgo [ 'id' ])) {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>' ;
2022-06-06 21:30:34 +00:00
} else {
$sp = mysql_query ( 'SELECT * FROM `quests` WHERE `line` = 4' );
$dq_add = array ();
while ( $pl = mysql_fetch_array ( $sp )) {
$dq_add [ count ( $dq_add )] = $pl ;
}
$dq_add = $dq_add [ rand ( 0 , count ( $dq_add ) - 1 )];
if ( $q -> testGood ( $dq_add ) == 1 )
{
$q -> startq_dn ( $dq_add [ 'id' ]);
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно получили новое задание "' . $dq_add [ 'name' ] . '".</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$hgo [ 'id' ] = 1 ;
$u -> addAction ( time (), 'psh_qt_allcity' , $dq_add [ 'id' ]);
} else {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Н е удалось получить задание "' . $dq_add [ 'name' ] . '". Попробуйте еще...</b></font><br>' ;
2022-06-06 21:30:34 +00:00
}
unset ( $dq_add );
}
}
2023-01-10 16:29:32 +00:00
//Генерируем список текущих квестов
2022-06-06 21:30:34 +00:00
$sp = mysql_query ( 'SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u -> info [ 'id' ] . '" LIMIT 100' );
while ( $pl = mysql_fetch_array ( $sp ))
{
$pq = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `quests` WHERE `id` = "' . str_replace ( 'start_quest' , '' , $pl [ 'vars' ]) . '" LIMIT 1' ));
2023-03-31 18:30:14 +00:00
$qsee .= '<a href="main.php?rz=1&end_qst_now=' . $pq [ 'id' ] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <b>' . $pq [ 'name' ] . '</b><div style="padding-left:15px;padding-bottom:5px;border-bottom:1px solid grey"><small>' . $pq [ 'info' ] . '<br>' . $q -> info ( $pq ) . '</small></div><br>' ;
2022-06-06 21:30:34 +00:00
$qx ++ ;
}
if ( $qsee == '' )
{
2023-01-10 16:29:32 +00:00
$qsee = 'К сожалению у вас нет ни одного задания' ;
2022-06-06 21:30:34 +00:00
}
?>
< Br />
< FIELDSET >
2023-01-10 16:29:32 +00:00
< LEGEND >< B > Текущие задания : </ B > [ < ? = $qx ?> /28]</LEGEND>
2022-06-06 21:30:34 +00:00
< ? = $qsee ?>
< span style = " padding-left: 10 " >
< ?
if ( ! isset ( $hgo [ 'id' ])) {
?>
< br />
2023-01-10 16:29:32 +00:00
< input type = 'button' value = 'Получить задание' onclick = 'location="main.php?rz=1&add_quest=1"' />
2022-06-06 21:30:34 +00:00
< ?
} else {
2023-01-10 16:29:32 +00:00
echo 'Получить новое задание можно <b>' . date ( 'd.m.Y H:i' , $hgo [ 'time' ] + 60 * 60 * 24 ) . '</b> <font color="grey">( Через ' . $u -> timeOut ( $hgo [ 'time' ] + 60 * 60 * 24 - time ()) . ' )</font>' ;
2022-06-06 21:30:34 +00:00
}
?>
</ span >
</ FIELDSET >
</ form >
< br />
< ?
2023-01-10 16:29:32 +00:00
//Начисление бонуса награды
2022-06-06 21:30:34 +00:00
if ( isset ( $_GET [ 'buy1' ])) {
if ( $_GET [ 'buy1' ] == 1 ) {
2023-01-10 16:29:32 +00:00
//покупаем статы
2022-06-06 21:30:34 +00:00
if ( 25 - $u -> rep [ 'add_stats' ] > 0 && $u -> rep [ 'repsuncity' ] - $u -> rep [ 'nu_suncity' ] >= 2000 ) {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно приобрели 1 способность за 2000 ед. награды</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$u -> info [ 'ability' ] += 1 ;
$u -> rep [ 'nu_suncity' ] += 2000 ;
$u -> rep [ 'add_stats' ] += 1 ;
mysql_query ( 'UPDATE `rep` SET `add_stats` = `add_stats`+1,`nu_suncity` = "' . $u -> rep [ 'nu_suncity' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `ability` = "' . $u -> info [ 'ability' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
} else {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Ничего не получилось...</b></font><br>' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $_GET [ 'buy1' ] == 2 ) {
2023-01-10 16:29:32 +00:00
//покупаем статы
2022-06-06 21:30:34 +00:00
if ( 10 - $u -> rep [ 'add_skills' ] > 0 && $u -> rep [ 'repsuncity' ] - $u -> rep [ 'nu_suncity' ] >= 2000 ) {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно приобрели 1 умение за 2000 ед. награды</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$u -> info [ 'skills' ] += 1 ;
$u -> rep [ 'nu_suncity' ] += 2000 ;
$u -> rep [ 'add_skills' ] += 1 ;
mysql_query ( 'UPDATE `rep` SET `add_skills` = `add_skills`+1,`nu_suncity` = "' . $u -> rep [ 'nu_suncity' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `skills` = "' . $u -> info [ 'skills' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
} else {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Ничего не получилось...</b></font><br>' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $_GET [ 'buy1' ] == 3 ) {
2023-01-10 16:29:32 +00:00
//покупаем статы
2022-06-06 21:30:34 +00:00
if ( $u -> rep [ 'repsuncity' ] - $u -> rep [ 'nu_suncity' ] >= 100 ) {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно приобрели 10 кр. за 100 ед. награды</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$u -> info [ 'money' ] += 10 ;
$u -> rep [ 'nu_suncity' ] += 100 ;
$u -> rep [ 'add_money' ] += 10 ;
mysql_query ( 'UPDATE `rep` SET `add_money` = `add_money`+10,`nu_suncity` = "' . $u -> rep [ 'nu_suncity' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `users` SET `money` = "' . $u -> info [ 'money' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
} else {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Ничего не получилось...</b></font><br>' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $_GET [ 'buy1' ] == 4 ) {
2023-01-10 16:29:32 +00:00
//покупаем статы
2022-06-06 21:30:34 +00:00
if ( 5 - $u -> rep [ 'add_skills2' ] > 0 && $u -> rep [ 'repsuncity' ] - $u -> rep [ 'nu_suncity' ] >= 3000 ) {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно приобрели 1 особенность за 3000 ед. награды</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$u -> info [ 'nskills' ] += 1 ;
$u -> rep [ 'nu_suncity' ] += 3000 ;
$u -> rep [ 'add_skills2' ] += 1 ;
mysql_query ( 'UPDATE `rep` SET `add_skills2` = `add_skills2`+1,`nu_suncity` = "' . $u -> rep [ 'nu_suncity' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `stats` SET `nskills` = "' . $u -> info [ 'nskills' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
} else {
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Ничего не получилось...</b></font><br>' ;
2022-06-06 21:30:34 +00:00
}
}
}
?>
< fieldset style = 'padding: 5,5,5,5' >
2023-01-10 16:29:32 +00:00
< legend > Награда : < b >
2022-06-06 21:30:34 +00:00
< ? = ( $u -> rep [ 'repsuncity' ] - $u -> rep [ 'nu_suncity' ]) ?>
2023-01-10 16:29:32 +00:00
ед .</ b ></ legend >
2022-06-06 21:30:34 +00:00
< table >
< tr >
2023-01-10 16:29:32 +00:00
< td > Способность ( еще < ? = ( 25 - $u -> rep [ 'add_stats' ]) ?> )</td>
< td style = 'padding-left: 10' > за 2000 ед .</ td >
< td style = 'padding-left: 10' >< input type = 'button' value = 'Купить'
onclick = " if (confirm('Купить: Способность? \n \n Купив способность, Вы сможете увеличить характеристики персонажа. \n Например, можно увеличить силу.')) { location='main.php?rz=1&buy1=1'} " /></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td > Умение ( еще < ? = ( 10 - $u -> rep [ 'add_skills' ]) ?> )</td>
< td style = 'padding-left: 10' > за 2000 ед .</ td >
< td style = 'padding-left: 10' >< input type = 'button' value = 'Купить'
onclick = " if (confirm('Купить: Умение? \n \n Умение даёт возможность почуствовать себя мастером меча, топора, магии и т.п.')) { location='main.php?rz=1&buy1=2'} " /></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td > Деньги ( 10 кр . ) </ td >
< td style = 'padding-left: 10' > за 100 ед .</ td >
< td style = 'padding-left: 10' >< input type = 'button' value = 'Купить'
onclick = " if (confirm('Купить: Деньги (10 кр.)? \n \n Награду можно получить полновесными кредитами.')) { location='main.php?rz=1&buy1=3'} " /></ td >
2022-06-06 21:30:34 +00:00
</ tr >
< tr >
2023-01-10 16:29:32 +00:00
< td > Особенность ( еще < ? = ( 5 - $u -> rep [ 'add_skills2' ]) ?> )</td>
< td style = 'padding-left: 10' > за 3000 ед .</ td >
< td style = 'padding-left: 10' >< input type = 'button' value = 'Купить'
onclick = " if (confirm('Купить: Особенность? \n \n Особенность - это дополнительные возможности персонажа, не дающие преимущества в боях. \n Например, можно увеличить скорость восстановления HP')) { location='main.php?rz=1&buy1=4'} " /></ td >
2022-06-06 21:30:34 +00:00
</ tr >
</ table >
< p >< span style = " padding-left: 10 " >
2023-03-31 16:54:33 +00:00
< ? php
2022-06-06 21:30:34 +00:00
$chk = mysql_fetch_array ( mysql_query ( 'SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u -> info [ 'id' ] . '" LIMIT 1000' ));
if ( isset ( $_GET [ 'buy777' ]) && $chk [ 0 ] > 0 ) {
$chk_cl = mysql_query ( 'SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u -> info [ 'id' ] . '" LIMIT 1000' );
while ( $chk_pl = mysql_fetch_array ( $chk_cl )) {
if ( mysql_query ( 'UPDATE `items_users` SET `delete` = "' . time () . '" WHERE `id` = "' . $chk_pl [ 'id' ] . '" LIMIT 1' ));
{
$x ++ ; $prc += $chk_pl [ 'price1' ];
}
}
$u -> info [ 'money' ] += $prc ;
mysql_query ( 'UPDATE `users` SET `money` = "' . $u -> info [ 'money' ] . '" WHERE `id` = "' . $u -> info [ 'id' ] . '" LIMIT 1' );
2023-01-10 16:29:32 +00:00
echo '<font color="red"><b>Вы успешно сдали чеки в количестве ' . $x . ' шт. на сумму ' . $prc . ' кр.</b></font><br>' ;
2022-06-06 21:30:34 +00:00
$chk [ 0 ] = 0 ;
}
if ( $chk [ 0 ] > 0 ) {
?>
2023-01-10 16:29:32 +00:00
< input type = 'button' value = 'Сдать чеки'
onclick = " if (confirm('Сдать все чеки (<?= $chk[0] ?> шт.) находящиеся у В а с в инвентаре за <?= $chk[1] ?> кр. ?')) { location='main.php?rz=1&buy777=1'} " />
2023-03-31 16:54:33 +00:00
< ? php } ?>
2022-06-06 21:30:34 +00:00
</ span ></ p >
</ fieldset >
< br />
2023-01-10 16:29:32 +00:00
Репутация в Sun city : < ? = $u -> rep [ 'repsuncity' ] ?>
2022-06-06 21:30:34 +00:00
< br />
</ div >
< ?
} else {
if ( $g111 == 1 )
{
if ( $u -> info [ 'dn' ] == 0 )
{
?>
< table width = " 350 " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td valign = " top " >
2023-03-31 16:54:33 +00:00
< form id = " from " name = " from " action = " main.php?pz1=<?= $code ; ?> " method = " post " >
2022-06-06 21:30:34 +00:00
< fieldset style = 'padding-left: 5; width=50%' >
2023-01-10 16:29:32 +00:00
< legend >< b > Группа </ b > </ legend >
Комментарий
2022-06-06 21:30:34 +00:00
< input type = " text " name = " text " maxlength = " 40 " size = " 40 " />
< br />
2023-01-10 16:29:32 +00:00
Пароль
2022-06-06 21:30:34 +00:00
< input type = " password " name = " pass " maxlength = " 25 " size = " 25 " />
< br />
2023-01-10 16:29:32 +00:00
< input type = " submit " name = " add " value = " Создать группу " />
2022-06-06 21:30:34 +00:00
& nbsp ; < br />
</ fieldset >
</ form >
</ td >
</ tr >
</ table >
< ?
} else {
$psh_start = '' ;
if ( isset ( $zv [ 'id' ]))
{
if ( $zv [ 'uid' ] == $u -> info [ 'id' ])
{
2023-01-10 16:29:32 +00:00
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> ' ;
2022-06-06 21:30:34 +00:00
}
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . ' " >
< FIELDSET style = \ ' padding - left : 5 ; width = 50 % \ ' >
2023-01-10 16:29:32 +00:00
< LEGEND >< B > Группа </ B > </ LEGEND >
2022-06-06 21:30:34 +00:00
'.$psh_start.'
2023-01-10 16:29:32 +00:00
< INPUT type = \ ' submit\ ' name = \ ' leave\ ' value = \ ' Покинуть группу\ ' >
2022-06-06 21:30:34 +00:00
</ FIELDSET >
</ FORM > ' ;
}
}
?>
< ?
} else {
2023-01-10 16:29:32 +00:00
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u -> timeOut ( 7200 - time () + $g11 [ 'time' ]) . '<br><small style="color:grey">Н о Вы всегда можете приобрести ключ от прохода у любого "копателя пещер" в Торговом зале ;)</small>' ;
2022-06-06 21:30:34 +00:00
}
}
}
?>