Ajuda Spell 'kamui'

wesleybeek
em Scripts

wesleybeek

SoulNTO Online
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/11/12Posts: 124Char no Tibia: Xtibia Soul

Olá Galera do XTIBIA, venho aqui pedir a voces que me ajudem com uma Dúvida, eu tenho um Script em que ele faz seguinte sequencia:

(Torget) Ao falar "Mangekyou Kamui" o Torget e levado para "
x y z" em que após 10 Segundos o Torget Levado para Mundo Retorna para onde o Spell foi Utilizando (Torget = Inimigo)

Mas queria que modificassem ou talvez Criasse (Se ja existe no Fórum por favor Passa Link, sou meio Lerdo) -
Em que no Spell quando o Player 'x' usar no torget 'y' o Torget 'y' Seria Mandado para Mundo '
x y z' e Nao iria retornar, ele ira ficar Preso no Mundo em que La Tera Varios Tps etc.. (Mundo e o Teleport que Retora ja estão Configurados)

 

X Y Z - 1517, 417, 6

Level - 340

Se puder colocar "Exhaustion" (voce só pode usar spell daqui x tempo)

Se puder Ajudar.. dou
REP+
Agradeço desde Já.

Vou Mandar o Spell "Kamui" talvez se Precisar


Kamui.Lua

local newPos1 = {x = 0, y = 0, z = 0} --pos pra onde sera levado o caster da spell

local newPos2 = {x = 1517, y = 417, z = 6} --pos pra onde sera levado o target
local function teleport(cid, pid, pos, pos2)
if isCreature(cid) then
doTeleportThing(cid, getClosestFreeTile(cid, pos))
doSendMagicEffect(getPlayerPosition(cid), 30)
end
if isCreature(pid) then
doTeleportThing(pid, getClosestFreeTile(pid, pos2 or pos))
doSendMagicEffect(getPlayerPosition(pid), 30)
end
end
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if not isCreature(target) or not isPlayer(target) then
return doPlayerSendTextMessage(cid, 27, "Apenas Com Um Alvo Para usar Mangekyou Kamui.")
end
if getPlayerStorageValue(cid, 33333) < os.time () then
local target = getCreatureTarget(cid)
local posCid = getPlayerPosition(cid)
local posTarget = getPlayerPosition(target)
local tempo = 10000 -- 10s
setPlayerStorageValue(cid, 33333, os.time () + 30)
teleport(cid, target, newPos1, newPos2)
addEvent(teleport, tempo, cid, target, posCid, posTarget)
else
doPlayerSendCancel(cid, "Voce só pode usar esse jutsu daki a "..getPlayerStorageValue(cid, 33333) - os.time ().." Segundos ")
end
return true
end

Spell.xml
         <instant name="Mangekyou Kamui" words="mangekyou kamui" allowfaruse="1" lvl="340" mana="3220" prem="1" exhaustion="8000" script="kakashi/mkamui.lua">

 

                                                       i4eu.png

                                        tmbn.gif

gonorreiaswat

I'm AdrianøØ SwaTT
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 16/09/07Posts: 600Gênero: MasculinoChar no Tibia: NãoJogoMais

Bom, se entendi corretamente, funcionará assim.

 

O player usa a magia e leva o target para outra posição, só que é para este player se manter no lugar destino.

Sendo assim, este script foi testado após a edição que fiz e está funcionando.

E o Exhaust já estava funcionando.

 

O player que usa a magia não é teleportado, correto?

Alias, ele é teleportado, porém, para outro lugar né?

 

Caso queira alguma modificação, favor postar aqui.

Sendo assim, segue abaixo o script para que o target mantenha-se no lugar destino:

local newPos1 = {x = 0, y = 0, z = 0} --pos pra onde sera levado o caster da spell
local newPos2 = {x = 1517, y = 417, z = 6} --pos pra onde sera levado o target

local function teleport(cid, pid, pos, pos2)
    if isCreature(cid) then
        doTeleportThing(cid, getClosestFreeTile(cid, pos))
        doSendMagicEffect(getPlayerPosition(cid), 30)
end
    if isCreature(pid) then
        doTeleportThing(pid, getClosestFreeTile(pid, pos2 or pos))
        doSendMagicEffect(getPlayerPosition(pid), 30)
    end
end
 
 
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
    if not isCreature(target) or not isPlayer(target) then
    return doPlayerSendTextMessage(cid, 27, "Voce precisa selecionar um alvo para usar o Mangekyou Kamui.")
