Skip to content

L2Champion Mod

Featured Replies

Hi guys. 

 

Short question. How could I disable the champion spawn for certain monsters with a certain title? The monster type is L2Monster, and the title is MonsterSpawn.

 

Would it be possible to exclude these mobs to be transformed into a champion mob?

 

		if (Config.L2JMOD_CHAMPION_ENABLE)
		{
			// Set champion on next spawn
			if (!(this instanceof L2GrandBossInstance) && !(this instanceof L2RaidBossInstance) && !(this instanceof L2ChestInstance) && !(getTemplate().title.contentEquals("MonsterSpawn") && (this instanceof L2MonsterInstance)
			&& (Config.L2JMOD_CHAMPION_FREQUENCY > 0) && (getLevel() >= Config.L2JMOD_CHAMP_MIN_LVL) && (getLevel() <= Config.L2JMOD_CHAMP_MAX_LVL)))
			{
				final int random = Rnd.get(100);
				if (random < Config.L2JMOD_CHAMPION_FREQUENCY)
				{
					setChampion(true);
				}
			}
		}

As you can see I tried with the getTemplte.title but I doesn't work.

Any help or hint would be great. Thanks!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.