• 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

Zuber98

New Member
Joined
Apr 27, 2021
Messages
12
Reaction score
2
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()


Hi, how do I remake the manaruna run out?
 
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()


Hi, how do I remake the manaruna run out?


You could try and add

item:remove(1)
 
You need to find the item and then transform it. I don't know how to find the item in spell but once you do that and define it as item you can transform it like this to remove 1 charge
item:transform(item:getId(), charges - 1)
 
Last edited:
Back
Top