Jump to content
  • 0

[Help] How edit amount of spawning raidbosses?


Question

Posted

Hello, i use L2jSunrise, and i want to know how i can edit these lines to have possibility to spawn more than 1 raid ( instance )?
 

if (RaidBossSpawnManager.getInstance().isDefined(spawn.getId()))
			{
				activeChar.sendMessage("You cannot spawn another instance of " + template.getName() + ".");
			}
			else
			{
				if (template.isType("L2RaidBoss"))
				{
					spawn.setRespawnMinDelay(43200);
					spawn.setRespawnMaxDelay(129600);
					RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getBaseHpMax(), template.getBaseMpMax(), permanent);
				}
				else
				{
					SpawnTable.getInstance().addNewSpawn(spawn, permanent);
					spawn.init();
				}
				if (!permanent)
				{
					spawn.stopRespawn();
				}
				activeChar.sendMessage("Created " + template.getName() + " on " + target.getObjectId());
			}

 

2 answers to this question

Recommended Posts

  • 0
Posted

Remove the if part of the code:
 

if (template.isType("L2RaidBoss"))
{
	spawn.setRespawnMinDelay(43200);
	spawn.setRespawnMaxDelay(129600);
	RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getBaseHpMax(), template.getBaseMpMax(), permanent);
}
else
{
	SpawnTable.getInstance().addNewSpawn(spawn, permanent);
	spawn.init();
}
if (!permanent)
{
	spawn.stopRespawn();
}
activeChar.sendMessage("Created " + template.getName() + " on " + target.getObjectId());

 

  • 0
Posted (edited)
3 hours ago, Zoey76 said:

Remove the if part of the code:
 

if (template.isType("L2RaidBoss"))
{
	spawn.setRespawnMinDelay(43200);
	spawn.setRespawnMaxDelay(129600);
	RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getBaseHpMax(), template.getBaseMpMax(), permanent);
}
else
{
	SpawnTable.getInstance().addNewSpawn(spawn, permanent);
	spawn.init();
}
if (!permanent)
{
	spawn.stopRespawn();
}
activeChar.sendMessage("Created " + template.getName() + " on " + target.getObjectId());

 

Thank you very much, but now, if i spawn a raid, i see in chat, but npc isn;t spawned, it's visual bug?

 

Edited by byEvanthe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...