function onStepIn(cid, item, position, fromPosition)       --alterado v1.7 reformulado e melhorado ^^

if isSummon(cid) or ehMonstro(cid) then return false end     --alterado v1.8

local posis = { --{{pos}, storage, cor da roupa},
[1563] = {{x = 359, y = 796, z = 10}, 567865, 1},
[1564] = {{x = 1053, y = 1050, z = 7}},
}
local action = posis[item.actionid]
local out = getPlayerSex(cid) == 0 and 270 or 273
                                                                           --alterado v1.9
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 5700) >= 1 or getPlayerStorageValue(cid, 17000) == 1 then
   doPlayerSendCancel(cid, "You can't do that while ride/fly/or in a bike.")
   doTeleportThing(cid, fromPosition, false)  --alterado v1.6
   return true
end
if getPlayerStorageValue(cid, 52480) >= 1 then
   doPlayerSendCancel(cid, "You are already dueling!")
   doTeleportThing(cid, fromPosition, false)  --alterado v1.6
   return true
end

if posis[item.actionid] then
   if isInArray({1563}, item.actionid) then
      setPlayerStorageValue(cid, action[2], 1)
      doSetCreatureOutfit(cid, {lookType = out, lookBody = action[3], lookHead = action[3], lookLegs = action[3], lookFeet = action[3]}, -1)
   else
      setPlayerStorageValue(cid, 567865, -1) 
      doRemoveCondition(cid, CONDITION_OUTFIT) 
   end
   doTeleportThing(cid, getClosestFreeTile(cid, action[1]), false)  
elseif item.actionid == 1565 then
   if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
      doPlayerSendCancel(cid, "You can't do that while is in battle!")
      doTeleportThing(cid, fromPosition, false)
   end
end
   
return true
end