mocoba
New Member
- Joined
- Aug 23, 2008
- Messages
- 332
- Reaction score
- 0
Hello Guys 
i found this error when i Start The Server
and the script Druid2.Lua
i found this error when i Start The Server
PHP:
[12/02/2011 17:08:32] [Error - Spell Interface]
[12/02/2011 17:08:32] data/spells/scripts/attack/Druid2.lua
[12/02/2011 17:08:32] Description:
[12/02/2011 17:08:32] (luaSetCombatFormula) Combat not found
PHP:
local repeatAmount = 4
local deathFlamesArea = {
createCombatArea({
{0, 1, 0},
{1, 2, 1},
{0, 1, 0}
}),
createCombatArea({
{0, 1, 1, 1, 0},
{1, 1, 0, 1, 1},
{1, 0, 2, 0, 1},
{1, 1, 0, 1, 1},
{0, 1, 1, 1, 0}
}),
createCombatArea({
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 2, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
})
}
local bigFlamesArea = createCombatArea({
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 0, 0, 0, 1, 1, 0},
{1, 1, 0, 0, 0, 0, 0, 1, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 2, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 1},
{1, 1, 0, 0, 0, 0, 0, 1, 1},
{0, 1, 1, 0, 0, 0, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0}
})
local deathFlames = {}
for k, area in ipairs(deathFlamesArea) do
deathFlames[k] = createCombatObject()
setCombatParam(deathFlames[k], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(deathFlames[k], COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatFormula(deathFlames[k], COMBAT_FORMULA_LEVELMAGIC, -4.100, -500, -4.1000, -40000)
setCombatArea(deathFlames[k], area)
end
local bigFlames = createCombatObject()
setCombatParam(bigFlames, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(bigFlames, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatFormula(bigFlames, COMBAT_FORMULA_LEVELMAGIC-4.100, -500, -4.1000, -40000)
setCombatArea(bigFlames, bigFlamesArea)
function onTargetTile(cid, pos)
doSendDistanceShoot(getCreaturePosition(cid), pos, CONST_ANI_DEATH)
end
setCombatCallback(bigFlames, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
local function castSpellDelay(p)
if(isCreature(p[1]) == TRUE) then
doCombat(unpack(p))
end
end
function onCastSpell(cid, var)
for i = 0, repeatAmount - 1 do
for k, combat in ipairs(deathFlames) do
addEvent(castSpellDelay, (150 * k) + #deathFlames * 150 * i + 700 * i, {cid, combat, var})
end
addEvent(castSpellDelay, (150 * #deathFlames) + #deathFlames * 150 * i + 700 * i, {cid, bigFlames, var})
end
return LUA_NO_ERROR
end