Caduceus
Unknown Member
- Joined
- May 10, 2010
- Messages
- 321
- Solutions
- 2
- Reaction score
- 24
<attack script="monster/flam_wave.lua" interval="3000" chance="100"/>
<attack name="flam_wave" interval="3000" chance="50" radius="10" target="0" min="-600" max="-700"/>
I have the spell registered in spells.xml.
<instant name="flam_wave" words="flam wave" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/flam_wave.lua"/>
I had to edit the spell to:
Code:
for x, _ in ipairs(area) do
combat[x]:setArea(createCombatArea(area[x]))
end
function executeCombat(p, i)
if not p.creature then
return false
end
p.combat[i]:execute(p.creature, p.var)
end
function onCastSpell(creature, var)
local p = {creature = creature, var = var, combat = combat}
local time_ = {1, 200, 400, 800, 1000, 1200}
for t, _ in ipairs(time_) do
addEvent(executeCombat, time_[t], p, t)
end
return true
end
from:
Code:
for x, _ in ipairs(area) do
combat[x]:setArea(createCombatArea(area[x]))
end
function executeCombat(p, i)
if not p.player then
return false
end
if not p.player:isPlayer() then
return false
end
p.combat[i]:execute(p.player, p.var)
end
function onCastSpell(player, var)
local p = {player = player, var = var, combat = combat}
local time_ = {1, 400, 800, 1200, 1600, 2000}
for t, _ in ipairs(time_) do
addEvent(executeCombat, time_[t], p, t)
end
return true
end
Last edited: