• 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.1b - Based in OTServ Trunk (Latest)

For Shared Exp
https://github.com/mattyx14/RlMap77x/blob/master/sources/party.cpp#L331

Code:
bool Party::canUseSharedExperience(const Player* player, uint32_t highestLevel/* = 0*/) const
bool Party::canEnableSharedExperience()

and now check the req

1-Your Level < Highest Player level in Party * Config_PartyDifference
2-You and Leader are both in x,y,z range
3-Time since last Activity < config_EXPERIENCE_SHARE_ACTIVITY(Setting it to 99999 wont work)
 
Hi. I've got a problem. When i start this OT sever my friends from the internet cant login. The character list will load but when they try to login timeout will pop up. I can login just fine. Idk where is the problem, i check config multiple times and i even try to compile a new exe.

Thx for reply :)
 
Hi. I've got a problem. When i start this OT sever my friends from the internet cant login. The character list will load but when they try to login timeout will pop up. I can login just fine. Idk where is the problem, i check config multiple times and i even try to compile a new exe.

Thx for reply :)

You have to open 7171-7172 ports for TCP and UDP in your router, other than that, fix your config.lua IP-Address to your Global IP-Address and it will run for your friends aswell, there is no way this distribution is "broken".
 
You have to open 7171-7172 ports for TCP and UDP in your router, other than that, fix your config.lua IP-Address to your Global IP-Address and it will run for your friends aswell, there is no way this distribution is "broken".

My ports 7171-7172 are opened for TCP and UDP in my router. If i change the ip in config to my global IP the server wont be even accessible for character list.

up8m.png
 
Okey problem was the bind_only_global_address = true. When i set this to false everything is working now. Thx anyway
 
For Shared Exp
https://github.com/mattyx14/RlMap77x/blob/master/sources/party.cpp#L331

Code:
bool Party::canUseSharedExperience(const Player* player, uint32_t highestLevel/* = 0*/) const
bool Party::canEnableSharedExperience()

and now check the req

1-Your Level < Highest Player level in Party * Config_PartyDifference
2-You and Leader are both in x,y,z range
3-Time since last Activity < config_EXPERIENCE_SHARE_ACTIVITY(Setting it to 99999 wont work)

Hey tetra20, thanks for helping. But I'm still having some problems. I swapped these two:
Code:
bool Party::canUseSharedExperience(const Player* player, uint32_t highestLevel/* = 0*/) const
bool Party::canEnableSharedExperience()
from ot hire's to rlmap77x code.

So I added to configmanager.cpp:
Code:
  m_confNumber[PARTY_RADIUS_X] = getGlobalNumber(L, "experienceShareRadiusX", 30);
   m_confNumber[PARTY_RADIUS_Y] = getGlobalNumber(L, "experienceShareRadiusY", 30);
   m_confNumber[PARTY_RADIUS_Z] = getGlobalNumber(L, "experienceShareRadiusZ", 1);
   m_confDouble[PARTY_DIFFERENCE] = getGlobalDouble(L, "experienceShareLevelDifference", (double)2 / 3);
   m_confNumber[EXPERIENCE_SHARE_ACTIVITY] = getGlobalNumber(L, "experienceShareActivity", 120000);

Needed to change something in position.h too, but I think I am getting a problem in configmanager.h, as I'm not a programmer it's getting hard for me...
in configmanager.h I added:
Code:
enum number_config_t {
     EXPERIENCE_SHARE_ACTIVITY,
     PARTY_RADIUS_X,
     PARTY_RADIUS_Y,
     PARTY_RADIUS_Z,
     LAST_NUMBER_CONFIG /* this must be the last one */     
   };
   
   enum double_config_t {
     PARTY_DIFFERENCE,
     LAST_DOUBLE_CONFIG /* this must be the last one */
   };
and:
Code:
double getGlobalDouble(lua_State* _L, const std::string& _identifier, double _default=0);
...
int64_t m_confNumber[LAST_NUMBER_CONFIG];
 double m_confDouble[LAST_DOUBLE_CONFIG];

When I try to build I get:
Code:
1>configmanager.obj : error LNK2001: unresolved external symbol "private: double __thiscall ConfigManager::getGlobalDouble(struct lua_State *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,double)" (?getGlobalDouble@ConfigManager@@AAENPAUlua_State@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@N@Z)
1>party.obj : error LNK2001: unresolved external symbol "public: double __thiscall ConfigManager::getDouble(unsigned int)const " (?getDouble@ConfigManager@@QBENI@Z)
1>C:\Projects\server\Release\server.exe : fatal error LNK1120: 2 unresolved externals

Am I doing anything wrong? Is it all simples than what I'm trying to do? I can describe what I did more specifically if needed. Thanks again!
 
Change
Code:
m_confNumber[PARTY_RADIUS_X] = getGlobalNumber(L, "experienceShareRadiusX", 30);
m_confNumber[PARTY_RADIUS_Y] = getGlobalNumber(L, "experienceShareRadiusY", 30);
m_confNumber[PARTY_RADIUS_Z] = getGlobalNumber(L, "experienceShareRadiusZ", 1);
m_confDouble[PARTY_DIFFERENCE] = getGlobalDouble(L, "experienceShareLevelDifference", (double)2 / 3);
m_confNumber[EXPERIENCE_SHARE_ACTIVITY] = getGlobalNumber(L, "experienceShareActivity", 120000);
;
To
Code:
m_confInteger[PARTY_RADIUS_X] = getGlobalNumber(L, "experienceShareRadiusX", 30);
m_confInteger[PARTY_RADIUS_Y] = getGlobalNumber(L, "experienceShareRadiusY", 30);
m_confInteger[PARTY_RADIUS_Z] = getGlobalNumber(L, "experienceShareRadiusZ", 1);
m_confDouble[PARTY_DIFFERENCE] = getGlobalDouble(L, "experienceShareLevelDifference", (double)2 / 3);
m_confInteger[EXPERIENCE_SHARE_ACTIVITY] = getGlobalNumber(L, "experienceShareActivity", 120000);

