• 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!

Party XP Shared System, and No need to put runes on Hand

Stellow

C++/C#/PHP/LUA
Joined
Oct 23, 2008
Messages
1,112
Reaction score
221
Location
Germany
GitHub
eubrunomiguel
I have this code on server's implementation files, how do I use it ingame? Does it need to be implemented somehow on functions.lua?
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;
}

I have the talkaction code to enable or disable it, but the I cant use the function setSharedExperience on my scripts.

Also, how would you do to allow players rune without putting runes on hand?

Sincerely,
Bruno.
 
Make exp sharing system in LUA, saves time.

And to make craft runes from blank runes in in bag, simply make while loop on cast what searches for blank rune in the bag. (while loop because then you can search trough bags in bags)
 
You probably have the experience share in your source but check if you have the lua function(luascript.cpp)
If so you can easily create a talkaction script to enable it.
 
I fixed conjure runes from backpack and released the code on programming area.
About Sharing Experience, I added the function to luascript and implemented thru talkaction.
Topic can be closed.
 
Back
Top