function onUse(cid, item, frompos, item2, topos)
local lvl = 200if getPlayerLevel(cid) <= lvl thendoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")return trueendif getPlayerPosition(cid).x > getThingPos(item.uid).x thendoTeleportThing(cid, {x=getThingPos(item.uid).x - 1, y=getThingPos(item.uid).y, z=getThingPos(item.uid).z})elseif getPlayerPosition(cid).x < getThingPos(item.uid).x thendoTeleportThing(cid, {x=getThingPos(item.uid).x + 1, y=getThingPos(item.uid).y, z=getThingPos(item.uid).z})elseif getPlayerPosition(cid).y < getThingPos(item.uid).y thendoTeleportThing(cid, {x=getThingPos(item.uid).x, y=getThingPos(item.uid).y + 1, z=getThingPos(item.uid).z})elseif getPlayerPosition(cid).y > getThingPos(item.uid).y thendoTeleportThing(cid, {x=getThingPos(item.uid).x, y=getThingPos(item.uid).y - 1, z=getThingPos(item.uid).z})endreturn TRUEend
esse script só funciona se vc tiver na frente da porta se vc tiver de kina com ela ele buga teleporta pra parede, quero um que funcione certinho teleporte pra o outro lado da porta rep + pra quem ajudar ai