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

[0.4] Manarune script with cool effect ( Like Ultimate Manarune from Highexp )

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,826
Solutions
82
Reaction score
1,948
Location
Germany
Heyo
This script has been created for my ot befor but I dont need it anymore so I release it

  • Every vocation has different healing just set it up as you want
  • You can heal other peoples with this manarune
  • You can setup easly other effect and animated text for the healing

Little gif how it looks like

This manarune script is made for TFS 0.4

Lua:
local exhaust_time = 500 -- 1 = millisecond
local colour, effect, dist_effect = 210, CONST_ME_HOLYAREA, CONST_ANI_HOLY
local values = {
    [{1, 2, 5, 6}] = {550000000}, -- [{vocation numbers}] = {mana_amount}
    [{3, 7}] = {550000000},
    [{4, 8}] = {550000000}
}

local exhaust_timer = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local pid = itemEx.uid
    if not isCreature(pid) then
        return true
    end
    if not isPlayer(pid) then
        doPlayerSendCancel(cid, "This item can only be used on players.")
        return true
    end
    
    local cur_time = os.mtime()
    if exhaust_timer[cid] and exhaust_timer[cid] > cur_time then
        doPlayerSendCancel(cid, "Exhausted. Can use again in " .. ((exhaust_timer[cid] - cur_time) / 1000) .. " seconds.")
        return true
    end
    exhaust_timer[cid] = cur_time + exhaust_time

    local pos = toPosition
    local voc = getPlayerVocation(pid)
    for v, k in pairs(values) do
        if isInArray(v, voc) then
            local cur_mana, max_mana, add = getCreatureMana(pid), getCreatureMaxMana(pid), k[1]
            if cur_mana + k[1] > max_mana then
                add = max_mana - cur_mana
            end
            doSendMagicEffect(toPosition, effect)
            doSendDistanceShoot({x = pos.x + 2,y = pos.y + 2,z = pos.z}, pos, dist_effect)
            doSendDistanceShoot({x = pos.x + 2,y = pos.y - 2,z = pos.z}, pos, dist_effect)
            doSendDistanceShoot({x = pos.x - 2,y = pos.y - 2,z = pos.z}, pos, dist_effect)
            doSendDistanceShoot({x = pos.x - 2,y = pos.y + 2,z = pos.z}, pos, dist_effect)
            doCreatureAddMana(pid, add, false)
            doSendAnimatedText(toPosition, "+" .. k[1] .. "", colour)
            return true
        end
    end
    return true
end

Thanks to @Xikini for updating the script
 
Last edited:
Heyo
This script has been created for my ot befor but I dont need it anymore so I release it

  • Every vocation has different healing just set it up as you want
  • You can heal other peoples with this manarune
  • You can setup easly other effect and animated text for the healing

Little gif how it looks like

This manarune script is made for TFS 0.4
Cool gif, but where's the script? 🤣
 
Ups :D
Its there now sorryyyyyyy <3
Post automatically merged:

Script updated
Credits: @Xikini
 
Last edited:
How do i get the rune=? And where should i copy paste the script? sorry, im new lol.
 
It can be a percentage instead of a fixed number 550000000
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000) -- 1000 means 1 sec

function onUse(cid, item, fromPosition, itemEx, toPosition)

local manamax = getPlayerMaxMana(cid)
local min = 12
local max = 14
local mana_add = math.random((manamax * (min/100)), (manamax * (max/100)))

if(hasCondition(cid, CONDITION_EXHAUST)) then
return true
end

local pos = getThingPos(cid)
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
doSendDistanceShoot({x=pos.x+2,y=pos.y+2,z=pos.z},pos, CONST_ANI_HOLY)
doSendDistanceShoot({x=pos.x+2,y=pos.y-2,z=pos.z},pos, CONST_ANI_HOLY)
doSendDistanceShoot({x=pos.x-2,y=pos.y-2,z=pos.z},pos, CONST_ANI_HOLY)
doSendDistanceShoot({x=pos.x-2,y=pos.y+2,z=pos.z},pos, CONST_ANI_HOLY)
doSendAnimatedText(getPlayerPosition(cid),"+"..mana_add.."", TEXTCOLOR_YELLOW)
doAddCondition(cid, exhaust)
return true
end
 
