Well, quick glance over:
if (player.chat = "Testdestination") {
=, is an assignment i.e: a = 1;
==, is a comparison. i.e: player.chat == "yes!";
You should be doing comparisons in if statements.
Also I would recommend just setting:
client.destination = "Test destination";
Instead of setting actual level coordinates that could easily be changed with a memory editor, then on the serverside you'd have to a simple check.
PHP Code:
function onActionServerSide() {
if (params[0] == "arrive") {
// Determine coordinates from the destination
if (client.destination == "Test destination") {
temp.coordinates = {"onlinestartlocal.nw", 30, 30};
}
else if (client.destination == "some other place") {
temp.coordinates = {"onlinestartlocal.nw", 30, 30};
}
// Make sure coordinates were set.
if (temp.coordinates != NULL) {
// Warp player
player.setlevel2(temp.coordinates[0], temp.coordinates[1], temp.coordinates[2]);
}
}
}
But that was assuming you were using it in a weapon npc, oh well.