DA
pedido

Teleporte por level

Por damiaotorres, 31 de mar. de 2014 em Scripts

otserv
tibia
script
18
1.7k
01 de abril de 2014 às 13:43

eu peguei meu char level 145 entrei na area desloguei e não saiu de la '-' , não precisa mais pode deixa queto

Muito obrigado

Editado Abril 1 por damiaotorres

01 de abril de 2014 às 13:58

Faz assim:

em movements coloca esse script :

function onStepIn(cid, item, position, fromPosition)

local pos1 = {x = 1027, y = 912, z = 5} -- Posicao que sera levado

 if getPlayerLevel(cid) >= 120 and getPlayerLevel(cid) <= 140 then
    doTeleportThing(cid, pos1)
    setPlayerStorageValue(cid, 190983, 1)
 else
    doPlayerSendCancel(cid, "Voce nao pode entrar nesse Tp.")
    doTeleportThing(cid, fromPosition, true)
 end

return true
end

agora em creaturescripts coloca esse :

function onThink(cid, interval)

local pos = {x= 1, y= 2, z= 3} -- posição pra onde o player vai

if getPlayerLevel(cid) > 140 and getPlayerStorageValue(cid, 190983) >= 1 then
  if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
     doTeleportThing(cid, pos)
     setPlayerStorageValue(cid, 190983, 0)
  end
end

 return true
end

com esse script , quando o player passar do level 140, e se ele não tiver com batler o mesmo será teleportado.

 

a tag que vai em login.lua é essa:

registerCreatureEvent(cid, "Nome do Evento")

e a tag que vai em creaturescripts.xml é essa :

 <event type="think" name="Nome do Evento" event="script" value="Nome do Arquivo.lua"/>

Editado Abril 1 por DuuhCarvalho

2 semanas depois...
09 de abril de 2014 às 12:30

Tópico movido para Pedidos e dúvidas resolvidos.