I was curious where the npc was heading off to, so I built into
client.cpp a small filter that gives you an update as to what the npc is up to. In the future, maybe one could lookup a particular step #? I'm open to some ideas on this.
Code:
//Malevolent
//Pathpointinfo look up on target NPC
else if (strcasecmp(sep.arg[0], "#pathpointinfo") == 0)
{
if (target != 0 && target->IsNPC())
{
Message(0,"Requesting pathpoints..");
LinkedListIterator<PathPoint*> iter(zone->PathPointsList);
iter.Reset();
while(iter.MoreElements())
{
PathPoint* pp = iter.GetData();
if (target->GetNPCTypeID() == pp->NPC_TypeID) ///make sure that the npc matches
{
//What is the npc type id as defined by the table npc_types column: id
Message(0,"NPC Type ID: %i",pp->NPC_TypeID);
//What is the integer step of the critter - a step defining where the critter is at in a sequence of linear(n) steps
Message(0,"Series Step: %i",pp->step);
//How far can the critter move? 0.5f to 1.5f seem to be generally ok
Message(0,"Movement per tick: %f",pp->movement_increment);
//What is the ultimate destination of the critter?
Message(0, "Destination: x: %f, y:%f z:disabled",pp->x,pp->y);
//What is the current location of the critter
Message(0, "Current: x:%f,y:%f,z:%f",target->GetX(), target->GetY(), target->GetZ());
}
iter.Advance();
}//end while
Message(0,"Completed pathpoints lookup.");
iter.Reset();
}
}
Now then, in theory, it would be possible to script movement for objects using this pathpoint scheme. For example, boats come to mind. Instead of moving bugs, you'd have boats. But, they would need a unique entry in npc_types to work properly (which they should anyway according to drawde's setup).
--MV