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

Scripter OTHIRE EXP BOOST SCROLL

It's your lucky night buddy. This is staged exerience so in those 3 files should be the same. You should count how many is 6,5 and so on but it's like current stage e.q multiplied by 8 or so. Just test some.

In actions add file expboost.lua (or sth like that)
Code:
-- OTcentrum.pl - Polskie Centrum OpenTibii
local config = {
time = 48, -- Hours of Exp Time
storage = 20011,
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}

local function endExpRate(cid)
    if isPlayer(cid) == TRUE then
        setPlayerStorageValue(cid, config.storage, -1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
    end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local str = getPlayerStorageValue(cid, config.storage)
if str < 0 then
local level = getPlayerLevel(cid)

    for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2] then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)
            doRemoveItem(item.uid, 1)
            setPlayerStorageValue(cid, config.storage, os.time() + config.time * 3600)
            addEvent(endExpRate, config.time * 3600 * 1000, cid)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your experience rate is now higher. It will last for ".. config.time .." hours.")
            break
        end
    end 
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You still have extra experience time left.")
    end
    return TRUE
end

In creaturescripts add file: OnAdvanceRate.lua
Code:
local config = {
    storage = 20011
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}


function onAdvance(cid, skill, oldLevel, newLevel)
    local level = getPlayerLevel(cid)
    local str = getPlayerStorageValue(cid, config.storage)

    if (str >= 0 and (str - os.time()) > 0) then   
    for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2]  then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)       
        break           
        end       
    end
        else
        setPlayerStorageValue(cid, config.storage, -1)
end
    return true
end

In creaturescripts add file: ExtraLoginRate.lua
Code:
local config = {
    storage = 20011
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}

local function endExpRate(cid)
    if isPlayer(cid) == TRUE then
        setPlayerStorageValue(cid, config.storage, -1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
    end
end


function onLogin(cid)
    local str = getPlayerStorageValue(cid, config.storage)
    local level = getPlayerLevel(cid)
    if (str >= 0 and (str - os.time()) > 0) then
        for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2] then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)
        break           
        end       
    end        
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time is running.")
        addEvent(endExpRate, (str - os.time()) * 1000, cid)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at: " .. os.date("%c", str))
    else
        setPlayerStorageValue(cid, config.storage, -1)
    end
    return TRUE
end
Declare them properly
 
It's your lucky night buddy. This is staged exerience so in those 3 files should be the same. You should count how many is 6,5 and so on but it's like current stage e.q multiplied by 8 or so. Just test some.

In actions add file expboost.lua (or sth like that)
Code:
-- OTcentrum.pl - Polskie Centrum OpenTibii
local config = {
time = 48, -- Hours of Exp Time
storage = 20011,
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}

local function endExpRate(cid)
    if isPlayer(cid) == TRUE then
        setPlayerStorageValue(cid, config.storage, -1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
    end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local str = getPlayerStorageValue(cid, config.storage)
if str < 0 then
local level = getPlayerLevel(cid)

    for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2] then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)
            doRemoveItem(item.uid, 1)
            setPlayerStorageValue(cid, config.storage, os.time() + config.time * 3600)
            addEvent(endExpRate, config.time * 3600 * 1000, cid)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your experience rate is now higher. It will last for ".. config.time .." hours.")
            break
        end
    end
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You still have extra experience time left.")
    end
    return TRUE
end

In creaturescripts add file: OnAdvanceRate.lua
Code:
local config = {
    storage = 20011
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}


function onAdvance(cid, skill, oldLevel, newLevel)
    local level = getPlayerLevel(cid)
    local str = getPlayerStorageValue(cid, config.storage)

    if (str >= 0 and (str - os.time()) > 0) then  
    for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2]  then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)      
        break          
        end      
    end
        else
        setPlayerStorageValue(cid, config.storage, -1)
end
    return true
end

In creaturescripts add file: ExtraLoginRate.lua
Code:
local config = {
    storage = 20011
}
local addExp = {
[{6, 25}] = 6.5,
[{26, 50}] = 2.5,
[{51, 75}] = 1.625,
[{76, 100}] = 1.25,
[{101, 125}] = 0.875,
[{126, 150}] = 0.6,
[{151, 180}] = 0.45,
[{181, 999}] = 0.325
}

local function endExpRate(cid)
    if isPlayer(cid) == TRUE then
        setPlayerStorageValue(cid, config.storage, -1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.")
    end
end


function onLogin(cid)
    local str = getPlayerStorageValue(cid, config.storage)
    local level = getPlayerLevel(cid)
    if (str >= 0 and (str - os.time()) > 0) then
        for k, v in pairs(addExp) do
        if level >= k[1] and level <= k[2] then
            doPlayerSetRate(cid, LEVEL_EXPERIENCE, LEVEL_EXPERIENCE * v)
        break          
        end      
    end       
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time is running.")
        addEvent(endExpRate, (str - os.time()) * 1000, cid)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at: " .. os.date("%c", str))
    else
        setPlayerStorageValue(cid, config.storage, -1)
    end
    return TRUE
end
Declare them properly

Hello, this works when EXP Stages is active?
 
Back
Top