• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Mana rune in proffesion !

Shady970

New Member
Joined
Dec 4, 2011
Messages
3
Reaction score
0
Hello Pleasse edited mz script :
ID Proffesion : 5,6,9,10

Script :
LUA:
local config = {
funnyEffect = "YES", -- Effect  (YES/NO) 
minimumLevel = 1,
maximumLevel = math.huge, -- for infinite type math.huge
}
local addMana = {
[{config.minimumLevel, 1}] = 3000,
[{1, 1999}] = 3000,
[{2000, config.maximumLevel}] = 3000,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
    local effect = 36

    if level < config.minimumLevel then
        doPlayerSendCancel(cid, "Musisz mieć conajmniej "..config.minimumLevel.." aby uzyc manarune.")
        return FALSE 
    end
    
    if level >= config.maximumLevel then
        doPlayerSendCancel(cid, "Twoj Poziom jest zbyt duzy.")
        return FALSE 
    end

    for k, v in pairs(addMana) do 
        if level >= k[1] and level < k[2] then 
            doPlayerAddMana(cid, v)
            break 
        end 
    end  

        if config.funnyEffect == "YES" then
        local pos = getPlayerPosition(cid)
        local positions = {
                {x=pos.x,y=pos.y,z=pos.z},
        }

        for i = 1, table.getn(positions) do
           doSendMagicEffect(positions[i],effect)
        end
    end
    return TRUE 
end

EDIT FOR REP ++
 
Last edited by a moderator:
Please use lua tags like this :

LUA:
local config = {
funnyEffect = "YES", -- Effect (YES/NO) 
minimumLevel = 1,
maximumLevel = math.huge, -- for infinite type math.huge
}
local addMana = {
[{config.minimumLevel, 1}] = 3000,
[{1, 1999}] = 3000,
[{2000, config.maximumLevel}] = 3000,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local effect = 36

if level < config.minimumLevel then
doPlayerSendCancel(cid, "Musisz mieć conajmniej "..config.minimumLevel.." aby uzyc manarune.")
return FALSE 
end

if level >= config.maximumLevel then
doPlayerSendCancel(cid, "Twoj Poziom jest zbyt duzy.")
return FALSE 
end

for k, v in pairs(addMana) do 
if level >= k[1] and level < k[2] then 
doPlayerAddMana(cid, v)
break 
end 
end 

if config.funnyEffect == "YES" then
local pos = getPlayerPosition(cid)
local positions = {
{x=pos.x,y=pos.y,z=pos.z},
}

for i = 1, table.getn(positions) do
doSendMagicEffect(positions[i],effect)
end
end
return TRUE 
end
 
Back
Top