Well hello this is a simple script that i made for a friend...
When you reaches the level 100 you obtain 10cc and a bronze trophy.
When you reaches the level 200 you obtain 20cc and a plate trophy.
When you reaches the level 300 you obtain 30cc and a gold trophy.
Here is..
(.data/scripts/advances/level.lua
Not tested =D
When you reaches the level 100 you obtain 10cc and a bronze trophy.
When you reaches the level 200 you obtain 20cc and a plate trophy.
When you reaches the level 300 you obtain 30cc and a gold trophy.
Here is..
(.data/scripts/advances/level.lua
Code:
--onAdvance system by 4220niller
--Script by Darkhaos
function onAdvance(cid, skill, oldlevel, newlevel)
local config = {
playerName = getCreatureName(cid),
addStorage1 = 13201,
addStorage2 = 13202,
addStorage3 = 13203,
checkStorage1 = getPlayerStorageValue(cid,config.addStorage1),
checkStorage2 = getPlayerStorageValue(cid,config.addStorage2),
checkStorage3 = getPlayerStorageValue(cid,config.addStorage3),
itemToAdd = 2160,
bronzeGoblet = 5087,
plateGoblet = 5086,
goldGoblet = 5085
}
if newlevel == 100 and config.checkStorage1 == -1 then
doPlayerAddItem(cid,config.itemToAdd,10)
local bronzeGoblet = doPlayerAddItem(cid,config.bronzeGoblet,1)
doSetItemSpecialDescription(bronzeGoblet, "This trophy is given to the adventurer for
reaches the level 100. Awarded to " .. config.playerName .. ".")
setPlayerStorageValue(cid,config.addStorage1,1)
end
elseif newlevel == 200 and config.checkStorage2 == -1 then
doPlayerAddItem(cid,config.itemToAdd,20)
local plateGoblet = doPlayerAddItem(cid,config.plateGoblet,1)
doSetItemSpecialDescription(plateGoblet, "This trophy is given to the adventurer for
reaches the level 200. Awarded to " .. config.playerName .. ".")
setPlayerStorageValue(cid,config.addStorage2,1)
end
elseif newlevel == 300 and config.checkStorage3 == -1 then
doPlayerAddItem(cid,config.itemToAdd,30)
local goldGoblet = doPlayerAddItem(cid,config.goldGoblet,1)
doSetItemSpecialDescription(goldGoblet, "This trophy is given to the adventurer for
reaches the level 300. Awarded to " .. config.playerName .. ".")
setPlayerStorageValue(cid,config.addStorage3,1)
end
else
return FALSE
end
Not tested =D
Last edited: