dev-remote_buildings #62
@ -87,6 +87,10 @@ function getBtc(int $id)
|
|||||||
<div style="position: absolute; left: 270px; top: 158px; width: 71px; height: 45px; z-index: 91;">
|
<div style="position: absolute; left: 270px; top: 158px; width: 71px; height: 45px; z-index: 91;">
|
||||||
<img <?php thisInfRm('1.180.0.210'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2remont.gif" width="71" height="45" class="aFilter" alt="">
|
<img <?php thisInfRm('1.180.0.210'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2remont.gif" width="71" height="45" class="aFilter" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
<div style="position: absolute; left: 383px; top: 119px; z-index: 88;">
|
||||||
|
<img <?php thisInfRm('1.180.0.321'); ?> src="<?= Config::img() ?>/city/capitalcity/day/cp_portal.gif" class="aFilter" alt="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (ConversionHelper::secondsToTimeout(getBtc(89489) - time()) == '0 сек.'): ?>
|
if (ConversionHelper::secondsToTimeout(getBtc(89489) - time()) == '0 сек.'): ?>
|
||||||
@ -163,6 +167,12 @@ function getBtc(int $id)
|
|||||||
Ремонтная Мастерская
|
Ремонтная Мастерская
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||||||
|
<img src="<?= Config::img() ?>/i/move/links.gif" width="9" height="7" alt="">
|
||||||
|
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.321&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.321', 1); ?>">
|
||||||
|
Магический Портал
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||||||
<img src="<?= Config::img() ?>/i/move/links.gif" width="9" height="7" alt="">
|
<img src="<?= Config::img() ?>/i/move/links.gif" width="9" height="7" alt="">
|
||||||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11', 1); ?>">
|
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11', 1); ?>">
|
||||||
|
@ -141,9 +141,6 @@ if (date("H") >= 6 && date("H") < 22) {
|
|||||||
<div style="position: absolute; left: 28px; top: 86px; width: 73px; height: 47px; z-index: 89;">
|
<div style="position: absolute; left: 28px; top: 86px; width: 73px; height: 47px; z-index: 89;">
|
||||||
<img <?php thisInfRm('1.180.0.214'); ?> src="<?= Config::img() ?>/city/capitalcity/day/cp_hostel.gif" width="86" height="90" class="aFilter" alt="">
|
<img <?php thisInfRm('1.180.0.214'); ?> src="<?= Config::img() ?>/city/capitalcity/day/cp_hostel.gif" width="86" height="90" class="aFilter" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div style="position:absolute; left:446px; top:153px; width:30px; height:54px; z-index:94;">
|
|
||||||
<img <?php thisInfRm('1.180.0.213'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2strelka.gif" width="30" height="54" class="aFilter" alt="">
|
|
||||||
</div>
|
|
||||||
<div style="position:absolute; left:16px; top:155px; width:30px; height:54px; z-index:910;">
|
<div style="position:absolute; left:16px; top:155px; width:30px; height:54px; z-index:910;">
|
||||||
<img <?php thisInfRm('1.180.0.9'); ?> src="//img.new-combats.tech/i/images/300x225/capital/3strelka.gif" width="30" height="53" class="aFilter" alt="">
|
<img <?php thisInfRm('1.180.0.9'); ?> src="//img.new-combats.tech/i/images/300x225/capital/3strelka.gif" width="30" height="53" class="aFilter" alt="">
|
||||||
</div>
|
</div>
|
||||||
@ -187,12 +184,6 @@ if (date("H") >= 6 && date("H") < 22) {
|
|||||||
Магазин Березка
|
Магазин Березка
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
|
||||||
<img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" alt="">
|
|
||||||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.213&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.213', 1); ?>">
|
|
||||||
Большая торговая Улица
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display:none; height:0;" id="moveto"></div>
|
<div style="display:none; height:0;" id="moveto"></div>
|
||||||
|
@ -1,192 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('GAME')) {
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
$tattack = '';
|
|
||||||
|
|
||||||
if ($u->room['file'] == 'cp3') {
|
|
||||||
if (date("H") >= 6 && date("H") < 22) {
|
|
||||||
$now = 'day';
|
|
||||||
} else {
|
|
||||||
$now = 'night';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script>
|
|
||||||
<?php
|
|
||||||
if(date("H") < 6 || date("H") >= 22)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
function AtackNoWindow() {
|
|
||||||
var dt = document.getElementById('atackDiv');
|
|
||||||
if (dt.style.display == 'none') {
|
|
||||||
dt.style.display = '';
|
|
||||||
} else {
|
|
||||||
dt.style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
var no = 20; // snow number
|
|
||||||
var speed = 15; // smaller number moves the snow faster
|
|
||||||
var sp_rel = 1.4; //speed relevation
|
|
||||||
var snowflake1 = "/i/itimeges/snow1.gif";
|
|
||||||
var snowflake2 = "/i/itimeges/snow2.gif";
|
|
||||||
|
|
||||||
var i, doc_width, doc_height;
|
|
||||||
|
|
||||||
dx = [];
|
|
||||||
xp = [];
|
|
||||||
yp = [];
|
|
||||||
am = [];
|
|
||||||
stx = [];
|
|
||||||
sty = [];
|
|
||||||
|
|
||||||
Array.prototype.exists = function (el) {
|
|
||||||
for (var i = 0; i < this.length; i++)
|
|
||||||
if (this[i] == el)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var rooms = ['0', '1'];
|
|
||||||
|
|
||||||
function SetVariable(c) {
|
|
||||||
dx[c] = 0; // set coordinate variables
|
|
||||||
am[c] = Math.random() * 15; // set amplitude variables
|
|
||||||
xp[c] = Math.random() * (doc_width - 35) + 0 + am[c]; // set position variables
|
|
||||||
yp[c] = 0;
|
|
||||||
stx[c] = 0.02 + Math.random() / 10; // set step variables
|
|
||||||
sty[c] = 0.7 + Math.random(); // set step variables
|
|
||||||
}
|
|
||||||
|
|
||||||
function DrawWeather(room) {
|
|
||||||
|
|
||||||
doc_width = document.getElementById('ione').width;
|
|
||||||
doc_height = document.getElementById('ione').height;
|
|
||||||
|
|
||||||
doc_width = 500;
|
|
||||||
doc_height = 268;
|
|
||||||
|
|
||||||
var div = '';
|
|
||||||
for (i = 0; i < no; ++i) {
|
|
||||||
SetVariable(i);
|
|
||||||
div += "<div id=\"dot" + i + "\" style=\"POSITION: absolute; Z-INDEX: 30" + i + "; VISIBILITY: visible; TOP: " + 0 + "px; LEFT: " + 0 + "px;\"><img id=\"im" + i + "\" src=\"" + (sty[i] < sp_rel ? snowflake2 : snowflake1) + "\" border=\"0\" alt=\"Снежинка\"></div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById('snow').innerHTML = div;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function WeatherBegin() { // IE main animation function
|
|
||||||
|
|
||||||
for (i = 0; i < no; ++i) { // iterate for every dot
|
|
||||||
yp[i] += sty[i] < sp_rel ? sty[i] / 2 : sty[i];
|
|
||||||
if (yp[i] > doc_height - 40) {
|
|
||||||
SetVariable(i);
|
|
||||||
var im = document.getElementById('im' + i);
|
|
||||||
im.src = (sty[i] < sp_rel) ? snowflake2 : snowflake1;
|
|
||||||
}
|
|
||||||
dx[i] += stx[i];
|
|
||||||
document.getElementById('dot' + i).style.top = yp[i] + 'px';
|
|
||||||
document.getElementById('dot' + i).style.left = xp[i] + am[i] * Math.sin(dx[i]) + 'px';
|
|
||||||
}
|
|
||||||
setTimeout('WeatherBegin()', speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="250" valign="top">
|
|
||||||
<?php $usee = $u->getInfoPers($u->info['id'], 0);
|
|
||||||
if ($usee != false) {
|
|
||||||
echo $usee[0];
|
|
||||||
} else {
|
|
||||||
echo 'information is lost.';
|
|
||||||
} ?>
|
|
||||||
</td>
|
|
||||||
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules_data/stats_loc.php'); ?></td>
|
|
||||||
<td valign="top">
|
|
||||||
<div align="right">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr align="right" valign="top">
|
|
||||||
<td>
|
|
||||||
<?php if ($re != '') {
|
|
||||||
echo '<font color="red"><b>' . $re . '</b></font>';
|
|
||||||
} ?>
|
|
||||||
<table width="500" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="position:relative; cursor: pointer;" id="ione">
|
|
||||||
<img src="//img.new-combats.tech/city/capitalcity/<?= $now; ?>/city_capres2.jpg" alt="" name="img_ione" width="500" height="268" border="1"
|
|
||||||
id="img_ione"/>
|
|
||||||
<div id="buttons_on_image" style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
|
|
||||||
<?= $tattack; ?>
|
|
||||||
</div>
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if (document.getElementById('ione')) {
|
|
||||||
document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
|
|
||||||
document.getElementById('buttons_on_image').style.position = 'absolute';
|
|
||||||
document.getElementById('buttons_on_image').style.bottom = '8px';
|
|
||||||
document.getElementById('buttons_on_image').style.right = '23px';
|
|
||||||
} else {
|
|
||||||
document.getElementById('buttons_on_image').style.display = 'none';
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
|
||||||
<div style="position: absolute; left: 313px; top: 109px; width: 73px; height: 47px; z-index: 88;"><img <?php thisInfRm('1.180.0.321'); ?>
|
|
||||||
src="//img.new-combats.tech/city/capitalcity/day/cp_portal.gif" width="75" height="90" class="aFilter"/></div>
|
|
||||||
<div style="position:absolute; left:16px; top:155px; width:30px; height:54px; z-index:910;"><img <?php thisInfRm('1.180.0.11'); ?>
|
|
||||||
src="//img.new-combats.tech/i/images/300x225/capital/3strelka.gif" width="30" height="53" class="aFilter"/></div>
|
|
||||||
<div id="snow"></div>
|
|
||||||
<?= $goline; ?>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
if (date("H") < 6 || date("H") >= 22) {
|
|
||||||
?>
|
|
||||||
<div align="center" id="atackDiv" style="display:none;">
|
|
||||||
<form method="post" action="main.php">
|
|
||||||
<table width="300" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757;"> Введите логин жертвы:<br/>
|
|
||||||
<input name="atack" type="text" id="atack" size="35" maxlength="30"/>
|
|
||||||
<input type="submit" name="button" id="button" class="btn" value="OK"/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
<div style="width:500px; text-align:left; background-color:#D3D3D3;">
|
|
||||||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/> <a
|
|
||||||
href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11', 1); ?>">Страшилкина Улица</a></span>
|
|
||||||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/> <a
|
|
||||||
href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.321&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.321', 1); ?>">Магический Портал</a></span>
|
|
||||||
</div>
|
|
||||||
<!-- -->
|
|
||||||
<div style="display:none; height:0px " id="moveto"></div>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<HR>
|
|
||||||
<?= $rowonmax; ?><BR>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@ -2,10 +2,13 @@
|
|||||||
|
|
||||||
use User\StatsModel;
|
use User\StatsModel;
|
||||||
|
|
||||||
if(!defined('GAME')) { die(); }
|
if (!defined('GAME')) {
|
||||||
|
die();
|
||||||
if($u->room['file'] == 'dungeon_enter_all') {
|
}
|
||||||
|
|
||||||
|
if ($u->room['file'] != 'dungeon_enter_all') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$error = ''; // Собираем ошибки.
|
$error = ''; // Собираем ошибки.
|
||||||
$dungeonGroupList = ''; // Сюда помещаем список Групп.
|
$dungeonGroupList = ''; // Сюда помещаем список Групп.
|
||||||
$dungeonGo = 1; // По умолчанию, мы идем в пещеру.
|
$dungeonGo = 1; // По умолчанию, мы идем в пещеру.
|
||||||
@ -15,40 +18,31 @@ if($u->room['file'] == 'dungeon_enter_all') {
|
|||||||
$dungeon['quest'] = 1;
|
$dungeon['quest'] = 1;
|
||||||
//
|
//
|
||||||
|
|
||||||
$dunname = array(
|
$dunname = [
|
||||||
12 => array('capitalcity','Пещера Тысячи Проклятий'),
|
12 => ['capitalcity', 'Пещера Тысячи Проклятий'],
|
||||||
3 => array('demonscity','Катакомбы'),
|
3 => ['demonscity', 'Катакомбы'],
|
||||||
101 => array('angelscity','Бездна'),
|
101 => ['angelscity', 'Бездна'],
|
||||||
16 => array('sandcity','Пещеры Мглы'),
|
16 => ['sandcity', 'Пещеры Мглы'],
|
||||||
9 => array('emeraldscity','Потерянный вход'), //108
|
9 => ['emeraldscity', 'Потерянный вход'], //108
|
||||||
10 => array('suncity','Грибница'),
|
10 => ['suncity', 'Грибница'],
|
||||||
1 => array('dreamscity','Водосток'),
|
1 => ['dreamscity', 'Водосток'],
|
||||||
13 => array('abandonedplain','Гора Легиона'),
|
13 => ['abandonedplain', 'Гора Легиона'],
|
||||||
31 => array('devilscity','Туманные Низины'),
|
31 => ['devilscity', 'Туманные Низины'],
|
||||||
109 => array('izlom16','Излом Хаоса'),
|
109 => ['izlom16', 'Излом Хаоса'],
|
||||||
444 => array('eastcity','Тропа Инквизиции')
|
444 => ['eastcity', 'Тропа Инквизиции'],
|
||||||
|
|
||||||
);
|
];
|
||||||
if($u->info['admin'] > 0) $dunname[999] = array('capitalcity','Тестовая локация');
|
if ($u->isAdmin()) {
|
||||||
if( $dungeon['id'] == 104 && isset($_GET['freego'])) {
|
$dunname[999] = ['capitalcity', 'Тестовая локация'];
|
||||||
if( $u->info['level'] > 7 ) {
|
|
||||||
|
|
||||||
}elseif( $u->info['money4'] < $u->info['level'] * 5 ) {
|
|
||||||
echo '<div><b style="color:#F00">Недостаточно зубов, необходимо '.$u->zuby( ($u->info['level'] * 5) ,1).'</b></div>';
|
|
||||||
}else{
|
|
||||||
mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "psh0" AND `time` >= '.(time()-60*60*2).' LIMIT 1');
|
|
||||||
$u->info['money4'] -= $u->info['level'] * 5;
|
|
||||||
mysql_query('UPDATE `users` SET `money4` = "'.$u->info['money4'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
||||||
echo '<div><b style="color:#F00">Вы успешно сняли задержку на поход за '.$u->zuby( ($u->info['level'] * 5) ,1).'</b></div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['rz']) && $dungeon['quest'] == 1) $roomSection = 1; // Получаем Задание
|
$roomSection = isset($_GET['rz']) && $dungeon['quest'] == 1 ? 1 : 0;
|
||||||
else $roomSection = 0; // Собираем группу для похода
|
// Собираем группу для похода
|
||||||
//if( $u->info['admin'] > 0 ) var_info($dungeon);
|
|
||||||
|
|
||||||
$all_dungeon = mysql_query('SELECT `city` FROM `dungeon_room` WHERE `city` IS NOT NULL AND `active`=1 ');
|
$all_dungeon = mysql_query('SELECT `city` FROM `dungeon_room` WHERE `city` IS NOT NULL AND `active`=1 ');
|
||||||
while( $t = mysql_fetch_array($all_dungeon) ) { $dungeon['list'][] = $t['city']; }
|
while ($t = mysql_fetch_array($all_dungeon)) {
|
||||||
|
$dungeon['list'][] = $t['city'];
|
||||||
|
}
|
||||||
unset($all_dungeon);
|
unset($all_dungeon);
|
||||||
|
|
||||||
if ($u->info['dn'] > 0) {
|
if ($u->info['dn'] > 0) {
|
||||||
@ -86,10 +80,10 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
$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) . '*/');
|
$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 = '';
|
$ids = '';
|
||||||
|
|
||||||
$map_locs = array();
|
$map_locs = [];
|
||||||
$spm2 = mysql_query('SELECT `id`,`x`,`y` FROM `dungeon_map` WHERE `id_dng` = "' . $zv['dun'] . '"');
|
$spm2 = mysql_query('SELECT `id`,`x`,`y` FROM `dungeon_map` WHERE `id_dng` = "' . $zv['dun'] . '"');
|
||||||
while ($plm2 = mysql_fetch_array($spm2)) {
|
while ($plm2 = mysql_fetch_array($spm2)) {
|
||||||
$map_locs[] = array($plm2['x'],$plm2['y']);
|
$map_locs[] = [$plm2['x'], $plm2['y']];
|
||||||
}
|
}
|
||||||
unset($spm2, $plm2);
|
unset($spm2, $plm2);
|
||||||
|
|
||||||
@ -126,9 +120,9 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
$actdate['tk_itm_fromY'] = (integer)$actdate['tk_itm_fromY'];
|
$actdate['tk_itm_fromY'] = (integer)$actdate['tk_itm_fromY'];
|
||||||
$actdate['tk_itm_toY'] = (integer)$actdate['tk_itm_toY'];
|
$actdate['tk_itm_toY'] = (integer)$actdate['tk_itm_toY'];
|
||||||
}
|
}
|
||||||
$ml_arr = array();
|
$ml_arr = [];
|
||||||
foreach ($map_locs as $ml) { // tk_itm_fromY tk_itm_toY - отсеиваем позицию для дропа предметов.
|
foreach ($map_locs as $ml) { // tk_itm_fromY tk_itm_toY - отсеиваем позицию для дропа предметов.
|
||||||
if( (isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) OR (!isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) ) {
|
if ((isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) or (!isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY']))) {
|
||||||
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
||||||
elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
|
||||||
} else $ml_arr[] = $ml;
|
} else $ml_arr[] = $ml;
|
||||||
@ -180,8 +174,7 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
//Добавляем обьекты
|
//Добавляем обьекты
|
||||||
$vls = '';
|
$vls = '';
|
||||||
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $zv['dun'] . '"');
|
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $zv['dun'] . '"');
|
||||||
while($pl = mysql_fetch_array($sp))
|
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 .= '("' . $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'] . '"),';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +183,7 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
if (floor(date('m')) == 2 && floor(date('d')) >= 14 && floor(date('d')) <= 20) {
|
if (floor(date('m')) == 2 && floor(date('d')) >= 14 && floor(date('d')) <= 20) {
|
||||||
//Появляются мобы которые принимают цветы
|
//Появляются мобы которые принимают цветы
|
||||||
$vlsbts = '';
|
$vlsbts = '';
|
||||||
$ins1bts = NULL;
|
$ins1bts = null;
|
||||||
if ($zv['dun'] == 1) {
|
if ($zv['dun'] == 1) {
|
||||||
//4 уровня (КАНАЛИЗАЦИЯ)
|
//4 уровня (КАНАЛИЗАЦИЯ)
|
||||||
$vlsbts .= '("' . $zid . '","410","1","","-5","3","8","0","0"),';
|
$vlsbts .= '("' . $zid . '","410","1","","-5","3","8","0","0"),';
|
||||||
@ -223,12 +216,12 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
unset($vlsbts, $ins1bts);
|
unset($vlsbts, $ins1bts);
|
||||||
}
|
}
|
||||||
//Раскидываем предметы по пещере (Блёклый подземник)
|
//Раскидываем предметы по пещере (Блёклый подземник)
|
||||||
$dcords = array();
|
$dcords = [];
|
||||||
$c_sp = mysql_query('SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $zv['dun'] . '"');
|
$c_sp = mysql_query('SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $zv['dun'] . '"');
|
||||||
while ($c_pl = mysql_fetch_array($c_sp)) {
|
while ($c_pl = mysql_fetch_array($c_sp)) {
|
||||||
$dcords[] = array($c_pl['x'],$c_pl['y']);
|
$dcords[] = [$c_pl['x'], $c_pl['y']];
|
||||||
}
|
}
|
||||||
$fcords = array();
|
$fcords = [];
|
||||||
$i = 1;
|
$i = 1;
|
||||||
while ($i <= $pxd) {
|
while ($i <= $pxd) {
|
||||||
$j = rand(1, 10);
|
$j = rand(1, 10);
|
||||||
@ -245,19 +238,19 @@ if( isset( $_GET['start'] ) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1 )
|
|||||||
}
|
}
|
||||||
//Раскидываем предметы по пещере (Черепичный подземник)
|
//Раскидываем предметы по пещере (Черепичный подземник)
|
||||||
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $zv['dun'] . '"');
|
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $zv['dun'] . '"');
|
||||||
$test = array();
|
$test = [];
|
||||||
$dcords2 = array();
|
$dcords2 = [];
|
||||||
$dcords3 = array();
|
$dcords3 = [];
|
||||||
while ($pl = mysql_fetch_array($sp)) {
|
while ($pl = mysql_fetch_array($sp)) {
|
||||||
if (!isset($test[$pl['id_bot']])) {
|
if (!isset($test[$pl['id_bot']])) {
|
||||||
$test[$pl['id_bot']] = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `id` = "' . $pl['id_bot'] . '" LIMIT 1'));
|
$test[$pl['id_bot']] = mysql_fetch_array(mysql_query('SELECT * FROM `test_bot` WHERE `id` = "' . $pl['id_bot'] . '" LIMIT 1'));
|
||||||
}
|
}
|
||||||
if (isset($test[$pl['id_bot']]['id']) && $test[$pl['id_bot']] != 2) {
|
if (isset($test[$pl['id_bot']]['id']) && $test[$pl['id_bot']] != 2) {
|
||||||
if ($test[$pl['id_bot']]['level'] > 6) {
|
if ($test[$pl['id_bot']]['level'] > 6) {
|
||||||
$dcords2[] = array($pl['x'],$pl['y']);
|
$dcords2[] = [$pl['x'], $pl['y']];
|
||||||
}
|
}
|
||||||
if ($test[$pl['id_bot']]['level'] >= 8 && $test[$pl['id_bot']]['align'] == 9) {
|
if ($test[$pl['id_bot']]['level'] >= 8 && $test[$pl['id_bot']]['align'] == 9) {
|
||||||
$dcords3[] = array($pl['x'],$pl['y']);
|
$dcords3[] = [$pl['x'], $pl['y']];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$test[$pl['id_bot']] = 2;
|
$test[$pl['id_bot']] = 2;
|
||||||
@ -498,7 +491,8 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
}
|
}
|
||||||
$pus = trim($pus, ', ');
|
$pus = trim($pus, ', ');
|
||||||
|
|
||||||
$dungeonGroupList .= $pus; unset($pus);
|
$dungeonGroupList .= $pus;
|
||||||
|
unset($pus);
|
||||||
|
|
||||||
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
|
||||||
|
|
||||||
@ -513,7 +507,7 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
$pl['dcom'] = $u->info['id'];
|
$pl['dcom'] = $u->info['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$pl['com'] = htmlspecialchars($pl['com'],NULL);
|
$pl['com'] = htmlspecialchars($pl['com'], null);
|
||||||
if ($pl['dcom'] > 0) {
|
if ($pl['dcom'] > 0) {
|
||||||
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
|
||||||
}
|
}
|
||||||
@ -532,12 +526,15 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<?php if ($roomSection == 0) { ?>
|
<?php if ($roomSection == 0) { ?>
|
||||||
<td><div style="padding-left:0px;" align="center">
|
<td>
|
||||||
|
<div style="padding-left:0px;" align="center">
|
||||||
<h3>Вход в подземелье</h3>
|
<h3>Вход в подземелье</h3>
|
||||||
</div></td>
|
</div>
|
||||||
|
</td>
|
||||||
<?php
|
<?php
|
||||||
} ?>
|
} ?>
|
||||||
<td width="200"><div align="right">
|
<td width="200">
|
||||||
|
<div align="right">
|
||||||
<table cellspacing="0" cellpadding="0">
|
<table cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100%"> </td>
|
<td width="100%"> </td>
|
||||||
@ -550,10 +547,33 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
<td nowrap="nowrap">
|
||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
|
||||||
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=<?php if($u->info['city']=='abandonedplain') { echo '3.180.0.267'; } elseif($u->info['city']=='fallenearth') { echo '6.180.0.102'; } elseif($u->info['room']==188) { echo '1.180.0.4'; } elseif($u->info['room']==393) { echo '1.180.0.2'; } elseif($u->info['room']==372) { echo '1.180.0.323'; }elseif($u->info['room']==395) { echo '2.180.0.231'; }elseif($u->info['room']==397) { echo '2.180.0.229'; } elseif($u->info['room']==242) { echo '2.180.0.236'; } elseif($u->info['room']==321) { echo '1.180.0.213'; } else { echo '1.180.0.321'; } ?>&rnd=<?= $code; ?>';" title="<?php
|
<td bgcolor="#D3D3D3" nowrap="nowrap">
|
||||||
|
<a href="#" id="greyText" class="menutop"
|
||||||
|
onclick="location='main.php?loc=<?php if ($u->info['city'] == 'abandonedplain') {
|
||||||
|
echo '3.180.0.267';
|
||||||
|
} elseif ($u->info['city'] == 'fallenearth') {
|
||||||
|
echo '6.180.0.102';
|
||||||
|
} elseif ($u->info['room'] == 188) {
|
||||||
|
echo '1.180.0.4';
|
||||||
|
} elseif ($u->info['room'] == 393) {
|
||||||
|
echo '1.180.0.2';
|
||||||
|
} elseif ($u->info['room'] == 372) {
|
||||||
|
echo '1.180.0.323';
|
||||||
|
} elseif ($u->info['room'] == 395) {
|
||||||
|
echo '2.180.0.231';
|
||||||
|
} elseif ($u->info['room'] == 397) {
|
||||||
|
echo '2.180.0.229';
|
||||||
|
} elseif ($u->info['room'] == 242) {
|
||||||
|
echo '2.180.0.236';
|
||||||
|
} elseif ($u->info['room'] == 321) {
|
||||||
|
echo '1.180.0.9';
|
||||||
|
} else {
|
||||||
|
echo '1.180.0.321';
|
||||||
|
} ?>&rnd=<?= $code; ?>';" title="<?php
|
||||||
if ($u->info['city'] == 'fallenearth') {
|
if ($u->info['city'] == 'fallenearth') {
|
||||||
thisInfRm('6.180.0.102', 1);
|
thisInfRm('6.180.0.102', 1);
|
||||||
} elseif ($u->info['city'] == 'abandonedplain') {
|
} elseif ($u->info['city'] == 'abandonedplain') {
|
||||||
@ -571,7 +591,7 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
} elseif ($u->info['room'] == 242) {
|
} elseif ($u->info['room'] == 242) {
|
||||||
thisInfRm('2.180.0.236', 1);
|
thisInfRm('2.180.0.236', 1);
|
||||||
} elseif ($u->info['room'] == 321) {
|
} elseif ($u->info['room'] == 321) {
|
||||||
thisInfRm('1.180.0.213',1);
|
thisInfRm('1.180.0.9', 1);
|
||||||
} else {
|
} else {
|
||||||
thisInfRm('1.180.0.321', 1);
|
thisInfRm('1.180.0.321', 1);
|
||||||
}
|
}
|
||||||
@ -593,7 +613,7 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
} elseif ($u->info['room'] == 242) {
|
} elseif ($u->info['room'] == 242) {
|
||||||
echo "Большая торговая улица";
|
echo "Большая торговая улица";
|
||||||
} elseif ($u->info['room'] == 321) {
|
} elseif ($u->info['room'] == 321) {
|
||||||
echo "Большая торговая улица";
|
echo "Центральная площадь";
|
||||||
} else {
|
} else {
|
||||||
echo "Магический Портал";
|
echo "Магический Портал";
|
||||||
}
|
}
|
||||||
@ -602,32 +622,35 @@ while( $pl = mysql_fetch_array( $sp ) ){
|
|||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div></td>
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php if ($roomSection == 1) { ?>
|
<?php if ($roomSection == 1) { ?>
|
||||||
<td><div style="padding-left:0px;" align="center">
|
<td>
|
||||||
|
<div style="padding-left:0px;" align="center">
|
||||||
<h3>Рыцарский Магазин</h3>
|
<h3>Рыцарский Магазин</h3>
|
||||||
</div></td>
|
</div>
|
||||||
|
</td>
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<INPUT TYPE=button value="Обновить" class="btn" style="width: 100px" onclick="location='main.php?rz=1'">
|
<INPUT TYPE=button value="Обновить" class="btn" style="width: 100px" onclick="location='main.php?rz=1'">
|
||||||
<TD style="width: 25%; vertical-align: top; text-align: left; "><INPUT class="btn" type='button' value='Вернуться' style='width: 100px' onclick='location="/main.php"'></TD></div>
|
<TD style="width: 25%; vertical-align: top; text-align: left; "><INPUT class="btn" type='button' value='Вернуться' style='width: 100px' onclick='location="/main.php"'></TD>
|
||||||
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<?php
|
|
||||||
if($u->info['level'] > 7) {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<INPUT TYPE=button value="Рыцарский Магазин" class="btn btn-success" style="width: 150px" onclick="location='main.php?rz=1'">
|
<INPUT TYPE=button value="Рыцарский Магазин" class="btn btn-success" style="width: 150px" onclick="location='main.php?rz=1'">
|
||||||
<?php }?>
|
<TD style="width: 25%; vertical-align: top; text-align: left; ">
|
||||||
<TD style="width: 25%; vertical-align: top; text-align: left; "><INPUT class="btn" onclick="window.open('/forum/', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" style="color:red;" type="button"><INPUT class="btn" type='button' value='Обновить' style='width: 100px' onclick='location="/main.php"'></TD></div>
|
<INPUT class="btn" type='button' value='Обновить' style='width: 100px' onclick='location="/main.php"'>
|
||||||
|
</TD>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if ($error != '') echo '<font color="red"><b>' . $error . '</b></font><br>';
|
if ($error != '') echo '<font color="red"><b>' . $error . '</b></font><br>';
|
||||||
@ -645,7 +668,9 @@ if( $dungeonGroupList == '' ) {
|
|||||||
$dungeonGroupList .= '<hr>';
|
$dungeonGroupList .= '<hr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $roomSection == 0 ) { echo $dungeonGroupList; }
|
if ($roomSection == 0) {
|
||||||
|
echo $dungeonGroupList;
|
||||||
|
}
|
||||||
if ($roomSection == 1) {
|
if ($roomSection == 1) {
|
||||||
# endQuest завершаем задание по нажатию.
|
# endQuest завершаем задание по нажатию.
|
||||||
if (!empty($_GET['endQuest'])) {
|
if (!empty($_GET['endQuest'])) {
|
||||||
@ -662,16 +687,20 @@ if( $roomSection == 1 ) {
|
|||||||
$qsee = '';
|
$qsee = '';
|
||||||
$hgo = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1);
|
$hgo = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1);
|
||||||
$qc = 0; // Quest Count
|
$qc = 0; // Quest Count
|
||||||
$qcc = array();
|
$qcc = [];
|
||||||
//Генерируем список текущих квестов
|
//Генерируем список текущих квестов
|
||||||
$sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100');
|
$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)) {
|
while ($pl = mysql_fetch_array($sp)) {
|
||||||
if ($pl['room'] == $u->info['room']) {
|
if ($pl['room'] == $u->info['room']) {
|
||||||
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
|
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
|
||||||
if ($q->questCheckEnd($pq) == 1 or $u->info['login'] == 'тест1') {
|
if ($q->questCheckEnd($pq) == 1 or $u->info['login'] == 'тест1') {
|
||||||
if ($u->info['login'] == 'тест1') {print_r($pl['id'] . ' ');}
|
if ($u->info['login'] == 'тест1') {
|
||||||
|
print_r($pl['id'] . ' ');
|
||||||
|
}
|
||||||
$qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&endQuest=' . $pl['id'] . '\'">';
|
$qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&endQuest=' . $pl['id'] . '\'">';
|
||||||
} else $qsee2 = '';
|
} else {
|
||||||
|
$qsee2 = '';
|
||||||
|
}
|
||||||
|
|
||||||
$qsee .= '
|
$qsee .= '
|
||||||
<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a>
|
<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a>
|
||||||
@ -694,8 +723,6 @@ if( $roomSection == 1 ) {
|
|||||||
$dun5 = 16; //Пещера Мглы
|
$dun5 = 16; //Пещера Мглы
|
||||||
} elseif ($qst_city == 'demonscity') {
|
} elseif ($qst_city == 'demonscity') {
|
||||||
$dun5 = 3; //Катакомбы
|
$dun5 = 3; //Катакомбы
|
||||||
/*}elseif($qst_city=='emeraldscity') {
|
|
||||||
$dun5 = 17; //Потерянный вход 17*/
|
|
||||||
} elseif ($qst_city == 'suncity') {
|
} elseif ($qst_city == 'suncity') {
|
||||||
$dun5 = 10; //Грибница
|
$dun5 = 10; //Грибница
|
||||||
} elseif ($qst_city == 'dreamscity') {
|
} elseif ($qst_city == 'dreamscity') {
|
||||||
@ -723,24 +750,13 @@ if( $roomSection == 1 ) {
|
|||||||
} elseif (isset($hgo['id'])) {
|
} elseif (isset($hgo['id'])) {
|
||||||
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
|
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
|
||||||
} else {
|
} else {
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dun5 . '');
|
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dun5 . '');
|
||||||
$dq_add = array();
|
$dq_add = [];
|
||||||
while ($pl = mysql_fetch_array($sp)) {
|
while ($pl = mysql_fetch_array($sp)) {
|
||||||
/*if( $u->rep['rep'.$qst_city] == 9999 ) {
|
|
||||||
//квет, рыцарского задания
|
|
||||||
if( $pl['kin'] == 1 ) {
|
|
||||||
$dq_add = array( 0 => $pl );
|
|
||||||
}
|
|
||||||
} else*/
|
|
||||||
if ($u->rep['rep' . $qst_city] == 24999) {
|
if ($u->rep['rep' . $qst_city] == 24999) {
|
||||||
//квет, рыцарского задания
|
//квет, рыцарского задания
|
||||||
if ($pl['kin'] == 2) {
|
if ($pl['kin'] == 2) {
|
||||||
$dq_add = array( 0 => $pl );
|
$dq_add = [0 => $pl];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($pl['kin'] == 0) {
|
if ($pl['kin'] == 0) {
|
||||||
@ -751,7 +767,6 @@ if( $roomSection == 1 ) {
|
|||||||
$dq_add = $q->onlyOnceQuest($dq_add, $u->info['id']);
|
$dq_add = $q->onlyOnceQuest($dq_add, $u->info['id']);
|
||||||
$dq_add = $dq_add[rand(0, count($dq_add) - 1)];
|
$dq_add = $dq_add[rand(0, count($dq_add) - 1)];
|
||||||
|
|
||||||
|
|
||||||
if ($q->testGood($dq_add) == 1 && $dq_add > 0 && $u->rep['rep' . $qst_city] < 25000) {
|
if ($q->testGood($dq_add) == 1 && $dq_add > 0 && $u->rep['rep' . $qst_city] < 25000) {
|
||||||
$q->startq_dn($dq_add['id']);
|
$q->startq_dn($dq_add['id']);
|
||||||
echo '<font color="red"><b>Вы успешно получили новое задание "' . $dq_add['name'] . '".</b></font><br>';
|
echo '<font color="red"><b>Вы успешно получили новое задание "' . $dq_add['name'] . '".</b></font><br>';
|
||||||
@ -773,26 +788,25 @@ if( $roomSection == 1 ) {
|
|||||||
$qsee = 'К сожалению у вас нет ни одного задания<br/><br/>';
|
$qsee = 'К сожалению у вас нет ни одного задания<br/><br/>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<Br /> <style>
|
<Br/>
|
||||||
|
<style>
|
||||||
.btnnewred {
|
.btnnewred {
|
||||||
background-color: #ca726d;
|
background-color: #ca726d;
|
||||||
color: #f8d2d0;
|
color: #f8d2d0;
|
||||||
border-color: #b44039;
|
border-color: #b44039;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnnewred:hover {
|
.btnnewred:hover {
|
||||||
background-color: #ca726d;
|
background-color: #ca726d;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<FIELDSET>
|
<FIELDSET>
|
||||||
<LEGEND><B><font color=bagr>Текущие задания: </font></B></LEGEND>
|
<LEGEND style="color: maroon; font-weight: bold;">Текущие задания:</LEGEND>
|
||||||
<?= $qsee ?>
|
<?= $qsee ?>
|
||||||
<span style="padding-left: 10">
|
<span style="padding-left: 10px;">
|
||||||
<?php
|
<?php
|
||||||
//if( $qc > 0 ){
|
|
||||||
// echo 'Вы еще не справились с текущим заданием.';
|
|
||||||
//} elseif( !isset( $hgo['id'] ) && $qc == 0 ) {
|
|
||||||
$hgo1 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_capitalcity" LIMIT 1', 1);
|
$hgo1 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_capitalcity" LIMIT 1', 1);
|
||||||
$hgo2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_angelscity" LIMIT 1', 1);
|
$hgo2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_angelscity" LIMIT 1', 1);
|
||||||
$hgo3 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_suncity" LIMIT 1', 1);
|
$hgo3 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_suncity" LIMIT 1', 1);
|
||||||
@ -808,57 +822,63 @@ if( $roomSection == 1 ) {
|
|||||||
if (!isset($hgo1['id'])) { ?>
|
if (!isset($hgo1['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Пещера Тысячи Проклятий)' onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Пещера Тысячи Проклятий)' onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo1['time']-time())?> (Пещера Тысячи Проклятий)' onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo1['time'] - time()) ?> (Пещера Тысячи Проклятий)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo2['id'])) { ?>
|
if (!isset($hgo2['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Бездна)' onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Бездна)' onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo2['time']-time())?> (Бездна)' onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo2['time'] - time()) ?> (Бездна)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo3['id'])) { ?>
|
if (!isset($hgo3['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Грибница)' onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Грибница)' onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo3['time']-time())?> (Грибница)' onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo3['time'] - time()) ?> (Грибница)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo4['id'])) { ?>
|
if (!isset($hgo4['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Катакомбы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Катакомбы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo4['time']-time())?> (Катакомбы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo4['time'] - time()) ?> (Катакомбы)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo5['id'])) { ?>
|
if (!isset($hgo5['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Водосток)' onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"'/><br>
|
<input class="btn btn-success" type='button' value='Получить задание (Водосток)' onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"'/><br>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo5['time']-time())?> (Водосток)' onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo5['time'] - time()) ?> (Водосток)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo6['id'])) { ?>
|
if (!isset($hgo6['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Гора Легиона)' onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Гора Легиона)' onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo6['time']-time())?> (Гора Легиона)' onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo6['time'] - time()) ?> (Гора Легиона)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo7['id'])) { ?>
|
if (!isset($hgo7['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Излом Хаоса)' onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Излом Хаоса)' onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo7['time']-time())?> (Излом Хаоса)' onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo7['time'] - time()) ?> (Излом Хаоса)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo8['id'])) { ?>
|
if (!isset($hgo8['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Пещеры Мглы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Пещеры Мглы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo8['time']-time())?> (Пещера Мглы)' onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo8['time'] - time()) ?> (Пещера Мглы)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo9['id'])) { ?>
|
if (!isset($hgo9['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Потерянный Вход)' onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Потерянный Вход)' onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo9['time']-time())?> (Потерянный Вход)' onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo9['time'] - time()) ?> (Потерянный Вход)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
if (!isset($hgo10['id'])) { ?>
|
if (!isset($hgo10['id'])) { ?>
|
||||||
<input class="btn btn-success" type='button' value='Получить задание (Туманные Низины)' onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"'/>
|
<input class="btn btn-success" type='button' value='Получить задание (Туманные Низины)' onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"'/>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?=$u->timeOut(60*60*24+$hgo10['time']-time())?> (Туманные Низины)' onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"' />
|
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo10['time'] - time()) ?> (Туманные Низины)'
|
||||||
|
onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"'/>
|
||||||
<?php }
|
<?php }
|
||||||
//16 => array('sandcity','Пещеры Мглы'),
|
|
||||||
//} else {
|
|
||||||
// echo 'Получить новое задание можно <b>'.date('d.m.Y H:i',$hgo['time']+60*60*24).'</b> <font color="">( Через '.$u->timeOut($hgo['time']+60*60*24-time()).' )</font>';
|
|
||||||
//}
|
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
</FIELDSET>
|
</FIELDSET>
|
||||||
@ -872,7 +892,7 @@ if( $roomSection == 1 ) {
|
|||||||
if ($_GET['buy1'] == 1) {
|
if ($_GET['buy1'] == 1) {
|
||||||
//покупаем статы
|
//покупаем статы
|
||||||
$price = 2000;
|
$price = 2000;
|
||||||
$cur_price = array('price'=>0);
|
$cur_price = ['price' => 0];
|
||||||
if (50 - $u->rep['add_stats'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Характеристики!
|
if (50 - $u->rep['add_stats'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Характеристики!
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
if (!($cur_price['price'] >= $price)) {
|
if (!($cur_price['price'] >= $price)) {
|
||||||
@ -880,20 +900,17 @@ if( $roomSection == 1 ) {
|
|||||||
$cur_price['nu_' . $val] = $cur;
|
$cur_price['nu_' . $val] = $cur;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$mnt1 = ( isset( $rt ) && $rt == 1 ? ($u->rep['allrep']-$u->rep['allnurep'])-$cur_price['price'] : ($u->rep['allrep']-$u->rep['allnurep']) );
|
|
||||||
//print_r($dungeon['list']);
|
|
||||||
//
|
|
||||||
if ($price == $cur_price['price']) {
|
if ($price == $cur_price['price']) {
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
//echo '['.$val.'->'.$cur_price['nu_'.$val].'->'.$u->rep['nu_'.$val].'->'.$rt.']';
|
|
||||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
if($r) $rt = 1; else $rt = 0;
|
$rt = $r ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($rt == 1) {
|
if ($rt == 1) {
|
||||||
$u->info['ability'] += 1; $u->rep['add_stats'] += 1;
|
$u->info['ability'] += 1;
|
||||||
|
$u->rep['add_stats'] += 1;
|
||||||
mysql_query('UPDATE `rep` SET `add_stats` = "' . $u->rep['add_stats'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `rep` SET `add_stats` = "' . $u->rep['add_stats'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
mysql_query('UPDATE `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
echo '<font color="red"><b>Вы успешно приобрели 1 способность за ' . $price . ' ед. награды</b></font><br>';
|
echo '<font color="red"><b>Вы успешно приобрели 1 способность за ' . $price . ' ед. награды</b></font><br>';
|
||||||
@ -906,7 +923,7 @@ if( $roomSection == 1 ) {
|
|||||||
}
|
}
|
||||||
} elseif ($_GET['buy1'] == 2) { // Умения!
|
} elseif ($_GET['buy1'] == 2) { // Умения!
|
||||||
$price = 5000;
|
$price = 5000;
|
||||||
$cur_price = array('price'=>0);
|
$cur_price = ['price' => 0];
|
||||||
if (15 - $u->rep['add_skills'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Умения!
|
if (15 - $u->rep['add_skills'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Умения!
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
if (!($cur_price['price'] >= $price)) {
|
if (!($cur_price['price'] >= $price)) {
|
||||||
@ -919,24 +936,27 @@ if( $roomSection == 1 ) {
|
|||||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
if($r) $rt = 1; else $rt = 0;
|
$rt = $r ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($rt == 1) {
|
if ($rt == 1) {
|
||||||
$u->info['skills'] += 1; $u->rep['add_skills'] += 1;
|
$u->info['skills'] += 1;
|
||||||
|
$u->rep['add_skills'] += 1;
|
||||||
mysql_query('UPDATE `rep` SET `add_skills` = "' . $u->rep['add_skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `rep` SET `add_skills` = "' . $u->rep['add_skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
mysql_query('UPDATE `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
echo '<font color="red"><b>Вы успешно приобрели 1 умение за ' . $price . ' ед. награды</b></font><br>';
|
echo '<font color="red"><b>Вы успешно приобрели 1 умение за ' . $price . ' ед. награды</b></font><br>';
|
||||||
} else {
|
} else {
|
||||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||||
}
|
}
|
||||||
} else echo 'Недостаточно репутации.';
|
} else {
|
||||||
|
echo 'Недостаточно репутации.';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||||
}
|
}
|
||||||
} elseif ($_GET['buy1'] == 3) { // Кредиты
|
} elseif ($_GET['buy1'] == 3) { // Кредиты
|
||||||
$price = 100;
|
$price = 100;
|
||||||
$cur_price = array('price'=>0);
|
$cur_price = ['price' => 0];
|
||||||
if ($u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Покупаем кредиты
|
if ($u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Покупаем кредиты
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
if (!($cur_price['price'] >= $price)) {
|
if (!($cur_price['price'] >= $price)) {
|
||||||
@ -949,24 +969,27 @@ if( $roomSection == 1 ) {
|
|||||||
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
|
||||||
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
$u->rep['nu_' . $val] += $cur_price['nu_' . $val];
|
||||||
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
if($r) $rt = 1; else $rt = 0;
|
$rt = $r ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($rt == 1) {
|
if ($rt == 1) {
|
||||||
$u->info['money'] += 10; $u->rep['add_money'] += 10;
|
$u->info['money'] += 10;
|
||||||
|
$u->rep['add_money'] += 10;
|
||||||
mysql_query('UPDATE `rep` SET `add_money` = "' . $u->rep['add_money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `rep` SET `add_money` = "' . $u->rep['add_money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
echo '<font color="red"><b>Вы успешно приобрели 10 кр. за ' . $price . ' ед. награды</b></font><br>';
|
echo '<font color="red"><b>Вы успешно приобрели 10 кр. за ' . $price . ' ед. награды</b></font><br>';
|
||||||
} else {
|
} else {
|
||||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||||
}
|
}
|
||||||
} else echo 'Недостаточно репутации.';
|
} else {
|
||||||
|
echo 'Недостаточно репутации.';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
|
||||||
}
|
}
|
||||||
} elseif ($_GET['buy1'] == 4) { // Особенности
|
} elseif ($_GET['buy1'] == 4) { // Особенности
|
||||||
$price = 3000;
|
$price = 3000;
|
||||||
$cur_price = array('price'=>0);
|
$cur_price = ['price' => 0];
|
||||||
if (5 - $u->rep['add_skills2'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Особенности
|
if (5 - $u->rep['add_skills2'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Особенности
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
if (!($cur_price['price'] >= $price)) {
|
if (!($cur_price['price'] >= $price)) {
|
||||||
@ -983,7 +1006,8 @@ if( $roomSection == 1 ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($rt == 1) {
|
if ($rt == 1) {
|
||||||
$u->info['sskills'] += 1; $u->rep['add_skills2'] += 1;
|
$u->info['sskills'] += 1;
|
||||||
|
$u->rep['add_skills2'] += 1;
|
||||||
mysql_query('UPDATE `rep` SET `add_skills2` = "' . $u->rep['add_skills2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `rep` SET `add_skills2` = "' . $u->rep['add_skills2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
mysql_query('UPDATE `stats` SET `sskills` = "' . $u->info['sskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
mysql_query('UPDATE `stats` SET `sskills` = "' . $u->info['sskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||||
echo '<font color="red"><b>Вы успешно приобрели 1 особенность за ' . $price . ' ед. награды</b></font><br>';
|
echo '<font color="red"><b>Вы успешно приобрели 1 особенность за ' . $price . ' ед. награды</b></font><br>';
|
||||||
@ -999,7 +1023,7 @@ if( $roomSection == 1 ) {
|
|||||||
//покупаем слоты
|
//покупаем слоты
|
||||||
$price = 2000 + ($u->rep['add_slot'] * 2000);
|
$price = 2000 + ($u->rep['add_slot'] * 2000);
|
||||||
$price_kr = 500 + ($u->rep['add_slot'] * 500);
|
$price_kr = 500 + ($u->rep['add_slot'] * 500);
|
||||||
$cur_price = array('price'=>0);
|
$cur_price = ['price' => 0];
|
||||||
if ($price_kr > $u->info['money']) {
|
if ($price_kr > $u->info['money']) {
|
||||||
echo '<font color=red><b>Недостаточно денег</b></font><br>';
|
echo '<font color=red><b>Недостаточно денег</b></font><br>';
|
||||||
} elseif (4 - $u->rep['add_slot'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Характеристики!
|
} elseif (4 - $u->rep['add_slot'] > 0 && $u->rep['allrep'] - $u->rep['allnurep'] >= $price) { // Характеристики!
|
||||||
@ -1009,9 +1033,6 @@ if( $roomSection == 1 ) {
|
|||||||
$cur_price['nu_' . $val] = $cur;
|
$cur_price['nu_' . $val] = $cur;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$mnt1 = ( isset( $rt ) && $rt == 1 ? ($u->rep['allrep']-$u->rep['allnurep'])-$cur_price['price'] : ($u->rep['allrep']-$u->rep['allnurep']) );
|
|
||||||
//print_r($dungeon['list']);
|
|
||||||
//
|
|
||||||
if ($price == $cur_price['price']) {
|
if ($price == $cur_price['price']) {
|
||||||
foreach ($dungeon['list'] as $key => $val) {
|
foreach ($dungeon['list'] as $key => $val) {
|
||||||
//echo '['.$val.'->'.$cur_price['nu_'.$val].'->'.$u->rep['nu_'.$val].'->'.$rt.']';
|
//echo '['.$val.'->'.$cur_price['nu_'.$val].'->'.$u->rep['nu_'.$val].'->'.$rt.']';
|
||||||
@ -1042,15 +1063,21 @@ if( $roomSection == 1 ) {
|
|||||||
//цена на слоты
|
//цена на слоты
|
||||||
?>
|
?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><font color=brown><b>Наград: </font></b><font color=green><b> <?= ( isset( $rt ) && $rt == 1 ? ($u->rep['allrep']-$u->rep['allnurep'])-$cur_price['price'] : ($u->rep['allrep']-$u->rep['allnurep']) );?>
|
<legend style="color: brown; font-weight: bold;">
|
||||||
</font><font color=brown>ед.</b></legend></font>
|
Наград:
|
||||||
|
<span style="color: green;">
|
||||||
|
<?= (isset($rt) && $rt == 1 ? ($u->rep['allrep'] - $u->rep['allnurep']) - $cur_price['price'] : ($u->rep['allrep'] - $u->rep['allnurep'])); ?>
|
||||||
|
</span>
|
||||||
|
ед.
|
||||||
|
</legend>
|
||||||
<table>
|
<table>
|
||||||
<?php if ((50 - $u->rep['add_stats']) > 0) { ?>
|
<?php if ((50 - $u->rep['add_stats']) > 0) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Способность (еще <?= (50 - $u->rep['add_stats']) ?>)</td>
|
<td>Способность (еще <?= (50 - $u->rep['add_stats']) ?>)</td>
|
||||||
<td style='padding-left: 10px'>за<b> 2000</b> ед.</td>
|
<td style='padding-left: 10px'>за<b> 2000</b> ед.</td>
|
||||||
<td style='padding-left: 10px'><input class="btn" type='button' value='Купить'
|
<td style='padding-left: 10px'><input class="btn" type='button' value='Купить'
|
||||||
onclick="if (confirm('Купить: Способность?\n\nКупив способность, Вы сможете увеличить характеристики персонажа.\nНапример, можно увеличить силу.')) {location='main.php?rz=1&buy1=1'}" /></td>
|
onclick="if (confirm('Купить: Способность?\n\nКупив способность, Вы сможете увеличить характеристики персонажа.\nНапример, можно увеличить силу.')) {location='main.php?rz=1&buy1=1'}"/>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ((15 - $u->rep['add_skills']) > 0) { ?>
|
<?php if ((15 - $u->rep['add_skills']) > 0) { ?>
|
||||||
@ -1058,7 +1085,8 @@ if( $roomSection == 1 ) {
|
|||||||
<td>Умение (еще <?= (15 - $u->rep['add_skills']) ?>)</td>
|
<td>Умение (еще <?= (15 - $u->rep['add_skills']) ?>)</td>
|
||||||
<td style='padding-left: 10px'>за<b> 5000</b> ед.</td>
|
<td style='padding-left: 10px'>за<b> 5000</b> ед.</td>
|
||||||
<td style='padding-left: 10px'><input class="btn" type='button' value='Купить'
|
<td style='padding-left: 10px'><input class="btn" type='button' value='Купить'
|
||||||
onclick="if (confirm('Купить: Умение?\n\nУмение даёт возможность почуствовать себя мастером меча, топора, магии и т.п.')) {location='main.php?rz=1&buy1=2'}" /></td>
|
onclick="if (confirm('Купить: Умение?\n\nУмение даёт возможность почуствовать себя мастером меча, топора, магии и т.п.')) {location='main.php?rz=1&buy1=2'}"/>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
<tr>
|
||||||
@ -1086,9 +1114,9 @@ if( $roomSection == 1 ) {
|
|||||||
<?php
|
<?php
|
||||||
$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');
|
$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)) {
|
while ($chk_pl = mysql_fetch_array($chk_cl)) {
|
||||||
if(mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$chk_pl['id'].'" LIMIT 1'));
|
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
|
||||||
{
|
$x++;
|
||||||
$x++; $prc += $chk_pl['price1'];
|
$prc += $chk_pl['price1'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$u->info['money'] += $prc;
|
$u->info['money'] += $prc;
|
||||||
@ -1131,7 +1159,8 @@ onclick="if (confirm('Сдать все чеки (<?=$chk[0]?> шт.) наход
|
|||||||
<form id="from" autocomplete="0" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
<form id="from" autocomplete="0" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
|
||||||
<fieldset style='padding-left: 5; width=50%'>
|
<fieldset style='padding-left: 5; width=50%'>
|
||||||
<legend><b> Группа </b></legend>
|
<legend><b> Группа </b></legend>
|
||||||
<font color=green><b> Выберите пещеру:</b></font><hr />
|
<font color=green><b> Выберите пещеру:</b></font>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
<label><input type="radio" name="rpmg1" id="rpmg1" value="10"/>
|
<label><input type="radio" name="rpmg1" id="rpmg1" value="10"/>
|
||||||
<img style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/dreamscity.gif" width="34" height="19"/> Водосток [8]</label><br/>
|
<img style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/dreamscity.gif" width="34" height="19"/> Водосток [8]</label><br/>
|
||||||
@ -1199,5 +1228,3 @@ onclick="if (confirm('Сдать все чеки (<?=$chk[0]?> шт.) наход
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user