• 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+ Modifying "over time" (utori) spells

  • Thread starter Deleted member 210450
  • Start date
D

Deleted member 210450

Guest
Hi. I was trying to understand this through tests, modyfing numbers but nothing gave me logical rules.

I'd like to modify spells that works over time, i mean utori pox/flam/vis/whatever. In Utura, the other "over time" spell i can see rules, i've got there ticks. But in attacking over time spells like Ignite (Utori Flam) or Envenom (Utori Pox), i can't spot the specific fragments of code.

Moreover, Utori Pox itself has completely different code than Utori Flam.
Editing Utori Flam's code, even without understanding formula, i could see differences after modyfing numbers - but still don't know how to bridle it. In the other case, Utori Pox, the only thing i can change is damage.

I'd like to change duration, time between ticks and damage for all of those spells. (How) Can I?

#edit: I've checked Utori Mort, and there is "normal" (clear, understandable) formula with lvl & mlvl multipliers. What means for all 3 (pox, flam, mort) there are 3 different formulas. Why?
 
Last edited by a moderator:
first of all, where are you looking these spells?


everything looks fine here...

now if you talking about otserverbr (that you should HAVE specified)

then yes you sure their spells are funny as hell
 
Oh, that's surprising. My code looks like this:

Utori Mort (Curse)
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 onCastSpell(creature, variant)
    local min = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.5) + 7
    local max = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.9) + 8
    local damage = math.random(math.floor(min), math.floor(max))
    for _, target in ipairs(combat:getTargets(creature, variant)) do
        creature:addDamageCondition(target, CONDITION_CURSED, DAMAGELIST_EXPONENTIAL_DAMAGE, damage)
    end
    return true
end

Utori Flam
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)

function onCastSpell(creature, variant)
    local min = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.3) + 2
    local max = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.6) + 4
    local rounds = math.random(math.floor(min), math.floor(max))
    for _, target in ipairs(combat:getTargets(creature, variant)) do
        creature:addDamageCondition(target, CONDITION_FIRE, DAMAGELIST_VARYING_PERIOD, target:isPlayer() and 5 or 10, {8, 10}, rounds)
    end
    return true
end

Is that means i have some different (wrong?) ver of TFS? :O I downloaded it through GIT following this tutorial.

#Edit: Well, codes you have linked are the same as mine, but here's go my question: how to understand the formula? Where are ticks, damage, time etc.?
 
Okay, but in that place i will change EVERY utori spell. How can i put this separately in specific spell's code? Like, dunno, changing this fragment:
Code:
local min = (creature:getLevel() / 3) + (creature:getMagicLevel() * 1.66) + 2
    local max = (creature:getLevel() / 2) + (creature:getMagicLevel() * 1.75) + 4
    local damage = math.random(math.floor(min) * 1000, math.floor(max) * 1000) / 1000
or utori flame's one
Code:
local min = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.3) + 2
    local max = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.6) + 4
    local rounds = math.random(math.floor(min), math.floor(max))
    for _, target in ipairs(combat:getTargets(creature, variant)) do
        creature:addDamageCondition(target, CONDITION_FIRE, DAMAGELIST_VARYING_PERIOD, target:isPlayer() and 5 or 10, {8, 10}, rounds)
    end

To something more clear and independent like, for example, Utura has?

Code:
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000)
 
Back
Top