Ir para conteúdo

Featured Replies

Postado

Olá pessoal estou com um problema, ultimamente pedi suporte pra retirar alguns erros na distro e tals, eu achei que havia resolvido, porém sem perceber apenas havia apenas diminuido o número de erros e não havia acabado com eles.

 

Erros:

post-44064-0-24776000-1421432264_thumb.p

 

 

Tag XML:

<instant name="Twin Energy Ball" words="twin energy ball" lvl="200" mana="6000" prem="0" range="10" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="LvL200/twin energy ball.lua">

</instant>

 

Spell.lua:

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)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
 
function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
 
function onCastSpell(cid, var)
local parameters = {cid = cid, var = var, combat1 = combat1}
 
for k = 1, 10 do
addEvent(function()
if isCreature(cid) then
addEvent(onCastSpell1, 1, parameters)
end
end, 1 + ((k-1) * 200))
end
for i = 1, 10 do
addEvent(function()
if isCreature(cid) then
addEvent(twb1,1,cid)
end
end, 1 + ((i-1) * 200))
end
return true
end

 

Se puderem me ajudar ficaria muito grato! Estes erros são muito chatos! rsrs

  • Respostas 7
  • Visualizações 528
  • 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

Postado

Troca:

function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
por: 
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

não respondo pms solicitando suporte em programação/scripting

Postado
  • Autor

 

Troca:

function twb1(cid)
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 53)
end
por: 
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

 

 

Deu certinho, o erro do effect parou, porém se um player usar uma magia dessas e morrer na mesma hora, o erro "Creature not found" ainda ocorre. É possível retirar este erro ou não tem como?

Postado

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

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

não respondo pms solicitando suporte em programação/scripting

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

Informação Importante

Confirmação de Termo