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

Lua ManaRune By % TFS 1.3

Solution
data/scripts/manarune.lua
Lua:
local runeTest = Spell(SPELL_RUNE)
function runeTest.onCastSpell(creature, variant)
    local target = Tile(variant:getPosition()):getTopVisibleCreature(creature)
    if not target or not target:isPlayer() then
        creature:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end
    local maxMana = creature:getMaxMana() / 100
    target:addMana(math.random(maxMana * 10, maxMana * 15))
    target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    target:say("MR Aaahh!")
    return true
end

runeTest:name("ManaRune#1")
runeTest:isAggressive(false)
runeTest:runeId(2307)
runeTest:blockWalls(true)
runeTest:magicLevel(1)
runeTest:level(8)
runeTest:group("support")...
data/scripts/manarune.lua
Lua:
local runeTest = Spell(SPELL_RUNE)
function runeTest.onCastSpell(creature, variant)
    local target = Tile(variant:getPosition()):getTopVisibleCreature(creature)
    if not target or not target:isPlayer() then
        creature:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end
    local maxMana = creature:getMaxMana() / 100
    target:addMana(math.random(maxMana * 10, maxMana * 15))
    target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    target:say("MR Aaahh!")
    return true
end

runeTest:name("ManaRune#1")
runeTest:isAggressive(false)
runeTest:runeId(2307)
runeTest:blockWalls(true)
runeTest:magicLevel(1)
runeTest:level(8)
runeTest:group("support")
runeTest:id(24)
runeTest:cooldown(1 * 1000)
runeTest:groupCooldown(1 * 1000)
runeTest:isPremium(true)
runeTest:register()

In this line:
target:addMana(math.random(maxMana * 10, maxMana * 15))
control the amount of percentage that you recover with each use, in this case, from 10 to 15 percent
 
Solution
data/scripts/manarune.lua
Lua:
local runeTest = Spell(SPELL_RUNE)
function runeTest.onCastSpell(creature, variant)
    local target = Tile(variant:getPosition()):getTopVisibleCreature(creature)
    if not target or not target:isPlayer() then
        creature:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end
    local maxMana = creature:getMaxMana() / 100
    target:addMana(math.random(maxMana * 10, maxMana * 15))
    target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
    target:say("MR Aaahh!")
    return true
end

runeTest:name("ManaRune#1")
runeTest:isAggressive(false)
runeTest:runeId(2307)
runeTest:blockWalls(true)
runeTest:magicLevel(1)
runeTest:level(8)
runeTest:group("support")
runeTest:id(24)
runeTest:cooldown(1 * 1000)
runeTest:groupCooldown(1 * 1000)
runeTest:isPremium(true)
runeTest:register()

In this line:
target:addMana(math.random(maxMana * 10, maxMana * 15))
control the amount of percentage that you recover with each use, in this case, from 10 to 15 percent
it works perfectly, Thanks
 
Back
Top