Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. perks = {
  2. brilliance = {
  3. storage = 80051,
  4. gold = 10000,
  5. rebirth = 1,
  6. callback = function(cid) return doPlayerSetRate(cid, SKILL__LEVEL, getPlayerRates(cid)[SKILL__LEVEL] + 0.5) end
  7. description = "Increases the rate at which experience is gained by 0.5% per point."
  8. },
  9. vigor = {
  10. storage = 80052,
  11. gold = 10000,
  12. rebirth = 20,
  13. callback = function(cid)
  14. local points = getPlayerStorageValue(cid, 80052)
  15. if getCreatureCondition(cid, CONDITION_ATTRIBUTES, 1) then
  16. doRemoveCondition(cid, CONDITION_ATTRIBUTES, 1)
  17. end
  18. local c = createConditionObject(CONDITION_ATTRIBUTES)
  19. setConditionParam(c, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, points)
  20. setConditionParam(c, CONDITION_PARAM_TICKS, -1)
  21. setConditionParam(c, CONDITION_PARAM_SUBID, 1)
  22. return doAddCondition(cid, c)
  23. end
  24. description = "Increases max health by 1% per point."
  25. },
  26. vita = {
  27. storage = 80053,
  28. gold = 10000,
  29. rebirth = 20,
  30. callback = function(cid)
  31. local points = getPlayerStorageValue(cid, 80053)
  32. if getCreatureCondition(cid, CONDITION_ATTRIBUTES, 2) then
  33. doRemoveCondition(cid, CONDITION_ATTRIBUTES, 2)
  34. end
  35. local c = createConditionObject(CONDITION_ATTRIBUTES)
  36. setConditionParam(c, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, points)
  37. setConditionParam(c, CONDITION_PARAM_TICKS, -1)
  38. setConditionParam(c, CONDITION_PARAM_SUBID, 2)
  39. return doAddCondition(cid, c)
  40. end
  41. description = "Increases max mana by 1% per point."
  42. },
  43. arcane = {
  44. storage = 80054,
  45. gold = 10000,
  46. rebirth = 40,
  47. callback = function(cid)
  48. local points = getPlayerStorageValue(cid, 80054)
  49. if getCreatureCondition(cid, CONDITION_ATTRIBUTES, 3) then
  50. doRemoveCondition(cid, CONDITION_ATTRIBUTES, 3)
  51. end
  52. local c = createConditionObject(CONDITION_ATTRIBUTES)
  53. setConditionParam(c, CONDITION_PARAM_STAT_MAGLEVEL, points)
  54. setConditionParam(c, CONDITION_PARAM_TICKS, -1)
  55. setConditionParam(c, CONDITION_PARAM_SUBID, 3)
  56. return doAddCondition(cid, c)
  57. end
  58. description = "Increases magic level by 1 per point."
  59. },
  60. stragnosa = {
  61. storage = 80055,
  62. gold = 10000,
  63. rebirth = 40,
  64. callback = function(cid)
  65. local points = getPlayerStorageValue(cid, 80055)
  66. if getCreatureCondition(cid, CONDITION_ATTRIBUTES, 4) then
  67. doRemoveCondition(cid, CONDITION_ATTRIBUTES, 4)
  68. end
  69. local c = createConditionObject(CONDITION_ATTRIBUTES)
  70. setConditionParam(c, CONDITION_PARAM_SKILL_FIST, points)
  71. setConditionParam(c, CONDITION_PARAM_SKILL_CLUB, points)
  72. setConditionParam(c, CONDITION_PARAM_SKILL_SWORD, points)
  73. setConditionParam(c, CONDITION_PARAM_SKILL_AXE, points)
  74. setConditionParam(c, CONDITION_PARAM_TICKS, -1)
  75. setConditionParam(c, CONDITION_PARAM_SUBID, 4)
  76. return doAddCondition(cid, c)
  77. end
  78. description = "Increases axe/sword/fist/club fighting by 1 per point"
  79. }
  80. }
  81.  
  82. function getPlayerPerks(cid)
  83. local ret = {}
  84. for perk, data in pairs(perks) do
  85. local points = getPlayerStorageValue(cid, data.storage)
  86. if points ~= -1 then
  87. ret[#ret+1] = data.callback
  88. end
  89. end
  90. return ret
  91. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement