Entity_List->GetMobList() works on existing NPCs, not my custom NPC
I'm making a script that has a custom NPC completing other quests, so I am trying to make a script to find and attack other npcs.
I tested a simple script on my buddy Waradern_Skymoor in qeytoqrg: Code:
sub killthings { However, now that I've put this on my custom NPC, GetMobList() only has my PC character as a member. GetNPCList() is completely empty. If I look for $nlist[1], Perl throws an error for calling GetName() on undefined. I've checked their database entries, and nothing looks too out of place. I inserted my custom NPC using the EOC platform, and the only difference I can see is that I've made my NPC unique by name. Both are the only members of their spawngroups, both have similar values, etc... I would guess that my NPC is on a different entity list than the rest for some reason. Any thoughts? |
Take a look at this extremely valuable/powerful write up:
http://wiki.eqemulator.org/p?Entity_...ow_to_Use_Them |
A better way of writing it would be this:
Code:
sub killthings { |
thanks for responding so fast, guys. I'm clearly behind.
Akkadius, your writeup was very helpful. Kingly, would you recommend always getting NPC by ID? I implemented it with NPCList so that I wouldn't have to specify other NPC types, and attacking would be determined by a survival function or sanity checks. |
You want 1 mob running around killing multiple mobs?
|
yes.
I want to play around with AI, and I need a fake PC. |
Heres an example of a quest where the mob just runs around killing stuff :p
Code:
sub EVENT_SPAWN { |
That looks like it could be a lot of fun for testing. Especially if you make the aggressor mob NoHarm.
|
I love you Natedog
|
Thanks, Nate. That's a lot cleaner than what I wrote.
|
All times are GMT -4. The time now is 10:15 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.