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

TFS 0.3.1

Jarhead

New Member
Joined
Feb 2, 2012
Messages
81
Reaction score
2
Location
Poland
Hi, I'm looking for manarune script for tfs 0.3.1 tibia 8.4 for all vocations.
Rune should give knight 100-150 mana, pal 200-250, mage, drut 350+

Admin: I forget thread title, please type there manarune
 
you can use an onUse actionscript for this and structure a table with vocation ids and min/max values it should have like this:

Code:
local values = {
    [1] = {min = 350, max = 500},
    [3] = {min = 200, max = 250},
    [4] = {min = 100, max = 150}
}
values[2] = values[1] -- make druid vocation id the same as sorc id

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local value = values[getPlayerVocation(cid)]
    -- just incase player vocation doesnt exist in the table for some reason
    if not value then
        return true
    end
    doPlayerAddMana(cid, math.random(value.min, value.max))
    return true
end

the keys in the values table should be vocation ids
like [1] is vocation id 1 (sorcerer im assuming)
[2] should be druid (vocation id 2)
etc
 
Back
Top