Pagina 1 din 1

🟨 QUEST: Cooldown la deschis cufere (anti-spam 2 sec)

Scris: Dum Feb 01, 2026 10:36 am
de ProFight3D

Cod: SelectaĊ£i tot

quest chest_cooldown begin
	state start begin
		function cfg()
			local c = {}
			c.SEC = 2
			c.CHESTS = {80017, 80018, 80019} -- schimba vnum-urile
			return c
		end

		when 80017.use or 80018.use or 80019.use begin
			local last = pc.getqf("cc_last")
			if get_time() - last < chest_cooldown.cfg().SEC then
				syschat("[Info] Asteapta "..(chest_cooldown.cfg().SEC - (get_time() - last)).." sec.")
				return
			end
			pc.setqf("cc_last", get_time())
		end
	end
end