• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

CreatureEvent [TFS 1.3] Item Sets

Status
Not open for further replies.
I'm getting more free time now so I'm back with new stuff, starting with update to Item Sets.


[1.1.0] - 2019-05-19
  • Improved code functionality
  • Moved ITEM_SETS table to separated file, so future core updates won't interfere with previously created sets
  • Added new bonus type - Trigger
  • 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).
Updated installation and configuration! If you are upgrading from v1.0 to v1.1+ then follow new instructions!

Installation

  1. Open data/global.lua.
  2. Add somewhere on top (2nd-3rd line)
    Lua:
    dofile('data/item_sets_const.lua')
  3. Under that add
    Lua:
    dofile('data/item_sets.lua')
  4. Open data/creaturescripts/creaturescripts.xml.
  5. Add
    XML:
    <event type="login" name="ItemSetsLogin" script="item_sets_core.lua" />
    <event type="healthchange" name="ItemSetsHealth" script="item_sets_core.lua" />
  6. Open data/events/events.xml.
  7. Enable onTargetCombat, onGainExperience, onItemMoved and onLook.
  8. Open data/events/scripts/creature.lua.
  9. Add target:registerEvent("ItemSetsHealth") inside Creature:onTargetCombat.
  10. Open data/events/scripts/player.lua.
  11. Find Player:onGainExperience and add onItemSetsGainExperience(self, source, exp, rawExp) at the end before return exp
  12. Find Player:onItemMoved and add onItemSetMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder) inside.
  13. Find Player:onLook and replace local description = "You see " .. thing:getDescription(distance) to this
    Lua:
    local description = nil
    local itemSetLook = onItemSetLook(self, thing, position, distance)
    if itemSetLook ~= nil then
    description = itemSetLook
    else
    description = "You see " .. thing:getDescription(distance)
    end
  14. Open data/talkactions/talkactions.xml and add <talkaction words="!sets" separator=" " script="sets_cmd.lua" />
  15. Download item_sets.rar from attachment at the bottom of this post.
  16. Copy item_sets_const.lua to data/item_sets_const.lua.
  17. Copy item_sets.lua to data/item_sets.lua.
  18. Copy item_sets_core.lua to data/creaturescripts/scripts/item_sets_core.lua.
  19. Copy sets_cmd.lua to data/talkactions/scripts/sets_cmd.lua.
Configuration
Every configuration in - data/item_sets.lua. If you were using version previous to v1.1, just move ITEM_SETS from data/creaturescripts/scripts/item_sets.lua to data/item_sets.lua.
Bonus types are located here - data/item_sets_const.lua.
Example
Lua:
ITEM_SETS = {
  [1] = { -- set id
    name = "Leather Set", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 2461}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 2467},
      {slot = CONST_SLOT_LEGS, item = 2649},
      {slot = CONST_SLOT_FEET, item = 2643}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
      }
    }
  }
}
 

Attachments

  • item_sets-1_1_0.rar
    4.8 KB · Views: 20 · VirusTotal
Last edited:
what was good, got even better!

a small note:

you forgot to add the comma(,) at the end of the line in data\itens_sets.lua
Lua:
{type = BONUS_TYPE_MAXHP, value = 15},

in addition, the following two lines do not follow the same formatting {(space) code (space)}.

If you prefer I am attaching the edited file for your evaluation ... I added the old sets of the first version too.

I'm just trying to help and thank you for the great work.
 

Attachments

Last edited:
what was good, got even better!
Thanks!
you forgot to add the comma(,) at the end of the line in data\itens_sets.lua
Thanks, fixed.
in addition, the following two lines do not follow the same formatting {(space) code (space)}.
Fixed :p

the system does not recalculate the value of hp when switching to an item (other item different than the set)
It does. There is nothing wrong with that, just tested. Make sure you followed installation properly and use Player:onItemMoved (which is TFS 1.3 only) rather than Player:onItemMove. Uh, I haven't try to change it to non-set item before, wow. Fixed, updated attachment file in previous post.
 
