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

reconfig party exp / config dead drop players.

thefrancis

New Member
Joined
Apr 16, 2010
Messages
22
Reaction score
1
Hello, I wonder if it is possible to configure that the player, who do not have Redskull or Black Skull. They don't ask for their things. The idea is that the blessings serve only to protect the Skill and Exp. And the other thing is that I would like to know how I can increase the exp of the party that of 100% of XP having 2 or 3 players.

Lua:
function Party:onJoin(player)
    return true
end

function Party:onLeave(player)
    return true
end

function Party:onDisband()
    return true
end

function Party:onShareExperience(exp)
    local sharedExperienceMultiplier = 1.20 --20%
    local vocationsIds = {}

    local vocationId = self:getLeader():getVocation():getBase():getId()
    if vocationId ~= VOCATION_NONE then
        table.insert(vocationsIds, vocationId)
    end

    for _, member in ipairs(self:getMembers()) do
        vocationId = member:getVocation():getBase():getId()
        if not table.contains(vocationsIds, vocationId) and vocationId ~= VOCATION_NONE then
            table.insert(vocationsIds, vocationId)
        end
    end

    local size = #vocationsIds
    if size > 1 then
        sharedExperienceMultiplier = 1.0 + ((size * (5 * (size - 1) + 10)) / 100)
    end

    return (exp * sharedExperienceMultiplier) / (#self:getMembers() + 1)
end
 
For loot drop, you need to remove this part here.
Lua:
or math.random(item:isContainer() and 100 or 1000) <= lossPercent
For party experience you need to add this to onGainExperience here.
Lua:
local membersList = getPartyMembers(self:getId())
if (membersList == nil or type(membersList) ~= "table" or #membersList <= 1) then
    exp = exp
elseif (#membersList > 1) then
    exp = exp * (#membersList * 1.0)
    return exp
end
Party might need source edit not sure if events one will work tho.
 
For loot drop, you need to remove this part here.
Lua:
or math.random(item:isContainer() and 100 or 1000) <= lossPercent
For party experience you need to add this to onGainExperience here.
Lua:
local membersList = getPartyMembers(self:getId())
if (membersList == nil or type(membersList) ~= "table" or #membersList <= 1) then
    exp = exp
elseif (#membersList > 1) then
    exp = exp * (#membersList * 1.0)
    return exp
end
Party might need source edit not sure if events one will work tho.
thanks, i check and msg u
 
Back
Top