Hello Otlanders,
I have got problem with a spell.
Here is the Error:
Script:
In Spells.xml
+ The Spells have no exhaustion
Please Help,
Thanks Johny5608
I have got problem with a spell.
Here is the Error:
Code:
[Error - Spell Interface]
data/spells/scripts/attack/meteorio.lua:onCastSpell
Description:
data/spells/scripts/attack/meteorio.lua:11: attempt to index a boolean value
stack traceback:
data/spells/scripts/attack/meteorio.lua:11: in function <data/spells/scripts/attack/meteorio.lua:3>
Script:
Code:
local area = createCombatArea(AREA_SQUARE1X1)
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
doSendDistanceShoot(getCreaturePosition(cid),{x = getCreaturePosition(cid).x - math.random(4,6), y = getCreaturePosition(cid).y - 5, z = getCreaturePosition(cid).z},CONST_ANI_FLAMMINGARROW)
for x = 1, 10 do
addEvent(furyAttackTarget,200*x+500,cid,target,{x = getCreaturePosition(target).x + math.random(-1,1), y = getCreaturePosition(target).y + math.random(-1,1), z = getCreaturePosition(target).z})
end
end
function furyAttackTarget(cid,target,pos)
if isCreature(cid) == TRUE and isCreature(target) == TRUE then
doSendDistanceShoot({x = getCreaturePosition(target).x - math.random(4,6), y = getCreaturePosition(target).y - 5, z = getCreaturePosition(target).z},pos,CONST_ANI_FIRE)
doAreaCombatHealth(cid,COMBAT_FIREDAMAGE,pos,area,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)+50,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)-50,CONST_ME_HITBYFIRE)
end
end
In Spells.xml
Code:
<instant name="meteorio" words="exevo flam tempest" lvl="200" mana="3" prem="1" selftarget="1" exhaustion="2000" needlearn="0" event="script" value="attack/meteorio.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
</instant>
+ The Spells have no exhaustion
Please Help,
Thanks Johny5608