Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Since for GladoR
- quest fishing_mission_1 begin
- state start begin
- function is_fish_in_eq(is_remove, fish_get_id)
- local fish_count_1 = 0
- local fish_count_2 = 0
- local fish_count_3 = 0
- for i = 0, 180 do
- item.select_cell(i)
- local dwVnum = item.get_vnum()
- local dwCm = item.get_socket(0)
- if dwVnum == 27803 then
- if dwCm >= 10 then
- if is_remove and fish_count_1 < 5 then
- item.remove(1)
- end
- fish_count_1 = fish_count_1 + 1
- end
- elseif dwVnum == 27804 then
- if dwCm >= 10 then
- if is_remove and fish_count_2 < 5 then
- item.remove(1)
- end
- fish_count_2 = fish_count_2 + 1
- end
- elseif dwVnum == 27805 then
- if dwCm >= 10 then
- if is_remove and fish_count_3 < 5 then
- item.remove(1)
- end
- fish_count_3 = fish_count_3 + 1
- end
- end
- if fish_count_1 >= 5 and fish_count_2 >= 5 and fish_count_3 >= 5 then
- return true
- end
- end
- if fish_get_id > 0 then
- if fish_get_id == 1 then
- return fish_count_1
- elseif fish_get_id == 2 then
- return fish_count_2
- elseif fish_get_id == 3 then
- return fish_count_3
- end
- end
- return false
- end
- when login or enter or levelup with pc.level >= 80 begin
- set_state(information)
- end
- end
- state information begin
- when letter begin
- target.vid("__TARGET__", find_npc_by_vnum(9009), "Rybak")
- send_letter("Rybak - Wędkarstwo")
- end
- when button or info begin
- say("Witaj, "..pc.get_name().." !")
- say("Rybak znajdujący się w miasteczku właśnie Cię szukał.")
- say("Udaj się do niego aby zdobyć więcej informacji.")
- say()
- end
- when __TARGET__.target.click or 9009.chat."Odnalazłem Cię !" begin
- target.delete("__TARGET__")
- npc.name()
- say_reward("Witaj początkujący Wędkarzu !")
- say_reward("Będę potrzebował abyś złowił dla mnie kilka przeciętnych ryb")
- say_zloto("Karaś: 5x")
- say_zloto("Ryba Mandaryna: 5x")
- say_zloto("Duży Karaś: 5x")
- say_zloto("Pamiętaj że ryby musisz wyłowić sam.")
- say_zloto("Minimalna Długość każdej z złowionych ryb to 10 cm.")
- say()
- clear_letter()
- set_state(drop)
- end
- end
- state drop begin
- when letter begin
- target.vid("__TARGET__", find_npc_by_vnum(9009), "Rybak")
- send_letter("Rybak - Zadanie I")
- end
- when button or info begin
- say("Witaj, "..pc.get_name().." !")
- say("Musisz wykazać się sprytem i cierpliwością,a zostaniesz")
- say("sowicie nagrodzony.")
- say_zloto("Potrzebujesz:")
- say_zloto("-Karaś: "..pc.getqf("fish_1").."/5")
- say_zloto("-Ryba Mandaryna: "..pc.getqf("fish_2").."/5")
- say_zloto("-Duży Karaś: "..pc.getqf("fish_3").."/5")
- if pc.getqf("fish_1") >= 5 and pc.getqf("fish_2") >= 5 and pc.getqf("fish_3") >= 5 then
- say_reward("Oddaj Rybakowi złowione Ryby !")
- else
- say_zloto("Pamiętaj że ryby musisz wyłowić sam.")
- say_zloto("Minimalna Długość każdej z złowionych ryb to 10 cm.")
- end
- end
- when fishing begin -- Event Pomyślnego połowu Ryby
- local dwVnum = item.vnum
- local cm = item.get_socket(0)
- if dwVnum == 27803 then
- if cm >= 10 then
- pc.setqf("fish_1", pc.getqf("fish_1") + 1)
- chat("<Wędkarstwo> Ten Karaś jest idealny dla Rybaka")
- else
- chat("<Wędkarstwo> "..item_name(dwVnum).." jest zbyt mały aby rybak go przyjął..")
- end
- elseif dwVnum == 27804 then
- if cm >= 10 then
- pc.setqf("fish_2", pc.getqf("fish_2") + 1)
- chat("<Wędkarstwo> Ta Ryba Mandaryna jest idealna dla rybaka !")
- else
- chat("<Wędkarstwo> "..item_name(dwVnum).." jest zbyt mała aby rybak ją przyjął..")
- end
- elseif dwVnum == 27805 then
- if cm >= 10 then
- pc.setqf("fish_3", pc.getqf("fish_3") + 1)
- chat("<Wędkarstwo> Ten Karaś jest idealny dla Rybaka")
- else
- chat("<Wędkarstwo> "..item_name(dwVnum).." jest zbyt mały aby rybak go przyjął..")
- end
- end
- end
- when 9009.chat."Oddaj Złowione Ryby" begin
- npc.name()
- if pc.getqf("fish_1") < 5 or pc.getqf("fish_2") < 5 or pc.getqf("fish_3") < 5 then
- say_zloto("Potrzebujesz:")
- say_zloto("-Karaś: "..pc.getqf("fish_1").."/5")
- say_zloto("-Ryba Mandaryna: "..pc.getqf("fish_2").."/5")
- say_zloto("-Duży Karaś: "..pc.getqf("fish_3").."/5")
- say_zloto("Pamiętaj że ryby musisz wyłowić sam.")
- say_zloto("Minimalna Długość każdej z złowionych ryb to 10 cm.")
- return
- end
- if !fishing_mission_1.is_fish_in_eq(false, 0) then
- say_zloto("Potrzebujesz:")
- say_zloto("-Karaś: "..fishing_mission_1.is_fish_in_eq(false, 1).."/5")
- say_zloto("-Ryba Mandaryna: "..fishing_mission_1.is_fish_in_eq(false, 2).."/5")
- say_zloto("-Duży Karaś: "..fishing_mission_1.is_fish_in_eq(false, 3).."/5")
- say_zloto("Pamiętaj że ryby musisz wyłowić sam.")
- say_zloto("Minimalna Długość każdej z złowionych ryb to 10 cm.")
- say()
- say_reward("Brakuje Ci Ryb w Ekwipunku !")
- return
- else
- pc.setqf("fish_1", 0) -- Kasuje Qf
- pc.setqf("fish_2", 0)
- pc.setqf("fish_3", 0)
- fishing_mission_1.is_fish_in_eq(true, 0) -- Usuwam Przedmioty
- say_zloto("Otrzymujesz:")
- say_zloto("+5% Szansy na Pomyślne Złowienie Ryby na stałe")
- say_zloto("+10% Odporności na Ludzi")
- say_zloto("-1x Skrzynia Item-Shop")
- say_zloto("-10x Kukurydza")
- say_zloto("-10x Żaba")
- pc.setqf("chance", 5)
- affect.add_new(apply.RESIST_HUMAN, 10, 60*60*24*365*20, 3)
- pc.give_item2(27591, 10)
- pc.give_item2(27592, 10)
- pc.give_item2(53502, 1)
- clear_letter()
- set_state(__COMPLETE__)
- end
- end
- end
- state __COMPLETE__ begin
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement