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

Windows Need TFS 1.0 scripter service

hahawithout

Spanisher
Joined
Apr 21, 2014
Messages
16
Reaction score
1
Hello, i was wondering if there is someone out there with experience on scripting.

Send me skype via pm. So we can talk.

ty
 
excuse me printer but im from spain and my english is not really good to be honest, so im kinda lost trying to search scripts and that...
 
im looking for a script wich gives you XXX item when you reach XXX level ingame....

example... REACH LEVEL 100 GIVE YOU 5 CRYSTAL COINS
 
Code:
local config, storage = {
    [{1, 5}] = {
        [20] = {
            {
                {2160, 1}, {2159, 1}
            }
        },
        [30] = {
            {
                {2160, 3}, {2159, 3}
            }
        },
        [40] = {
            {
                {2160, 5}, {2159, 5}
            }
        }
    },
    [{2, 6}] = {
        [20] = {
            {
                {2160, 1}, {2159, 1}
            }
        },
        [30] = {
            {
                {2160, 3}, {2159, 3}
            }
        },
        [40] = {
            {
                {2160, 5}, {2159, 5}
            }
        }
    },
    [{3, 7}] = {
        [20] = {
            {
                {2160, 1}, {2159, 1}
            }
        },
        [30] = {
            {
                {2160, 3}, {2159, 3}
            }
        },
        [40] = {
            {
                {2160, 5}, {2159, 5}
            }
        }
    },
    [{4, 8}] = {
        [20] = {
            {
                {2160, 1}, {2159, 1}
            }
        },
        [30] = {
            {
                {2160, 3}, {2159, 3}
            }
        },
        [40] = {
            {
                {2160, 5}, {2159, 5}
            }
        }
    }
}, 123

function onAdvance(cid, skill, oldLevel, newLevel)
    local player = Player(cid)
    if skill ~= 8 then
        return true
    end
 
    for vocation, k in pairs(config) do
        if isInArray(vocation, player:getVocation():getId()) then
            for level, v in pairs(k) do
                if newLevel >= level and player:getStorageValue(storage + level) ~= 1 then
                    local text = ""
                    for i = 1, #v[1] do
                        local itemType = ItemType(v[1][i][1])
                        text = text .. (i ~= 1 and (i == #v[1] and " and " or ", ") or "") .. (v[1][i][2] > 1 and v[1][i][2] or itemType:getArticle()) .. " " .. (v[1][i][2] > 1 and itemType:getPluralName() or itemType:getName())
                        player:addItem(v[1][i][1], v[1][i][2])
                    end
                    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("Congratulations, you reached level %d and received %s.", level, text))
                    player:setStorageValue(storage + level, 1)
                end
            end
        end
    end
    return true
end
 
Back
Top