Passive xp stonks

This commit is contained in:
2025-03-30 03:46:06 +02:00
parent 2fb2e5fdf8
commit add02f0a8d

View File

@@ -699,3 +699,36 @@ Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptab
end end
end end
end, Hook.HookMethodType.After) end, Hook.HookMethodType.After)
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
local amountExperience = 600
local passiveExperienceDelay = 2
local passiveExperienceTimer = 0
Hook.Add("think", "examples.passiveExperience", function()
if Timer.GetTime() < passiveExperienceTimer then return end
for k, v in pairs(Character.CharacterList) do
if not v.IsDead and v.Info ~= nil then
v.Info.GiveExperience(amountExperience)
end
end
passiveExperienceTimer = Timer.GetTime() + passiveExperienceDelay
end)