Hi everyone, I'm here to give you a nice Quest I made just for fun.
The principle is simple, the item acts like the normal Soul Stone, but gives you a Perfect skill with 100%
Chance and no rank loss. I can edit the quest on demand, for those who want to give less chance or rank loss.
Here it is:
Code:
quest super_ss begin
state start begin
when Your_Item_ID.use begin
if pc.get_skill_group() == 0 then
say("None of your skills are available to")
say("try to increase their level to Perfect Master")
return
end
local result = super_ss.BuildGrandMasterSkillList(pc.get_job(), pc.get_skill_group())
local vnum_list = result[1]
local name_list = result[2]
say_title("Super Soul Stone: ")
say("Choose the Skill you want to upgrade")
say("to Perfect Master.")
say("")
local menu_list = {}
table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
table.insert(menu_list, "Cancel")
local s=select_table(menu_list)
if table.getn(menu_list) == s then
return
end
local skill_name=name_list[s]
local skill_vnum=vnum_list[s]
local skill_level = pc.get_skill_level(skill_vnum)
local title=string.format("Super Soul Stone: %s", skill_name)
say_title(string.format("%s", title))
say("")
say("Perfect Master training is very rare here")
say("It's a chance you have this stone with you.")
say("It is very rare.")
say("")
say_reward("The upgrade will not reduce your Rank")
say_reward("thanks to this special stone.")
say("")
local s=select("Continue", "Cancel")
if s==2 then
return
else
if pc.count_item("50526") == 0 then
say("Your Soul Stone seems to have disappeared from")
say("your inventory. Try again later with a Super SS.")
return
end
pc.set_skill_level(skill_vnum, 40)
say_title(string.format("%s", title))
say("")
say("Congratulations! You did it! Your skill is")
say("now Perfect Master.")
say("")
item.remove()
end
end
function BuildGrandMasterSkillList(job, group)
GRAND_MASTER_SKILL_LEVEL = 30
PERFECT_MASTER_SKILL_LEVEL = 40
local skill_list = special.active_skill_list[job+1][group]
local ret_vnum_list = {}
local ret_name_list = {}
table.foreach(skill_list,
function(i, skill_vnum)
local skill_level = pc.get_skill_level(skill_vnum)
if skill_level >= GRAND_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL then
table.insert(ret_vnum_list, skill_vnum)
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
if name == nil then
name=skill_vnum
end
table.insert(ret_name_list, name)
end
end)
return {ret_vnum_list, ret_name_list}
end
end
end
Don't forget to change the Item ID to make it work !