🔥 QUEST: Anti-Logout în duel (nu te lasă să ieși rapid) (basic, util PvP)
Scris: Dum Feb 01, 2026 10:31 am
Cod: Selectaţi tot
quest anti_logout_duel begin
state start begin
function cfg()
local c = {}
c.TAG = "[Duel]"
c.SEC = 60 -- blocaj 60 sec dupa ce ataci/esti atacat
return c
end
-- cand lovesti sau esti lovit
when kill begin
-- optional: nu folosim aici
end
-- varianta simpla: la orice hit PvP salvezi timpul (unele baze au when attack)
when attack begin
if pc.is_player() then
pc.setqf("pvp_last", get_time())
end
end
when logout begin
local c = anti_logout_duel.cfg()
local last = pc.getqf("pvp_last")
if last > 0 and (get_time() - last) < c.SEC then
syschat("|cff56ff00|H|h"..c.TAG.."|h|r : Nu poti iesi acum! Asteapta "..(c.SEC - (get_time() - last)).." sec.")
return
end
end
end
end