Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.91 KB | None | 0 0
  1. quest exygo_bonus begin
  2.     state start begin
  3.         function give_item_bonus(vnum, tabel)
  4.             pc.give_item2_select(vnum, 1);
  5.  
  6.             for i in tabel do
  7.                 local arg = tabel[i];
  8.                 item.set_attribute(i-1, arg[1], arg[2]);
  9.             end -- for
  10.         end -- function
  11.  
  12.         function give_full(tab)
  13.             for i in tab do
  14.                 local vnum = 0;
  15.                 for v in tab[i] do
  16.                     if (v ~= "socket") then
  17.                         vnum = v;
  18.                     end -- if
  19.                 end -- for
  20.  
  21.                 exygo_bonus.give_item_bonus(vnum, tab[i][vnum]);
  22.                 local socket_list = tab[i]["socket"];
  23.                 if (socket_list ~= nil) then
  24.                     for s in socket_list do
  25.                         local arg = socket_list[s];
  26.                         item.set_socket(arg[1], arg[2]);
  27.                     end -- for
  28.                 end -- if
  29.             end -- for
  30.         end -- function
  31.  
  32.         when 70030.use begin
  33.             say_title(string.format("%s:[ENTER]", item_name(item.get_vnum())))
  34.             say("What do you want to do?[ENTER]")
  35.             local selection = select(
  36.                 "Max my secondary skills",
  37.                 "Give me the default items",
  38.                 "Give me the Warrior equipment",
  39.                 "Give me the Ninja equipment",
  40.                 "Give me the Sura equipment",
  41.                 "Give me the Shaman equipment",
  42.                 "Nothing"
  43.             );
  44.  
  45.             if (selection == 1) then
  46.                 pc.set_skill_level(121, 40);
  47.                 pc.set_skill_level(122, 2);
  48.                 pc.set_skill_level(124, 20);
  49.                 pc.set_skill_level(126, 20);
  50.                 pc.set_skill_level(127, 20);
  51.                 pc.set_skill_level(128, 20);
  52.                 pc.set_skill_level(129, 40);
  53.                 pc.set_skill_level(130, 21);
  54.                 pc.set_skill_level(131, 10);
  55.                 pc.set_skill_level(137, 20);
  56.                 pc.set_skill_level(138, 20);
  57.                 pc.set_skill_level(139, 20);
  58.                 pc.set_skill_level(140, 20);
  59.  
  60.             elseif (selection == 2) then
  61.                 local default_items = {{27001, 1}, {27002, 100}}; -- Insert the default items (like Potions) you want to give to the player.
  62.                 for i in default_items do
  63.                     local arg = default_items[i];
  64.                     pc.give_item2(arg[1], arg[2]);
  65.                 end -- for
  66.  
  67.             elseif (selection ~= 7) then
  68.                 local equipment = {
  69.                     [3] = {
  70.                         {
  71.                             [11299] = { -- Item Vnum
  72.                                 {1, 3000}, -- First bonus
  73.                                 {29, 20}, -- Second bonus
  74.                                 {30, 20}, -- Third bonus
  75.                                 {31, 20}, -- Fourth bonus
  76.                                 {34, 20}, -- Fifth bonus
  77.                             },
  78.                             ["socket"] = {
  79.                                 {0, 28708}, -- First Stone Vnum
  80.                                 {1, 28711}, -- Second Stone Vnum
  81.                                 {2, 28712}, -- Third Stone Vnum
  82.                             }
  83.                         },
  84.                         -- Insert the items you want to give to the warrior players.
  85.                     }
  86.                     [4] = {
  87.                         {
  88.                             [11499] = { -- Item Vnum
  89.                                 {1, 3000}, -- First bonus
  90.                                 {29, 20}, -- Second bonus
  91.                                 {30, 20}, -- Third bonus
  92.                                 {31, 20}, -- Fourth bonus
  93.                                 {34, 20}, -- Fifth bonus
  94.                             },
  95.                             ["socket"] = {
  96.                                 {0, 28708}, -- First Stone Vnum
  97.                                 {1, 28711}, -- Second Stone Vnum
  98.                                 {2, 28712}, -- Third Stone Vnum
  99.                             }
  100.                         },
  101.                         -- Insert the items you want to give to the ninja players.
  102.                     },
  103.                     [5] = {
  104.                         {
  105.                             [11699] = { -- Item Vnum
  106.                                 {1, 3000}, -- First bonus
  107.                                 {29, 20}, -- Second bonus
  108.                                 {30, 20}, -- Third bonus
  109.                                 {31, 20}, -- Fourth bonus
  110.                                 {34, 20}, -- Fifth bonus
  111.                             },
  112.                             ["socket"] = {
  113.                                 {0, 28708}, -- First Stone Vnum
  114.                                 {1, 28711}, -- Second Stone Vnum
  115.                                 {2, 28712}, -- Third Stone Vnum
  116.                             }
  117.                         },
  118.                         -- Insert the items you want to give to the sura players.
  119.                     },
  120.                     [6] = {
  121.                         {
  122.                             [11899] = { -- Item Vnum
  123.                                 {1, 3000}, -- First bonus
  124.                                 {29, 20}, -- Second bonus
  125.                                 {30, 20}, -- Third bonus
  126.                                 {31, 20}, -- Fourth bonus
  127.                                 {34, 20}, -- Fifth bonus
  128.                             },
  129.                             ["socket"] = {
  130.                                 {0, 28708}, -- First Stone Vnum
  131.                                 {1, 28711}, -- Second Stone Vnum
  132.                                 {2, 28712}, -- Third Stone Vnum
  133.                             }
  134.                         },
  135.                         -- Insert the items you want to give to the shaman players.
  136.                     }
  137.                 };
  138.  
  139.                 exygo_bonus.give_full(equipment[selection]);
  140.             end -- if/elseif
  141.         end -- when
  142.     end -- state
  143. end -- quest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement