Script porta:
Em data/actions/scripts crie um arquivo.lua e cole isto dentro:
local storage = {35019,35018}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i=1, #storage do
if getPlayerStorageValue(cid, storage[i]) <= 0 then
return doPlayerSendCancel(cid, "Você não tem permissão para passar dessa porta.")
end
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return true
end
Em actions.xml cole a tag:
<action actionid="ACTION_ID_DA_PORTA" script="NOMEDOSEUARQUIVO.lua"/>
Script portal:
Em data/movements/scripts crie um arquivo.lua e cole isto dentro:
local storage = {35019,35018,35020} -- storages
local npos = {x=1, y=1, z=1} --posição para onde o teleport levará
function onStepIn(cid, item, position, fromPosition)
for i=1, #storage do
if getPlayerStorageValue(cid, storage[i]) > 0 then
doTeleportThing(cid,npos)
doSendMagicEffect(npos, 10)
else
doTeleportThing(cid,fromPosition, true)
return doPlayerSendCancel(cid, "Você não tem a permissão para entrar aqui.")
end
end
return TRUE
end
Em movements.xml cole a tag:
<movevent type="StepIn" actionid="ACTION_ID_DO_TELEPORT" event="script" value="NOMEDOSEUARQUIVO.lua"/>


info
Grupo: Cavaleiro
Registrado: 02/07/08
Posts: 156
Reputação: +4
presiso de 2 scripts nao sei se e posivel mais vamu ve ne
presiso de uma porta qe so passe se vc tiver "storages = {35019,35018}"
e um portal com a mesma funçao so que com " storages = {35019,35018,35020}"
agradeço desde ja!
bom ja que ninguem posto um script ne eu tentei faser um eu nao sei nada de scripts entao fui tentando juntar alguns sei la eu so loko
function onUse(cid, item, frompos, item2, topos)
local storage = 35019,35018
if getPlayerStorageValue(cid,storage) >= 2 and doTeleportThing(cid,topos) or doPlayerSendCancel(cid, "Você não pode passar aqui.") then
end
if getPlayerPosition(cid).x > getThingPos(item.uid).x then
doTeleportThing(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 then
doTeleportThing(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 then
doTeleportThing(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 then
doTeleportThing(cid, {x=getThingPos(item.uid).x, y=getThingPos(item.uid).y - 1, z=getThingPos(item.uid).z})
end
return TRUE
end
fiz isso e por hora deu certo a porta nao tava abrindo entao peguei esse script e teleporta pra frent da porta xDD
se alguem tiver um melhor demoro esse e so uma gambiara kk
Editado Setembro 11 por Dersinho