forked from metin2/server
92 lines
2.3 KiB
Plaintext
92 lines
2.3 KiB
Plaintext
quest reset_scroll begin
|
|
state start begin
|
|
when 71002.use or 76001.use begin
|
|
say_title(gameforge.reset_scroll._10_sayTitle)
|
|
|
|
say(gameforge.reset_scroll._20_say)
|
|
local s = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
|
|
if 2 == s then
|
|
return
|
|
end
|
|
|
|
say_title(gameforge.reset_scroll._30_sayTitle)
|
|
|
|
say(gameforge.reset_scroll._40_say)
|
|
local c = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
|
|
if 2 == c then
|
|
return
|
|
end
|
|
|
|
char_log(0, "RESET_ALL", "USE_ITEM(71002 or 76001)")
|
|
|
|
item.remove()
|
|
|
|
char_log(0, "RESET_ALL", "RESET_STAT_POINTS")
|
|
pc.reset_point()
|
|
char_log(0, "RESET_ALL", "RESET_SKILL_POINTS")
|
|
pc.clear_skill()
|
|
pc.set_skill_group(0)
|
|
char_log(0, "RESET_ALL", "RESET_END")
|
|
end
|
|
|
|
when 71003.use begin
|
|
say_title(gameforge.reset_scroll._50_sayTitle)
|
|
say(gameforge.reset_scroll._60_sayReward)
|
|
wait()
|
|
|
|
local result = BuildSkillList(pc.get_job(), pc.get_skill_group())
|
|
|
|
local vnum_list = result[1]
|
|
local name_list = result[2]
|
|
|
|
if table.getn(vnum_list) < 2 then
|
|
say_title(gameforge.reset_scroll._50_sayTitle)
|
|
say(gameforge.reset_scroll._70_say)
|
|
return
|
|
end
|
|
|
|
say_title(gameforge.reset_scroll._50_sayTitle)
|
|
say(gameforge.reset_scroll._80_say)
|
|
local i = select_table(name_list)
|
|
|
|
if table.getn(name_list) == i then
|
|
return
|
|
end
|
|
|
|
local name = name_list[i]
|
|
local vnum = vnum_list[i]
|
|
|
|
say_title(gameforge.reset_scroll._50_sayTitle)
|
|
|
|
say(gameforge.reset_scroll._90_sayReward)
|
|
say_reward(string.format(gameforge.reset_scroll._100_say, name))
|
|
|
|
local s = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
|
|
if 2 == s then
|
|
return
|
|
end
|
|
|
|
say_title(gameforge.reset_scroll._110_sayTitle)
|
|
|
|
say(gameforge.reset_scroll._120_say)
|
|
local c = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
|
|
|
|
if 2 == c then
|
|
return
|
|
end
|
|
|
|
char_log(0, "RESET_ONE_SKILL", "USE_ITEM(71003)")
|
|
pc.remove_item(71003)
|
|
|
|
char_log(0, "RESET_ONE_SKILL", "RESET_SKILL["..name.."]")
|
|
pc.clear_one_skill(vnum)
|
|
|
|
char_log(0, "RESET_ONE_SKILL", "APPLY_17MASTER_BONUS")
|
|
pc.setqf("force_to_master_skill", 1)
|
|
|
|
say_title(gameforge.reset_scroll._140_sayTitle)
|
|
say_reward(string.format(gameforge.reset_scroll._150_say, name))
|
|
end
|
|
end
|
|
end
|