Ir para conteúdo
  • 0

Porta Que Teleporta


Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0

Aehuaheuhauhuhea, ta na mão:

 

function onUse(cid, item, frompos, item2, topos)

 

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

 

Coloca essa tag se for pra todos os itens de um certo id:

 

<action itemid="ID;OUTROID;OUTROID;OUTROID" event="script" value="Nome_do_Aquivo.lua"/>

 

Só vai adicionando os ids e colocando ; para separa-los.

 

Se for só pra alguns itens no mapa, põe um actionid nesses itens e usa essa tag:

 

<action actionid="ACTIONID" event="script" value="Nome_do_Arquivo.lua"/>

 

Valeu.

Editado por Demonbholder
Link para o comentário
https://xtibia.com/forum/topic/144444-porta-que-teleporta/#findComment-1006205
Compartilhar em outros sites

  • 0

Mas ai o cara é teleportado para o outro lado mesmo não tendo o level que a porta exige. Qualquer level pode entrar em uma porta de level 300. Se puder me dar um help, eu agradeceria.

Link para o comentário
https://xtibia.com/forum/topic/144444-porta-que-teleporta/#findComment-1323535
Compartilhar em outros sites

×
×
  • Criar Novo...