The problem with the mob spawning in the wrong location is because you are setting your variables when the script is initialized(ie on spawn) so when it hits the waypoint the variables remain the same. To fix that you need to do it like this:
Code:
my $EventStart = 0;
sub EVENT_SPAWN
{
$EventStart = 0;
quest::depopall(999228);
}
sub EVENT_WAYPOINT
{
if ($EventStart == 0)
{
$EventStart = 1;
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();
quest::spawn2(999228,0,0,$x+1,$y+1,$z,$h);
quest::shout("Wanderer spawned");
}
}
In regards to your other issue with the wrong text being shouted, since we can't see the full script the only thing we know for sure is that the computer isn't crazy, if that mob is shouting then its got to be in a script somewhere. Perhaps the file numbers are incorrect or you have 2 mobs with similar script, rest assured its user error.