Pagina 1 din 1

🟠 QUEST: „Protecție la moarte” (revive + buff) — 1 dată la 30 min

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

Cod: Selectaţi tot

quest death_protection begin
	state start begin
		function cfg()
			local c = {}
			c.COOLDOWN = 30 * 60
			c.TAG = "[Protectie]"
			c.TIME = 60 * 10
			c.HP = 200
			return c
		end

		when die begin
			local c = death_protection.cfg()
			local last = pc.getqf("dp_last")

			if get_time() - last < c.COOLDOWN then
				return
			end

			pc.setqf("dp_last", get_time())

			-- la revive, ii dam buff mic
			timer("dp_buff", 1)
		end

		when dp_buff.timer begin
			local c = death_protection.cfg()
			affect.add(apply.MAX_HP, c.HP, c.TIME)
			syschat("|cff56ff00|H|h"..c.TAG.."|h|r : Ai primit protectie dupa moarte (10 min).")
		end
	end
end