• 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 [TFS 1.x] "Exura gran ico" with anihi weapons.

Svira

Active Member
Joined
Jan 27, 2008
Messages
267
Solutions
11
Reaction score
36
Hello, some time ago I added some interesting spells to my server. Today I will share one of them!

Spell for EK with EQ element selected, here sov, sca or th in hand.
summons a few druids who regenerate hp, the spell takes% mana.


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_AGGRESSIVE, false)

AREA1 = {
    {0, 0, 0},
    {0, 3, 0},
    {0, 0, 0}
}

local function sendHealingEffect(cid, position, loopCount)
    local player = Player(cid)
    if not player then
        return
    end

    position:sendDistanceEffect(player:getPosition(), CONST_ANI_SMALLHOLY)
    player:addHealth(math.max(10, 70))
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    if loopCount == 0 then
        player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
    end
end

function onCastSpell(creature, var)
    manamax = getPlayerMaxMana(creature) / 100 * 30 -- ile ma pobierac many manacost
    if not isInArray({2421,2431,2400}, getPlayerSlotItem(creature, CONST_SLOT_LEFT).itemid) then
        doPlayerSendCancel(creature, "You can't cast the spell without Anihi Weapon in LEFT HAND.")
        return false
    end
    local playerPos = creature:getPosition()
    local loopCount = 6 -- ile razy ma leczyc how many times heal

    creature:say('Heal me!', TALKTYPE_MONSTER_SAY)
  
    for i = 1, loopCount do
        local position = Position(playerPos.x + math.random(-4, 3), playerPos.y + math.random(-3, 2), playerPos.z)
        addEvent(doAreaCombatHealth, i * 75, creature:getId(), COMBAT_PHYSICALDAMAGE, position, createCombatArea(AREA1), 0, 0, CONST_ME_ASSASSIN)
        addEvent(sendHealingEffect, i * 75, creature:getId(), position, loopCount - i)
    end
    if getPlayerMana(creature) < manamax then
        doPlayerSendCancel(creature, 'You dont have enought of mana')
        return false
    else
        if(variantToNumber(var) ~= 0) then
        return creature:addMana(-manamax)
        end
        
        creature:addMana(-manamax)
        end
    return false
end

and in spells xml:
Lua:
<instant group="healing" name="Wound Cleansing with EQ" words="exura gran ico" lvl="80" manapercent="30" prem="0" selftarget="1" aggressive="0" exhaustion="1000" needlearn="0" script="wound cleansingeq.lua">
        <vocation name="Knight"/>
        <vocation name="Elite Knight"/>
    </instant>

Have fun!
 
Back
Top