Pagina 1 din 1

🟨 QUEST: Limită folosire poțiune (anti-spam poțiuni) — 2 sec cooldown

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

Cod: Selectaţi tot

quest potion_cooldown begin
	state start begin
		function cfg()
			local c = {}
			c.SEC = 2
			c.POT = {27001, 27002, 27003, 27004, 27005} -- potiuni
			return c
		end

		when 27001.use or 27002.use or 27003.use or 27004.use or 27005.use begin
			local last = pc.getqf("pot_last")
			if get_time() - last < cfg().SEC then
				syschat("[Info] Asteapta "..(cfg().SEC - (get_time() - last)).." sec.")
				return
			end
			pc.setqf("pot_last", get_time())
		end
	end
end