function onEquip(cid, item, slot)
-----set 1
if isInArray(EQUIPMENT.armor_set1, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set1, slot_head) and isInArray(EQUIPMENT.armor_set1, slot_armor) and isInArray(EQUIPMENT.armor_set1, slot_legs) and isInArray(EQUIPMENT.armor_set1, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 1", math.random(1, 25))
end
-----set 2
elseif isInArray(EQUIPMENT.armor_set2, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set2, slot_head) and isInArray(EQUIPMENT.armor_set2, slot_armor) and isInArray(EQUIPMENT.armor_set2, slot_legs) and isInArray(EQUIPMENT.armor_set2, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 2", math.random(1, 25))
end
------set 3
elseif isInArray(EQUIPMENT.armor_set3, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set3, slot_head) and isInArray(EQUIPMENT.armor_set3, slot_armor) and isInArray(EQUIPMENT.armor_set3, slot_legs) and isInArray(EQUIPMENT.armor_set3, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 3", math.random(1, 25))
end
end
return true
end