Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------
- --COLLECT QUEST_lv30
- --METIN2 Collecting Quest
- ----------------------------------------------------
- quest collect_quest_lv30 begin
- state start begin
- when login or levelup with pc.level >= 30 and (not is_amminchia()) begin
- set_state(information)
- end
- end
- state information begin
- when letter begin
- local v = find_npc_by_vnum(20084)
- if v != 0 then
- target.vid("__TARGET__", v, "Biologo Cheagirab")
- end
- send_letter(localeInfo.coll_q.send_1)
- end
- when button or info begin
- say_title(localeInfo.coll_q.sayt_1)
- say(localeInfo.coll_q.say_1)
- end
- when __TARGET__.target.click or 20084.chat.localeInfo.coll_q.lv30_npc_1 begin
- target.delete("__TARGET__")
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.say_2)
- wait()
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_1)
- wait()
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_2)
- set_state(go_to_disciple)
- pc.setqf("duration",0)
- pc.setqf("collect_count",0)
- pc.setqf("drink_drug",0)
- end
- end
- state go_to_disciple begin
- when letter begin
- send_letter(localeInfo.coll_q.lv30_send_1)
- end
- when button or info begin
- say_title(localeInfo.coll_q.lv30_npc_1)
- say(localeInfo.coll_q.lv30_say_3)
- say_item_vnum(30006)
- say_reward(string.format(localeInfo.coll_q.lv30_sayr_1,pc.getqf("collect_count")))
- end
- when 71035.use begin
- if pc.getqf("drink_drug") == 1 then
- syschat(localeInfo.coll_q.use_e)
- return
- end
- pc.remove_item(71035, 1)
- pc.setqf("drink_drug",1)
- pc.setqf("duration",0)
- syschat(localeInfo.coll_q.use_e2)
- end
- when 20084.chat.localeInfo.coll_q.lv30_npc_2 with pc.count_item(30006) >0 begin
- if get_time() > pc.getqf("duration") then
- if pc.count_item(30006) >0 then
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_4)
- pc.remove_item(30006,1)
- wait()
- local pass_percent
- if pc.getqf("drink_drug")==0 then
- pass_percent=70
- else
- pass_percent=100
- end
- local s= number(1,100)
- if s<= pass_percent then
- if pc.getqf("collect_count")< 9 then
- local index =pc.getqf("collect_count")+1
- pc.setqf("collect_count",index)
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_6)
- say(string.format(localeInfo.coll_q.lv30_sayr_3,10-pc.getqf("collect_count")))
- pc.setqf("drink_drug",0)
- return
- end
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_7)
- pc.setqf("collect_count",0)
- pc.setqf("drink_drug",0)
- pc.setqf("duration",0)
- set_state(key_item)
- return
- else
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.lv30_say_5)
- pc.setqf("drink_drug",0)
- return
- end
- else
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.noitem)
- return
- end
- else
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.time)
- return
- end
- end
- end
- state key_item begin
- when letter begin
- send_letter(localeInfo.coll_q.send_2)
- if pc.count_item(30220)>0 then
- local v = find_npc_by_vnum(20084)
- if v != 0 then
- target.vid("__TARGET__", v, "")
- end
- end
- end
- when button or info begin
- if pc.count_item(30220) >0 then
- say_title(localeInfo.coll_q.sayt_3)
- say(localeInfo.coll_q.say_3)
- return
- end
- say_title(localeInfo.coll_q.sayt_3)
- say(localeInfo.coll_q.say_4)
- say_item_vnum(30220)
- end
- when __TARGET__.target.click or 20084.chat.localeInfo.coll_q.npc_1 with pc.count_item(30220) > 0 begin
- target.delete("__TARGET__")
- if pc.count_item(30220) > 0 then
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.say_5)
- pc.remove_item(30220,1)
- set_state(__reward)
- else
- say_title(localeInfo.coll_q.sayt_2)
- say(localeInfo.coll_q.say_8)
- return
- end
- end
- end
- state __reward begin
- when letter begin
- send_letter(localeInfo.coll_q.send_4)
- local v = find_npc_by_vnum(20018)
- if v != 0 then
- target.vid("__TARGET__", v, "Baek-Go")
- end
- end
- when button or info begin
- say_title(localeInfo.coll_q.sayt_4)
- say(localeInfo.coll_q.say_6)
- end
- when __TARGET__.target.click or 20018.chat.localeInfo.coll_q.sayt_5 begin
- target.delete("__TARGET__")
- say_title(localeInfo.coll_q.sayt_5)
- say(localeInfo.coll_q.say_7)
- say_reward(localeInfo.coll_q.sayr_1)
- say_reward(localeInfo.coll_q.lv30_sayr_5)
- affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60) -- 60Years
- pc.give_item2("50110",1)
- pc.changegold(500000)
- pc.give_exp2(212200)
- clear_letter()
- set_quest_state("collect_quest_lv40", "run")
- set_state(__complete)
- end
- end
- state __complete begin
- end
- end
Add Comment
Please, Sign In to add comment