View Single Post
  #4  
Old 02-19-2015, 10:48 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Code:
sub EVENT_SPAWN {
	plugin::SetProx(40,40);
	quest::settimer("setprox", 2);
}

sub EVENT_TIMER {
	quest::clear_proximity();
	plugin::SetProx(40,40);
}

sub EVENT_ENTER {
	$client->Message(14,"You hear a voice as something emerges from the crystalline walls.");
	quest::spawn2(999341,0,0,2312,1120,459,187);
}

sub EVENT_EXIT {
	$client->Message(14,"The image shimmers and fades into the shadows...");
	quest::depopall(999341);
}
NPC spawns set proximity with 40 z y z axes range, clears after 2 seconds, then another proximity is set (every two seconds). Upon entering the proximity it will spawn npctype 999341 with no grid assigned, no guildwarset assigned, at coordinates 2312, 1120, 459 with a heading of 187. When the entity (that entered the proximity triggering that npc spawn) leaves the proximity it will depop all npc types of 999341. Made it as "efficient" as I would know how I think or atleast, less lines of code to be concerned with.
Reply With Quote