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