Yes, I've edited a bit the guildwar page some time ago from Znote, to work with my server, don't remember if I've edited some functions in database/users.phpdo you have the guildwar page for znote? i mean the one that work with otserv
<?php require_once 'engine/init.php';
if ($config['require_login']['guildwars']) protect_page();
if ($config['log_ip']) znote_visitor_insert_detailed_data(3);
if ($config['guildwar_enabled'] === false) {
header('Location: guilds.php');
exit();
}
include 'layout/overall/header.php';
if (!empty($_GET['warid'])) {
$warid = (int)$_GET['warid']; // Sanitizing GET.
if ($config['TFSVersion'] == 'TFS_02') $war = get_guild_war($warid);
if ($war != false) {
// Kills data for this specific war entry
if ($config['TFSVersion'] == 'TFS_02') $kills = get_war_kills($warid);
?>
<center><h1><font color="red"><?php echo $war['name1']; ?></font> - VERSUS - <font color="green"><?php echo $war['name2']; ?></font></h1></center>
<?php
if ($config['TFSVersion'] == 'TFS_02') {
?>
<table id="guildwarTable" class="table table-striped table-hover">
<tr class="yellow">
<th><center><?php echo $war['name1']; ?> Frags</center></th>
<th><center><?php echo $war['name2']; ?> Frags</center></th>
</tr>
<?php
foreach ($kills as $kill) {
echo '<td><center><b>'. $kill['killer'] .'</b></center></td>';
echo '<td><center><b>'. $kill['target'] .'</b></center></td>';
echo '</tr>';
}
?>
</table>
<?php
}
}
} else {
// Display current wars.
// Fetch list of wars
if ($config['TFSVersion'] == 'TFS_02') $wardata = get_guild_wars();
if ($wardata != false) {
// kills data
$killsdata = array(); // killsdata[guildid] => array(warid) => array info about the selected war entry
foreach ($wardata as $wars) {
if ($config['TFSVersion'] == 'TFS_02') $killsdata[$wars['id']] = get_war_kills($wars['id']);
}
?>
<img src="layout/images/line_body.gif" align="center" height="7" width="100%">
<img src="layout/images/titles/t_war.gif"/>
<img src="layout/images/line_body.gif" align="center" height="7" width="100%">
<table id="guildwarViewTable" class="table table-striped table-hover">
<tr class="yellow">
<th><center>Attacking Guild:</center></th>
<th><center>Defending Guild:</center></th>
<th><center>War Status:</center></th>
</tr>
<?php
foreach ($wardata as $wars) {
$url = url("guildwar.php?warid=". $wars['id']);
echo '<tr class="special" style="cursor: pointer;" onclick="javascript:window.location.href=\'' . $url . '\'">';
echo '<td><b><center><font color="red">'. $wars['name1'] .'</font></b></center></td>';
echo '<td><b><center><font color="green">'. $wars['name2'] .'</font></b></center></td>';
echo '<td><b><center>'. $config['war_status'][get_guild_war($warid)['status']] .'</b></center></td>';
echo '</tr>';
}
?>
</table>
<?php
} else {
echo '<img src="layout/images/line_body.gif" align="center" height="7" width="100%"><img src="layout/images/titles/t_war.gif"/><img src="layout/images/line_body.gif" align="center" height="7" width="100%"><br><b><h2>There have not been any pending wars on this server.</h2></b>';
}
}
// GET links sample:
// guildwar.php?warid=1
include 'layout/overall/footer.php'; ?>
Thanks bro another question i dont know if you have tested the guild war system but yesterday i test it with 10 frags but after that 10 kills the war doesnt end so i killed until 12 frags and nothing happend deleted the guild war in the db and still got the skulls of war ingame :O maybe it is a problem with my db?Yes, I've edited a bit the guildwar page some time ago from Znote, to work with my server, don't remember if I've edited some functions in database/users.php
But here's the code, feel free to test it
PHP:<?php require_once 'engine/init.php'; if ($config['require_login']['guildwars']) protect_page(); if ($config['log_ip']) znote_visitor_insert_detailed_data(3); if ($config['guildwar_enabled'] === false) { header('Location: guilds.php'); exit(); } include 'layout/overall/header.php'; if (!empty($_GET['warid'])) { $warid = (int)$_GET['warid']; // Sanitizing GET. if ($config['TFSVersion'] == 'TFS_02') $war = get_guild_war($warid); if ($war != false) { // Kills data for this specific war entry if ($config['TFSVersion'] == 'TFS_02') $kills = get_war_kills($warid); ?> <center><h1><font color="red"><?php echo $war['name1']; ?></font> - VERSUS - <font color="green"><?php echo $war['name2']; ?></font></h1></center> <?php if ($config['TFSVersion'] == 'TFS_02') { ?> <table id="guildwarTable" class="table table-striped table-hover"> <tr class="yellow"> <th><center><?php echo $war['name1']; ?> Frags</center></th> <th><center><?php echo $war['name2']; ?> Frags</center></th> </tr> <?php foreach ($kills as $kill) { echo '<td><center><b>'. $kill['killer'] .'</b></center></td>'; echo '<td><center><b>'. $kill['target'] .'</b></center></td>'; echo '</tr>'; } ?> </table> <?php } } } else { // Display current wars. // Fetch list of wars if ($config['TFSVersion'] == 'TFS_02') $wardata = get_guild_wars(); if ($wardata != false) { // kills data $killsdata = array(); // killsdata[guildid] => array(warid) => array info about the selected war entry foreach ($wardata as $wars) { if ($config['TFSVersion'] == 'TFS_02') $killsdata[$wars['id']] = get_war_kills($wars['id']); } ?> <img src="layout/images/line_body.gif" align="center" height="7" width="100%"> <img src="layout/images/titles/t_war.gif"/> <img src="layout/images/line_body.gif" align="center" height="7" width="100%"> <table id="guildwarViewTable" class="table table-striped table-hover"> <tr class="yellow"> <th><center>Attacking Guild:</center></th> <th><center>Defending Guild:</center></th> <th><center>War Status:</center></th> </tr> <?php foreach ($wardata as $wars) { $url = url("guildwar.php?warid=". $wars['id']); echo '<tr class="special" style="cursor: pointer;" onclick="javascript:window.location.href=\'' . $url . '\'">'; echo '<td><b><center><font color="red">'. $wars['name1'] .'</font></b></center></td>'; echo '<td><b><center><font color="green">'. $wars['name2'] .'</font></b></center></td>'; echo '<td><b><center>'. $config['war_status'][get_guild_war($warid)['status']] .'</b></center></td>'; echo '</tr>'; } ?> </table> <?php } else { echo '<img src="layout/images/line_body.gif" align="center" height="7" width="100%"><img src="layout/images/titles/t_war.gif"/><img src="layout/images/line_body.gif" align="center" height="7" width="100%"><br><b><h2>There have not been any pending wars on this server.</h2></b>'; } } // GET links sample: // guildwar.php?warid=1 include 'layout/overall/footer.php'; ?>
Add this to your config.lua, I forgot to commit that heheThanks bro another question i dont know if you have tested the guild war system but yesterday i test it with 10 frags but after that 10 kills the war doesnt end so i killed until 12 frags and nothing happend deleted the guild war in the db and still got the skulls of war ingame :O maybe it is a problem with my db?
-- Guild War Fee
-- The addition 'war charge' to start a guild war (default: 1000)
-- To disable set to 0
guild_war_fee = 1000
-- if this is set to false, guild wars end immediatelly when frag_limit is reached (it ends in-game)
-- (on cipsoft tibia the guild wars just end when server (re)starts - set this to true to emulate original tibia)
guild_wars_end_only_on_startup = false
After many tests i noticed that "invisible bug" wasn't fixed
true it inst fixed tried it right now and go the same problem as you
void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg)
Change your tile.cpp to:
[C++] ////////////////////////////////////////////////////////////////////// // OpenT - Pastebin.com
and
in Protocolgame.cpp change the function
to:Code:void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg)
[C++] void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg) - Pastebin.com
1>..\..\tile.cpp(274): error C2511: 'Item *Tile::getTopDownItem(void) const' : overloaded member function not found in 'Tile'
1> c:\users\administrator\desktop\tibiana\source\tile.h(137) : see declaration of 'Tile'
Ok fine take tile.h also ...Code:1>..\..\tile.cpp(274): error C2511: 'Item *Tile::getTopDownItem(void) const' : overloaded member function not found in 'Tile' 1> c:\users\administrator\desktop\tibiana\source\tile.h(137) : see declaration of 'Tile'
Ok fine take tile.h also ...
[C++] ////////////////////////////////////////////////////////////////////// // OpenT - Pastebin.com
1>..\..\tile.cpp(275): error C2065: 'cpmst' : undeclared identifier
1>..\..\tile.cpp(275): error C2146: syntax error : missing ')' before identifier 'TileItemVector'
1>..\..\tile.cpp(275): error C2065: 'items' : undeclared identifier
1>..\..\tile.cpp(275): error C2275: 'TileItemVector' : illegal use of this type as an expression
1> c:\users\administrator\desktop\tibiana\source\tile.h(88) : see declaration of 'TileItemVector'
1>..\..\tile.cpp(275): error C2059: syntax error : ')'
1>..\..\tile.cpp(275): error C2143: syntax error : missing ';' before '{'
1>..\..\tile.cpp(276): error C2065: 'items' : undeclared identifier
1>..\..\tile.cpp(276): error C2227: left of '->getDownItemCount' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>..\..\tile.cpp(277): error C2065: 'items' : undeclared identifier
1>..\..\tile.cpp(277): error C2227: left of '->getBeginDownItem' must point to class/struct/union/generic type
1> type is ''unknown-type''
Lul i was looking for that cpmst in tile.h didnt read well where was the error -.- xd by the way the problem of the invisibility continues that code you posted here didnt fix it :/line 275, change cpmst to const
lel
back to the drawingboard I guess :^)Lul i was looking for that cpmst in tile.h didnt read well where was the error -.- xd by the way the problem of the invisibility continues that code you posted here didnt fix it :/
Ye it works whenever you are invisible the problem is when you become out of the invisibility in the same tile where the player isSeems to work fine when teleporting in the same position and what not. So guessing Player:: toogleGmInvisible is a bit whack and not updating every data it should ) will have a look tomorrow, gn
Not only player invisible but monsters invisible bugging players too, thats the problem.Seems to work fine when teleporting in the same position and what not. So guessing Player:: toogleGmInvisible is a bit whack and not updating every data it should ) will have a look tomorrow, gn