with target vid you can read out the vids of your npcs (different vids for npcs in different channels/maps)
or you can scan for vid by race of the npc:
Code:
def ScanForNPCByRace(self, race):
for i in xrange(100000):
if chr.INSTANCE_TYPE_NPC == chr.GetInstanceType(i):
chr.SelectInstance(i)
if chr.GetRace() == race:
return i
return 0
to get the race of your npc (you have to do it once for every npc)
Code:
chr.SelectInstance(player.GetTargetVID())
chat.AppendChat(7, str(chr.GetRace()))