demonrage
New Member
- Joined
- Oct 28, 2014
- Messages
- 22
- Reaction score
- 2
Can someone help me here, to put some check on not moving the item from the equipped slot, while the summoned pet is on the map.
otx2
Script:
otx2
Script:
Lua:
local itemsBlocked = {12345}
local function isItemEquippedInSlots(cid, uid)
for slot = 1, 10 do
if slot ~= 3 and getPlayerSlotItem(cid, slot).uid == uid then
return true
end
end
return false
end
function onThrow(cid, item, fromPosition, toPosition)
local fromPlayer = fromPosition.x == 65535
local toPlayer = toPosition.x == 65535
if fromPlayer and not toPlayer and isInArray(itemsBlocked, item.itemid) then
if isItemEquippedInSlots(cid, item.uid) then
doPlayerSendCancel(cid, "Você não pode mover este item enquanto estiver equipado!")
return false
end
end
return true
end