Advertisement
deadx2

Untitled

Aug 16th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.35 KB | None | 0 0
  1. quest system_nagroda_boss.quest begin
  2.     state start begin
  3.         function settings()
  4.             return
  5.             {
  6.                 ['Nagroda'] =
  7.                 {
  8.                     [101] = {70, 170},
  9.                 },
  10.                 ['Ilosc'] =
  11.                 {
  12.                     [101] = {1, 1},
  13.                 },
  14.                 ['IloscItemow'] =
  15.                 {
  16.                     [101] = 2,
  17.                 },
  18.             }
  19.         end
  20.        
  21.         when kill with npc.get_race() == 101 begin
  22.             local settings = system_nagroda_boss.quest.settings()
  23.             local przedmioty = settings.IloscItemow[npc.get_race()]
  24.  
  25.             local numerek1 = number(1, przedmioty)
  26.             local numerek2 = number(1, przedmioty)
  27.             local numerek3 = number(1, przedmioty)
  28.            
  29.             local item1 = settings.Nagroda[npc.get_race()][numerek1]
  30.             local item2 = settings.Nagroda[npc.get_race()][numerek2]
  31.             local item3 = settings.Nagroda[npc.get_race()][numerek3]
  32.            
  33.             local ilosc1 = settings.Ilosc[npc.get_race()][numerek1]
  34.             local ilosc2 = settings.Ilosc[npc.get_race()][numerek2]
  35.             local ilosc3 = settings.Ilosc[npc.get_race()][numerek3]
  36.  
  37.             pc.setqf("boss_nagroda_1", numerek1)
  38.             pc.setqf("boss_nagroda_2", numerek2)
  39.             pc.setqf("boss_nagroda_3", numerek3)
  40.             pc.setqf("boss_nagroda_boss", npc.get_race())
  41.             pc.give_item2(settings.Nagroda[pc.getqf("boss_nagroda_boss")][pc.getqf("boss_nagroda_1")], settings.Ilosc[pc.getqf("boss_nagroda_boss")][pc.getqf("boss_nagroda_1")])
  42.             cmdchat("Gui_Wybor_Boss_Nagroda "..item1.." "..item2.." "..item3.." "..ilosc1.." "..ilosc2.." "..ilosc3)
  43.         end
  44.     end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement