VegaS1234

[Lua] Voucher weapons

Jun 17th, 2017
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. quest voucher begin
  2.      state start begin
  3.         function GetItems()
  4.             local table_data = {
  5.                 [WARRIOR] = {469, 3199},
  6.                 [ASSASSIN] = {1349, 2379},
  7.                 [SURA] = {479},
  8.                 [SHAMAN] = {5349, 7379},
  9.                 [WOLFMAN] = {0}
  10.             }
  11.             local stl_container = table_data[pc.get_job()]
  12.             pc.give_item2(stl_container[math.random(1, table.getn(stl_container))], 1)
  13.         end
  14.  
  15.         when 40248.use begin
  16.             voucher.GetItems()
  17.             pc.remove_item(item.get_vnum(), 1)
  18.             set_state(__COMPLETE__)
  19.         end
  20.     end
  21. state __COMPLETE__ begin
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment