Hi,
Can someome tell me why this spell do not dmg ?
TFS 1.3 , 8.6
Can someome tell me why this spell do not dmg ?
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setArea(createCombatArea(AREA_SQUAREWAVE5))
function onGetFormulaValues(cid, level, magicLevel)
local min = (level / 5) + (magicLevel * 1.4) + 8
local max = (level / 5) + (magicLevel * 1.4) + 8
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
local player = Player(cid)
local playerPos = player:getPosition()
local playerDir = player:getDirection()
if playerDir == NORTH then
Position(playerPos.x + 2, playerPos.y - 1, playerPos.z):sendMagicEffect(100)
elseif playerDir == SOUTH then
Position(playerPos.x + 2, playerPos.y + 4, playerPos.z):sendMagicEffect(101)
elseif playerDir == WEST then
Position(playerPos.x - 2, playerPos.y + 1, playerPos.z):sendMagicEffect(99)
elseif playerDir == EAST then
Position(playerPos.x + 4, playerPos.y + 1, playerPos.z):sendMagicEffect(98)
end
return combat:execute(cid, var)
end
TFS 1.3 , 8.6