Ir para conteúdo

Featured Replies

Postado
  • Autor

 

Hm, tenta assim:

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -35.5, 0)
 
local function onCastSpell1(parameters)
    if isCreature(parameters.cid) then
        doCombat(parameters.cid, parameters.combat1, parameters.var)
    end
end
 
function twb1(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position1, 53)
    end
end
 
function onCastSpell(cid, var)
    local parameters = {cid = cid, var = var, combat1 = combat1}
    for k = 1, 10 do
        addEvent(function()
            if isCreature(cid) then
                onCastSpell1(parameters)
                twb1(cid)
            end
        end, 1 + ((k-1) * 200))
    end
    return true
end

 

Eu fiz os testes, o erro Creature not found só ocorre se um jogador morrer no mesmo segundo da spell (Algo muito raro). Mas creio que não prejudicará nada no funcionamento do servidor. Agradeço pela ajuda!  ^^

  • Respostas 7
  • Visualizações 549
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Troca: function twb1(cid) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicE

  • Hm, tenta assim: local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(comb

Posted Images

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