Passive xp stonks
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user