This is the block of code I am working with.
Code:
my @moblist = $entity_list->GetMobList();
foreach $ent (@moblist)
{
my $dist = $ent->CalculateDistance($npc->GetSpawnPointX(),$npc->GetSpawnPointY(),$npc->GetSpawnPointZ());
my $level = $ent->GetLevel();
if(int($dist)<100 && $level>=45 && $ent->IsClient())
{
#$npc->SpellFinished(2570, $ent);
$npc->CastSpell(2570, $ent, 10, -1, -1)
}
elsif(int($dist)<100 && $level<45 && $ent->IsClient())
{
quest::say("Sorry " . $ent->GetCleanName() . " you are too low to recieve this spell");
}
}
With either what you see, or un-remarking the other line of code, both she will cast on herself. If I change the $npc to $ent I will cast the spell on myself. If I change the spell to Skin like Nature it works fine, but KEI she will always cast on herself. My memory may be off but you had to be grouped to get KEI in Live, so I think this would make sense correct ? So essentially no matter who you have targetted it would only effect you and your group.