function onStepIn(cid, item, position, fromPosition)
if (item.actionid == 13731) then
a = 0
for check_forjax = 217,223 do -- check X começo e final da sala
for check_forjay = 64,65 do -- check Y começo e final da sala
forjapos = {x=check_forjax, y=check_forjay, z=7, stackpos=253}
room_forja = getThingfromPos(forjapos )
if room_forja.itemid == 0 then
a = a +1
if a >= 4 then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doPlayerSendCancel(cid,"Espere o Jogador sair da forja.")
return TRUE
end
end
end
end
end
return TRUE
end
Tenta assim.