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

Action [TFS 1.3] Manarune with animated text ( without source edit or custom client )

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,821
Solutions
82
Reaction score
1,943
Location
Germany
Hello
I would like to release this script
This manarune allows you to heal with animated text without using custom client or doing source edits
You can use this manarune aswell on other players
( Manarune healing depends on level and magic level )

This script has been tested on TFS 1.3 and should work without any big problem

Lua:
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, 1000) -- Here you can put your exhaust as you want. ( 1000 means = 1 second )

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
   
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 1) + (magLevel * 1) -- for every level you heal 1 mana more so if you setup 10 you'll heal for every level 10 mana more / same for magic level.
    local max = (level * 1) + (magLevel * 1)
    local mana_add = math.random(min,max)

    targetPlayer = Player(target)
    if not targetPlayer then
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You may only use this on players!")
        return true
    end

    local pos = targetPlayer:getPosition()
   
    if player:getCondition(CONDITION_EXHAUST_HEAL) then
       player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED))
       return true
    end

    targetPlayer:addMana(mana_add)

    -- This part allows you to heal with animated text even without source edits or custom client.
    local spectators = Game.getSpectators(pos, false, false, 13, 13, 7, 7)
    if #spectators > 0 then
        for i = 1, #spectators do
            local spectator = spectators[i]
            if spectator:isPlayer() then
                spectator:sendTextMessage(MESSAGE_HEALED, nil, pos, mana_add, TEXTCOLOR_YELLOW) -- <-- There you can change the color as you want.
            end
        end
    end
    pos:sendMagicEffect(50) -- Here you can change your effect as you want.
    targetPlayer:addCondition(exhaust)
    return true
end
 
Lua:
    local min = (level * 1) + (magLevel * 1)
    local max = (level * 1) + (magLevel * 1)
    
    
    this is equal and easier to understand
    
    local min = level + magLevel
    local max = level + magLevel
    
    which means that min is equal to max in all cases
    
    level times 1 is alway = level. no need for the times 1.
 
Lua:
    local min = (level * 1) + (magLevel * 1)
    local max = (level * 1) + (magLevel * 1)
   
   
    this is equal and easier to understand
   
    local min = level + magLevel
    local max = level + magLevel
   
    which means that min is equal to max in all cases
   
    level times 1 is alway = level. no need for the times 1.
Based on their comment saying “…if you setup 10…” I’m assuming this was intentional and functions as a “config”, even though it should be at the top in variables.
 
Back
Top