115820
Member
I need relogin to work
Then you didn't follow install instructions properly.I need relogin to work
I try 2 times. But now i just have 1 error. When i onEquip helmet dont give buffs, when deEquip hemet give buffs. (others parts works fine, just helmet not)system works fine, tested it. You are probably doing something wrong. recheck!
should it look like this?
function CreaturenTargetCombat(target)
target:registerEvent("ItemSetsHealth"
return RETURNVALUE_NOERROR
end
function Creature:onTargetCombat(target)
target:registerEvent("ItemSetsHealth")
return RETURNVALUE_NOERROR
end
I think this should work.yo
is it not possible to use two sets with effects at same time?
explain:
i have a set 3/5 means im getting 12% everything is working
but if im trying to put a other part of a set ( 1/5 ) I dont get the extra hp you know
I think this should work.
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},
{slot = CONST_SLOT_SHIELD, item = 2526}
},
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_MAXMP, value = 2},
{type = BONUS_TYPE_MAXHP, value = 2}, -- add +5% max HP
{type = BONUS_TYPE_ELEMENTAL_PROTECTION, value = 1}
},
[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_MAXMP, value = 4},
{type = BONUS_TYPE_MAXHP, value = 4}, -- add +8% max HP
{type = BONUS_TYPE_ELEMENTAL_PROTECTION, value = 2}
},
[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_MAXMP, value = 6},
{type = BONUS_TYPE_MAXHP, value = 6},
{type = BONUS_TYPE_ELEMENTAL_PROTECTION, value = 3}
},
[4] = { -- 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_MAXMP, value = 8},
{type = BONUS_TYPE_MAXHP, value = 8},
{type = BONUS_TYPE_ELEMENTAL_PROTECTION, value = 4}
},
[5] = { -- 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_MAXMP, value = 10},
{type = BONUS_TYPE_MAXHP, value = 10}, -- add +15% max HP
{type = BONUS_TYPE_ELEMENTAL_PROTECTION, value = 5},
{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 = "Yalah Set", -- name of this set
parts = { -- items that are part of this set
{slot = CONST_SLOT_HEAD, item = 9778}, -- slot is where this item can be equipped, item is item id
{slot = CONST_SLOT_ARMOR, item = 9776},
{slot = CONST_SLOT_LEGS, item = 9777},
{slot = CONST_SLOT_FEET, item = 2646},
{slot = CONST_SLOT_SHIELD, item = 8905}
},
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_MAXMP, value = 5},
{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_MAXMP, value = 8},
{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_MAXMP, value = 10},
{type = BONUS_TYPE_MAXHP, value = 10}
},
[4] = { -- 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_MAXMP, value = 12},
{type = BONUS_TYPE_MAXHP, value = 12}
},
[5] = { -- 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_MAXMP, value = 15},
{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
}
}
},
}
Check your sets then, looks like you have typo or something.
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onItemMoved
...aturescripts/scripts/item_sets_system/item_sets_core.lua:230: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: at 0x55f87b8c6e40
[C]: in function 'ipairs'
...aturescripts/scripts/item_sets_system/item_sets_core.lua:230: in function 'RefreshPlayerSet'
...aturescripts/scripts/item_sets_system/item_sets_core.lua:21: in function 'onItemSetMoved'
data/events/scripts/player.lua:491: in function <data/events/scripts/player.lua:490>
Lua Script Error: [Event Interface]