end
    if getPlayerStorageValue(cid, 33333) < os.time () then
local target = getCreatureTarget(cid)
local posCid = getPlayerPosition(cid)
local posTarget = getPlayerPosition(target)
local tempo = 10000 -- 10s
        setPlayerStorageValue(cid, 33333, os.time () + 30)
        teleport(cid, target, newPos1, newPos2)
    else
        doPlayerSendCancel(cid, "Voce so pode usar esse jutsu daki a "..getPlayerStorageValue(cid, 33333) - os.time ().." segundos ")
    end
  return true
end

Boa sorte.

Atenciosamente,
Adriano Swatt'

wesleybeek

SoulNTO Online
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/11/12Posts: 124Char no Tibia: Xtibia Soul

Bom, se entendi corretamente, funcionará assim.

 

O player usa a magia e leva o target para outra posição, só que é para este player se manter no lugar destino.

Sendo assim, este script foi testado após a edição que fiz e está funcionando.

E o Exhaust já estava funcionando.

 

O player que usa a magia não é teleportado, correto?

Alias, ele é teleportado, porém, para outro lugar né?

 

Caso queira alguma modificação, favor postar aqui.

Sendo assim, segue abaixo o script para que o target mantenha-se no lugar destino:

local newPos1 = {x = 0, y = 0, z = 0} --pos pra onde sera levado o caster da spell
local newPos2 = {x = 1517, y = 417, z = 6} --pos pra onde sera levado o target

local function teleport(cid, pid, pos, pos2)
    if isCreature(cid) then
        doTeleportThing(cid, getClosestFreeTile(cid, pos))
        doSendMagicEffect(getPlayerPosition(cid), 30)
end
    if isCreature(pid) then
        doTeleportThing(pid, getClosestFreeTile(pid, pos2 or pos))
        doSendMagicEffect(getPlayerPosition(pid), 30)
    end
end
 
 
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
    if not isCreature(target) or not isPlayer(target) then
    return doPlayerSendTextMessage(cid, 27, "Voce precisa selecionar um alvo para usar o Mangekyou Kamui.")
end
    if getPlayerStorageValue(cid, 33333) < os.time () then
local target = getCreatureTarget(cid)
local posCid = getPlayerPosition(cid)
local posTarget = getPlayerPosition(target)
local tempo = 10000 -- 10s
        setPlayerStorageValue(cid, 33333, os.time () + 30)
        teleport(cid, target, newPos1, newPos2)
    else
        doPlayerSendCancel(cid, "Voce so pode usar esse jutsu daki a "..getPlayerStorageValue(cid, 33333) - os.time ().." segundos ")
    end
  return true
end

Boa sorte.

 

Vou testar, Bom o Script Sim Leva Inimigo (x) para (x y z) o Player que uso Spell nao vai a lugar nenhum rs..

                                                       i4eu.png

                                        tmbn.gif

gonorreiaswat

I'm AdrianøØ SwaTT
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 16/09/07Posts: 600Gênero: MasculinoChar no Tibia: NãoJogoMais

Tudo bem.

Quando testar, lembre-se de passar por aqui e postar o resultado.

 

 

Boa sorte.

Atenciosamente,
Adriano Swatt'

wesleybeek

SoulNTO Online
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/11/12Posts: 124Char no Tibia: Xtibia Soul

Tudo bem.

Quando testar, lembre-se de passar por aqui e postar o resultado.

 

 

Boa sorte.

 

Obrigado, Funcionou Perfeitamente (REP++) Parabéns, continue assim cara vc vai Longe mdr.gifhappy.png

                                                       i4eu.png

                                        tmbn.gif

gonorreiaswat

I'm AdrianøØ SwaTT
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 16/09/07Posts: 600Gênero: MasculinoChar no Tibia: NãoJogoMais

Obrigado, que bom que funcionou.

 

:D

 

Até mais.

Atenciosamente,
Adriano Swatt'

luciano147

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/08/12Posts: 3Char no Tibia: Lord Klipto

tipo , como coloca pra player volta a mesma position que estava?

gonorreiaswat

I'm AdrianøØ SwaTT
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 16/09/07Posts: 600Gênero: MasculinoChar no Tibia: NãoJogoMais

tipo , como coloca pra player volta a mesma position que estava?

Pra isto, tem que deixar do jeito que estava antes o script.

Atenciosamente,
Adriano Swatt'

Creatserv

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/02/14Posts: 106

Vlw, vaii ajuda eu