Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest nagroda_boss begin
- state start begin
- function settings()
- return
- {
- ['Nagroda'] =
- {
- [5491] = {70, 170},
- },
- ['Ilosc'] =
- {
- [5491] = {1, 1},
- },
- ['IloscItemow'] =
- {
- [5491] = 2,
- },
- }
- end
- when kill with npc.get_race() == 5491 begin
- chat("zabiles1")
- local settings = nagroda_boss.settings()
- local przedmioty = settings.IloscItemow[npc.get_race()]
- local numerek1 = number(1, przedmioty)
- local numerek2 = number(1, przedmioty)
- local numerek3 = number(1, przedmioty)
- local item1 = settings.Nagroda[npc.get_race()][numerek1]
- local item2 = settings.Nagroda[npc.get_race()][numerek2]
- local item3 = settings.Nagroda[npc.get_race()][numerek3]
- local ilosc1 = settings.Ilosc[npc.get_race()][numerek1]
- local ilosc2 = settings.Ilosc[npc.get_race()][numerek2]
- local ilosc3 = settings.Ilosc[npc.get_race()][numerek3]
- pc.setqf("boss_nagroda_1", numerek1)
- pc.setqf("boss_nagroda_2", numerek2)
- pc.setqf("boss_nagroda_3", numerek3)
- pc.setqf("boss_nagroda_boss", npc.get_race())
- cmdchat("Gui_Wybor_Boss_Nagroda "..item1.." "..item2.." "..item3.." "..ilosc1.." "..ilosc2.." "..ilosc3)
- chat("zabiles2")
- end
- when button or info begin
- local wybor = get_input()
- local settings = nagroda_boss.settings()
- if wybor == "1" then
- chat("Gratulacje, wybrales nagrode!")
- pc.give_item2(settings[pc.getqf("boss_nagroda_boss")]['vnum'][pc.getqf("boss_nagroda_1")],settings[pc.getqf("boss_nagroda_boss")]['count'][pc.getqf("boss_nagroda_1")])
- elseif wybor == "2" then
- chat("Gratulacje, wybrales nagrode!")
- pc.give_item2(settings[pc.getqf("boss_nagroda_boss")]['vnum'][pc.getqf("boss_nagroda_2")],settings[pc.getqf("boss_nagroda_boss")]['count'][pc.getqf("boss_nagroda_2")])
- elseif wybor == "3" then
- chat("Gratulacje, wybrales nagrode!")
- pc.give_item2(settings[pc.getqf("boss_nagroda_boss")]['vnum'][pc.getqf("boss_nagroda_3")],settings[pc.getqf("boss_nagroda_boss")]['count'][pc.getqf("boss_nagroda_3")])
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement