Advertisement
deadx2

Untitled

Aug 10th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.03 KB | None | 0 0
  1. quest nagroda_boss begin
  2.     state start begin
  3.         function settings()
  4.             return
  5.             {
  6.                 [691] =
  7.                 {
  8.                 ['vnum'] = {70, 170, 270, 370},
  9.                 ['count'] = {1, 1, 1, 1},
  10.                 ['ilosc_itemow'] = {4},
  11.                 }
  12.             }
  13.         end
  14.        
  15.         when kill with npc.get_race() == 691 begin
  16.             chat("zabiles1")
  17.             local settings = nagroda_boss.settings()
  18.             local przedmioty = settings[npc.get_race()]['ilosc_itemow'][0]
  19.            
  20.             local item1 = settings[npc.get_race]['vnum'][number(0, przedmioty)]
  21.  
  22.     --      local numerek1 = number(0, przedmioty)
  23.     --      local numerek2 = number(0, przedmioty)
  24.     --      local numerek3 = number(0, przedmioty)
  25.  
  26.     --      local nagrody = {settings[npc.get_race()]['vnum'][nagroda1], settings[npc.get_race()]['vnum'][nagroda2], settings[npc.get_race()]['vnum'][nagroda3]}
  27.     --      local ilosc = {settings[npc.get_race()]['count'][nagroda1], settings[npc.get_race()]['count'][nagroda2], settings[npc.get_race()]['count'][nagroda3]}
  28.            
  29.     --      pc.setqf("boss_nagroda_1", numerek1)
  30.     --      pc.setqf("boss_nagroda_2", numerek2)
  31.     --      pc.setqf("boss_nagroda_3", numerek3)
  32.     --      pc.setqf("boss_nagroda_boss", npc.get_race())
  33.         --  cmdchat("Gui_Wybor_Boss_Nagroda "..nagrody.." "..ilosc)
  34.     --      cmdchat("Gui_Wybor_Boss_Nagroda "..nagrody)
  35.             chat("zabiles2")
  36.         end
  37.        
  38.         when button or info begin
  39.             local wybor = get_input()
  40.             local settings = nagroda_boss.settings()
  41.             if wybor == "1" then
  42.                 chat("Gratulacje, wybrales nagrode!")
  43.                 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")])
  44.  
  45.             elseif wybor == "2" then
  46.                 chat("Gratulacje, wybrales nagrode!")
  47.                 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")])
  48.  
  49.             elseif wybor == "3" then
  50.                 chat("Gratulacje, wybrales nagrode!")
  51.                 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")])
  52.             end
  53.         end
  54.        
  55.     end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement