Like this?
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {
[50] = {count = 50},
[100] = {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...