Ir para conteúdo

Erro No Arquivo Woe.php


Sinos

Posts Recomendados

Opa galera do xtibia, vim pedir uma ajuda que é a seguinte:

 

Tenho adicionando o sistema war of emperium (WOE) no meu tibia 8.60, só que quero adicionar agora no site numa coluna War of Emperium, já fiz tudo certinho, só que meu arquivo woe.php ta bugado, vejam:

 

Meu arquivo WOE.php

	   <div class='message'>
	<div class='title'>War of Emperium</div>
	<div class='content'>
	<?PHP
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
echo '<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
 <tr class="tableheader">
<TD align="center">What is War of Emperium?</TD>
</TR>
</TABLE>
<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
<tr class="tablerow">
<TD width="30%">
<center><b>Objective</b><br />How to participate in War of Emperium.</center>
</TD>
<TD width="70%">
<center>Everyday tuesday, thursday, saturday and sunday at <b>5pm (Pacific Time)</b> the War of Emperium will begin. The objective of the event is to capture the castle and defend it until the event is over <i>(It lasts 10 minutes)</i>. Anybody can participate in this event and capture the castle as long as they\'re in a guild.</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>Attacking the Castle</b><br />How to obtain power of the castle.</center>
</TD>
<TD width="70%">
<center>To capture the castle, you must enter inside and defeat both pre-emperiums. Once both crystals are destroyed, portals will open to the final emperium. If your guild destroys the final emperium, you must defend the Castle until the event has finished.</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>Castle Defense</b><br />How can I defend my guilds castle?</center>
</TD>
<TD width="70%">
<center>If the event is not active, no guilds will have access to your castle and it is safe from intruders. However, during the event your castle is vulnerable to attacks. You can defend castle with guards or by healing your own emperium.</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>The Castle Governor</b><br />What are the benefits of owning a castle?</center>
</TD>
<TD width="70%">
<center>When you control the castle, you will be given access to something.</center>
</TD>
</TR>
</TABLE>

<br />
<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
	 <tr class="tableheader">
<TD align="center">
<center>Additional Information and Commands</center>
</TD>
</TR>
</TABLE>
<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
<tr class="tablerow">  
<TD width="30%">
<center><b>/woe info</b><br />Anybody</center>
</TD>
<TD width="70%">
<center>View the current Castle owner or when War of Emperium ends.</center>
</TD>
</TR>
<tr class="tablerow">  
<TD width="30%">
<center><b>!recall</b><br />Guild Leader</center>
</TD>
<TD width="70%">
<center>If you\'re inside the Castle, you may teleport all guild members to you. This has a 5 minute exhaust.</center>
</TD>
</TR>
<tr class="tablerow">  
<TD width="30%">
<center><b>Castle Banners</b><br />Guild Member</center>
</TD>
<TD width="70%">
<center>If you use a banner located inside the Castle, you will be teleported to the emperium regardless if the pre-emperiums are broken.</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>Guard Lever</b><br />Guild Leader</center>
</TD>
<TD width="70%">
<center>If you use a the lever located near the main emperium, you will spawn 5 guards to help defend at the cost of 30000gp.</center>
</TD>
</TR>
</TABLE>

<br /><br />';


$woe = $SQL->query("
SELECT w.id AS id, w.time AS time, g.name AS guild, p.name AS name, w.started AS start, w.guild AS guild_id
FROM woe AS w
INNER JOIN players AS p
ON p.id = w.breaker
INNER JOIN guilds AS g
ON g.id = w.guild
ORDER BY id DESC LIMIT 10;
")->fetchAll();

if(empty($woe)) {
echo '
<table border="0" cellspacing="0" cellpadding="5" width="100%" class="cellspadding">
 <tr class="tableheader">
<TD align="center">Castle Governors</TD>
</TR>
<tr class="tablerow">
<td align="center">No WoE battles at Emporia yet.</td>
</tr>
</TABLE>
';
}
else
{
foreach ($woe as $k=>$v) {
echo "<table border='0' cellspacing='1' cellpadding='5' width=100% class='cellspadding'>
 <tr class='tableheader'>
 <TD><b><center>#</center></b></TD>
 <TD><b><center>Winner Guild</center></b></TD>
 <TD><b><center>Conquest by</center></b></TD>
 <TD><b><center>Start time</center></b></TD>
 <TD><b><center>Last conquest</center></b></td>
 <tr class='tablerow'>
<TD>".$v["id"]."</TD>
<TD><a href='".WEBSITE."/index.php/guilds/view/".$v["guild_id"]."'>".$v["guild"]."</a></TD>
<TD>".$v["name"]."</TD>
<TD>" . date("d/m/y   H:i:s", $v["start"]) . "</TD>
<TD>" . date("d/m/y   H:i:s", $v["time"]) . "</TD>
</TR>
</TABLE>
";
}
}

?>
</div>
</div>

 

Aparece esse erro aqui:

 

War of Emperium

 

Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\woe.php on line 5

 

Fatal error: require() [function.require]: Failed opening required 'config.php' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\woe.php on line 5

 

É isso ai galera, mas se tiverem outro arquivo woe.php seria muito bom tb, melhor ainda traduzido hehe, um rep+ pra quem me ajudar.

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

mas o evento funciona certinho no servidor pq vc tem q executa-lo uma vez pra configurar, se nao der certo troca essa linha

 

require("config.php");

 

por essa

 

require("config-and-functions.php");

Editado por Sociopataa
Link para o comentário
Compartilhar em outros sites

mas o evento funciona certinho no servidor pq vc tem q executa-lo uma vez pra configurar, se nao der certo troca essa linha

 

require("config.php");

 

por essa

 

require("config-and-functions.php");

 

fiz exatamente isso, mas agora dar esse erro oO

 

War of Emperium

 

Fatal error: Cannot redeclare isPremium() (previously declared in C:\xampp\htdocs\config-and-functions.php:79) in C:\xampp\htdocs\config-and-functions.php on line 82

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...