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

Players in party recieve bonus exp

strutZ

Australian OT Member {AKA Beastn}
Joined
Nov 16, 2014
Messages
1,393
Solutions
7
Reaction score
552
As per the title.. How would i go about giving all the players bonus exp?
 
That can be easily added on events folder.

Code:
function Player:onGainExperience(source, exp, rawExp)
    if not source or source:isPlayer() then
        return exp
    end

    -- Apply experience stage multiplier
    exp = exp * Game.getExperienceStage(self:getLevel())

    -- Stamina modifier
    if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
        useStamina(self)

        local staminaMinutes = self:getStamina()
        if staminaMinutes > 2400 and self:isPremium() then
            exp = exp * 1.5
        elseif staminaMinutes <= 840 then
            exp = exp * 0.5
        end
    end

    -- Party Bonus
    if self:getParty() then
        exp = exp * 0.5
    end

    return exp
end
 
That can be easily added on events folder.

Code:
function Player:onGainExperience(source, exp, rawExp)
    if not source or source:isPlayer() then
        return exp
    end

    -- Apply experience stage multiplier
    exp = exp * Game.getExperienceStage(self:getLevel())

    -- Stamina modifier
    if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
        useStamina(self)

        local staminaMinutes = self:getStamina()
        if staminaMinutes > 2400 and self:isPremium() then
            exp = exp * 1.5
        elseif staminaMinutes <= 840 then
            exp = exp * 0.5
        end
    end

    -- Party Bonus
    if self:getParty() then
        exp = exp * 0.5
    end

    return exp
end

Hey Printer! Thanks for the reply though my brain wasnt working right when i posted this its all fixed now =) thanks!
 
I'm sorry about off topic. But how to edit this script to bonus exp depends of how many vocations are in party? For explain:
if in party is same vocation then exp=1+20%bonus
if in party is two diffrent vocations then exp=1+40%bonus
if in party are three vocations then exp=1+60%bonus
if in party are all vocations then exp=1+100%bonus?
 
Back
Top