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

UH for TFS 1.3

antonio664

Member
Joined
Jan 9, 2013
Messages
129
Reaction score
5
I need a script for ultimate healing rune.
has to work identical to 7.7
minimum regeneration of 240 hp

PLEASE
 
I'm using a Character Paladin, level 24, magic level 5.
I tested all the ready scripts obtained on github.


on cipsoft servers, a minimum regeneration must be a minimum of 240
independently of the magic level or level
 
then just do min = 240 + (level etc
and max = 240+ (level etc

and modify the rest of the calc to not be OP.

the minimum damage is working
I will test the maximum damage. I still don't know any maximum reference = (
thanks brow
Post automatically merged:

I see in old videos that the regeneration is fixed
and not variable
is it possible to do something like this?
 
Last edited:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
    local min, max
    if (((level * 2) + (maglevel * 3)) * 2.8) < 250 then
        max = 250
    else
        max = ((level * 2) + (maglevel * 3)) * 2.8
    end

    if (((level * 2) + (maglevel * 3)) * 2) < 250 then
        min = 250
    else
        min = ((level * 2) + (maglevel * 3)) * 2
    end

    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
    if Tile(var:getPosition()):getTopCreature() then
        return combat:execute(creature, var)
    end

    creature:sendCancelMessage("You can only use this rune on creatures.")
    creature:getPosition():sendMagicEffect(CONST_ME_POFF)
end
 
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, magicLevel)
    local min = (level * 1) + (magicLevel * 1) + 240
    local max = (level * 1) + (magicLevel * 1) + 241
    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
    return combat:execute(creature, variant)
end
try it, you can change the numbers
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
--setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.5, -30, 2.5, 0)

function onGetFormulaValues(cid, level, maglevel)
    min = (level * 2 + maglevel * 3) * 1.5
    max = (level * 2 + maglevel * 3) * 2.0

    return math.max(240, min), math.max(240, max)
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
formula from cip

Lua:
    local base = 250
    local variation = 0
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
    local min = math.max((base - variation), ((3 * maglevel + 2 * level) * (base - variation) / 100))
    local max = math.max((base + variation), ((3 * maglevel + 2 * level) * (base + variation) / 100))

    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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