L2JMobius

C6 Show the name of the red Monster if Aggressive

junin00 · 4 · 3348

Offline junin00

  • Black Sheep
  • Heir
  • **
    • Posts: 31
For those who like it, enjoy.   ;D



Code: [Select]
===================================================================================
Index: java.org.l2jmobius.Config.java
===================================================================================

public static boolean SHOW_NPC_LVL;
+ public static boolean SHOW_RED_NAME_IF_AGGRO;
public static boolean SHOW_NPC_AGGRESSION;



SHOW_NPC_LVL = generalConfig.getBoolean("ShowNpcLevel", false);
+ SHOW_RED_NAME_IF_AGGRO = generalConfig.getBoolean("ShowRedName", false);
SHOW_NPC_AGGRESSION = generalConfig.getBoolean("ShowNpcAggression", false);


===================================================================================
Index: java.org.l2jmobius.gameserver.model.actor.Creature.java
===================================================================================

@Override
public boolean isCreature()
{
return true;
}
+
+ /**
+ * Return True if the NpcInstance is agressive (ex : MonsterInstance in function of aggroRange).
+ * @return true, if is aggressive
+ */
+ public boolean isAggressive()
+ {
+ return false;
+ }

}

===================================================================================
Index: java.org.l2jmobius.gameserver.network.serverpackets.NpcInfo.java
===================================================================================

if (_creature instanceof Summon)
{
writeD(0x01); // Title color 0=client default
writeD(((Summon) _creature).getPvpFlag());
writeD(((Summon) _creature).getKarma());
}
+ else if (Config.SHOW_RED_NAME_IF_AGGRO)
+ {
+ writeD(0);
+ writeD(0);
+ writeD(_creature.isAggressive() ? 0x9999 : 0x00);
+ }
else
{
writeD(0);
writeD(0);
writeD(0);
}

===================================================================================
Index:  dist\game\config\main\General.ini
===================================================================================

# Show the level of monsters.
# Default: false
ShowNpcLevel = False
+
+# Show Red name of NPC / Monster if is agrro
+# Default: False
+ShowRedName = True

# Show aggression of monsters.
# Default: false
ShowNpcAggression = False


Offline flor

  • Vassal
  • *
    • Posts: 1


Offline junin00

  • Black Sheep
  • Heir
  • **
    • Posts: 31
Is it possible to use other colors or only red?

I don't know, I haven't tested it.

Maybe it's the same as these color codes: https://wiibrew.org/wiki/U16_colors