Postado Julho 24, 2019 5 anos 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 [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64) => Scripts/Códigos/Tutoriais Pokemon pescado aparece em volta do seu pokemon [Gesior]Dobrar pontos PagSeguro a partir de x valor doado Gostou de alguma contribuição? Rep +?
Postado Julho 24, 2019 5 anos 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 Julho 24, 2019 5 anos @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 [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64) => Scripts/Códigos/Tutoriais Pokemon pescado aparece em volta do seu pokemon [Gesior]Dobrar pontos PagSeguro a partir de x valor doado Gostou de alguma contribuição? Rep +?
Postado Julho 24, 2019 5 anos 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 Julho 24, 2019 5 anos 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 [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#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.