View Single Post
  #7  
Old 05-16-2014, 02:31 AM
Esildor
Hill Giant
 
Join Date: Feb 2010
Posts: 207
Default

Good catch Splose.

It stopped him from repeating 'timer works' every second, but, still no follow.

This is exactly what it looks like right now:

Code:
sub EVENT_SPAWN {
	quest::settimer("add_boss_dist", 3);
	quest::shout("I work");
	quest::settimer(1, 1);
	}
	
sub EVENT_TIMER {	
	my $npc1 = $entity_list->GetNPCByNPCTypeID(4770003);
	my $npc2 = $entity_list->GetNPCByNPCTypeID(4770004);
	if($timer == 1){
		quest::shout("timer works");
		quest::follow($npc1);
		quest::stoptimer(1);
		}
	if ($timer eq "add_boss_dist"){
		if(plugin::CheckDistBetween2Ents($npc1, $npc2, 10)){
			quest::shout("I'm in distance.");
			}
			else{
			quest::shout("I'm not in distance.");
			}
		}
	}
}

Last edited by Esildor; 05-16-2014 at 02:33 AM.. Reason: added exact code
Reply With Quote