pasiak12
Well-Known Member
- Joined
- Jun 7, 2009
- Messages
- 260
- Solutions
- 13
- Reaction score
- 70
I want to create a spell that send BOLTs to every field of the wave spell
spells.xml
the effect is:
Imgur: The most awesome images on the Internet
Sends the bolt only on the first square in the front of player (red square on screen)
Would like to send bolt on every square of the definied AREA_WAVEBOLT
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
AREA_WAVEBOLT = {
{1,1,1, 1, 1, 1, 1, 1, 1},
{0,1,1, 1, 1, 1, 1, 1, 0},
{0,0,1, 1, 1, 1, 1, 0, 0},
{0,0,0, 1, 1, 1, 0, 0, 0},
{0,0,0, 0, 2, 0, 0, 0, 0} }
combat:setArea(createCombatArea(AREA_WAVEBOLT))
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BOLT)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 1.2) + 7
local max = (level / 5) + (maglevel * 2) + 12
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
spells.xml
Code:
<instant group="attack" name="Bolt Wave" words="exevo bolt hur" lvl="30" direction="1" mana="100" exhaustion="2000" needlearn="0" script="attack/Bolt Wave.lua">
<vocation name="Paladin"/>
<vocation name="Royal Paladin"/>
</instant>
the effect is:
Imgur: The most awesome images on the Internet
Sends the bolt only on the first square in the front of player (red square on screen)
Would like to send bolt on every square of the definied AREA_WAVEBOLT