Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
9 years ago
Diff never expires
Clear
Export
Share
Explain
0 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
29 lines
Copy
9 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
35 lines
Copy
function Player:onGainExperience(source, exp, rawExp)
function Player:onGainExperience(source, exp, rawExp)
if not source or source:isPlayer() then
if not source or source:isPlayer() then
return exp
return exp
end
end
-- Soul regeneration
-- Soul regeneration
local vocation = self:getVocation()
local vocation = self:getVocation()
if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
self:addCondition(soulCondition)
self:addCondition(soulCondition)
end
end
-- Apply experience stage multiplier
-- Apply experience stage multiplier
Copy
Copied
Copy
Copied
exp = exp *
Game.getExperienceStage(self:getLevel())
-- custom edit: half exp after some passive damage bonus
if(self:getLevel() < configManager.getNumber(configKeys.MAX_LEVEL)) then
exp = exp * (Game.getExperienceStage(self:getLevel()))
else
exp = exp *
(
Game.getExperienceStage(self:getLevel())
/ (self:getPassiveDamageBonus()+1))
end
-- Stamina modifier
-- Stamina modifier
if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
useStamina(self)
useStamina(self)
local staminaMinutes = self:getStamina()
local staminaMinutes = self:getStamina()
if staminaMinutes > 2400 and self:isPremium() then
if staminaMinutes > 2400 and self:isPremium() then
exp = exp * 1.5
exp = exp * 1.5
elseif staminaMinutes <= 840 then
elseif staminaMinutes <= 840 then
exp = exp * 0.5
exp = exp * 0.5
end
end
end
end
return exp
return exp
end
end
Saved diffs
Original text
Open file
function Player:onGainExperience(source, exp, rawExp) if not source or source:isPlayer() then return exp end -- Soul regeneration local vocation = self:getVocation() if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000) self:addCondition(soulCondition) 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 return exp end
Changed text
Open file
function Player:onGainExperience(source, exp, rawExp) if not source or source:isPlayer() then return exp end -- Soul regeneration local vocation = self:getVocation() if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000) self:addCondition(soulCondition) end -- Apply experience stage multiplier -- custom edit: half exp after some passive damage bonus if(self:getLevel() < configManager.getNumber(configKeys.MAX_LEVEL)) then exp = exp * (Game.getExperienceStage(self:getLevel())) else exp = exp * (Game.getExperienceStage(self:getLevel()) / (self:getPassiveDamageBonus()+1)) end -- 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 return exp end
Find difference