Last edited:
It does. There is nothing wrong with that, just tested. Make sure you followed installation properly and use Player:onItemMoved (which is TFS 1.3 only) rather than Player:onItemMove. Uh, I haven't try to change it to non-set item before, wow. Fixed, updated attachment file in previous post.

now it updates the value. however, when placing a different item in the set, the current value of it is updated as if it did not have the items.

only part with item set 2/4: 108/108 hp.

then, i f iput the common boots or desequid (if i have) and: 100/108 hp.

the expected result would be no change in that case, right?

 
Last edited:
now it updates the value. however, when placing a different item in the set, the current value of it is updated as if it did not have the items.

only part with item set 2/4: 108/108 hp.

then, i f iput the common boots or desequid (if i have) and: 100/108 hp.

the expected result would be no change in that case, right?

Actually no, conditions are adding MAX HP, not current HP so that's why it's staying on current HP. You can heal player when they change items and Max HP bonus is applied. To make sure it's not easy to exploit and have free healing, we should check if players current HP is full before condition is added. That way we can heal them and it would be as if they were at 100% all the time. Just be aware that even 1HP less than maxHP and it won't heal them so except same results as you noticed.
Same thing with Mana.

Update
[1.1.1] - 2019-05-21
  • Fixed some important stuff
  • Added HP and MP regeneration when switching items

New installation steps, please update accordingly.
  1. Open data/events/scripts/player.lua
  2. Under local description = "You see " .. thing:getDescription(distance) add description = onItemSetLook(self, thing, position, distance, description)
If you have previous versions installed then
This is how first few lines should look like
Lua:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    description = onItemSetLook(self, thing, position, distance, description)
    if self:getGroup():getAccess() then
 

Attachments

  • item_sets-1_1_1.rar
    4.9 KB · Views: 26 · VirusTotal
Last edited:
Offtopic: Is there a tutorial or something for the items background? That blue bg on demon shield and so on.
 
Very nice work. I will take a look at it later for my server!
 
Congratulations on the work, you really and very well have tested all your systems and they all work for you and a god.

One question, would be able to add possibility in increase of drop, increase of gold when equipped.
 
explain to me how you put it, can not put it
Please read about Lua and especially tables. This is basic stuff, if you are going to work on your server and add custom features then you should really learn Lua.
Copy pasting won't get you anywhere.

One question, would be able to add possibility in increase of drop, increase of gold when equipped.
Not working on any updates atm.
 
Please read about Lua and especially tables. This is basic stuff, if you are going to work on your server and add custom features then you should really learn Lua.
Copy pasting won't get you anywhere.


Not working on any updates atm.
mano, just give me an example of how it puts another set, because I tried here and gave errors
 
mano, just give me an example of how it puts another set, because I tried here and gave errors
It's shown in the first post. If you don't know how to add more data to a table then sorry but you will fail with starting your own server.
If you are expecting step by step of how to do it then give up. I have made this feature so you don't have to, but I'm not going to configure your stuff for you.
Show me what you have tried and I'll tell you what you did wrong and why, at least you will learn something.

Please people, stop relying on others with everything, be self-sufficient for once.
 
It's shown in the first post. If you don't know how to add more data to a table then sorry but you will fail with starting your own server.
If you are expecting step by step of how to do it then give up. I have made this feature so you don't have to, but I'm not going to configure your stuff for you.
Show me what you have tried and I'll tell you what you did wrong and why, at least you will learn something.

