|
@@ -1556,6 +1556,19 @@ public abstract class AbstractScript extends ManagedScript
|
|
return addSpawn(npcId, pos.getX(), pos.getY(), pos.getZ(), pos.getHeading(), false, 0, false, 0);
|
|
return addSpawn(npcId, pos.getX(), pos.getY(), pos.getZ(), pos.getHeading(), false, 0, false, 0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Add a temporary spawn of the specified NPC.
|
|
|
|
+ * @param summoner the NPC that requires this spawn
|
|
|
|
+ * @param npcId the ID of the NPC to spawn
|
|
|
|
+ * @param pos the object containing the spawn location coordinates
|
|
|
|
+ * @param despawnDelay time in milliseconds till the NPC is despawned (0 - only despawned on server shutdown)
|
|
|
|
+ * @return the {@link L2Npc} object of the newly spawned NPC, {@code null} if the NPC doesn't exist
|
|
|
|
+ */
|
|
|
|
+ public static L2Npc addSpawn(L2Npc summoner, int npcId, IPositionable pos, long despawnDelay)
|
|
|
|
+ {
|
|
|
|
+ return addSpawn(summoner, npcId, pos.getX(), pos.getY(), pos.getZ(), pos.getHeading(), false, despawnDelay, false, 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Add a temporary spawn of the specified NPC.
|
|
* Add a temporary spawn of the specified NPC.
|
|
* @param npcId the ID of the NPC to spawn
|
|
* @param npcId the ID of the NPC to spawn
|