Ir para conteúdo

Bug Getcreaturetarget


zapzn

Posts Recomendados

Bug getCreatureTarget

Lua Script Error: [spell Interface]

data/spells/scripts/holy strike.lua:onCastSpell

 

data/spells/scripts/holy strike.lua:18: attempt to call global 'getCreatureTarget' <a nil value>

 

Script

<instant name="Holy strike" words="exori san" direction="1" lvl="40" maglv="2" mana="20" soul="0" exhaustion="1" prem="1" enabled="1" script="holy strike.lua"><vocation id="3"/><vocation id="7"/><vocation id="11"/></instant>

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 39)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.4, -30, -0.5, 0)

 

 

 

 

local combatDist = createCombatObject()

setCombatParam(combatDist, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combatDist, COMBAT_PARAM_EFFECT, 39)

setCombatParam(combatDist, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

setCombatFormula(combatDist, COMBAT_FORMULA_LEVELMAGIC, -0.4, -30, -0.5, 0)

 

 

 

function onCastSpell(cid, var)

local target = getCreatureTarget(cid)

if(target ~= 0) then

return doCombat(cid, combatDist, numberToVariant(target))

end

return doCombat(cid, combat, var)

end

 

 

Pode ser um erro bobo, mais não consegui arrumar

Por favor me ajudem!!!

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...