quest guild_manage begin
state start begin
when 11000.chat."Paraseste Bresla" or 11002.chat."Paraseste Bresla" or 11004.chat."Paraseste Bresla" with pc.hasguild() and not pc.isguildmaster() and npc.get_empire() == pc.get_empire() begin
say_title("Gardianul Satului")
say("Chiar vrei sa parasesti aceasta")
say("bresla? Sunt sigur ca membrii")
say("vor fi foarte dezamagiti de tine..")
local s = select("Da", "Nu")
if s==1 then
say_title("Gardianul Satului")
say("Nu mai sunteti in bresla!")
pc.remove_from_guild()
pc.setqf("new_withdraw_time",get_global_time())
end
end
when 11000.chat."Sparge Bresla" or 11002.chat."Sparge Bresla" or 11004.chat."Sparge Bresla" with pc.hasguild() and pc.isguildmaster() and npc.get_empire() == pc.get_empire() begin
say_title("Gardianul Satului")
say("Chiar doresti sa iti spargi bresla?")
say("Sunt sigur ca membri din ea")
say("vor fi foarte dezamagiti..")
local s = select("Da", "Nu")
if s==1 then
say_title("Gardianul Satului")
say("Ati spart Bresla cu succes!")
pc.destroy_guild()
pc.setqf("new_disband_time",get_global_time())
pc.setqf("new_withdraw_time",get_global_time())
end
end
when 11000.chat."Creaza Bresla" or 11002.chat."Creaza Bresla" or 11004.chat."Creaza Bresla" with not pc.hasguild() and not pc.isguildmaster() and npc.get_empire() == pc.get_empire() begin
if game.get_event_flag("guild_withdraw_delay")*86400 >
get_global_time() - pc.getqf("new_withdraw_time") or
game.get_event_flag("guild_disband_delay")*86400 >
get_global_time() - pc.getqf("new_disband_time") then
say_title("Gardianul Satului")
say("Nu poti face acum alta Bresla!")
say("Te rog sa astepti un timp!")
return
end
say_title("Gardianul Satului")
say("Pentru a crea o noua bresla")
say("iti trebuie:")
say("-Level 40")
say("-500.000 Yang")
say("Vrei sa creezi o bresla?")
local s = select("Da", "Nu")
if s == 2 then
return
elseif pc.get_level()<40 then
say_title("Gardianul Satului")
say("Inca nu ai atins nivelul 40.")
return
elseif pc.get_gold()<500000 then
say_title("Gardianul Satului")
say("Nu ai 500.000 Yang.")
return
end
game.request_make_guild()
end
end
end