You should use a putnpc2, level NPCs can't follow you outside of the level. You could do something like:
PHP Code:
function onCreated() {
putnpc2(x, y, "join CLASS;");
}
Then it should follow you just fine. Make sure inside of the class you have:
PHP Code:
function onCreated() {
canwarp();
canwarp2();
}