Thread: War Event
View Single Post
  #2  
Old 01-29-2012, 07:16 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you get all of the plugins from the plugins repo here:

http://www.eqemulator.org/forums/showthread.php?t=32608

You can use my plugins for spawning in formations:

http://code.google.com/p/eqemuplugin...ation_tools.pl

Specifically, I think you would want to use:

Code:
#Usage: plugin::SpawnMixedFormation(LeaderMob, Distance, Columns, Rows, LeadDist=Distance, MaxZDiff=15, NPCID, NPCID...);
# Works just like SpawnInFormation, accept this allows mixing multiple NPCs into the formation
# Can add as many NPCIDs as wanted by appending to the end of the arguments
# NPCID is the NPC Type ID of the NPCs you want to form the squad formation with
# LeaderMob is the Client or NPC you want to spawn the formation behind (use invisible and/or temp NPC to show no leader)
# Distance is the distance each member of the formation will be from each other on both axis
# Columns is the number of columns you want in the formation
# Rows is the number of rows you want in the formation
# LeadDist is the distance you want the formation to be created behind the leader
# MaxZDiff is the maximum height above the leader that the best Z will be searched for
You would just need to create a "leader" NPC and put a script on him to spawn the squads around him as needed. You can make the leader invisible if needed.

Here is an example based on your script and I added a few random NPCIDs in there as well so you can see how to use multiple NPC IDs to spawn randomly in the squad:

Code:
sub EVENT_SAY
{
	if($text=~/hail/i)
	{
		plugin::Whisper("${name}, I can only be activated one way. Sorry");
	}
	
	# Check status if using GM test stuff
	if($status > 80 && $text =~ /spawn/i)
	{
		quest::broadcast("War! War! War is uppon Norrath! Venkars forces have been spotted in the Greater Faydark! We must drive them back or we risk the loss of Felwithe and the Greater Faydark!");
		quest::shout("War is uppon us! The forces of Venkar have been sighted in the greater faydark! If they are not driven back we risk loosing not only the Greater Faydark, but Felwithe aswell!");
		# Usage: plugin::SpawnMixedFormation(LeaderMob, Distance, Columns, Rows, LeadDist=Distance, MaxZDiff=15, NPCID, NPCID...);
		plugin::SpawnMixedFormation($npc, 15, 15, 15, 10, 15, 1254, 1253, 1252);
	}

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote