Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------
- -----Biolog by PoetaNapalmu------
- ---------------------------------
- quest biolog_poeta_20
- state start begin
- when login or levelup with pc.get_level() >= 20 begin
- set_state(dostawa)
- end
- end
- state dostawa begin
- when letter begin
- send_letter("")
- end
- when button or info begin
- say_title("")
- say("")
- say("")
- say("")
- say("")
- say("")
- local left = x - pc.getqf("ilosc") -- x==ilosc itemkow do oddania
- say_reward(left.."x nazwaitemka")
- say_item_vnum(iditemka)
- end
- when 71035.use or 76020.use begin
- if pc.getqf("duration") != 0 then
- pc.setqf("duration", 0)
- pc.setqf("procenty", 1)
- chat("Czas oddania przedmiotu został skasowany. Szansa pomyślnego oddania wzrosła.")
- pc.remove_item(71035, 1)
- return
- else
- chat("Możesz oddać przedmiot biologowi.")
- return
- end
- end
- when 20084.chat."" with pc.count_item(iditemka) != 0 begin
- if pc.getqf("duration") > get_time() then
- say_title("")
- say("")
- say("")
- local duration = (pc.getqf("duration") - get_time()) / 3600
- local hours = math.floor(duration)
- local minutes = math.floor((duration - hours) * 60)
- if hours >= 1 and minutes >= 1 then
- say(string.format("Pozostały Czas: %dH %dM", hours, minutes))
- elseif hours >= 1 and minutes == 0 then
- say(string.format("Pozostały Czas: %dH", hours))
- else
- say(string.format("Pozostały Czas: %dM", minutes))
- end
- return
- end
- end
- local percent = 50
- if pc.getqf("procenty") == 1 then
- percent = x --ilosc procent z eliksirem
- pc.setqf("procenty", 0)
- end
- say_title("")
- say("")
- say("")
- say("")
- wait()
- if number(1, 100) <= percent and pc.count_item(iditemka) != 0 then
- pc.setqf("ilosc", pc.getqf("ilosc") + 1)
- pc.remove_item(iditemka, 1)
- pc.setqf("duration", get_time() + 60 * 60)
- if pc.getqf("ilosc") == 20 then
- say_title("")
- say("koniec")
- wait()
- say_title("")
- say("")
- affect.add_collect_point()
- pc.give_item2()
- clear_letter()
- set_quest_state("", "")
- set_state(gotowe)
- return
- end
- local left_count = 20 - pc.getqf("ilosc")
- say_title("Biolog Chaegirab")
- say("sukces")
- say_reward("Przynieś mi jeszcze: "..left_count.." sztuk.")
- pc.setqf("duration", get_time() + 60 * 60)
- else
- say_title("Biolog Chaegirab")
- say("spalil")
- pc.setqf("duration", get_time() + 60 * 60)
- pc.remove_item(item.get_vnum(), 1)
- end
- end
- state gotowe begin
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment