Ir para conteúdo

Featured Replies

  • Respostas 21
  • Visualizações 3.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local config = { pos = {x=42, y=234, z=7}, -- posição da aegis dimension tempo = 15, -- tempo pra voltar effect1 = 66, -- efeito ao ser teleportado effect2 = 10 -- efeito ao voltar } function

  • [NEW] Hiraishin Ni No Dan http://www.tibiaking...shin-ni-no-dan/

  • a de se teleportar eu ja fiz.. a outra eu não vou fazer porque ela requer um nível de detalhes que eu não to afim de ficar discutindo com você até você me explicar.   local config = { pos = {x=42,

Postado
  • Solução
local config = {
pos = {x=42, y=234, z=7}, -- posição da aegis dimension
tempo = 15, -- tempo pra voltar
effect1 = 66, -- efeito ao ser teleportado
effect2 = 10 -- efeito ao voltar
}








function onCastSpell(cid, var)
if isPlayer(getCreatureTarget(cid)) then
target = getCreatureTarget(cid)
addEvent(doTeleportThing, 1000*config.tempo, target, getThingPos(target), true)
addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2)
doSendMagicEffect(getThingPos(target), config.effect1)
doTeleportThing(target, config.pos)
if isCreature(cid) then
doPlayerSendTextMessage(target, 27, "You were teleported by ".. getCreatureName(cid) ..".")
end
if isPlayer(cid) and isCreature(target) then
doPlayerSendTextMessage(cid, 27, "You teleported ".. getCreatureName(target) .."!")
end
for i = 1,config.tempo  do
addEvent(function()
if isCreature(target) then
doPlayerSendTextMessage(target,25,"You'll be back in " .. config.tempo -i +1 .. " second(s)")
end
end, 1000*i)
end
else
doPlayerSendCancel(cid, "You can only use this spell in players")
end
return true
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo