local config = {
levelReach = 50,
item = 2160,
count = 50
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58557) == -1) then
setPlayerStorageValue(cid, 58557, 1)
doPlayerAddItem(cid, config.item, config.count)
end
return TRUE
end
local config = {
levelReach = 200,
points = 100
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
setPlayerStorageValue(cid, 58558, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
end
return TRUE
end
local config = {
levelReach = 50,
item = 2160,
count = 50
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58557) == -1) then
setPlayerStorageValue(cid, 58557, 1)
doPlayerAddItem(cid, config.item, config.count)
end
return TRUE
end
local config = {
levelReach = 200,
points = 100
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
setPlayerStorageValue(cid, 58558, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
end
return TRUE
end
registerCreatureEvent(cid, "AdvanceMoney")
registerCreatureEvent(cid, "AdvancePoints")
<event type="advance" name="AdvanceMoney" event="script" value="advanceMoney.lua"/>
<event type="advance" name="AdvancePoints" event="script" value="advancePoints.lua"/>