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

[Talkaction]

Delvire

°£°
Joined
Feb 24, 2008
Messages
236
Reaction score
9
Hello!

In the last month, an user helped me to make this script:

local config = {
levelMax = 20,
price = 5000,
priceAdd = 250,
days = 21
}

function onSay(cid, words, param)
local price = config.price
local level = getPlayerLevel(cid)
if level > config.levelMax then
for i = 1, level - config.levelMax do
price = price + config.priceAdd
end
end

if doPlayerRemoveMoney(cid, price) == TRUE then
doPlayerAddPremiumDays(cid, config.days)

doPlayerPopupFYI(cid, "Greetings, player! You have brought 3 weeks of premium time! Enjoy!")
doPlayerAddMapMark(cid, {x=681, y=601, z=7}, 9, "O barco")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
else
doPlayerSendCancel(cid, "You do not have enough money.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end

return TRUE
end

This is a premium time script. It works like the actual bless system... after a Y level, the price of the premium time increases a X amount, according to your level

But there's a foolish weakness on this script.
Let me show an example:

Delvire have a character with level 320, and the premium time is too expensive for his level, so, he creates a noob character and pay a premium time for the minimun price D: D: D: D:

There's any way to fix this problem?


Thanks
 
Back
Top