function onAdvance(cid, skill, oldlevel, newlevel)
local m = {3172, 100, 2} --First is storage value (don't touch it), 2 = level & 3 = townid
local t = m[2] + 10 --Don't touch
local newpos = {x=32225, y=33664, z=7} --Position
local status = getPlayerStorageValue(cid,m[1])
if(getPlayerLevel(cid) >= m[2] and getPlayerLevel(cid) < t and status == -1)then
doTeleportThing(cid,newpos)
doPlayerSetTown(cid, m[3])
setPlayerStorageValue(cid,m[1],1)
end
return 1
end
--Sonical