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

I'm pretty sure that it is NOT the same error, you need two different dlls:

msvcp100d.dll
msvcr100d.dll
 
There is a function 'setsharedexperience' on party.h, how do I proper implement it at functions.lua so I can make a talkaction using it?
 
I had it up to the 2012 package, tried uninstalling it and all other installs down to 2008 and then reinstalled 2010, still doesn't work
 
There is a function 'setsharedexperience' on party.h, how do I proper implement it at functions.lua so I can make a talkaction using it?

IIRC there are currently no LUA-registered function to enable it. Make an account on Github and make a pull-request and see if Ezzz accepts it.
Or you can post the parameters of the function that enables it, is it in player.cpp or game.cpp? (can't remember) and make a general request thread here on otland and see if someone can make a LUA-function of it.
 
... post the function that enables it* <Can't edit my posts in this thread>
 
Error with record.lua with this:
Code:
if getGlobalStorageValue(PlayersRecordStorage) == nil then
the console tell me the "nil value" not work.
 
function setPartySharedExp(cid, value)
if isPlayer(cid) == getPlayerPartyLeader(cid) then
setPartySharedExp(cid, true)
end
end

I tried everything, lua is not my think, can u help
 
The Exp Shared System code is all there, to make it work, you just need to add 3 lua functions

Example:

getPlayerPartyLeader(cid)
isExpShareActivated(cid)
setPartySharedExp(cid, value)
Maybe you can pull a request on github or share here your functions.
 
function setPartySharedExp(cid, value)
if isPlayer(cid) == getPlayerPartyLeader(cid) then
setPartySharedExp(cid, true)
end
end

I tried everything, lua is not my think, can u help

There is no LUA function that enables it. I wrote this in my previous post.
 
There is this code in party.cpp
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;
}
 
updateAllPartyIcons();

/\ should not be there since there are no shared icons in 7.72
 
Here's an example of the Shared Exp TalkAction, now it's with you guys !!!
Code:
local cfg = {
 inFightBlock = true,
 onlyLeader = true,
}

function onSay(cid, words, param)
 local members = getPartyMembers(cid)
 if not members then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not in a party.")
  return false
 end

 if cfg.onlyLeader and not isPartyLeader(cid) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Only party leader can enable or disable shared experience.")
  return false
 end

 if cfg.inFightBlock and hasCondition(cid, CONDITION_INFIGHT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to be out of fight.")
  return false
 end

 local boolean = not isPartySharedExperienceActive(cid)
 if setPartySharedExperience(cid, boolean) then
  for _, pid in ipairs(members) do
   if not isPartyLeader(pid) then
    doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Shared Experience has been "..(boolean and "activated" or "deactivated")..".")
   end
  end
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "There was an error. Try again in few seconds.")
 end

 return false
end
 
Here's an example of the Shared Exp TalkAction, now it's with you guys !!!
Code:
local cfg = {
inFightBlock = true,
onlyLeader = true,
}

function onSay(cid, words, param)
local members = getPartyMembers(cid)
if not members then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not in a party.")
  return false
end

if cfg.onlyLeader and not isPartyLeader(cid) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Only party leader can enable or disable shared experience.")
  return false
end

if cfg.inFightBlock and hasCondition(cid, CONDITION_INFIGHT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to be out of fight.")
  return false
end

local boolean = not isPartySharedExperienceActive(cid)
if setPartySharedExperience(cid, boolean) then
  for _, pid in ipairs(members) do
   if not isPartyLeader(pid) then
    doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Shared Experience has been "..(boolean and "activated" or "deactivated")..".")
   end
  end
else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "There was an error. Try again in few seconds.")
end

return false
end

It still need to me implemented at functions.lua ... do you have it?
 
Back
Top