FYI,
It is OK to define arrays outside of the subs, but you can't use "my" on them or they won't be loaded.
Also, if you are using default.pl, I highly suggest adding something like the below to the top of any subs you have in default.pl:
Code:
# Prevent pets or charmed NPCs from loading the default.pl
if (!$npc || $npc->GetOwnerID() || $npc->GetSwarmOwner())
{
return;
}
This will prevent your default.pl script from being applied to pets.