SixNine
Active Member
- Joined
- Dec 12, 2018
- Messages
- 452
- Reaction score
- 41
Its so weird or im just blind and not noticing something but for some reason my monster spell does only 10 energydamage damage even tho i changed formula to a thousands
Than i even changed it in monsters.xml
actually confused
Lua:
local combats = {}
local areas = {
-- Area 1
{ arr = {{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 3, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1}},
effect = 57
},
-- Area 2
{ arr = {{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 3, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1}},
type = COMBAT_ENERGYDAMAGE,
effect = CONST_ME_FIREAREA
},
-- Area 3
{ arr = {{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 3, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0}},
effect = 57
},
-- Area 4
{ arr = {{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 3, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0, 1, 0}},
type = COMBAT_ENERGYDAMAGE,
effect = CONST_ME_FIREAREA
}
}
for i, arr in pairs(areas) do
combats[i] = Combat()
if arr.effect then combats[i]:setParameter(COMBAT_PARAM_EFFECT, arr.effect) end
combats[i]:setArea(createCombatArea(arr.arr))
if arr.type then
combats[i]:setParameter(COMBAT_PARAM_TYPE, arr.type)
function onGetFormulaValues(player, level, magicLevel)
local min = (level * 230) + (magicLevel * 1200.5) + 25
local max = (level * 230) + (magicLevel * 1310) + 50
return -min, -max
end
combats[i]:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
end
end
local function castSpell(creatureId, variant, combatIndex)
local creature = Creature(creatureId)
if creature then
combats[combatIndex]:execute(creature, variant)
end
end
function onCastSpell(creature, variant)
for i = 2, #areas do
addEvent(castSpell, 800 * i, creature:getId(), variant, i)
end
return combats[1]:execute(creature, variant)
end
Than i even changed it in monsters.xml
Code:
<attack name="spell name" interval="15000" min="-25000" max="-30000"/>
Code:
<instant name="spell name" words="spell name" enabled="1" prem="0" exhaustion="1000" soul="0" mana="1" maglv="300" lvl="500" aggressive="1" selftarget="1" script="Skill spells/spell name.lua">
<vocation id="0"/>
</instant>
actually confused