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

eventy

pitu120

New Member
Joined
Jul 3, 2011
Messages
18
Reaction score
0
Witam

Szukam skryptu/sposobu na różnego rodzaju eventy. Chodzi o dawanie pkt do sklepu automatycznie np. po nabiciu 400lv, zdobyciu danej ilości fragów itp.

Pozdrawiam
 
PHP:
function doAddPoints(cid, points)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end

local config = {
    {level = 150, storage = 89964, reward = 2160, howmanyreward = 10},
    {level = 200, storage = 89965, reward = 2160, howmanyreward = 15},
    {level = 250, storage = 89966, reward = 2160, howmanyreward = 20}
    }
function onAdvance(cid, skill, oldLevel, newLevel)
    for i = 1, #config do
        if(getPlayerStorageValue(cid, config[i].storage) ~= 1 and getPlayerLevel(cid) >= config[i].level) then
                local itemname = getItemNameById(config[i].reward)
                doAddPoints(cid, config[i].howmanyreward)
                setPlayerStorageValue(cid, config[i].storage, 1)
                doPlayerSendTextMessage(cid, 22, "You have gained " .. config[i].howmanyreward .. " premium points for advancing to level " .. config[i].level .. ".")
        end
    end
        return TRUE
end

punkty za 150,200 i 250lvl
 
Back
Top