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

Free points script

Adel

New Member
Joined
Apr 16, 2011
Messages
39
Reaction score
3
I want free points script and what i will do to get it working i know alot of u busy but i will be happy if someone helped me with that Thanks.
 
  1. You can use it that script aswell

  2. -- Author: Kahras // TIBIA.NET.PL \\ Help: Matt --
    [*]function onAdvance(cid, skill, oldLevel, newLevel)
    [*]-- [level] = {give = "yes/no", itemid = iditem, count = count, storage = storage}
    [*]local poziomy = {
    [*][50] = {give = "no", itemid = id of item who give premium points, count = 1, storage = 350001},
    [*][100] = {give = "yes", itemid = id of item who give premium points, count = 2, storage = 350002},
    [*][150] = {give = "yes", itemid = id of item who give premium points, count = 3, storage = 350003},
    [*][200] = {give = "no", itemid = id of item who give premium points, count = 5, storage = 350004}
    [*]}
    [*]for k, v in pairs(poziomy) do
    [*]if getPlayerStorageValue(cid, v.storage) == -1 then
    [*]if(newLevel == k) then
    [*]setPlayerStorageValue(cid, v.storage, 1)
    [*]doBroadcastMessage("Player "..getPlayerName(cid).." advanced on level "..newLevel.." !\n Congratulations!")
    [*]if(v.give) then
    [*]v.give = getBooleanFromString(v.give)
    [*]end
    [*]if(not v.give) then
    [*]return false
    [*]end
    [*]doPlayerAddItem(cid, v.itemid, v.count)
    [*]end
    [*]end
    [*]end
    [*]return TRUE
    [*]end
 
Add this at creaturescripts.xml
Code:
<event type="advance" name="pointsforlvl" event="script" value="points.lua"/>
Create a folder in the creaturescripts and name it points and add this in it
Code:
local t, storage = {
  -- level -- amount points (delete this line)..
    {350, 50},
    {450, 65},
    {500, 275},
    {600, 100},
}, 259

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill ~= SKILL__LEVEL then
        return true
    end
    for i = 1, #t do
        local v = t[i]
        if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
            db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
            doCreatureSetStorage(cid, storage, i)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
        end
    end
    return true
end
 
Add this at creaturescripts.xml
Code:
<event type="advance" name="pointsforlvl" event="script" value="points.lua"/>
Create a folder in the creaturescripts and name it points and add this in it
Code:
local t, storage = {
  -- level -- amount points (delete this line)..
    {350, 50},
    {450, 65},
    {500, 275},
    {600, 100},
}, 259

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill ~= SKILL__LEVEL then
        return true
    end
    for i = 1, #t do
        local v = t[i]
        if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
            db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
            doCreatureSetStorage(cid, storage, i)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
        end
    end
    return true
end
i will see,Thanks

i got an error

http://prntscr.com/6ifni9

not working
Add this at creaturescripts.xml
Code:
<event type="advance" name="pointsforlvl" event="script" value="points.lua"/>
Create a folder in the creaturescripts and name it points and add this in it
Code:
local t, storage = {
  -- level -- amount points (delete this line)..
    {350, 50},
    {450, 65},
    {500, 275},
    {600, 100},
}, 259

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill ~= SKILL__LEVEL then
        return true
    end
    for i = 1, #t do
        local v = t[i]
        if newLevel >= v[1] and getCreatureStorage(cid, storage) < i then
            db.executeQuery('UPDATE accounts SET premium_points=premium_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
            doCreatureSetStorage(cid, storage, i)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have earned '.. v[2] ..' Premium Points!')
        end
    end
    return true
end
i got an error

Here's a screenshot

http://prntscr.com/6ifni9
 
Last edited by a moderator:
Back
Top