Updated skills

TLDR:
If you dont pass amount it will calculate xp gained based on your current level and a base amount
Also generating xp needed for levels instead of using a table. Still caching results
Also learned some very cool math symbols Σ and σ
This commit is contained in:
gononono64 committed 2025-06-22 21:11:25 -05:00
1 parent 9b44fcbc16
commit f50d93b027
4 files changed
+219 -80

No files matched your search

+6
View File
@@ -28,6 +28,12 @@ end
Skills.AddXp = function(src, skillName, amount)
local skillData = exports.pickle_xp:GetPlayerLevel(src, skillName)
if not skillData then return false, print("Skill not found") end
if not Skills.All[skillName] then
Skills.All[skillName] = Skills.Create(skillName, 99, 50)
end
if not amount or amount < 0 then
amount = Skill.GetScaledXP(Skills.All[skillName].baseXP, Skills.GetSkillLevel(src, skillName))
end
exports.pickle_xp:AddPlayerXP(src, skillName, amount)
return true
end