Cod: Selectaţi tot
quest change_empire_item begin
state start begin
when login with pc.getqf("special_func") == 0 begin
if pc.get_empire() == 1 then
affect.add_collect(apply.GOLD_DOUBLE_BONUS,10,60*60*24*365*4)
affect.add_collect(apply.ITEM_DROP_BONUS,10,60*60*24*365*4)
affect.add_collect(apply.ATT_BONUS_TO_MONSTER,10,60*60*24*365*4)
pc.setqf("special_func", 1)
elseif pc.get_empire() == 2 then
affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*4)
affect.add_collect(apply.MAX_HP,1000,60*60*24*365*4)
affect.add_collect(apply.EXP_DOUBLE_BONUS,10,60*60*24*365*4)
pc.setqf("special_func", 2)
elseif pc.get_empire() == 3 then
affect.add_collect(apply.STR,10,60*60*24*365*4)
affect.add_collect(apply.CON,10,60*60*24*365*4)
affect.add_collect(apply.INT,10,60*60*24*365*4)
affect.add_collect(apply.DEX,10,60*60*24*365*4)
affect.add_collect(apply.GOLD_DOUBLE_BONUS,10,60*60*24*365*4)
pc.setqf("special_func", 3)
end
end
when 71054.use begin
say_title("Tinctura Regatului")
say("Cu această tinctură poţi să")
say("îţi schimbi regatul cu unul nou")
say("pe care tu îl doreşti.")
say("")
if get_time() < pc.getqf("next_use_time") then
say_reward("Nu puteţi schimba regatul.")
if pc.is_gm() then
pc.setqf("next_use_time", 0)
end
return
end
if change_empire_item.move_pc() == true then
if pc.getqf("special_func")==1 then
affect.remove_collect(apply.GOLD_DOUBLE_BONUS,10)
affect.remove_collect(apply.ITEM_DROP_BONUS,10)
affect.remove_collect(apply.ATT_BONUS_TO_MONSTER,10)
elseif pc.getqf("special_func")==2 then
affect.remove_collect(apply.ATT_GRADE_BONUS)
affect.remove_collect(apply.MAX_HP,1000)
affect.remove_collect(apply.EXP_DOUBLE_BONUS,10)
elseif pc.getqf("special_func")==3 then
affect.remove_collect(apply.STR,10)
affect.remove_collect(apply.CON,10)
affect.remove_collect(apply.INT,10)
affect.remove_collect(apply.DEX,10)
affect.remove_collect(apply.GOLD_DOUBLE_BONUS,10)
end
pc.setqf("special_func", 0)
pc.setqf("next_use_time", get_time() + time_hour_to_sec(24*7))
end
end
function move_pc()
if pc.is_engaged() then
say_reward("Eşti căsătorit/ă.")
say_reward("Nu poţi schimba regatul.")
return false
end
if pc.is_married() then
say_reward("Eşti căsătorit/ă.")
say_reward("Nu poţi schimba regatul.")
return false
end
if pc.is_polymorphed() then
say_reward("Eşti transformat.")
say_reward("Nu poţi schimba regatul.")
return false
end
if pc.has_guild() then
say_reward("Eşti într-o breaslă.")
say_reward("Nu poţi schimba regatul.")
return false
end
if pc.money < 500000 then
say_reward("Nu ai suficient Yang.")
say_reward("Pentru a schimba regatul ai nevoie de 500.000 Yang.")
return false
end
say_reward("In ce regat vrei sa te muti?")
local s = select("Regatul Roşu", "Regatul Galben", "Regatul Albastru", "Nu mai vreau")
if 4==s then
return false
end
say_title("Tinctura Regatelor")
say("Vrei să părăseşti acest regat?")
say("Pentru trădare nu există scuze!")
local a = select("Schimb Regatul", "Nu mai vreau")
if 2== a then
return false
end
local ret = pc.change_empire(s)
local oldempire = pc.get_empire()
if ret == 999 then
say_title("Tinctura Regatelor")
say("Ai schimbat regatul cu succes.")
say("Dacă vei dori să schimbi din nou regatul")
say("va trebui să aştepţi o săptămână.")
say("Vă rugăm relogaţi-vă.")
pc.change_gold(-500000)
pc.remove_item(71054)
return true
elseif ret == 1 then
say("Eşti deja în acest regat.")
say("Te rog să selectezi alt regat.")
elseif ret == 2 then
say("Încă nu poţi schimba regatul.")
say("Nu poţi schimba regatul,")
say("deoarece ai fost într-o breslă recent.")
elseif ret == 3 then
say("Nu poţi schimba regatul.")
say("Nu poţi schimba regatul,")
say("deoarece ai fost casatorit recent.")
end
return false
end
end
endCam asa ceva
Multumesc anticipat !