Please people, stop relying on others with everything, be self-sufficient for once.
ITEM_SETS = {
[1] = { -- set id
name = "Supremy Set/Mage", -- name of this set
parts = { -- items that are part of this set
{slot = CONST_SLOT_HEAD, item = 27065}, -- slot is where this item can be equipped, item is item id
{slot = CONST_SLOT_ARMOR, item = 25188},
{slot = CONST_SLOT_LEGS, item = 21700},
{slot = CONST_SLOT_FEET, item = 25412}
},
bonuses = { -- list of bonuses based on number of parts equipped
[1] = { -- bonuses when 1 part is equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
{type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
},
[2] = { -- bonuses when 2 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
{type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
},
[3] = { -- bonuses when 3 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 5},
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
{type = BONUS_TYPE_SHIELDING, value = 5},
{type = BONUS_TYPE_MAXHP, value = 12}
},
[4] = { -- bonuses when 4 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
{type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
{type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
{type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
}
}
}
ITEM_SETS = {
[2] = { -- set id
name = "Supremy Set/EK/RP", -- name of this set
parts = { -- items that are part of this set
{slot = CONST_SLOT_HEAD, item = 2499}, -- slot is where this item can be equipped, item is item id
{slot = CONST_SLOT_ARMOR, item = 2500},
{slot = CONST_SLOT_LEGS, item = 25190},
{slot = CONST_SLOT_FEET, item = 25412}
},
bonuses = { -- list of bonuses based on number of parts equipped
[1] = { -- bonuses when 1 part is equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
{type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
},
[2] = { -- bonuses when 2 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
{type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
},
[3] = { -- bonuses when 3 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 5},
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
{type = BONUS_TYPE_SHIELDING, value = 5},
{type = BONUS_TYPE_MAXHP, value = 12}
},
[4] = { -- bonuses when 4 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
{type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
{type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
{type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
}
}
}
}

}
 
ITEM_SETS = {
[1] = { -- set id
name = "Supremy Set/Mage", -- name of this set
parts = { -- items that are part of this set
{slot = CONST_SLOT_HEAD, item = 27065}, -- slot is where this item can be equipped, item is item id
{slot = CONST_SLOT_ARMOR, item = 25188},
{slot = CONST_SLOT_LEGS, item = 21700},
{slot = CONST_SLOT_FEET, item = 25412}
},
bonuses = { -- list of bonuses based on number of parts equipped
[1] = { -- bonuses when 1 part is equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
{type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
},
[2] = { -- bonuses when 2 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
{type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
},
[3] = { -- bonuses when 3 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 5},
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
{type = BONUS_TYPE_SHIELDING, value = 5},
{type = BONUS_TYPE_MAXHP, value = 12}
},
[4] = { -- bonuses when 4 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
{type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
{type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
{type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
}
}
}
ITEM_SETS = {
[2] = { -- set id
name = "Supremy Set/EK/RP", -- name of this set
parts = { -- items that are part of this set
{slot = CONST_SLOT_HEAD, item = 2499}, -- slot is where this item can be equipped, item is item id
{slot = CONST_SLOT_ARMOR, item = 2500},
{slot = CONST_SLOT_LEGS, item = 25190},
{slot = CONST_SLOT_FEET, item = 25412}
},
bonuses = { -- list of bonuses based on number of parts equipped
[1] = { -- bonuses when 1 part is equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
{type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
},
[2] = { -- bonuses when 2 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
{type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
},
[3] = { -- bonuses when 3 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 5},
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
{type = BONUS_TYPE_SHIELDING, value = 5},
{type = BONUS_TYPE_MAXHP, value = 12}
},
[4] = { -- bonuses when 4 parts are equipped
{type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
{type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
{type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
{type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
{type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
{type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
}
}
}
}

}
ITEM_SETS is where you put new sets, it's not meant to be copied. You did everything correctly except that part.
There is indexing involved, in the example in first post there is
Lua:
[1] = {
  -- Set code
}
That [1] is index 1, for first set. To add more, you can simply copy that entire [1] = { -- Set Code } part, put comma , at the end of } from first set and paste new one, then change its index to n+1 (1, 2, 3, 4 .. n+1). For example

Lua:
ITEM_SETS = {
  [1] = { -- set #1
    -- Set code
  }, -- notice this comma
  [2] = { -- set #2
    -- Set code
  }, -- another comma
  [3] = { -- set #3
    -- Set code
  } -- comma not needed at the last entry
}
 
ITEM_SETS is where you put new sets, it's not meant to be copied. You did everything correctly except that part.
There is indexing involved, in the example in first post there is
Lua:
[1] = {
  -- Set code
}
That [1] is index 1, for first set. To add more, you can simply copy that entire [1] = { -- Set Code } part, put comma , at the end of } from first set and paste new one, then change its index to n+1 (1, 2, 3, 4 .. n+1). For example

Lua:
ITEM_SETS = {
  [1] = { -- set #1
    -- Set code
  }, -- notice this comma
  [2] = { -- set #2
    -- Set code
  }, -- another comma
  [3] = { -- set #3
    -- Set code
  } -- comma not needed at the last entry
}
Code:
ITEM_SETS = {
  [1] = { -- set id
    name = "Supremy Set/Mage", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 27065}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 25188},
      {slot = CONST_SLOT_LEGS, item = 21700},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
        }
    }
  },
 
 
  ITEM_SETS = {
  [2] = { -- set id
    name = "Supremy Set/EK/RP", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 2499}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 2500},
      {slot = CONST_SLOT_LEGS, item = 25190},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
      }
    }
  }
  }
  }


I put two sets, but only one set that works
 
Code:
ITEM_SETS = {
  [1] = { -- set id
    name = "Supremy Set/Mage", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 27065}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 25188},
      {slot = CONST_SLOT_LEGS, item = 21700},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
        }
    }
  },


  ITEM_SETS = {
  [2] = { -- set id
    name = "Supremy Set/EK/RP", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 2499}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 2500},
      {slot = CONST_SLOT_LEGS, item = 25190},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
      }
    }
  }
  }
  }


I put two sets, but only one set that works
Read my post again...
 
Read my post again...
only one set works
Lua:
ITEM_SETS = {
  [1] = { -- set id
    name = "Supremy Set/Mage", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 27065}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 25188},
      {slot = CONST_SLOT_LEGS, item = 21700},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
  },
 
  [2] = { -- set id
    name = "Supremy Set/EK/RP", -- name of this set
    parts = { -- items that are part of this set
      {slot = CONST_SLOT_HEAD, item = 2499}, -- slot is where this item can be equipped, item is item id
      {slot = CONST_SLOT_ARMOR, item = 2500},
      {slot = CONST_SLOT_LEGS, item = 25190},
      {slot = CONST_SLOT_FEET, item = 25412}
    },
    bonuses = { -- list of bonuses based on number of parts equipped
      [1] = { -- bonuses when 1 part is equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 1}, -- add +1 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 1}, -- add +1 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 1}, -- add +1 to shielding
        {type = BONUS_TYPE_MAXHP, value = 5} -- add +5% max HP
      },
      [2] = { -- bonuses when 2 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 3}, -- add +3 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 3}, -- add +3 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 3}, -- add +3 to shielding
        {type = BONUS_TYPE_MAXHP, value = 8} -- add +8% max HP
      },
      [3] = { -- bonuses when 3 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 5},
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 5},
        {type = BONUS_TYPE_SHIELDING, value = 5},
        {type = BONUS_TYPE_MAXHP, value = 12}
      },
      [4] = { -- bonuses when 4 parts are equipped
        {type = BONUS_TYPE_MELEE_SKILLS, value = 8}, -- add +8 to all melee skills
        {type = BONUS_TYPE_DISTANCE_FIGHTING, value = 8}, -- add +8 to distance fighting
        {type = BONUS_TYPE_SHIELDING, value = 8}, -- add +8 to shielding
        {type = BONUS_TYPE_MAXHP, value = 15}, -- add +15% max HP
        {type = BONUS_TYPE_FLAMESTRIKE_ON_ATTACK, min = 100, max = 150, chance = 40}, -- cast Flame Strike on Attack, 100-150 damage, 40% chance
        {type = BONUS_TYPE_FLAMESTRIKE_ON_HIT, min = 100, max = 150, chance = 40} -- cast Flame Strike on Hit, 100-150 damage, 40% chance
      }
    }
  }
  }
  }
  }
 
Status
Not open for further replies.
Back
Top