I had a problem with the triggers all going off at the same time. I fixed this by just assigning some really large random number.
In NPC.CPP, specifically in the constructor:
Code:
SetWayPointStep(0);
waypoint_timer = new Timer(30000+rand()%20000);
waypoint_timer->Start();
In NPC.CPP, specifically in process:
Code:
/*********************************************
Waypoints
*********************************************/
if (ismovinghome==false && !IsEngaged()){
if (waypoint_timer->Check()){
if (this->GetWayPointStep() < 6){
if (!this->IsCorpse() && !this->IsClient())
this->CheckQuests(zone->GetShortName(), "WAYPOINT_CHECK", this->GetNPCTypeID());
} else
{
this->SetWayPointStep(0);
}
waypoint_timer->Start(50000+rand()%25000);
}
}