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)
  On 5/2/2024 at 12:56 AM, 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());

 

Expand  

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock