• 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 Magic Wall Rune " Script With Count Down For TFS 1.x+ "

Sarah Wesker

ƐƖєgαηт Sуηтαx ❤
Staff member
TFS Developer
Support Team
Joined
Mar 16, 2017
Messages
1,416
Solutions
155
Reaction score
1,971
Location
London
GitHub
MillhioreBT
Twitch
millhiorebt
they look for the following file: data/spells/scripts/support/magic_wall_rune.lua and replace the code for this!

Lua:
-- by: 𝓜𝓲𝓵𝓵𝓱𝓲𝓸𝓻𝓮 𝓑𝓣
local recAnimateText = false
local startSeconds = 20

local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_MAGICWALL)

mwCountDownStart = function(position, seconds)
    local spectators = Game.getSpectators(position, false, true, 7, 7, 7, 7)
    if #spectators > 0 then
        if not recAnimateText then
            Creature.say(spectators[1], seconds, TALKTYPE_MONSTER_SAY, false, nil, position)
        else
            Player.sendTextMessage(spectators[1], MESSAGE_EXPERIENCE_OTHERS, nil, position, seconds, TEXTCOLOR_MAYABLUE)
        end
    end
    if seconds > 0 then
        addEvent(mwCountDownStart, 1000, position, seconds -1)
    end
end

function onCastSpell(creature, variant, isHotkey)
    if combat:execute(creature, variant) then
        mwCountDownStart(Variant.getPosition(variant), startSeconds)
        return true
    end
    return false
end
 
Last edited:
Lua:
local startSeconds = 45

local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_WILDGROWTH)

Can be used for wildgrowth, I use something similar on my server.
 
not working in tfs 1.4/1.5 do i need to add something else to my code? im using otcv8
 
Back
Top