Ir para conteúdo
  • Cadastre-se

(Resolvido)Spell Izanami


Ir para solução Resolvido por zLockey9,

Posts Recomendados

Olá, Precisava de uma spell Izanami para o meu servidor você fala Izanami e fica imortal por 10 segundos, sua hp desce chega a 1% e volta pra 100% durante 10 segundos, conto com vocês, obrigado.

VlVKQKC.png&key=d5c17620ae9567a1f898dd7a

 

 

 

  • 532144234_Logo_NTO_BLOOD_Finish_HIM_By_Antonio_Luckas(3).png.fd58d1af125a7e82ccdd751637e9ca93.png
Link para o post
Compartilhar em outros sites

Aqui no TibiaKing mensagens como UP e BUMP são proibidas, utilize o botão subir este tópico. Esta é uma mensagem automática!
Pedimos que leia as regras do fórum!

Spoiler

Here in TibiaKing messages like UP and BUMP are prohibited, use the button raise this topic. This is an automated message!
Please read the forum rules.

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
Em 17/06/2018 em 23:48, King Laker disse:

Olá, Precisava de uma spell Izanami para o meu servidor você fala Izanami e fica imortal por 10 segundos, sua hp desce chega a 1% e volta pra 100% durante 10 segundos, conto com vocês, obrigado.

O Izanami do meu server está assim:

Spoiler

function onCastSpell(cid, var)
local from1,to1 = {x=1964, y=731, z=7},{x=1976, y=742, z=7} -- tsukuyomi world
local from2,to2 = {x=984, y=578, z=7},{x=1044, y=652, z=7} -- shinobi war
local from3,to3 = {x=1241, y=723, z=6},{x=1257, y=738, z=6} -- kamui


local tempo = 10


if isInRange(getCreaturePosition(cid), from1, to1) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) then
doPlayerSendCancel(cid, "Voce nao pode usar o Izanami aqui.")
return FALSE
end

if getTileInfo(getThingPos(cid)).nopvp then
doPlayerSendCancel(cid, "Voce nao pode usar o Izanami aqui.")
return FALSE
end

if getPlayerStorageValue(cid, 17453)-os.time() > 1 then
local seetime = getPlayerStorageValue(cid, 17453)-os.time()
local hours, minutes, seconds = math.floor(seetime/120), math.floor(seetime/60), math.floor(seetime%60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde "..minutes.." minutos e "..seconds.." segundos para usar novamente o Izanami!")
return FALSE
end

exhaustion.set(cid, 14505, tempo)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Izanami protection for "..tempo.." seconds!")
doSendMagicEffect(getCreaturePos(cid), 236)
setPlayerStorageValue(cid, 17453, 5*60+os.time())
setPlayerStorageValue(cid, 14501, getCreaturePosition(cid).x)
setPlayerStorageValue(cid, 14502, getCreaturePosition(cid).y)
setPlayerStorageValue(cid, 14503, getCreaturePosition(cid).z)
return TRUE
end

 

Creio que as posições no topo seja onde não será possível usar a spell

Link para o post
Compartilhar em outros sites

@zLockey9 tem também no creaturescripts no login.lua pode me mandar?
E a tag no creaturescripts.xml

Editado por King Laker (veja o histórico de edições)

VlVKQKC.png&key=d5c17620ae9567a1f898dd7a

 

 

 

  • 532144234_Logo_NTO_BLOOD_Finish_HIM_By_Antonio_Luckas(3).png.fd58d1af125a7e82ccdd751637e9ca93.png
Link para o post
Compartilhar em outros sites
  • Solução

@King Laker Ah claro .

 

data/creaturescript/script/izanami.lua

Spoiler

function onStatsChange(target, cid, changetype, combat, value)
if((cid and isCreature(cid)) and isPlayer(target) and exhaustion.check(target,14505) == TRUE and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target)) then
doCreatureAddHealth(target, getCreatureMaxHealth(target))
doTeleportThing(target, {x=getPlayerStorageValue(target,14501), y=getPlayerStorageValue(target,14502), z=getPlayerStorageValue(target,14503)})
return FALSE
end
return TRUE
end

data/creaturescript/script/login.lua

Spoiler

registerCreatureEvent(cid, "Izanami")

data/creaturescript/creaturescript.xml

Spoiler

<event type="statschange" name="Izanami" event="script" value="izanami.lua"/>

Se faltar algo é só me marcar e dizer

Link para o post
Compartilhar em outros sites

@zLockey9 faltou a parte essencial o script dentro do spells

VlVKQKC.png&key=d5c17620ae9567a1f898dd7a

 

 

 

  • 532144234_Logo_NTO_BLOOD_Finish_HIM_By_Antonio_Luckas(3).png.fd58d1af125a7e82ccdd751637e9ca93.png
Link para o post
Compartilhar em outros sites

@King Laker a Tag ? se for tá aí

Spoiler

<instant name="Izanami" words="izanami" lvl="1000" mana="30000" aggressive="1" exhaustion="0" needlearn="0" event="script" value="itachi/izanami.lua">
<vocation id="11"/>
</instant>

 

Link para o post
Compartilhar em outros sites

@zLockey9 não, vá no spells abra a pasta itachi e copie o izanami.lua pra mim pf

VlVKQKC.png&key=d5c17620ae9567a1f898dd7a

 

 

 

  • 532144234_Logo_NTO_BLOOD_Finish_HIM_By_Antonio_Luckas(3).png.fd58d1af125a7e82ccdd751637e9ca93.png
Link para o post
Compartilhar em outros sites
Em 03/07/2018 em 02:52, zLockey9 disse:

O Izanami do meu server está assim:

  Mostrar conteúdo oculto

function onCastSpell(cid, var)
local from1,to1 = {x=1964, y=731, z=7},{x=1976, y=742, z=7} -- tsukuyomi world
local from2,to2 = {x=984, y=578, z=7},{x=1044, y=652, z=7} -- shinobi war
local from3,to3 = {x=1241, y=723, z=6},{x=1257, y=738, z=6} -- kamui


local tempo = 10


if isInRange(getCreaturePosition(cid), from1, to1) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) then
doPlayerSendCancel(cid, "Voce nao pode usar o Izanami aqui.")
return FALSE
end

if getTileInfo(getThingPos(cid)).nopvp then
doPlayerSendCancel(cid, "Voce nao pode usar o Izanami aqui.")
return FALSE
end

if getPlayerStorageValue(cid, 17453)-os.time() > 1 then
local seetime = getPlayerStorageValue(cid, 17453)-os.time()
local hours, minutes, seconds = math.floor(seetime/120), math.floor(seetime/60), math.floor(seetime%60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde "..minutes.." minutos e "..seconds.." segundos para usar novamente o Izanami!")
return FALSE
end

exhaustion.set(cid, 14505, tempo)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Izanami protection for "..tempo.." seconds!")
doSendMagicEffect(getCreaturePos(cid), 236)
setPlayerStorageValue(cid, 17453, 5*60+os.time())
setPlayerStorageValue(cid, 14501, getCreaturePosition(cid).x)
setPlayerStorageValue(cid, 14502, getCreaturePosition(cid).y)
setPlayerStorageValue(cid, 14503, getCreaturePosition(cid).z)
return TRUE
end

 

Creio que as posições no topo seja onde não será possível usar a spell

@King Laker Foi a primeira coisa que mandei ‘-‘

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo