Thread: Question on KEI
View Single Post
  #4  
Old 01-13-2011, 09:41 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I will share what I learned, this worked perfect for me. The spell was only cast on me, client and only for level 45 and up and also only if I was in range.

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())
			{
			$ent->CastSpell(2570, $ent, 10, -1, -1)
			}
		}
Reply With Quote