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

Automatic Level Reward

Lanibox

Brutal1ty.com
Joined
Sep 21, 2010
Messages
179
Reaction score
4
Hey, I need creaturescript which gives player 3cc when he reaches lvl 50 and 5cc when he reaches lvl 100.

I know this has been made before, but I didnt found working one for 0.4

Can somebody help me? Would be nice :)
 
okey its eazy i will give you script
function onAdvance(cid, skill, oldLevel, newLevel)

local config = {
[20] = {item = 2160, count = 5},
[50] = {item = 2160, count = 5},
[100] = {item = 2160, count = 5},
[110] = {item = 2160, count = 5},
[120] = {item = 2160, count = 5},
[130] = {item = 2160, count = 5},
[140] = {item = 2160, count = 5},
[150] = {item = 2160, count = 5},
[160] = {item = 2160, count = 5},
[170] = {item = 2160, count = 5},
[180] = {item = 2160, count = 5},
[190] = {item = 2160, count = 5},
[200] = {item = 2160, count = 5},
[210] = {item = 2160, count = 5},
[220] = {item = 2160, count = 5},
[230] = {item = 2160, count = 5},
[240] = {item = 2160, count = 5},
[250] = {item = 2160, count = 5},
[260] = {item = 2160, count = 5},
[270] = {item = 2160, count = 5},
[280] = {item = 2160, count = 5},
[290] = {item = 2160, count = 5},
[300] = {item = 2160, count = 5},
[320] = {item = 2160, count = 5},
[330] = {item = 2160, count = 5},
[340] = {item = 2160, count = 5},
[350] = {item = 2160, count = 5},
[360] = {item = 2160, count = 5},
[370] = {item = 2160, count = 5},
[380] = {item = 2160, count = 30},
[390] = {item = 2160, count = 40},
[400] = {item = 2160, count = 50},
}

if skill == 8 then
for level, info in pairs(config) do
if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then
doPlayerAddItem(cid, info.item, info.count)
doPlayerSendTextMessage(cid, 27, "Parabéns Guerreiro você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".")
local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'"
setPlayerStorageValue(cid, 30700, sat)
end
end
end

return TRUE
end
if you want help again call me : [email protected] enjoy!
 
Back
Top