• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ how to make a spell to make a constant damage

darknelson

Member
Joined
Jun 19, 2011
Messages
190
Solutions
1
Reaction score
15
i like my spell hit always min 1000 maxium 3000 static damage, but i cant figure out how to edit to do that

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
combat:setParameter(COMBAT_PARAM_USECHARGES, 1)
combat:setArea(createCombatArea(AREA_SQUARE1X1))

function onGetFormulaValues(player, skill, attack, factor)
    local skillTotal = skill * attack
    local levelTotal = player:getLevel() / 5
    return -(((skillTotal * 0.07) + 7) + (levelTotal)), -(((skillTotal * 0.09) + 11) + (levelTotal))
end

combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end
 
-(((skillTotal * 0.07) + 7) + (levelTotal))
(skillTotal is your character's skills * (weapon attack) * 0.07 + 7 ) + your character's level/5 = minimum
-(((skillTotal * 0.09) + 11) + (levelTotal)
(skillTotal is your character's skills * (weapon attack) * 0.09 + 11 ) + your character's level/5 = maximum
You should calculate it depends on your level and skills, We can't do it since we don't know your character's level or your character's skills.
 
Last edited:
Back
Top