forked from metin2/server
1
0
Fork 0
server/gamefiles/data/quest/collect_quest_lv94.quest

228 lines
6.4 KiB
Plaintext
Raw Normal View History

----------------------------------------------------
--COLLECT QUEST_lv94
--METIN2 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
----------------------------------------------------
quest collect_quest_lv94 begin
state start begin
end
state run begin
when login or levelup with pc.level >= 94 begin
set_state(information)
end
end
state information begin
when letter begin
local v = find_npc_by_vnum(20091)
if v != 0 then
target.vid("__TARGET__", v, gameforge.collect_quest_lv94._010_target)
end
send_letter(gameforge.collect_quest_lv94._020_send_letter)
end
when button or info begin
say_title(gameforge.collect_quest_lv94._020_send_letter)
say(gameforge.collect_quest_lv94._030_say)
say("")
end
when __TARGET__.target.click or 20091.chat.gameforge.collect_quest_lv94._040_npcChat begin
target.delete("__TARGET__")
--- l
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._060_say)
say("")
wait()
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._070_say)
say("")
set_state(go_to_disciple)
pc.setqf("duration", 0) -- <20>õ<EFBFBD> <20>Ҽ<EFBFBD> <20>ִ<EFBFBD> <20>ð<EFBFBD>
pc.setqf("collect_count", 0)--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
pc.setqf("drink_drug", 0) --<2D><>Ȥ<EFBFBD><C8A4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
end
end
state go_to_disciple begin
when letter begin
send_letter(gameforge.collect_quest_lv94._080_say_title)
end
when button or info begin
say_title(gameforge.collect_quest_lv94._080_say_title)
--- l
say(gameforge.collect_quest_lv94._090_say)
say_item_vnum(30252)
say_reward(string.format(gameforge.collect_quest_lv94._100_sayReward, pc.getqf("collect_count")))
say("")
end
when 71035.use begin --<2D><>Ȥ<EFBFBD><C8A4> <20><><EFBFBD><EFBFBD>
if get_time() < pc.getqf("duration") then
say(gameforge.collect_quest_lv94._110_say)
return
end
if pc.getqf("drink_drug") == 1 then
say(gameforge.collect_quest_lv94._120_say)
return
end
if pc.count_item(30252) == 0 then
--- l
say(gameforge.collect_quest_lv94._130_say)
say("")
return
end
pc.remove_item(71035, 1)
pc.setqf("drink_drug", 1)
end
when 2414.kill or 2412.kill begin
local s = number(1, 400)
if s <= 1 then
pc.give_item2(30252, 1)
send_letter(gameforge.collect_quest_lv94._140_send_letter)
end
end
when 20091.chat.gameforge.collect_quest_lv94._150_npcChat with pc.count_item(30252) > 0 begin
if get_time() < pc.getqf("duration") then
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._160_say)
return
end
if pc.count_item(30252) <= 0 then
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._170_say)
return
end
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._180_say)
pc.remove_item(30252, 1)
if is_test_server() then
pc.setqf("duration", get_time() + 2)
else
pc.setqf("duration", get_time()+60*60*24) -----------------------------------24 stunden nun
end
wait()
local pass_percent
if pc.getqf("drink_drug") == 0 then
pass_percent = 10
else
pass_percent = 60
end
local s = number(1, 100)
if s <= pass_percent then
if pc.getqf("collect_count") < 19 then --10<31><30><EFBFBD≯<EFBFBD>
local index = pc.getqf("collect_count") + 1
pc.setqf("collect_count", index) --<2D>ϳ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> +1 <20><><EFBFBD>ش<EFBFBD>
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._190_say)
say(string.format(gameforge.collect_quest_lv94._200_say, 20-pc.getqf("collect_count")))
say(gameforge.collect_quest_lv94._210_say)
pc.setqf("drink_drug", 0) --<2D><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
return
end
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._250_say)
pc.setqf("collect_count",0)
set_state(key_item)
else
pc.setqf("drink_drug", 0) --<2D><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._240_say)
return
end
end -- end of when
end -- end of state
state key_item begin
when letter begin
send_letter(gameforge.collect_quest_lv94._260_send_letter)
if pc.count_item(30228)>0 then
local v = find_npc_by_vnum(20091)
if v != 0 then
target.vid("__TARGET__", v, "")
end
end
end
when button or info begin
if pc.count_item(30228) >0 then
say_title(gameforge.collect_quest_lv94._270_say_title)
say(gameforge.collect_quest_lv94._280_say)
return
end
say_title(gameforge.collect_quest_lv94._290_say_title)
say(gameforge.collect_quest_lv94._300_say)
say_item_vnum(30228)
say(gameforge.collect_quest_lv94._310_say)
end
when 2493.kill begin
if pc.count_item(30228)==0 then
pc.give_item2(30228, 1)
send_letter(gameforge.collect_quest_lv94._320_send_letter)
end
end
when 2495.kill begin
local s = number(1, 20)
if s == 1 then
if pc.count_item(30228)==0 then
pc.give_item2(30228, 1)
send_letter(gameforge.collect_quest_lv94._320_send_letter)
end
end
end
when __TARGET__.target.click or 20091.chat.gameforge.collect_quest_lv94._330_npcChat with pc.count_item(30228) > 0 begin
target.delete("__TARGET__")
if pc.count_item(30228) > 0 then
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._340_say)
local s = select(gameforge.collect_quest_lv94._230_1_select, gameforge.collect_quest_lv94._230_2_select, gameforge.collect_quest_lv94._230_3_select)
if 1 == s then
affect.add_collect(1, 1100, 60*60*24*365*60) -- hp apply index == 1
pc.setqf("reward", 1)
elseif 2 == s then
affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60)
pc.setqf("reward", 2)
elseif 3 == s then
affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60)
pc.setqf("reward", 3)
end
pc.remove_item(30228, 1)
pc.setqf("collect_count", 0)
pc.setqf("drink_drug", 0)
pc.setqf("duration", 0)
clear_letter()
set_quest_state("collect_quest_lv96", "run")
set_state(__complete)
return
else
say_title(gameforge.collect_quest_lv94._050_say_title)
say(gameforge.collect_quest_lv94._350_say)
return
end
end -- end of when
end -- end of state
state __complete begin
end
end