Não entendi, você que a porta ou o piso?
Na duvida vai os 2...
PISO data/movements/scripts/PisoMagico.lua
function onStepIn(cid, item, pos)
local msg = "Você absorveu o Poder Magico !!!" -- edit please
local erromsg = "Você ja tem o Poder Magico !!!" -- edit please
if isPlayer(cid) == TRUE then
if getPlayerStorageValue(cid, 50000) >= 1 then
doPlayerSetStorageValue(cid, 50000, 1)
doSendMagicEffect(getCreaturePosition(cid),49)
doCreatureSay(cid, msg, TALKTYPE_ORANGE_1)
else
doSendMagicEffect(getCreaturePosition(cid),17)
doCreatureSay(cid, erromsg, TALKTYPE_ORANGE_1)
end
end
return 1
end
movements.xml
<movevent type="StepIn" uniqueid="50000" script="PisoMagico.lua"/>
Porta data/actions/scripts/PortaMagica.lua
function onUse(cid, item, frompos, item2, topos)
local msg = "Você deve achar o Poder Magico !" -- edit please
if getPlayerStorageValue(cid,50000) == 1 then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y
else
pos.y = topos.y
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x
else
pos.x = topos.x
end
else
return 1
end
doTeleportThing(cid,pos)
else
doPlayerSendTextMessage(cid,25,msg)
end
return 1
end
actions.xml
<action uniqueid="50001" script="PortaMagica.lua"/>
* Não testei, mas deve funcionar
É por isso que eu gosto de ajudar (pelo menos tentar ajudar) este fórum, os caras sabe Agradecer né?
Att,
ஓ PẫulǾ ஓ
paulo.boc@hotmail.com