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

Getcreaturestorage

Bassam421

Lockout RPG/PVP Owner
Joined
Nov 8, 2008
Messages
359
Reaction score
7
Location
Sweden , Göteborg
Hello guys sorry for double post, but i see now that people wont answer the old one, and i have more to go after now :)

okey let's start with the script to get 100 honor when reach x level
Lua:
local t, storage = {
	{300, 10}
}, 256
 
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_CONSOLE_ORANGE, 'Congratulations! You have advanced to level ' .. v[1] .. ' and you have recived '.. v[2] ..' Premium Points!')
			doBroadcastMessage('Congratulations! ' .. getCreatureName(cid) .. ' Advenced To LeveL ' .. v[1] .. ' And Got ' .. v[2] .. ' Premium Points.')
        end
    end
    return true
end
By Bloring Mage!

This one if we can edit to have a storage in database like with premium points, etc Honorpoints so when a player dies it will look up the storage and take one from the person who died, and give it to the one who killed :) i'm quite a bit done here, just need a little more info :cool:

Thank you in advance! <3
 
Last edited:
ok 2 sec :D

- - - Updated - - -

if we can edit this part
Lua:
db.executeQuery('UPDATE accounts SET honor_points=honor_points+'.. v[100] ..' WHERE id=' .. getPlayerAccountId(cid))

- - - Updated - - -

and then add this to database
Lua:
ALTER TABLE `players` ADD
`honor_points` int(11) NOT NULL DEFAULT 0;
 
Back
Top