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},
[7408] = {{x = 1054, y = 1049, z = 7}, 878781, 52},
[7412] = {{x = 1064, y = 1059, z = 7}, 878782, 52},
[7413] = {{x = 1060, y = 1059, z = 7}},
[7414] = {{x = 1063, y = 1059, z = 7}, 878783, 52},
[7415] = {{x = 1063, y = 1060, z = 7}, 878784, 52},
[7416] = {{x = 1069, y = 1053, z = 7}, 878785, 113},
[7417] = {{x = 1069, y = 1053, z = 7}, 878786, 113},
[7418] = {{x = 1070, y = 1049, z = 7}},
[7419] = {{x = 1064, y = 1061, z = 7}, 878787, 1},
[7420] = {{x = 1069, y = 1064, z = 7}},
[7421] = {{x = 1068, y = 1061, z = 7}, 878788, 35},
[7422] = {{x = 1065, y = 1059, z = 7}, 878789, 54},
[7423] = {{x = 1065, y = 1058, z = 7}, 878790, 114},
[7430] = {{x = 1062, y = 1058, 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({7411, 7412, 7414, 7415, 7416, 7417, 7419, 7421, 7422, 7423}, 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, 878781, -1) 
      setPlayerStorageValue(cid, 878782, -1)
      setPlayerStorageValue(cid, 878783, -1) 
      setPlayerStorageValue(cid, 878784, -1)
      setPlayerStorageValue(cid, 878785, -1) 
      setPlayerStorageValue(cid, 878786, -1)
      setPlayerStorageValue(cid, 878787, -1) 
      setPlayerStorageValue(cid, 878788, -1)
      setPlayerStorageValue(cid, 878789, -1) 
      setPlayerStorageValue(cid, 878790, -1)
      doRemoveCondition(cid, CONDITION_OUTFIT) 
   end
   doTeleportThing(cid, getClosestFreeTile(cid, action[1]), false)  
elseif item.actionid == 7425 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