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

Spell 2 Paladin Spells [TFS 1.4]

Adorius Black

Advanced OT User
Joined
Mar 31, 2020
Messages
304
Solutions
3
Reaction score
180
Pallish

Pallish.jpg

XML:
<instant group="attack" spellid="23" name="Pallish" words="pallish" lvl="33" mana="130" prem="0" direction="1" exhaustion="5000" groupcooldown="2000" needlearn="0" script="custom/pallish.lua">
        <vocation name="Paladin" />
        <vocation name="Royal Paladin" />
</instant>

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)

AREA_PALLISH = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0}
 }

combat:setArea(createCombatArea(AREA_PALLISH))
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)



function onGetFormulaValues(player, level, maglevel)
    local min = (level / 5.5) + (maglevel * 4) + 15
    local max = (level / 5.5) + (maglevel * 7) + 25
    return -min, -max
end

function onTargetTile(creature, position)
    if creature then
        creature:getPosition():sendDistanceEffect(position, CONST_ANI_DEATH)
    end
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")

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





Pallish San

Pallish San.jpg

XML:
<instant group="attack" spellid="24" name="Pallish San" words="pallish san" lvl="60" mana="230" prem="0" direction="1" exhaustion="9000" groupcooldown="2000" needlearn="0" script="custom/pallish_san.lua">
        <vocation name="Paladin" />
        <vocation name="Royal Paladin" />
</instant>

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)

AREA_PALLISH_SAN = {
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 3, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0}
 }

combat:setArea(createCombatArea(AREA_PALLISH_SAN))
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)



function onGetFormulaValues(player, level, maglevel)
    local min = (level / 4.5) + (maglevel * 6) + 25
    local max = (level / 4.5) + (maglevel * 8) + 45
    return -min, -max
end

function onTargetTile(creature, position)
    if creature then
        creature:getPosition():sendDistanceEffect(position, CONST_ANI_REDSTAR)
    end
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")

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

If you know how to make this code more easy, stable, correct or you are just bored and you have created nice modification of this code please post it here. OTLand users will be grateful. :)
 
Last edited:
Back
Top