View Full Version : NPC Agro
janusd
01-21-2009, 11:44 AM
Is there a way to use PERL to cause an NPC to clear their hate and hate list and resume their grid/return to their spawn without having to force the player to do something like a FD? Basically looking for the same results of a feign death without forcing the spell or the ability.
Also, is there a way to use PERL to force an addition of a specific ammount of hate for a specific PID or NPCID?
kayen85
01-21-2009, 12:16 PM
This will clear all hate from the NPC through a quest.
$npc->WipeHateList();
janusd
01-21-2009, 01:21 PM
Thanks bunches! Boy howdy that's gonna make things more interesting.
cavedude
01-21-2009, 03:22 PM
Also, is there a way to use PERL to force an addition of a specific ammount of hate for a specific PID or NPCID?
Check out #Tunare.pl in growthplane for that.
janusd
01-21-2009, 03:59 PM
So if I did...
my $mobname = $entity_list->GetMobByNpcTypeID(123456);
$NPC->AddToHateList($mobname, 200);
This code would cause the NPC whose PERL file this is in to agro ONTO the NPC specified in the GetMobByNpcTypeID with the specified amount of 200 hate, right?
Would this then, in the code logic, constitute the NPC as being agroed for the events defined in a sub EVENT_AGRO?
Finally, does AssignWaypoints(grid) work to add a specific wander grid to an NPC and then does AssignWaypoints() work to remove that grid? I know I've heard before that some of the functions don't work and I'm at work, so can't test ATM. Thanks!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.