-- made by magista
local cfg = {
amount = 1 -- here how many points you want
stg = 9865 -- any free storage and u need to change it for every quest
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorage(cid,cfg.stg) < 1 then
db.executeQuery('UPDATE accounts SET premium_points=premium_points+'..cfg.amount..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSay(cid, "CONGRATULATIONS! You have recived" ..amount.. "points!. ", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 28)
doPlayerSetStorage(cid,cfg.stg,1)
else
doPlayerSendCancel(cid,"You already made this quest before.")
end
return TRUE
end