Figback65
02-06-2014, 07:34 PM
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/showthread.php?t=32586&highlight=formation
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!
I am using Trev's example.
http://www.eqemulator.org/forums/showthread.php?t=32586&highlight=formation
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!