Advertisement
MrKarpiuk

Untitled

Jan 25th, 2021
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.58 KB | None | 0 0
  1. quest chest_weapon_15_max begin
  2.     state start begin
  3.         function give_item_bonus(vnum)
  4. ------------------------------------------------------------------------------------------
  5. -- Weapon 15 lv max
  6. ------------------------------------------------------------------------------------------
  7.             bony = {
  8.                 [1] = 71,
  9.                 [2] = 72,
  10.             }
  11.        
  12.             w_bonow = {
  13.                 [1] = {-1, -2, -3, 4, 5, 6, 7, 8, 9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20,
  14.                         -1, -2, -3, 4, 5, 6, 7, 8, 9, -10,
  15.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  16.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  17.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
  18.                         1, 2, 3, 4, 5,
  19.                         },
  20.                 [2] = {-1, -2, -3, 4, 5, 6, 7, 8, 9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30,
  21.                         -1, -2, -3, 4, 5, 6, 7, 8, 9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20,
  22.                         -1, -2, -3, 4, 5, 6, 7, 8, 9, -10,
  23.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
  24.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
  25.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  26.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  27.                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  28.                         },
  29.             }
  30.    
  31.             pc.give_item2_select(vnum, 1)
  32.             for i=0, 4 do
  33.                 local b = math.random(table.getn(bony))
  34.                 local w = math.random(table.getn(w_bonow[b]))
  35.                 item.set_attr(i, bony[b], w_bonow[b][w])
  36.             end
  37.         end
  38.  
  39.         when 1378014.use with item.get_id() begin
  40.         code = item.get_vnum()
  41.             local bronie = {
  42.                                     -- Sword 1 - 15 lv max
  43.                                     10, 11, 12, 13, 14, 15, 16,
  44.                                     20, 21, 22, 23, 24, 25, 26,
  45.                                     30, 31, 32, 33, 34, 35, 36,
  46.                                     40, 41, 42, 43, 44, 45, 46,
  47.                                     -- 2hand 1 - 15 lv max
  48.                                     3000, 3001, 3002, 3003, 3004, 3005, 3006,
  49.                                     3010, 3011, 3012, 3013, 3014, 3015, 3016,
  50.                                     3020, 3021, 3022, 3023, 3024, 3025, 3026,
  51.                                     3030, 3031, 3032, 3033, 3034, 3035, 3036,
  52.                                     -- dagger 1 - 15 lv max
  53.                                     1000, 1001, 1002, 1003, 1004, 1005, 1006,
  54.                                     4000, 4001, 4002, 4003, 4004, 4005, 4006,
  55.                                     1010, 1011, 1012, 1013, 1014, 1015, 1016,
  56.                                     4010, 4011, 4012, 4013, 4014, 4015, 4016,
  57.                                     4020, 4021, 4022, 4023, 4024, 4025, 4026,
  58.                                     -- bow 1 - 15 lv max
  59.                                     2000, 2001, 2002, 2003, 2004, 2005, 2006,
  60.                                     2010, 2011, 2012, 2013, 2014, 2015, 2016,
  61.                                     2020, 2021, 2022, 2023, 2024, 2025, 2026,
  62.                                     2030, 2031, 2032, 2033, 2034, 2035, 2036,
  63.                                     -- bell 1 - 15 lv max
  64.                                     5000, 5001, 5002, 5003, 5004, 5005, 5006,
  65.                                     5010, 5011, 5012, 5013, 5014, 5015, 5016,
  66.                                     -- fan 1 - 15 lv max
  67.                                     7000, 7001, 7002, 7003, 7004, 7005, 7006,
  68.                                     7010, 7011, 7012, 7013, 7014, 7015, 7016,
  69.                                     7020, 7021, 7022, 7023, 7024, 7025, 7026,
  70.                                     7030, 7031, 7032, 7033, 7034, 7035, 7036,
  71.                                     }
  72.             local a = math.random(table.getn(bronie))
  73.             chest_weapon_15_max.give_item_bonus(bronie[a])
  74.             pc.remove_item(code)
  75.             setskin(0)
  76.         end
  77.     end
  78. end
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement