Ir para conteúdo

[Duvida]Alguem da uma olhadinha nesse script e diz erro dele

Featured Replies

Postado

Alguém pode min dizer porque esses ataques ta tirando vida do personagem mesmo pokemon tando vivo

 

elseif spell == "Absorb" then


local life = getCreatureHealth(target)


doAreaCombatHealth(cid, GRASSDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 14)
    
local newlife = life - getCreatureHealth(target)


doSendMagicEffect(getThingPosWithDebug(cid), 14)
if newlife >= 1 then
  doCreatureAddHealth(cid, newlife)
       doSendAnimatedText(getThingPosWithDebug(cid), "+"..newlife.."", 32)
end 


elseif spell == "Leech Life" then


local life = getCreatureHealth(target)


doDanoWithProtect(cid, BUGDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 14)
    
local newlife = life - getCreatureHealth(target)


doSendMagicEffect(getThingPosWithDebug(cid), 14)
if newlife >= 1 then
doCreatureAddHealth(cid, newlife)
doSendAnimatedText(getThingPosWithDebug(cid), "+"..newlife.."", 32)
end  

Editado por izac ximenes (veja o histórico de edições)

Postado

Amigo, seguinte. Não use mais cores como esse verde, dificulta a leitura.

 

Bom, eu fiz um código simples que se o player tiver algum summon, ele irá retornar o target para este summon.

 

for s = 1, #getCreatureSummons(cid) do
    if getCreatureSummons(cid)[s] then
        
        target = getCreatureSummons(cid)[s]
        break
    end
end

 

Basta implantar nas magias.

Tony Araújo  ;D 

 

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.7k

Informação Importante

Confirmação de Termo