Jump to content

Recommended Posts

Posted (edited)


gameserver/Config.java

 

 

public static boolean SEND_SKILLS_CHANCE_TO_PLAYERS;

+ public static boolean L2MOB_NPC;

+ public static String L2MOB_TITLE;

 

 

 

CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(L2JfrozenSettings.getProperty("CustomSpawnlistTable", "True"));

 

+ /** MOB TITLE **/

+ L2MOB_NPC = Boolean.parseBoolean(L2JfrozenSettings.getProperty("EnableMobTitle", "True"));

+ L2MOB_TITLE = L2JfrozenSettings.getProperty("MobTitle", "L2J-frozen");

+

 

 

 

 

head-src/com/l2jfrozen/gameserver/network/serverpackets/NpcInfo.java

 

 

if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())

{

_title = Config.L2JMOD_CHAMP_TITLE;

}

else if (cha.getTemplate().serverSideTitle)

{

_title = cha.getTemplate().title;

}

else

{

_title = cha.getTitle();

}

+

+ if (Config.L2MOB_NPC && _activeChar instanceof L2MonsterInstance)

+ {

+ _title = Config.L2MOB_TITLE;

+ }

+ else if (cha.getTemplate().serverSideTitle)

+ {

+ _title = cha.getTemplate().title;

+ }

+ else

+ {

+ _title = cha.getTitle();

+ }

+

 

 

 

 

 

 

gameserver/config/fuctions/l2jfrozen.properties

 

 

+

+#========================================

+# NPC TITLE BY KALLONE

+#========================================

+

+# Mob Custom Title

+EnableMobTitle = True

+MobTitle = L2J-frozen

Good as I had nothing to do I decided to make this code to l2j-frozen! use sparingly

 

sorry my english is not so good

 

 

They add a title on top of the mobs!

 

Edited by kallone
Posted (edited)

You can cut the code by 3 :

- Drop EnableMobTitle and simply check if MobTitle isEmpty() to see if custom is enabled or not.

- You add a complete _title if if if check, while you only need to add the given check on the existing check.

+		else if (Config.L2MOB_NPC && _activeChar instanceof L2MonsterInstance)
+		{
+			_title = Config.L2MOB_TITLE;
+		}

Also, I'm not sure because I'm lazy to check, but _activeChar isn't supposed to be monster instance (at least, if it uses L2J naming convention, activeChar is 99% a player). You probably meant "cha".

Edited by Tryskell
Posted

You can cut the code by 3 :

- Drop EnableMobTitle and simply check if MobTitle isEmpty() to see if custom is enabled or not.

- You add a complete _title if if if check, while you only need to add the given check on the existing check.

+		else if (Config.L2MOB_NPC && _activeChar instanceof L2MonsterInstance)
+		{
+			_title = Config.L2MOB_TITLE;
+		}

Also, I'm not sure because I'm lazy to check, but _activeChar isn't supposed to be monster instance (at least, if it uses L2J naming convention, activeChar is 99% a player). You probably meant "cha".

seui6a.jpg

Posted

and if you want to put to appear on top of all Mobs and NPCs and so just add this code down!

		if (Config.L2MOB_NPC && _activeChar instanceof L2MonsterInstance)
		{
			_title = Config.L2MOB_TITLE;
		}
		else if (cha.getTemplate().serverSideTitle)
		{
			_title = cha.getTemplate().title;
		}
		else
		{
			_title = cha.getTitle();
		}
+		
+		if (Config.L2MOB_NPC && _activeChar instanceof L2NpcInstance)
+		{
+			_title = Config.L2MOB_TITLE;
+		}
+		else if (cha.getTemplate().serverSideTitle)
+		{
+			_title = cha.getTemplate().title;
+		}
+		else
+		{
+			_title = cha.getTitle();
+		}

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