Add those
Code:
EXPERIENCE_SHARE_ACTIVITY,
PARTY_RADIUS_X,
PARTY_RADIUS_Y,
PARTY_RADIUS_Z,

Under this
Code:
RETRY_TIMEOUT,

Remove this function
Code:
double getGlobalDouble(lua_State* _L, const std::string& _identifier, double _default=0);

Because this exist
Code:
double ConfigManager::getGlobalFloat(lua_State* _L, const std::string& _identifier, double _default)

if you insist on keeping it, then you forgot to add it in configmanager.h
Code:
double getGlobalDouble(lua_State* _L, const std::string& _identifier, double _default=0);
like this
 
@tetra20 or @KreXt can you resume in a post all the changes needed to get shared experience to work?

At least all of the changes that are tested and working.

It will be very useful for all OTHire users.
 
Hello. I have a question. I want to add a feature so that if GM clicks on the ground he can see both id of item and position. How can i achieve that ?
 
@tetra20 Thanks for the fast reply! By the first try, I did everything you said and made a backup, but it still couldn't buid showing the following error:
Code:
1>configmanager.cpp(145): error C3861: 'getGlobalDouble': identifier not found

I think it had something to do with this line in confimanager.cpp:
Code:
m_confDouble[PARTY_DIFFERENCE] = getGlobalDouble(L, "experienceShareLevelDifference", (double)2 / 3);
Or this one in party.cpp:
Code:
if(player->getLevel() < (uint32_t)std::ceil((double)highestLevel * g_config.getNumber(

So I did several tests, all of them got me erros. Then I got back to where I did the backup, I maintained these 2 lines in configmanager.h:
Code:
 double getDouble(uint32_t _what) const;
..
  double getGlobalDouble(lua_State* _L, const std::string& _identifier, double _default=0);

and I did include these 2 in configmanager.cpp:
Code:
double ConfigManager::getDouble(uint32_t _what) const
{
   if(m_isLoaded && _what < LAST_DOUBLE_CONFIG)
     return m_confInteger[_what];
   else
   {
     std::cout << "Warning: [ConfigManager::getDouble] " << _what << std::endl;
     return 0;
   }
}

..

double ConfigManager::getGlobalDouble(lua_State* _L, const std::string& _identifier, double _default)
{
   lua_getglobal(_L, _identifier.c_str());

   if(!lua_isnumber(_L, -1)){
     lua_pop(_L, 1);
     return _default;
   }

   double val = lua_tonumber(_L, -1);
   lua_pop(_L,1);

   return val;
}

And after doing it, visual studio could build it without an error. So I put this in config.lua:
Code:
 -- Party System
   experienceShareRadiusX = 30
   experienceShareRadiusY = 30
   experienceShareRadiusZ = 1
   experienceShareLevelDifference = 2 / 3
   --extraPartyExperienceLimit = 20
   --extraPartyExperiencePercent = 5
   experienceShareActivity = 2 * 60 * 1000

But it still doesn't work ingame. I always receive "Shared Experience has been activated, but some members of your party are inactive.". Characters are at the same level, side by side, out of battle (I killed some monsters in party, wait till they leave battle and tried to use share talkaction). What did I do wrong this time :confused:? Thanks anyway!
 
Sorry, can't edit, in party.cpp it should be:
Code:
  if(player->getLevel() < (uint32_t)std::ceil((double)highestLevel * g_config.getDouble(
instead of what I posted before.
 
What exact flag needs to be added to see items id and positions ? Because when im using Elime's flag calculator and ill check all flags except cannot move items and cannot pick items im able to see item's id and position but i cant move any items or drop them from backpack. Those flags in Elime's flag arent 100% compatibile with OTHire
 
i need someone who is able to compile and start othire server, i am done with exp sharing, i just need someone to test before it is released.
 
Hello, when i compile 0.0.2 version spam mute not working (no errors in console), i dont touch anything about messagebuffer etc. in oryginal otserv.exe all works well.
(You are muted for... that staff)
can someone check after compile if spam mute works?

Works fine here.

omg how!? I use EXACLY step by step this tutorial
https://github.com/TwistedScorpio/OTHire/wiki/Compiling-under-Windows-(Visual-Studio-2010-2013)
and not touched even single source file! (all is 100% oryginal)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
And spam mute system not working...
(only this function)
can someone help me ? :(
Any ideas?

@LuisPro - Don't worry, you aren't the only one. I have the same problem on my distro/build.

Hello guys, I'm here now ...

First of all, are you testing with ur GOD/GM/CM Account or Normal Account ?

WATAFAK!!!
FIXED BITCHES!!!


Mute system was not working becouse i change in config.lua "kills_to_ban = 20" to "kills_to_ban = 99999999" as a feature of war server... SICK!
I set back kills_to_ban to 20 and removed ban code from source, and mute system is WORKING!

MANY THANKS to @Shyzoul who help me!! I love you! :D
 
Back
Top