Cod: Selectaţi tot
[spoiler]quest national_war begin
state start begin
--NPC--
when 11001.chat."National War" or 11003.chat."National War" or 11005.chat."National War" begin
local akroma_war =
{
{9466 , 250},
{9466 , 250},
{9466 , 250}
}
if game.get_event_flag("nation_war")== 0 then
say("National War este inchis in acest moment")
say("Vei fi anuntat cand va porni!")
elseif game.get_event_flag("nation_war")== 1 then
say("National War este deschis, vrei sa participi?")
local nation_war = select("Da","Nu")
if nation_war == 1 then
if pc.get_level() < 65 then
say("Ai nivel "..pc.get_level()..", trebuie sa ai minim 65!")
elseif pc.get_empire()== 1 then
pc.warp(akroma_war[1])
elseif pc.get_empire()== 2 then
pc.warp(akroma_war[2])
elseif pc.get_empire()== 3 then
pc.warp(akroma_war[3])
end
end
elseif nation_war == 2 then
return
end
end
--GM--
when 9004.chat."National War" with pc.is_gm() begin
if game.get_event_flag("nation_war")== 0 then
say("National War este inchis vrei sa-l deschizi "..pc.get_name().." ")
local open_nation = select("Da","Nu")
if open_nation == 1 then
game.set_event_flag("nation_war", 1)
game.set_event_flag("jinno", 0)
game.set_event_flag("shinsoo", 0)
game.set_event_flag("chunjo", 0)
elseif open_nation == 2 then
return
end
elseif game.get_event_flag("nation_war")== 1 then
say("National War deschis, vrei sa-l inchizi? "..pc.get_name().." ")
local close_nation = select("Da",Nu")
if close_nation == 1 then
game.set_event_flag("nation_war", 0)
game.set_event_flag("jinno", 0)
game.set_event_flag("shinsoo", 0)
game.set_event_flag("chunjo", 0)
elseif close_nation == 2 then
return
end
end
end
--Scor kills--
when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() begin
if game.get_event_flag("nation_war") == 1 and pc.get_map_index()== 114 then
if pc.get_empire() == 1 then
game.set_event_flag("jinno", game.get_event_flag("jinno")+1)
elseif pc.get_empire()== 2 then
game.set_event_flag("shinsoo", game.get_event_flag("shinsoo")+1)
elseif pc.get_empire()== 3 then
game.set_event_flag("chunjo", game.get_event_flag("chunjo")+1)
end
elseif game.get_event_flag("nation_war") == 2 then
syschat("Razboiul nu e activat.")
warp_to_village()
end
end
end
end[/spoiler]
