Few things:
when making quests, make sure you end your commands with a semicolon ; and make your "if" statements have a { and a matching } when you are done with them. This is required and should become a habit.
Guildwarset and grid can be 0.
I'm not sure what guildwarset does (obsolete code?) but grid determines if the NPC is on a grid *AFTER* it spawns. This is useful for having adds roam a specific location.
You can look here for grid creating commands.
http://www.eqemulator.net/wiki/wikka...aypointEditing
In addition, if you want to make NPCs spawn on the boss, or maybe a random direction 20 meters from the boss, you can use math to implement this:
This will spawn an NPC on top of where the NPC that triggered it is.
Code:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(75);
}
}
sub EVENT_HP {
if ($hpevent <= 75) {
$x1 = $npc->GetX();
$y1 = $npc->GetY();
$z1 = $npc->GetZ();
quest::spawn(999270,0,0,$x1,$y1,$z1);
}
}
At a direction random from where the NPC started (probably not the best way to do this):
Code:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(75);
}
}
sub EVENT_HP {
if ($hpevent <= 75) {
$x1 = quest::chooserandom(20,-20);
$x2 = $npc->GetX(); - $x1;
$y1 = quest::chooserandom(20,-20);
$y2 = $npc->GetY(); - $y1;
$z1 = quest::chooserandom(20,-20);
$z2 = $npc->GetZ(); - $z1;
quest::spawn(999270,0,0,$x2,$y2,$z2);
}
}
Finally, an NPC assigned to grid 1 in the zone. Note NPC location does not matter here, as grids put it in another xyz location as soon as the NPC spawns.
Code:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(75);
}
}
sub EVENT_HP {
if ($hpevent <= 75) {
quest::spawn(999270,0,1,0,0,0);
}
}
Please note depending if you use quest::spawn or quest::spawn2, the heading becomes a requirement. Hope this helps.