function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 8 and getPlayerVocation(cid) == 0 then
doTeleportThing(cid, { x = 100, y = 100, z = 7 })
doPlayerSetTown(cid, 2)
end
return TRUE
end
<event type="advance" name="PlayerTeleport" event="script" value="your_script_name.lua"/>
registerCreatureEvent("PlayerTeleport")