function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41024) ~= 1 and newlevel >= 20) then
setPlayerStorageValue(cid, 41024, 1)
doPlayerAddItem(cid, 3035, 30)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 20, you will now be rewarded 30 Platinum coins. Enjoy your hunting!", TALKTYPE_ORANGE_1)
end
return true
end
function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41024) ~= [COLOR="#FF0000"]21[/COLOR] and newlevel >= [COLOR="#FF0000"]30[/COLOR]) then
setPlayerStorageValue(cid, 41024, 1)
doPlayerAddItem(cid, 3043, [COLOR="#FF0000"]1[/COLOR])
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level [COLOR="#FF0000"]30[/COLOR], you will now be rewarded [COLOR="#FF0000"]1 [/COLOR]Crystal coin. Enjoy your hunting!", TALKTYPE_ORANGE_1)
end
return true
end
local config = {
levelReach = 30,
item = 2160,
count = 1
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 100000) == -1) then
setPlayerStorageValue(cid, 100000, 1)
doPlayerAddItem(cid, config.item, config.count)
end
return TRUE
end
<event type="advance" name="reward" event="script" value="reward.lua"/>