[Help] Event Timers

Babaka

New Member
Joined
Feb 8, 2009
Messages
153
Reaction score
4
Някой би ли ми дал кода за времето на евентите:
Chaos castle
Blood castle
Devil square
 
Мерси, но за chaos castle няма ли?
 
Добавяш това на нов ред и само промени времето :

<br>
&nbsp;Chaos Castle
<span id=timespan>
<script>
var dods;
var hour = 11;var minute = 55;var secundes = 38;dsin = minute * 60 + secundes;
function changeeventtime()
{
dsin = dsin + 1;
if(hour == 2 || hour == 4 || hour == 6 || hour == 8 || hour == 10 || hour == 12)
{
dods = 56*60 - dsin;
}
else
{
dods = 116*60 - dsin;
}
min = Math.floor(dods/60);
sec = dods%60;
if(dods < 0)
{
document.getElementById("timespan").innerHTML="Ope n";
}
else
{
if(min < 10) min = "0"+min;
if(sec < 10) sec = "0"+sec;
document.getElementById("timespan").innerHTML=min+ ":"+sec;
}
window.setTimeout("changeeventtime()",1000);
}
changeeventtime();
</script>
</span>
</code>
но не съм сигурен дали ще стане
 
  • Like
Reactions: Babaka
Добавяш това на нов ред и само промени времето etc...

Това нещо е кода на Devil Square и Blood Castle. И според мен няма да отчита правилно времето и т.н. Ето този вариянт виж също може да го добавиш кадето искаш ;)

Това нещо работи само на Му Уеб

Code:
<?
require("config.php");
$cs_map_server_group = "0";
$castle_siege_schedule = "<font color='#DDA943'>Every one week</font>";
$cs = $db->Execute("Select SIEGE_START_DATE,SIEGE_END_DATE,SIEGE_ENDED,CASTLE_OCCUPY,OWNER_GUILD,MONEY,TAX_RATE_CHAOS,TAX_RATE_STORE,TAX_HUNT_ZONE,MAP_SVR_GROUP from MuCastle_DATA where MAP_SVR_GROUP='$cs_map_server_group'");
$cs = $cs->fetchrow();
$cs_g = $db->Execute("Select GUILD_NAME from MuCastle_SIEGE_GUILDLIST where MAP_SVR_GROUP='$cs[9]'");
if($cs){
if($cs[2] == '1'){

echo("<font color='#ff6600'>Castle Siege: <font color='red'>Ended</font>"); } else { echo("<font color='#ff6600'>Castle Siege Status: </font><font color='#DDA943'>On</font>"); }
echo("<br><font color='#ff6600'>Castle Siege Schedule: <span class='text'>$castle_siege_schedule</span>");

if($cs[3] != NULL){

$cs[4] = htmlspecialchars($cs[4]);
echo("<br>Castle Owner: <font color='#DDA943'>$cs[4]</font>");}
else{echo("<br>Castle Owner: <font color='#DDA943'>No Owner</font>");}
for($i=0;$i < $cs_g->numrows();++$i)
{
$cs_guilds = $cs_g->fetchrow();
$rank = $i+1;

$cs_guilds[0] = str_replace(">","&gt;",$cs_guilds[0]);
$cs_guilds[0] = str_replace("<","&lt;",$cs_guilds[0]);

echo "<tbody><tr>
<td align=left>$rank</td>
<td align=left>$cs_guilds[0]</a></td>
</tr></tbody>
";
}
echo("");

}else {echo("Castle Siege Is Not Installed On This Server");}
?>
 
Last edited:
  • Like
Reactions: Babaka and pafa7a