• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[7.72] OTHire 0.0.3

:O this should be related to lua won't be hard to fix i guess :/
 
do you have the guildwar page for znote? i mean the one that work with otserv
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'; ?>
 
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'; ?>
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?
 
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?
Add this to your config.lua, I forgot to commit that hehe

Lua:
-- 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
 
I am having a lot of trouble getting the server to work.

All I need is for it to run locally with only my machine connected. I cant get the SQL to work and this is such a jungle to me.

I was following this guide
but its a bit old and the UI is completely different but I think I can still get uniform server to work however, phpmyadmin does not work. I have tried like crazy to find a solution but I cant.

Is there any easier way? I basically just need to get a single account up with the most basic stuff possible, no website, no account creation tool, no internet access.

Here is an album with some screenshots.
I am very thankful for any help I can get here.

Imgur: The magic of the Internet
 
Alright I got the server running now but now it appears that the map I get is some kind of test town.

Is this not the real tibia map? I tried opening the map file in remeres map editor and could find the real map but when I try to teleport there as a GM it says I cant.

Also tried copying real tibia map from other servers but I keep getting error messages with incorrect item lists etc
 
After many tests i noticed that "invisible bug" wasn't fixed, i mean this one:
Invisible bug · Issue #78 · TwistedScorpio/OTHire

On this gif i tested clean othire source with clean tibia 7.72 client
x4fmB92.gif


Please test it on your server and give me answer.
I was testing it on gamemaster but it happens also with invisible creatures like Stalker or Warlock.
 
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

Change your tile.cpp to:
[C++] ////////////////////////////////////////////////////////////////////// // OpenT - Pastebin.com
and
in Protocolgame.cpp change the function
Code:
void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg)
to:
[C++] void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg) - Pastebin.com
 
Change your tile.cpp to:
[C++] ////////////////////////////////////////////////////////////////////// // OpenT - Pastebin.com
and
in Protocolgame.cpp change the function
Code:
void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg)
to:
[C++] void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage_ptr msg) - Pastebin.com
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'
 
Code:
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''
:O :(
 
Lul i was looking for that cpmst in tile.h didnt read well where was the error :p -.- xd by the way the problem of the invisibility continues that code you posted here didnt fix it :/
back to the drawingboard I guess :^)
 
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
 
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
Ye it works whenever you are invisible the problem is when you become out of the invisibility in the same tile where the player is
 
Yea it's somthing related to invisible, server doesn't know invisible createure stackpos, but on avesta it works fine.
 
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
Not only player invisible but monsters invisible bugging players too, thats the problem.
 
Back
Top