local config = {
xyz = {x = 1000, z = 1000, y = 7},
level = 250,
storage = 3000
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == SKILL__LEVEL and newLevel == config.level and getCreatureStorage(cid, 3000) < 0 then
doTeleportThing(cid, config.xyz)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doCreatureSetStorage(cid, 3000, 1)
end
return true
end
Isn't it better to use newLevel >= config.level?
Just incase if he went from 249 to 251+ or something? (skipping that whole 250)