View Single Post
  #11  
Old 10-23-2009, 09:41 PM
nightsta69
Hill Giant
 
Join Date: May 2005
Posts: 134
Default

Code:
if($signal == 5){
		quest::say("Thanks arias, i'm following you.");
		my $x = $npc->GetX();
		my $y = $npc->GetY();
		my $z = $npc->GetZ();
		my $x_loc = 0;
		my $y_loc = 0;
		my $z_loc = 0;
		quest::say("checking for mob");
		my $target_to_follow = $entity_list->GetMobByNpcTypeID(189490);
		if($target_to_follow){
			quest::say("found mob, get coords");
			$x_loc = $target_to_follow->GetX();
			$y_loc = $target_to_follow->GetY();
			$z_loc = $target_to_follow->GetZ();
			quest::say("mobs coords is $x_loc, $y_loc, $z_loc");
		}
		quest::say("setting run mode to 1");
		quest::SetRunning(1);
			quest::say("while state executing");
			while($x != $x_loc && $y != $y_loc + 10) {
					$npc->moveto($x_loc,$y_loc + 10,$z);
			}
		quest::SetRunning(0);
		quest::signalwith(189490,12,0);
	}
heres what I have now. it makes it all the way to the while statement, including giving correct coords for the npc (thanks KLS and wesell) but the mob doesn't move. obviously a problem with the while statement, but I don't know what. (i'm thinking its the moveto, but not sure.) can anyone provide some enlightenment for this learning mind?
__________________
Server Op of Bonds of Strength(custom-Legit)
Reply With Quote