hello i need litle help i want create spell from tibia 7.6 to tfs 1.0 but im newbie someone can explain
this is tibia 7.6 spell
i want create the same on tfs 1.0 but when i create i have problems on more damage for magic level and level
here my spell:
this is tibia 7.6 spell
PHP:
-- exori gran spell by TibiaFun
area = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_HIT_AREA
animationEffect = NM_ANI_NONE
hitEffect = NM_ME_HIT_AREA
damageEffect = NM_ME_HIT_AREA
animationColor = 86
offensive = true
drawblood = true
UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)
function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0
UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 5.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 7.0
UltimateExplosionObject.minDmg = (level * 1.5 + maglv * 1.5) * 4.0
UltimateExplosionObject.maxDmg = (level * 1.5 + maglv * 1.5) * 5.6
end
return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
end
here my spell:
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, 1)
local area = createCombatArea(SPELL_EXORI_GRAN)
setCombatArea(combat, area)
function onGetFormulaValues(cid, skill, maglv, factor)
local skillTotal, levelTotal = skill * maglv, getPlayerLevel(cid) / 5
return -(((skillTotal * 0.02) + 4) + (levelTotal)), -(((skillTotal * 0.04) + 9) + (levelTotal))
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Last edited: