Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2014, 07:34 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default NPC Formations

Hey guys. I am working with the spawninformation trying to get those plugins to work properly. I searched forums for "formation" and found a few helpful topics. I copied information from those and the formation spawning works but everything spawns at a random spot in the zone instead of right beside the leadernpc. Any idea why they wouldn't be spawning beside the leader?

I am using Trev's example.
http://www.eqemulator.org/forums/sho...ight=formation

Code:
my $LeaderNPCID = 1000041;
my $SquadNPCID = 452005;
my $SpawnDist = 10;

sub EVENT_SPAWN {

	quest::depopall($SquadNPCID);
	quest::settimer("spawn_guards", 2);
	
}

sub EVENT_TIMER {

	if ($timer eq "spawn_guards") {
		quest::stoptimer("spawn_guards");
		#Usage: plugin::SpawnInFormation(NPCID, LeaderMob, Distance, Columns, Rows, [LeadDist, MaxZDiff]);
		plugin::SpawnInFormation($SquadNPCID, $npc, $SpawnDist, 2, 2, 10, 10);
		#Usage: plugin::MoveInFormation(NPCID, [$npc = 0, OnGrid = 0, MoveToX = 0, MoveToY = 0, NoSpeedBuffs = false]);
		plugin::MoveInFormation($SquadNPCID, $npc , 1);
	}

	if ($timer eq "WPArrive") {
		quest::stoptimer("WPArrive");
		plugin::MoveInFormation($SquadNPCID, $npc, 1);
	}
	
}

my $MoveSquad = 1;
sub EVENT_WAYPOINT_DEPART {

	if ($MoveSquad)
	{
		quest::settimer("WPArrive", 0);
	}
	else {
		quest::stop();
	}

}
Thanks all!
__________________
Reply With Quote
  #2  
Old 02-10-2014, 10:39 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you have more than 1 of the same NPC you are using for the squad leader in the same zone, it would probably cause issues. Also, if you are missing the .map file for the zone, it probably wouldn't work due to no LoS. It's also possible some function(s) changed since these plugins were written, and there may need to be an update for them to correct it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 02-10-2014, 02:46 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

I am not sure if they are static or not, but there are mobs on live that spawn like this now. If it is static, the plugin is not really needed, but if they spawn a bit dynamically, this would be a good thing to have working.
Reply With Quote
  #4  
Old 02-11-2014, 09:21 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by sorvani View Post
I am not sure if they are static or not, but there are mobs on live that spawn like this now. If it is static, the plugin is not really needed, but if they spawn a bit dynamically, this would be a good thing to have working.
Yeah, I think those are all static. The collector tool could get the pathing, but it is not 100% accurate. The pathing might look ok right after a repop of the zone, but after a while the patrols might get out of sync of one another.

At the very least, we could use the existing pathing for the leader NPC, and then just script the others to follow in formation. That would ensure that they all stay in sync. Though, once the leader is dead, the rest stop following (which is why I normally use an invis NPC as the real leader).
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 02-23-2014, 04:04 AM
roonibrice
Banned
 
Join Date: Feb 2014
Location: LA
Posts: 10
Default

im still playing around with it... ill let you know if i find out anything
Reply With Quote
  #6  
Old 03-06-2014, 06:23 AM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

Sorry for late response, work work work lol.
I did notice I do not have any map files for the zones I am trying to get it working in. I will test it today on a zone with a mapfile and post results.
__________________
Reply With Quote
  #7  
Old 03-12-2014, 02:07 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

ok, so I used azone2 and made a map file for oldfieldofbone and it worked.
The npcs spawn on the leader correctly.

Thanks for your help !
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:41 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3