• 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 1.x] Request - Free CC For LVL

Status
Not open for further replies.

arbipl

New Member
Joined
Oct 5, 2015
Messages
4
Reaction score
1
Hello :) i need script with one gives free cc for lvl's for ex.

50 lvl - 5cc
100 lvl - 10cc
150 lvl -15 cc

For TFS 1.2


Thanks ! ;)
 
Code:
local config = {
    storageKey = 1000,
    {level = 20, moneyAmount = 1000, storageValue = 1},
    {level = 50, moneyAmount = 5000, storageValue = 2}
}

function onAdvance(player, skill, oldLevel, newLevel)
    if skill ~= SKILL_LEVEL or newLevel <= oldLevel then
        return true
    end

    for _, v in ipairs(config) do
        if newLevel >= v.level and player:getStorageValue(config.storageKey) <= v.storageValue then
            player:setBankBalance(player:getBankBalance() + v.moneyAmount)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, v.moneyAmount .." gold coins has been deposit to your bank.")
            player:setStorageValue(config.storageKey, v.storageValue)
            break
        end
    end

    return true
end
 
Status
Not open for further replies.
Back
Top Bottom