Files
Leviathan/GameServer/AziaMafiaScriptsBackup/Other/etc_check_worldbuffs.lua
T
2026-06-01 12:46:52 +02:00

20 lines
547 B
Lua

function get_module_name()
return "etc_check_worldbuffs"
end
function check_worldbuffs()
local pBuffs ={9947,9948}
local login_time = get_os_time()
local max_duration = 180000
for i, v in ipairs(pBuffs) do
local started_time = tonumber(get_global_variable("state."..v..".last_cast_time"))
local in_progress = (login_time - started_time)*100
local rest_time = max_duration - in_progress
if (login_time * 100) < ( ( started_time * 100) + max_duration ) then
add_state(v,1, rest_time)
add_cstate(v,1, rest_time)
end
end
end