Stellow
C++/C#/PHP/LUA
Hello, I am trying to make shared xp work on my oldschool server, but is being a pain to implement the function.
The server is compiled with the following function in party.cpp, how do I implement it in functions.lua, or in other words, make this function usable ingame?
Thanks in advance.
The server is compiled with the following function in party.cpp, how do I implement it in functions.lua, or in other words, make this function usable ingame?
Thanks in advance.
Code:
bool Party::setSharedExperience(Player* player, bool _sharedExpActive)
{
if(!player || getLeader() != player){
return false;
}
if(sharedExpActive == _sharedExpActive){
return true;
}
sharedExpActive = _sharedExpActive;
if(sharedExpActive){
sharedExpEnabled = canEnableSharedExperience();
if(sharedExpEnabled){
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience is now active.");
}
else{
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been activated," \
" but some members of your party are inactive.");
}
}
else{
getLeader()->sendTextMessage(MSG_INFO_DESCR, "Shared Experience has been deactivated.");
}
updateAllPartyIcons();
return true;
}