Ir para conteúdo

Featured Replies

Postado

Testa ai:

 

local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)
    local health_summon = 2000 -- quantidade a ser curada


    if #summon > 0 then
        doCreatureAddHealth(#summon[1],health_summon)
        doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "Você não invocou nenhum summon.")
    end  

end

 

Contribuições:
 

=> Distribuições/Servidores

  1. [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64)

 

=> Scripts/Códigos/Tutoriais

  1. Pokemon pescado aparece em volta do seu pokemon
  2. [Gesior]Dobrar pontos PagSeguro a partir de x valor doado

 

 Gostou de alguma contribuição? Rep +?

  • Respostas 23
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Eu fiz aqui rapidinho e não testei,testa ai:   local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_

  • local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)

  • Da um "Voto positivo" para o pessoal, é só clicar na seta

Posted Images

Postado
  • Autor
2 horas atrás, Rayo disse:

Testa ai:

 


local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)
    local health_summon = 2000 -- quantidade a ser curada


    if #summon > 0 then
        doCreatureAddHealth(#summon[1],health_summon)
        doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "Você não invocou nenhum summon.")
    end  

end

 

 

Não deu erro nenhum, mas também não aconteceu nada, não curou o player nem o summon.

Postado

@Icaro Simoes ,Fiz aqui a alteração,testei e agora funcionou:
 

local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)
    local health_summon = 2000 -- quantidade a ser curada

    if summon > 0 then
		doCreatureAddHealth(summon,health_summon)
		doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "Você não invocou nenhum summon.")
    end  
end

 

Contribuições:
 

=> Distribuições/Servidores

  1. [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64)

 

=> Scripts/Códigos/Tutoriais

  1. Pokemon pescado aparece em volta do seu pokemon
  2. [Gesior]Dobrar pontos PagSeguro a partir de x valor doado

 

 Gostou de alguma contribuição? Rep +?

Postado
  • Autor
39 minutos atrás, Rayo disse:

@Icaro Simoes ,Fiz aqui a alteração,testei e agora funcionou:
 


local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
    local summon = getCreatureSummons(cid)
    local health_summon = 2000 -- quantidade a ser curada

    if summon > 0 then
		doCreatureAddHealth(summon,health_summon)
		doCreatureAddHealth(getCreatureMaster(cid), 1600)
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "Você não invocou nenhum summon.")
    end  
end

 

 

Apareceu esse erro no TFS quando o summon atacou o monstro

 

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:11: attempt to compare number with table
stack traceback:
        [C]: in function '__lt'
        data/spells/scripts/healing/heala_player.lua:11: in function <data/spells/scripts/healing/heala_player.lua:7>

Lua Script Error: [Spell Interface]
data/spells/scripts/healing/heala_player.lua:onCastSpell
data/spells/scripts/healing/heala_player.lua:11: attempt to compare number with table
stack traceback:
        [C]: in function '__lt'
        data/spells/scripts/healing/heala_player.lua:11: in function <data/spells/scripts/healing/heala_player.lua:7>

Postado
local combat = createCombatObject()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
     local summons = getCreatureSummons(cid)
    	local health_summon = 2000 -- quantidade a ser curada
        	if #summons > 0 then
			doCreatureAddHealth(getCreatureMaster(cid), health_summon)
        		return doCombat(cid, combat, var)
    		else
        		doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true
    		end 
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo