Advertisement
Kevick

Untitled

Jul 10th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1.  
  2. local config = {
  3. [1] = {
  4. --equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf
  5. items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
  6. --container rope, shovel, mana potion
  7. container = {{2120, 1}, {2554, 1}, {7620, 1}}
  8. },
  9. [2] = {
  10. --equipment spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots scarf
  11. items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
  12. --container rope, shovel, mana potion
  13. container = {{2120, 1}, {2554, 1}, {7620, 1}}
  14. },
  15. [3] = {
  16. --equipment dwrven shield, 5 spear, ranger's cloak, ranger legs scarf, legion helmet
  17. items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}},
  18. --container rope, shovel, health potion, bow, 50 arrow
  19. container = {{2120, 1}, {2554, 1}, {7618, 1}, {2456, 1}, {2544, 50}}
  20. },
  21. [4] = {
  22. --equipment dwarven shield, steel axe, brass armor, brass helmet, brass legs scarf
  23. items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}},
  24. --container jagged sword, daramian mace, rope, shovel, health potion
  25. container = {{8602, 1}, {2439, 1}, {2120, 1}, {2554, 1}, {7618, 1}}
  26. }
  27. }
  28.  
  29. function onLogin(cid)
  30. local player = Player(cid)
  31. local targetVocation = config[player:getVocation():getId()]
  32. if not targetVocation then
  33. return true
  34. end
  35.  
  36. if player:getLastLoginSaved() ~= 0 then
  37. return true
  38. end
  39.  
  40. for i = 1, #targetVocation.items do
  41. player:addItem(targetVocation.items[i][1], targetVocation.items[i][2])
  42. end
  43.  
  44. local backpack = player:addItem(1988)
  45. if not backpack then
  46. return true
  47. end
  48.  
  49. for i = 1, #targetVocation.container do
  50. backpack:addItem(targetVocation.container[i][1], targetVocation.container[i][2])
  51. end
  52. return true
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement