Friend if you can not understand what the boy wants, then do not say it's possible. because that is not true.You can do it with movements perfectly, you only need conditions.
function onEquip(cid, item, slot)
if getPlayerSlotItem(cid, CONST_SLOT_LEFT) then
weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid
elseif getPlayerSlotItem(cid, CONST_SLOT_RIGHT) then
weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid
elseif weapon and weapon == 2392 and getPlayerSkillLevel(cid, SKILL_SHIELD) >= 55 then
return true
elseif getPlayerSlotItem(cid, CONST_SLOT_LEFT) == false and getPlayerSlotItem(cid, CONST_SLOT_RIGHT) == false then
return true
else
if getPlayerSkillLevel(cid, SKILL_SHIELD) < 55 then
doPlayerSendCancel(cid, 'You need 55 shielding skill to equip this')
return false
end
if weapon ~= 2392 then
doPlayerSendCancel(cid, 'You need both hands free to equip this.')
return false
end
end
end
function onEquip(cid, item,slot)
if getPlayerSlotItem(cid, CONST_SLOT_LEFT) then
weapon = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid
elseif getPlayerSlotItem(cid, CONST_SLOT_RIGHT) then
weapon = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid
end
local it = ItemType(weapon):getWeaponType()
if (getPlayerSlotItem(cid, CONST_SLOT_LEFT) and it ~= 5 and getPlayerSkillLevel(cid, SKILL_SHIELD) < 55) or (getPlayerSlotItem(cid, CONST_SLOT_RIGHT) and it ~= 5 and getPlayerSkillLevel(cid, SKILL_SHIELD) < 55) then -- If it has a weapon already equiped on any of the hands, cant equip.
player:sendCancelMessage('You need both hands free to equip this.')
return false
elseif (getPlayerSlotItem(cid, CONST_SLOT_LEFT) and it == 5 and getPlayerSkillLevel(cid, SKILL_SHIELD) < 55) or (getPlayerSlotItem(cid, CONST_SLOT_RIGHT) and it == 5 and getPlayerSkillLevel(cid, SKILL_SHIELD) < 55) then -- If it has a shieldalready equiped on any of the hands, cant equip sword.
player:sendCancelMessage('You need both hands free to equip this.')
return false
else
return true
end
end
queryAdd
if (slotPosition & SLOTP_TWO_HAND)
if ((slotPosition & SLOTP_TWO_HAND) && getSkillLevel(SKILL_SHIELD) < 55)
case CONST_SLOT_RIGHT:
if (slotPosition & SLOTP_TWO_HAND)
if ((slotPosition & SLOTP_TWO_HAND) && getSkillLevel(SKILL_SHIELD) < 55)
if (leftItem->getSlotPosition() & SLOTP_TWO_HAND)
if ((leftItem->getSlotPosition() & SLOTP_TWO_HAND) && getSkillLevel(SKILL_SHIELD) < 55)
case CONST_SLOT_RIGHT:
if (slotPosition & SLOTP_TWO_HAND)
if ((slotPosition & SLOTP_TWO_HAND) && getSkillLevel(SKILL_SHIELD) < 55)
if (rightItem->getSlotPosition() & SLOTP_TWO_HAND)
if ((rightItem->getSlotPosition() & SLOTP_TWO_HAND) && getSkillLevel(SKILL_SHIELD) < 55)
Friend if you can not understand what the boy wants, then do not say it's possible. because that is not true.You can do it with movements perfectly, you only need conditions.