hi... i m trying to creat an addon that trigger a soundtrack playing whenever a certain npc is near. the soundtrack part is not problem but i m having trouble writing the code to track the npc. any help with that?
i am looking at the code from npc scan now and i ve gaind lots of ideas on how to actualy make my addon work but i can't find the code where he actualy checks if the npc is near. maybe i ll need another sollution.
This is the part with tooltip. If the tooltip does not show the NPC name, it means the NPC data is not in the client cache. And the NPC data does not get loaded in cache until the client has to show it in the 3D world.
as far as i know you cannot check if X is in range.
_NPC-Scan will check if NPC yy is in the cache file and then issue an alert as the NPC only gets loaded if the NPC is near. This may raise false positive alerts for tamed rare hunter pets, as the model gets loaded without a killable npc in range.
Silverdragon does also scan your mouseover and target to see if there is a rare about.
But both cannot check if NPC yy is within 10 yards range without you having it targeted, moused over, focused, ...
You could also listen to CLEU events and check NPC ids in GUID, but that would involve detecting them when they are in combat, and the range is lower than the cache test.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
When I pointed you to _NPCScan, I though it had another way to detect nearness.
_NPC-Scan will check if NPC yy is in the cache file and then issue an alert as the NPC only gets loaded if the NPC is near. This may raise false positive alerts for tamed rare hunter pets, as the model gets loaded without a killable npc in range.
Silverdragon does also scan your mouseover and target to see if there is a rare about.
But both cannot check if NPC yy is within 10 yards range without you having it targeted, moused over, focused, ...