well I don't know how to track distance between 2 npcs, but you can go around that and track them from their path grid
In other words the B will be moving on pre-assigned grid path and when he hits the spot X the event will trigger.
This of course assuming that A is always in the same spot, or at least limited variation of A positions and corresponding B paths
spawning C is easy. it just:
quest::spawn2(int npc_type, int grid, int unused, float x, float y, float z, float heading);
|