Is there a similiar script for the TFS 1.3 downgrade 8.6?
Lua:
local exhaust_time = 500 -- 1 = millisecond
local colour, effect, dist_effect = 210, CONST_ME_HOLYAREA, CONST_ANI_HOLY
local values = {
    [{1, 2, 5, 6}] = {550000000}, -- [{vocation numbers}] = {mana_amount}
    [{3, 7}] = {550000000},
    [{4, 8}] = {550000000}
}

local exhaust_timer = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local pid = itemEx.uid
    local player = Player(cid)
    local target = Player(pid)
    if not target then
        player:sendCancelMessage("This item can only be used on players.")
        return true
    end
    
    local cur_time = os.mtime()
    if exhaust_timer[cid] and exhaust_timer[cid] > cur_time then
        player:sendCancelMessage("Exhausted. Can use again in " .. ((exhaust_timer[cid] - cur_time) / 1000) .. " seconds.")
        return true
    end
    exhaust_timer[cid] = cur_time + exhaust_time

    local pos = toPosition
    local voc = player:getVocation():getBase():getId()
    for v, k in pairs(values) do
        if table.contains(v, voc) then
            local cur_mana, max_mana, add = player:getMana(), player:getMaxMana(), k[1]
            if cur_mana + k[1] > max_mana then
                add = max_mana - cur_mana
            end
            toPosition:sendMagicEffect(effect)
            Position(pos.x + 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x + 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x - 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x - 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
            target:addMana(add, false)
            local spectators = Game.getSpectators(pos, false, true, 6, 6)
            for _, spectator in ipairs(spectators) do
                target:say("+" .. k[1] .. "", TALKTYPE_MONSTER_SAY, false, spectator, pos)
            end
            return true
        end
    end
    return true
end
 
Lua:
local exhaust_time = 500 -- 1 = millisecond
local colour, effect, dist_effect = 210, CONST_ME_HOLYAREA, CONST_ANI_HOLY
local values = {
    [{1, 2, 5, 6}] = {550000000}, -- [{vocation numbers}] = {mana_amount}
    [{3, 7}] = {550000000},
    [{4, 8}] = {550000000}
}

local exhaust_timer = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local pid = itemEx.uid
    local player = Player(cid)
    local target = Player(pid)
    if not target then
        player:sendCancelMessage("This item can only be used on players.")
        return true
    end
   
    local cur_time = os.mtime()
    if exhaust_timer[cid] and exhaust_timer[cid] > cur_time then
        player:sendCancelMessage("Exhausted. Can use again in " .. ((exhaust_timer[cid] - cur_time) / 1000) .. " seconds.")
        return true
    end
    exhaust_timer[cid] = cur_time + exhaust_time

    local pos = toPosition
    local voc = player:getVocation():getBase():getId()
    for v, k in pairs(values) do
        if table.contains(v, voc) then
            local cur_mana, max_mana, add = player:getMana(), player:getMaxMana(), k[1]
            if cur_mana + k[1] > max_mana then
                add = max_mana - cur_mana
            end
            toPosition:sendMagicEffect(effect)
            Position(pos.x + 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x + 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x - 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
            Position(pos.x - 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
            target:addMana(add, false)
            local spectators = Game.getSpectators(pos, false, true, 6, 6)
            for _, spectator in ipairs(spectators) do
                target:say("+" .. k[1] .. "", TALKTYPE_MONSTER_SAY, false, spectator, pos)
            end
            return true
        end
    end
    return true
end

Thanks man i tried to make it myself but im not that good, i tried everything i could XD
Post automatically merged:

Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
  
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 1) + (magLevel * 1) 
    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

Tried to put this function in but its not working, i am trying to understand this scripting thing but its to much to handle...
 
Last edited:
Thanks man i tried to make it myself but im not that good, i tried everything i could XD
Post automatically merged:

Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
 
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 1) + (magLevel * 1)
    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

Tried to put this function in but its not working, i am trying to understand this scripting thing but its to much to handle...
Want it to be locked to certain vocations? If not then
Lua:
local exhaust_time = 500 -- 1 = millisecond
local colour, effect, dist_effect = 210, CONST_ME_HOLYAREA, CONST_ANI_HOLY

local function rollMana(player)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 1) + (magLevel * 1)
    local max = (level * 1) + (magLevel * 1)
    return math.random(min,max)
