Cod: Selectaţi tot
quest pvp_toggle_npc begin
state start begin
function cfg()
local c = {}
c.NPC_VNUM = 20084
c.TAG = "[PvP]"
c.TIME = 60 * 60 * 24 -- 24h
c.ATK = 10
c.MOV = 10
return c
end
when cfg().NPC_VNUM.chat."PvP Mode (ON/OFF)" begin
local c = pvp_toggle_npc.cfg()
if pc.getqf("pvp_on") != 1 then
pc.setqf("pvp_on", 1)
affect.add(apply.ATT_GRADE_BONUS, c.ATK, c.TIME)
affect.add(apply.MOV_SPEED, c.MOV, c.TIME)
say("PvP Mode: ACTIVAT")
syschat("|cff56ff00|H|h"..c.TAG.."|h|r : PvP Mode ACTIVAT.")
else
pc.setqf("pvp_on", 0)
affect.remove("pvp_toggle_npc")
-- fallback daca remove nu merge pe unele base:
affect.add(apply.ATT_GRADE_BONUS, 0, 1)
say("PvP Mode: DEZACTIVAT")
syschat("|cff56ff00|H|h"..c.TAG.."|h|r : PvP Mode DEZACTIVAT.")
end
end
end
end
