• 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!

Solved spell tfs 1.2

Doomdice

The N00betarian
Joined
Jul 20, 2009
Messages
658
Reaction score
108
Location
Indiana
magic level aint moving up this is not doing any dmg at all idk why it is the regular exori mort spell tfs 1.2

Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

function onGetFormulaValues(player, level, maglevel)
    local min = (level / 5) + (maglevel * 1.4) + 8
    local max = (level / 5) + (maglevel * 2.2) + 14
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end
 
Last edited:
Hey man so as Codex NG said use your code tags when you are pasting chunks of code as its easier to read in the forum like this:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

function onGetFormulaValues(player, level, maglevel)
    min = -((level / 5) + (maglevel * 1.4) + 8)
    max = -((level / 5) + (maglevel * 2.2) + 14)
    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end

Now so we can help you. what TFS you using? I'm assuming 1.1?
 
Hey man so as Codex NG said use your code tags when you are pasting chunks of code as its easier to read in the forum like this:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

function onGetFormulaValues(player, level, maglevel)
    min = -((level / 5) + (maglevel * 1.4) + 8)
    max = -((level / 5) + (maglevel * 2.2) + 14)
    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end

Now so we can help you. what TFS you using? I'm assuming 1.1?

lol idid it i edited my top post with it lol but forgot to say tfs 1.2
 
lol idid it i edited my top post with it lol but forgot to say tfs 1.2

Ye I saw as soon as i posted all good! =)

So just to be clear you are using this spell on a monster or somthing right? you are not using it with a GOD on a GOD?
 
print the creature and var for us.

Code:
print("creature: "..tostring(creature))
if creature then print("name: "..creature:getName()) end

Code:
for k,v in pairs(var) do
print("key: "..k.." - "..tostring(v))
end
 
print the creature and var for us.

Code:
print("creature: "..tostring(creature))
if creature then print("name: "..creature:getName()) end

Code:
for k,v in pairs(var) do
print("key: "..k.." - "..tostring(v))
end

he solved it champ =)
 
Back
Top