• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua [Help]Is it possible to make lua talkaction for exp share

moekl

Member
Joined
Aug 25, 2014
Messages
128
Reaction score
19
Location
Sweden
Is it possible to make lua talkaction for exp share? and what code is that.

can this code work ?

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;
}

And i get
/talkactions/scripts/expshare.lua
data/talkactions/scripts/expshare.lua:1: '=' expected near 'party'
 
Back
Top