end

local exhaust_timer = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local pid = itemEx.uid
    local player = Player(cid)
    local target = Player(pid)
    if not target then
        player:sendCancelMessage("This item can only be used on players.")
        return true
    end
   
    local cur_time = os.mtime()
    if exhaust_timer[cid] and exhaust_timer[cid] > cur_time then
        player:sendCancelMessage("Exhausted. Can use again in " .. ((exhaust_timer[cid] - cur_time) / 1000) .. " seconds.")
        return true
    end
    exhaust_timer[cid] = cur_time + exhaust_time

    local pos = toPosition
    local cur_mana, max_mana, add = player:getMana(), player:getMaxMana(), rollMana(player)
    if cur_mana + add > max_mana then
        add = max_mana - cur_mana
    end
    toPosition:sendMagicEffect(effect)
    Position(pos.x + 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x + 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x - 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x - 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
    target:addMana(add, false)
    local spectators = Game.getSpectators(pos, false, true, 6, 6)
    for _, spectator in ipairs(spectators) do
        target:say("+" .. add .. "", TALKTYPE_MONSTER_SAY, false, spectator, pos)
    end
    return true
end
Need to change min and max to something else if you want some randomness to it.
I can make it only for certain vocations if you want.
 
Want it to be locked to certain vocations? If not then
Lua:
local exhaust_time = 500 -- 1 = millisecond
local colour, effect, dist_effect = 210, CONST_ME_HOLYAREA, CONST_ANI_HOLY

local function rollMana(player)
    local level = player:getLevel()
    local magLevel = player:getMagicLevel()
    local min = (level * 1) + (magLevel * 1)
    local max = (level * 1) + (magLevel * 1)
    return math.random(min,max)
end

local exhaust_timer = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local pid = itemEx.uid
    local player = Player(cid)
    local target = Player(pid)
    if not target then
        player:sendCancelMessage("This item can only be used on players.")
        return true
    end
  
    local cur_time = os.mtime()
    if exhaust_timer[cid] and exhaust_timer[cid] > cur_time then
        player:sendCancelMessage("Exhausted. Can use again in " .. ((exhaust_timer[cid] - cur_time) / 1000) .. " seconds.")
        return true
    end
    exhaust_timer[cid] = cur_time + exhaust_time

    local pos = toPosition
    local cur_mana, max_mana, add = player:getMana(), player:getMaxMana(), rollMana(player)
    if cur_mana + add > max_mana then
        add = max_mana - cur_mana
    end
    toPosition:sendMagicEffect(effect)
    Position(pos.x + 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x + 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x - 2, pos.y - 2, pos.z):sendDistanceEffect(pos, dist_effect)
    Position(pos.x - 2, pos.y + 2, pos.z):sendDistanceEffect(pos, dist_effect)
    target:addMana(add, false)
    local spectators = Game.getSpectators(pos, false, true, 6, 6)
    for _, spectator in ipairs(spectators) do
        target:say("+" .. add .. "", TALKTYPE_MONSTER_SAY, false, spectator, pos)
    end
    return true
end
Need to change min and max to something else if you want some randomness to it.
I can make it only for certain vocations if you want.
i dont think i need it to certain voc, but i appreciate your help, you the best :) works perfect by the way i just changed the talktype to animated text instead and it work fine :) are you swedish?
 
i dont think i need it to certain voc, but i appreciate your help, you the best :) works perfect by the way i just changed the talktype to animated text instead and it work fine :) are you swedish?
Norway :)
Lets not spam this thread anymore
 
Back
Top