Advertisement
Guest User

Untitled

a guest
May 21st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.97 KB | None | 0 0
  1. [CENTER][B][SIZE=7]Item Sets[/SIZE][/B]
  2. Another addition known in lots of MMORPG games. By equipping items that are part of a set, bonuses are activated if more parts of the same set are equipped. You can use any item that can be equipped to be part of a set. There are 40 different bonuses that can be added. You can equip different parts of different sets and still get bonuses from all of them. Use command "!sets" to see list of all sets and their bonuses based on parts.[/CENTER]
  3.  
  4. [MEDIA=youtube]7D-41hn22l4[/MEDIA]
  5.  
  6. [CENTER][B][SIZE=7]Bonuses[/SIZE][/B][/CENTER]
  7.  
  8. [LIST=1]
  9. [*]% Max HP
  10. [*]% Max MP
  11. [*]Magic Level
  12. [*]Melee Skills (all in one)
  13. [*]Fist Fighting
  14. [*]Sword Fighting
  15. [*]Axe Fighting
  16. [*]Club Fighting
  17. [*]Distance Fighting
  18. [*]Shielding
  19. [*]Life Steal (heal for % of dealt damage)
  20. [*]Experience
  21. [*]Physical Damage or Protection
  22. [*]Energy Damage or Protection
  23. [*]Earth Damage or Protection
  24. [*]Fire Damage or Protection
  25. [*]Ice Damage or Protection
  26. [*]Holy Damage or Protection
  27. [*]Death Damage or Protection
  28. [*]Elemental Damage or Protection (every element in one except physical)
  29. [*]Cast Flame Strike on Attack
  30. [*]Cast Flame Strike on Hit
  31. [*]Cast Ice Strike on Attack
  32. [*]Cast Ice Strike on Hit
  33. [*]Cast Terra Strike on Attack
  34. [*]Cast Terra Strike on Hit
  35. [*]Cast Death Strike on Attack
  36. [*]Cast Death Strike on Hit
  37. [*]Cast Energy Strike on Attack
  38. [*]Cast Energy Strike on Hit
  39. [*]Cast Divine Missile on Attack
  40. [*]Cast Divine Missile on Hit
  41. [/LIST]
  42. [CENTER][B][SIZE=7]Installation[/SIZE][/B][/CENTER]
  43.  
  44. [LIST=1]
  45. [*]Open [ICODE]data/global.lua[/ICODE].
  46. [*]Add somewhere on top (2nd-3rd line)[CODE=lua]dofile('data/item_sets_const.lua')[/CODE]
  47. [*]Under that add [CODE=lua]dofile('data/item_sets.lua')[/CODE]
  48. [*]Open [ICODE]data/creaturescripts/creaturescripts.xml[/ICODE].
  49. [*]Add [CODE=xml]<event type="login" name="ItemSetsLogin" script="item_sets_core.lua" />
  50. <event type="healthchange" name="ItemSetsHealth" script="item_sets_core.lua" />[/CODE]
  51. [*]Open [ICODE]data/events/events.xml[/ICODE].
  52. [*]Enable [ICODE]onTargetCombat[/ICODE], [ICODE]onGainExperience[/ICODE], [ICODE]onItemMoved[/ICODE] and [ICODE]onLook[/ICODE].
  53. [*]Open [ICODE]data/events/scripts/creature.lua[/ICODE].
  54. [*]Add [ICODE]target:registerEvent("ItemSetsHealth")[/ICODE] inside [ICODE]Creature:onTargetCombat[/ICODE].
  55. [*]Open [ICODE]data/events/scripts/player.lua[/ICODE].
  56. [*]Find [ICODE]Player:onGainExperience[/ICODE] and add [ICODE]onItemSetsGainExperience(self, source, exp, rawExp)[/ICODE] at the end before [ICODE]return exp[/ICODE]
  57. [*]Find [ICODE]Player:onItemMoved[/ICODE] and add [ICODE]onItemSetMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)[/ICODE] inside.
  58. [*]Find [ICODE]Player:onLook[/ICODE] and under [ICODE]local description = "You see " .. thing:getDescription(distance)[/ICODE] add [CODE=lua]description = onItemSetLook(self, thing, position, distance, description)[/CODE]
  59. [*]Open [ICODE]data/talkactions/talkactions.xml[/ICODE] and add [ICODE]<talkaction words="!sets" separator=" " script="sets_cmd.lua" />[/ICODE]
  60. [*]Download [ICODE]item_sets.rar[/ICODE] from attachment at the bottom of this post.
  61. [*]Copy [ICODE]item_sets_const.lua[/ICODE] to [ICODE]data/item_sets_const.lua[/ICODE].
  62. [*]Copy [ICODE]item_sets.lua[/ICODE] to [ICODE]data/item_sets.lua[/ICODE].
  63. [*]Copy [ICODE]item_sets_core.lua[/ICODE] to [ICODE]data/creaturescripts/scripts/item_sets_core.lua[/ICODE].
  64. [*]Copy [ICODE]sets_cmd.lua[/ICODE] to [ICODE]data/talkactions/scripts/sets_cmd.lua[/ICODE].
  65. [/LIST]
  66.  
  67. [CENTER][B][SIZE=7]Configuration[/SIZE][/B][/CENTER]
  68. Every configuration in - [ICODE]data/item_sets.lua[/ICODE]. If you were using version previous to v1.1, just move [ICODE]ITEM_SETS[/ICODE] from [ICODE]data/creaturescripts/scripts/item_sets.lua[/ICODE] to [ICODE]data/item_sets.lua[/ICODE].
  69. Bonus types are located here - [ICODE]data/item_sets_const.lua[/ICODE].
  70. [ICODE]ITEM_SETS[/ICODE] - add sets here
  71. Example
  72. [CODE=lua]ITEM_SETS = {
  73. [1] = { -- set id
  74. name = "Leather Set", -- name of this set
  75. parts = { -- items that are part of this set
  76. {slot = CONST_SLOT_HEAD, item = 2461}, -- slot is where this item can be equipped, item is item id
  77. {slot = CONST_SLOT_ARMOR, item = 2467},
  78. {slot = CONST_SLOT_LEGS, item = 2649},
  79. {slot = CONST_SLOT_FEET, item = 2643}
  80. },
  81. bonuses = { -- list of bonuses based on number of parts equipped
  82. [1] = { -- bonuses when 1 part is equipped
  83. {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
  84. {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
  85. {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
  86. {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
  87. },
  88. [2] = { -- bonuses when 2 parts are equipped
  89. {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
  90. {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
  91. {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
  92. {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
  93. },
  94. [3] = { -- bonuses when 3 parts are equipped
  95. {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
  96. {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
  97. {type = BONUS_TYPE_SHIELDING, value = 5},
  98. {type = BONUS_TYPE_MAXHP, value = 12}
  99. },
  100. [4] = { -- bonuses when 4 parts are equipped
  101. {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
  102. {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
  103. {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
  104. {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
  105. {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
  106. {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
  107. }
  108. }
  109. }
  110. }[/CODE]
  111.  
  112. [CENTER][B][SIZE=7]Changelog[/SIZE][/B][/CENTER]
  113. [B][SIZE=5][1.1.1] - 2019-05-21[/SIZE][/B]
  114. [LIST]
  115. [*]Fixed item moving
  116. [*]Added HP and MP regeneration when switching items
  117. [/LIST]
  118. [B][SIZE=5][1.1.0] - 2019-05-19[/SIZE][/B]
  119. [LIST]
  120. [*]Improved code functionality
  121. [*]Moved ITEM_SETS table to separated file, so future core updates won't interfere with previously created sets
  122. [*]Added new bonus type - Trigger
  123. [*]Added 12 new bonuses - Cast on Attack and Cast on Hit: Flame Strike, Ice Strike, Terra Strike, Death Strike, Divine Missile, Energy Strike. Cast on Attack triggers when player attacks any creature (including players) while Cast on Hit triggers when player gets hit by any creature (including players).
  124. [/LIST]
  125. [B][SIZE=5][1.0.1] - 2019-03-29[/SIZE][/B]
  126. [LIST]
  127. [*]Fixed bonuses refreshing when item was unequipped by dragging on a backpack item and not the container window.
  128. [/LIST]
  129. [B][SIZE=5][1.0.0] - 2019-03-24[/SIZE][/B]
  130. [LIST]
  131. [*]Release version
  132. [/LIST]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement