Обучение/Помощь новичкам | Помогите с Огненными землями для БТ
Помогите исправить таймер идет в минус
}
$title = 'Огненные земли';
include './system/h.php';
switch($_GET['i']){
default:
if($user['hellworld_reward'] == 0) mysql_query('UPDATE `users` SET `hellworld_reward` = 1 WHERE `id` = "'.$user['id'].'" LIMIT 1');
if(isset($_GET['nagrad'])){
$id = _string(_num($_GET['nagrada']));
$hellworld_action = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_action` WHERE `id` = "'.$id.'" AND `user` = "'.$user['id'].'" LIMIT 1'));
if($hellwor_action){
if(!$id or !$hellworld_action or $hellworld_action['hp'] > 0){
header('Locaton:/');
exit;
}
else{
mysql_query('UPDATE `users` SET `hellworld` = 0, `hellworld_stage` = 0,`exp` = `exp` + "'.$hellworld_action['exp'].'" WHERE `id` = '.$user['id'].' LIMIT 1');
mysql_query('DELETE FROM `hellworld_action` WHERE `user` = "'.$user['id'].'"');
mysql_query('DELETE FROM `hellworld_logs` WHERE `user` = "'.$user['id'].'"');
mysql_query('INSERT INTO `hellworld_user` SET `user` = "'.$user['id'].'", `creature` = "'.$hellworld_action['creature'].'", `time` = "'.time().'", `respawn` = "'.(time() + 3600).'" ');
}
echo '
<div class="center">
<div class="block_light">
<img src="/images/icon/2hit.png" alt="" />
<span class="dgreen bold">
<center>Победа!
</span>
<img src="/images/icon/2hit.png" alt="" />
<br />
Вы одержали победу над
<img src="/images/icon/2hit.png" alt="" />
'.$hellworld_action['name'].'!
<br />
<div class="separ"></div>
<span class="blue">
Награда:
</span>
<img src="/images/icon/exp.png" alt="exp" />
'.$hellworld_action['exp'].' опыта
<br /> </center>
</div>
<div class="mini-line"></div>
</div>
';
}
else{
header('Location: /hellworld/');
exit;
}
}
if($user['hellworld'] == 0){
echo '
<div class="content center">
<div class="block_zero blue">
<font color="green">Убивай монстров, получай особую наградy
</font>
</div>
<div class="mini-line"></div>
</div>
';
$hellworld_reward = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_rewards` WHERE `id` = "'.$user['hellworld_reward'].'" LIMIT 1'));
$item = mysql_fetch_array(mysql_query('SELECT * FROM `items` WHERE `id` = "'.$hellworld_reward['item'].'" LIMIT 1'));
echo '
<div class="content" align="center">
<span class="dgreen bold">
Особая награда
</span>
<div class="separ"></div>
<div style="display:inline-block;white-space:nowrap;">
<span class="yellow">
<img src="/itemImage.php?id='.$hellworld_reward['item'].'" alt="" width="50" height="50" style="float:left;margin-right:3px;margin-top:3px;" />
</span>
<img src="/images/icon/quality/'.$item['quality'].'.png" alt="*" />
<span class="yellow">
'.$item['name'].'
</span>
</div>
<div class="separ"></div>
<div class="center">
<img src="/images/icon/exp.png" alt="" />
Опыт: '.$user['hellworld_exp'].' из '.$hellworld_reward['exp'].'
<br />
<a class="btn" href="/hellworld/reward/">
<span class="end">
<span class="label">
<font color="green">Подробней</font>
</span>
</span>
</a>
</div>
</div>
';
$hellworld_user_count = mysql_result(mysql_query('SELECT COUNT(*) FROM `hellworld_user` WHERE `user` = "'.$user['id'].'"'),0);
$_hellworld_creature = mysql_query('SELECT * FROM `hellworld` LIMIT '.($hellworld_user_count + 1).'');
while($hellworld_creature = mysql_fetch_array($_hellworld_creature)){
$hellworld_user = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_user` WHERE `user` = "'.$user['id'].'" AND `creature` = "'.$hellworld_creature['id'].'" LIMIT 1'));
echo'
<div class="content">
<div class="line"></div>
<div class="block_zero" style="display:inline-block;white-space:nowrap;text-align:left;">
'.($hellworld_user ? '
<a href="/hellworld/info/'.$hellworld_creature['id'].'/">
<img src="/images/monsters/hellworld/'.$hellworld_creature['id'].'.png" alt="" style="margin-right:3px;float:left;" />
</a>
':'
<img src="/images/monsters/hellworld/'.$hellworld_creature['id'].'.png" alt="" style="margin-right:3px;float:left;" />
').'
<img src="/images/icon/2hit.png" alt="" />
<span class="yellow">
'.$hellworld_creature['name'].'
</span>
<br />
<span class="medium">
<img src="/images/icon/quality/'.$hellworld_creature['quality'].'.png" alt="" />
<span class="quality-'.$hellworld_cr
________
посл. ред. 23.10.2015 в 14:22; всего 7 раз(а); by XAKEP
]Следуйщий бой через -3654
вот код exit; }
$title = 'Огненные земли';
include './system/h.php';
switch($_GET['i']){
default:
if($user['hellworld_reward'] == 0) mysql_query('UPDATE `users` SET `hellworld_reward` = 1 WHERE `id` = "'.$user['id'].'" LIMIT 1');
if(isset($_GET['nagrad'])){
$id = _string(_num($_GET['nagrada']));
$hellworld_action = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_action` WHERE `id` = "'.$id.'" AND `user` = "'.$user['id'].'" LIMIT 1'));
if($hellwor_action){
if(!$id or !$hellworld_action or $hellworld_action['hp'] > 0){
header('Locaton:/');
exit;
}
else{
mysql_query('UPDATE `users` SET `hellworld` = 0, `hellworld_stage` = 0,`exp` = `exp` + "'.$hellworld_action['exp'].'" WHERE `id` = '.$user['id'].' LIMIT 1');
mysql_query('DELETE FROM `hellworld_action` WHERE `user` = "'.$user['id'].'"');
mysql_query('DELETE FROM `hellworld_logs` WHERE `user` = "'.$user['id'].'"');
mysql_query('INSERT INTO `hellworld_user` SET `user` = "'.$user['id'].'", `creature` = "'.$hellworld_action['creature'].'", `time` = "'.time().'", `respawn` = "'.(time() + 3600).'" ');
}
echo '
<div class="center">
<div class="block_light">
<img src="/images/icon/2hit.png" alt="" />
<span class="dgreen bold">
<center>Победа!
</span>
<img src="/images/icon/2hit.png" alt="" />
<br />
Вы одержали победу над
<img src="/images/icon/2hit.png" alt="" />
'.$hellworld_action['name'].'!
<br />
<div class="separ"></div>
<span class="blue">
Награда:
</span>
<img src="/images/icon/exp.png" alt="exp" />
'.$hellworld_action['exp'].' опыта
<br /> </center>
</div>
<div class="mini-line"></div>
</div>
';
}
else{
header('Location: /hellworld/');
exit;
}
}
if($user['hellworld'] == 0){
echo '
<div class="content center">
<div class="block_zero blue">
<font color="green">Убивай монстров, получай особую наградy
</font>
</div>
<div class="mini-line"></div>
</div>
';
$hellworld_reward = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_rewards` WHERE `id` = "'.$user['hellworld_reward'].'" LIMIT 1'));
$item = mysql_fetch_array(mysql_query('SELECT * FROM `items` WHERE `id` = "'.$hellworld_reward['item'].'" LIMIT 1'));
echo '
<div class="content" align="center">
<span class="dgreen bold">
Особая награда
</span>
<div class="separ"></div>
<div style="display:inline-block;white-space:nowrap;">
<span class="yellow">
<img src="/itemImage.php?id='.$hellworld_reward['item'].'" alt="" width="50" height="50" style="float:left;margin-right:3px;margin-top:3px;" />
</span>
<img src="/images/icon/quality/'.$item['quality'].'.png" alt="*" />
<span class="yellow">
'.$item['name'].'
</span>
</div>
<div class="separ"></div>
<div class="center">
<img src="/images/icon/exp.png" alt="" />
Опыт: '.$user['hellworld_exp'].' из '.$hellworld_reward['exp'].'
<br />
<a class="btn" href="/hellworld/reward/">
<span class="end">
<span class="label">
<font color="green">Подробней</font>
</span>
</span>
</a>
</div>
</div>
';
$hellworld_user_count = mysql_result(mysql_query('SELECT COUNT(*) FROM `hellworld_user` WHERE `user` = "'.$user['id'].'"'),0);
$_hellworld_creature = mysql_query('SELECT * FROM `hellworld` LIMIT '.($hellworld_user_count + 1).'');
while($hellworld_creature = mysql_fetch_array($_hellworld_creature)){
$hellworld_user = mysql_fetch_array(mysql_query('SELECT * FROM `hellworld_user` WHERE `user` = "'.$user['id'].'" AND `creature` = "'.$hellworld_creature['id'].'" LIMIT 1'));
echo'
<div class="content">
<div class="line"></div>
<div class="block_zero" style="display:inline-block;white-space:nowrap;text-align:left;">
'.($hellworld_user ? '
<a href="/hellworld/info/'.$hellworld_creature['id'].'/">
<img src="/images/monsters/hellworld/'.$hellworld_creature['id'].'.png" alt="" style="margin-right:3px;float:left;" />
</a>
':'
<img src="/images/monsters/hellworld/'.$hellworld_creature['id'].'.png" alt="" style="margin-right:3px;float:left;" />
').'
<img src="/images/icon/2hit.png" alt="" />
<span class="yellow">
'.$hellworld_creature['name'].'
</span>
<br />
<span class="medium">
<img src="/images/icon/quality/'.$hellworld_creature['quality'].'.png" alt="" />
<span class="quality-'.$hellworld_cr
________
посл. ред. 23.10.2015 в 14:22; всего 7 раз(а); by XAKEP
Запрешено использовать вся текстовый бб код... Бан пока!
DELETED
23 октября 2015, в 12:55
Delete
ultral , Начинаеться правильно (Воскреснет через: 60 минут) а после нуля когда монстер должен воскреснуть идет в (Воскреснет через: -1 минут) и ниже
DELETED
23 октября 2015, в 13:10
Delete
XAKEP (23.10.2015 в 13:08)
ultral , Начинаеться правильно (Воскреснет через: 60 минут) а после нуля когда монстер должен воскреснуть идет в (Воскреснет через: -1 минут) и ниже
ultral , Начинаеться правильно (Воскреснет через: 60 минут) а после нуля когда монстер должен воскреснуть идет в (Воскреснет через: -1 минут) и ниже
Установи крон что бы каждый час было
DELETED
23 октября 2015, в 13:13
Delete
XAKEP (23.10.2015 в 13:12)
Крон на босов
ultral , Попробую а без крона как то можно ?
DELETED
23 октября 2015, в 13:18
Delete
DELETED
23 октября 2015, в 13:49
Delete
Если время равно 0 то
Запрос в БД об обновлении данных
Стр.: 1, 2