Thread: Kei Mgb
View Single Post
  #15  
Old 01-14-2011, 03:14 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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.
Reply With Quote