Cod: Selectaţi tot
quest new7and8th_skills begin
state start begin
when 50514.use begin
say_title(item_name(50514))
say("")
if pc.get_skill_group() == 0 then
say("Nu ai nici o competenta invatata!")
return
end
local check_learned = 0
local help_skill_list = {
{{236}, {240},},
{{237}, {241},},
{{238}, {242},},
{{239}, {243},},
{{244},},
}
local skill_list = help_skill_list[pc.get_job() + 1][pc.get_skill_group()]
for i = 1, table.getn(skill_list) do
skill_vnum = skill_list[i]
if pc.get_skill_level(skill_vnum) > 0 then
check_learned = 1
end
end
if check_learned == 1 then
say("Ai invatat deja un skill-ul Ajutorul Dragonului!")
return
end
help_skill_list_name = {
[236] = "Ajutor: Vârtejul Sabiei",
[237] = "Ajutor: Ambuscadã",
[238] = "Ajutor: Lovitura Degetului",
[239] = "Ajutor: Aruncarea Dragonului",
[240] = "Ajutor: Atacul Spiritului",
[241] = "Ajutor: Sageatã de Foc",
[242] = "Ajutor: Loviturã Întunecatã",
[243] = "Ajutor: Chemarea Fulgerului",
[244] = "Ajutor: Suflul Lupului"
}
local skill_vnum_list = {}
local skill_name_list = {}
for i = 1, table.getn(skill_list) do
skill_vnum = skill_list[i]
if pc.get_skill_level(skill_vnum) < 1 then
table.insert(skill_vnum_list, skill_vnum)
table.insert(skill_name_list, help_skill_list_name[skill_vnum])
end
end
if table.getn(skill_vnum_list) == 0 then
say("Nu ai nici un skill de ajutor.")
return
end
table.insert(skill_name_list, "Inchide")
say("Aceasta carte veche este foarte puternica! Este")
say("cheia catre ajutorul dragonului. Acum tu decizi!")
say("Luptatorii pot stapanii doar o singura abilitate.")
say("Alege ajutorul dragonului:")
local i = select_table(skill_name_list)
if i == table.getn(skill_name_list)then
return
end
local name = skill_name_list[i]
local vnum = skill_vnum_list[i]
say_title(item_name(50514))
say("")
say(string.format("Ai ales sa inveti %s.", name))
say("Esti sigur de decizia ta?")
local confirm = select("Da", "Nu")
if confirm == 1 then
pc.remove_item(item.get_vnum(), 1)
pc.set_skill_level(vnum, 1)
return
end
return
end
when 50515.use begin
say_title(item_name(50515))
say("")
if pc.get_skill_group() == 0 then
say("Nu ai invatat nici o competenta.")
return
end
local check_learned = 0
local anti_skill_list = {221, 222, 223, 224, 225, 226, 227, 228, 229}
for i = 1, table.getn(anti_skill_list) do
skill_vnum = anti_skill_list[i]
if pc.get_skill_level(skill_vnum) > 0 then
check_learned = 1
end
end
if check_learned == 1 then
say("Ai invatat deja un skill de respingere.")
return
end
anti_skill_list_name = {
[221] = "Respingere: Vârtejul Sabiei",
[222] = "Respingere: Ambuscadã",
[223] = "Respingere: Lovitura Degetului",
[224] = "Respingere: Aruncarea Dragonului",
[225] = "Respingere: Atacul Spiritului",
[226] = "Respingere: Sageatã de Foc",
[227] = "Respingere: Loviturã Întunecatã",
[228] = "Respingere: Chemarea Fulgerului",
[229] = "Respingere: Suflul Lupului"
}
local skill_vnum_list = {}
local skill_name_list = {}
for i = 1, table.getn(anti_skill_list) do
skill_vnum = anti_skill_list[i]
if pc.get_skill_level(skill_vnum) < 1 then
table.insert(skill_vnum_list, skill_vnum)
table.insert(skill_name_list, anti_skill_list_name[skill_vnum])
end
end
if table.getn(skill_vnum_list) == 0 then
say("Nici un skill de respingere disponibil.")
return
end
table.insert(skill_name_list, "Inchide")
say("Aceasta carte veche este foarte puternica! Este")
say("cheia catre ajutorul dragonului. Acum tu decizi!")
say("Luptatorii pot stapanii doar o singura abilitate.")
say("Alege ajutorul dragonului:")
local i = select_table(skill_name_list)
if i == table.getn(skill_name_list)then
return
end
local name = skill_name_list[i]
local vnum = skill_vnum_list[i]
say_title(item_name(50515))
say("")
say(string.format("Ai ales sa inveti %s.", name))
say("Esti sigur de alegerea ta?")
local confirm = select("Da", "Nu")
if confirm == 1 then
pc.remove_item(item.get_vnum(), 1)
pc.set_skill_level(vnum, 1)
return
end
return
end
when 50525.use begin
say_title(item_name(50525))
say("")
if pc.get_skill_group() == 0 then
say("Nu ai invatat nici o competenta inca.")
return
end
if get_time() < pc.getqf("next_time") then
if not pc.is_skill_book_no_delay() then
say("Ai citi deja o piatra a sufletului+")
say("trebuie sa astepti 24 de ore!")
return
end
end
GRAND_MASTER_SKILL_LEVEL = 30
PERFECT_MASTER_SKILL_LEVEL = 40
local check_learned = 0
local new_skill_list = {221, 222, 223, 224, 225, 226, 227, 228, 229, 236, 237, 238, 239, 240, 241, 242, 243, 244}
for i = 1, table.getn(new_skill_list) do
skill_vnum = new_skill_list[i]
if pc.get_skill_level(skill_vnum) >= GRAND_MASTER_SKILL_LEVEL and pc.get_skill_level(skill_vnum) < PERFECT_MASTER_SKILL_LEVEL then
check_learned = 1
end
end
if check_learned == 0 then
say("Nici un skill 7/8 invatat")
say("pentru a-l urca la nivelul Perfect Master.")
return
end
new_skill_list_name = {
[221] = "Respingere Vârtejul Sabiei",
[222] = "Respingere Ambuscadã",
[223] = "Respingere Lovitura Degetului",
[224] = "Respingere Aruncarea Dragonului",
[225] = "Respingere Atacul Spiritului",
[226] = "Respingere Sageatã de Foc",
[227] = "Respingere Loviturã Întunecatã",
[228] = "Respingere Chemarea Fulgerului",
[229] = "Respingere Suflul Lupului",
[236] = "Ajutor Vârtejul Sabiei",
[237] = "Ajutor Ambuscadã",
[238] = "Ajutor Lovitura Degetului",
[239] = "Ajutor Aruncarea Dragonului",
[240] = "Ajutor Atacul Spiritului",
[241] = "Ajutor Sageatã de Foc",
[242] = "Ajutor Loviturã Întunecatã",
[243] = "Ajutor Chemarea Fulgerului",
[244] = "Ajutor Suflul Lupului"
}
local skill_vnum_list = {}
local skill_name_list = {}
for i = 1, table.getn(new_skill_list) do
skill_vnum = new_skill_list[i]
if pc.get_skill_level(skill_vnum) >= GRAND_MASTER_SKILL_LEVEL and pc.get_skill_level(skill_vnum) < PERFECT_MASTER_SKILL_LEVEL then
table.insert(skill_vnum_list, skill_vnum)
table.insert(skill_name_list, new_skill_list_name[skill_vnum])
end
end
if table.getn(skill_vnum_list) == 0 then
say("Nici un skil de ajutor sau respingere disponibil.")
return
end
say("Invatarea aceste pitere")
say("va strica punctele tale de grad")
say("")
say("Doresti sa continui?")
local s = select("DA", "Nu")
if s == 2 then
return
end
say_title(item_name(50525))
say("")
say("Alege:")
table.insert(skill_name_list, "Cancel")
local i = select_table(skill_name_list)
if i == table.getn(skill_name_list)then
return
end
local name = skill_name_list[i]
local vnum = skill_vnum_list[i]
local level = pc.get_skill_level(vnum)
local -cenzurat-_alignment = pc.get_real_alignment()
local need_alignment = 1000 + 500 * (level - 30)
say_title(item_name(50525))
say("")
if -cenzurat-_alignment <- 29000+need_alignment then
say_reward("Nu ai suficiente pucte de grad")
say_reward("pentru a invata Maestrul Perfect.")
return
end
if get_time() < pc.getqf("next_time") then
if pc.is_skill_book_no_delay() then
pc.remove_skill_book_no_delay()
else
say("Cand invatarea a luat sfarsit trebuie ")
say("sa astepti intre 12 si 24 de ore.")
end
end
say(string.format("Ai ales %s.", name))
say("Esti sigur ca vrei sa continui?")
local confirm = select("Da", "Nu")
if confirm == 1 then
pc.setqf("next_time", get_time() + 60 * 60 * math.random(12, 24))
say_title(item_name(50525))
say("")
if pc.learn_grand_master_skill(vnum) then
if pc.get_skill_level(skill_vnum) == 40 then
say(string.format("%s a devenit Perfect Master.", name))
else
say(string.format("Ai crescut %s la G%d.", name, level-30+1+1))
end
say("Corpul meu este plin de putere. Ceva iese din el!")
say("Nivelul de ridicare a fost finalizat cu succes.")
else
pc.change_alignment(-number(need_alignment / 3, need_alignment / 2))
say("Nu ai reusit sa finalizezi nivelul de ridicare!")
end
pc.remove_item(item.get_vnum(), 1)
end
return
end
when 71000.use begin
say_title(item_name(71000))
say("")
if pc.get_skill_group() == 0 then
say("You didn't start an apprenticeship yet.")
return
end
local check_learned = 0
local new_skill_list = {221, 222, 223, 224, 225, 226, 227, 228, 229, 236, 237, 238, 239, 240, 241, 242, 243, 244}
for i = 1, table.getn(new_skill_list) do
skill_vnum = new_skill_list[i]
if pc.get_skill_level(skill_vnum) > 0 then
check_learned = 1
end
end
if check_learned == 0 then
say("Nu ai invatat nici un skill de ajutor sau repingere.")
return
end
say("Esti sigur ca doresti sa uiti skillurile de")
say("ajutor si respingere?")
local confirm = select("Da", "Nu")
if confirm == 1 then
for i = 1, table.getn(new_skill_list) do
skill_vnum = new_skill_list[i]
if pc.get_skill_level(skill_vnum) > 0 then
pc.set_skill_level(skill_vnum, 0)
end
end
pc.remove_item(item.get_vnum(), 1)
end
return
end
end
end

