Poftim rezolvarea:
quest gmmode_protection begin
state start begin
when 20095.chat."Protectia GM-MODE" with pc.is_gm() begin
say_title(mob_name(20095)..":")
if game.get_event_flag("gmmode_protection") == 0 then
say_title("JustIrinel")
say("Doriti sa activati Protectia GM-MODE?[ENTER]")
local s = select(locale.yes, locale.no)
if s == 1 then
say_title("JustIrinel")
say("Protectia GM-MODE Activata.[ENTER]")
game.set_event_flag("gmmode_protection", 1)
server_timer("gmmode_protection", 5, get_server_timer_arg())
end
elseif game.get_event_flag("gmmode_protection") == 1 then
say_title("JustIrinel")
say("Doriti sa dezactivati protectia GM-MODE?[ENTER]")
local s = select(locale.yes, locale.no)
if s == 1 then
say_title("JustIrinel")
say("Protectia GM MODE a fost dezactivata.[ENTER]")
game.set_event_flag("gmmode_protection", 0)
end
end
end
when gmmode_protection.server_timer begin
clear_server_timer("gmmode_protection", get_server_timer_arg())
if game.get_event_flag("gmmode_protection") == 1 then
if game.get_event_flag("test") == 1 then
game.set_event_flag("test", 0)
end
server_timer("gmmode_protection", 5, get_server_timer_arg())
end
end
end
end
questurile care sunt facute pentru gm ar trebuii sa aiba forma asta la inceput:
when letter with pc.is_gm() begin



