Moj mistrz
Monster Creator
Hiho, spell is only making damage when creature is casting it to the north, other directions do not deal any dmg, just effect appears.
Making any changes here dont work, but I post it if someones want to know how its configured in spells.xml
Code:
arr1 = {
{2},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1}
}
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
arr2 = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 2}
}
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
local area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)
arr3 = {
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{1},
{2}
}
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
local area3 = createCombatArea(arr3)
setCombatArea(combat3, area3)
arr4 = {
{2, 1, 1, 1, 1, 1, 1, 1, 1, 1}
}
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
local area4 = createCombatArea(arr4)
setCombatArea(combat4, area4)
local function delayedCastSpell(cid, var)
local creature = Creature(cid)
if isCreature(cid) == true then
if creature:getDirection() == 0 then
doCombat(cid, combat1, positionToVariant(getCreaturePosition(cid)))
elseif creature:getDirection() == 1 then
doCombat(cid, combat2, positionToVariant(getCreaturePosition(cid)))
elseif creature:getDirection() == 2 then
doCombat(cid, combat3, positionToVariant(getCreaturePosition(cid)))
elseif creature:getDirection() == 3 then
doCombat(cid, combat4, positionToVariant(getCreaturePosition(cid)))
end
doCreatureSay(cid, "OMRAFIR BREATHES INFERNAL FIRE", TALKTYPE_ORANGE_2)
end
end
function onCastSpell(cid, var)
doCreatureSay(cid, "OMRAFIR INHALES DEEPLY!", TALKTYPE_ORANGE_2)
addEvent(delayedCastSpell, 4000, cid, var)
return true
end
Code:
<instant name="omrafir beam" words="#omrafirbeam" aggressive="1" blockwalls="1" needlearn="1" script="monster/omrafirbeam.lua"/>