You need to tell the server to warp the player, which is done easily with triggeraction. Since this is just a level npc, you can do it like this:
PHP Code:
function onCreated() {
// Gives NPC shape to be 'hit' with triggeractions on the server-side.
setshape(1, 32, 32);
}
function onActionWarpPlayer() {
player.setlevel2("onlinestartlocal.nw", 30, 30);
}
//#CLIENTSIDE
function onPlayerTouchsMe() {
triggeraction(this.x + 1, this.y + 1, "WarpPlayer", "");
}
Your duplicate code can also be redone with a for loop.