If the boss is stationary try this. I made a script really fast trying to use the quest::follow and it didn't work for me either.
What this is going to do is the mob is going to walk/run whatever to the boss, and then you need to make sure you intercept it. If it gets to the boss it's going to walk back to its original spawnpoint.. Another way (and this is my suggestion) is to use a grid and then use the waypoint arrive event to script it.
Code:
sub EVENT_SPAWN {
quest::settimer("add_boss_dist", 3);
quest::shout("I work");
quest::settimer(1, 1);
}
sub EVENT_TIMER {
my $npc1 = $entity_list->GetNPCByNPCTypeID(4770003);
my $npc2 = $entity_list->GetNPCByNPCTypeID(4770004);
if($timer == 1){
quest::shout("timer works");
quest::moveto($npc1->GetX(),$npc1->GetY(),$npc1->GetZ());
quest::stoptimer(1);
}
if ($timer eq "add_boss_dist"){
if(plugin::CheckDistBetween2Ents($npc1, $npc2, 10)){
quest::shout("I'm in distance.");
}
else{
quest::shout("I'm not in distance.");
}
}
}
This is what i tried to use in my nexus/default.pl
Code:
sub EVENT_SPAWN {
$nn = $npc->GetCleanName();
if($nn eq "a") {
quest::follow($entity_list->GetNPCByNPCTypeID(999334), 1); #::
quest::say("following " . $entity_list->GetNPCByNPCTypeID(999334)->GetCleanName() . " ");
}
}