Jump to content
  • 1

How to set Announce msg Color for PK-PVP


aonniemnoi

Question

btw i want to change this msg announce for all player to color msg. something like RED color

like type a SHOUT...

Thank you for some 1 can help me

 

 

 

// announce pvp/pk
                if (Config.ANNOUNCE_PK_PVP && !pk.isGM())
                {
                    String msg = "";
                    if (getPvpFlag() == 0)
                    {
                        msg = Config.ANNOUNCE_PK_MSG.replace("$killer", pk.getName()).replace("$target", getName());
                        if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
                        {
                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);
                            sm.addString(msg);
                            Announcements.getInstance().announceToAll(sm);
                        }
                        else
                        {
                            Announcements.getInstance().announceToAll(msg);
                        }
                    }
                    else if (getPvpFlag() != 0)
                    {
                        msg = Config.ANNOUNCE_PVP_MSG.replace("$killer", pk.getName()).replace("$target", getName());
                        if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
                        {
                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);
                            sm.addString(msg);
                            Announcements.getInstance().announceToAll(sm);
                        }
                        else
                        {
                            Announcements.getInstance().announceToAll(msg);
                        }
                    }
                }
                
            }

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
11 minutes ago, aonniemnoi said:

now i open it on systemmsg-e.dat  in system.

now where to change pls?

https://www.google.com/search?q=systemmsg+change+text+color+lineage2

Link to comment
Share on other sites

  • 0
5 hours ago, Celestine said:

Interlude or H5? it depends if it's h5 i can change it.

yes  H5

6 hours ago, splicho said:

As this is custom message hardcoded in Java I dont think its existing in systemmessage or im trippin

can change in this ?

SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1

 

because color is nomal msg. i want to change to red color how to do please?

Link to comment
Share on other sites

  • 0

                if (Config.ANNOUNCE_PK_PVP && !pk.isGM())
                {
                    String msg = "";
                    if (getPvpFlag() == 0)
                    {
                        msg = Config.ANNOUNCE_PK_MSG.replace("$killer", pk.getName()).replace("$target", getName());
                        if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
                        {
                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);

change this to;

                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.anything);

insert the id that u put into SystemMessageId, open systemmsg-e, add the id, name it $s1 $s2, put the color u want to that system message

Edited by aLzhite
Link to comment
Share on other sites

  • 0
17 hours ago, aLzhite said:

                if (Config.ANNOUNCE_PK_PVP && !pk.isGM())
                {
                    String msg = "";
                    if (getPvpFlag() == 0)
                    {
                        msg = Config.ANNOUNCE_PK_MSG.replace("$killer", pk.getName()).replace("$target", getName());
                        if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
                        {
                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1);

change this to;

                            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.anything);

insert the id that u put into SystemMessageId, open systemmsg-e, add the id, name it $s1 $s2, put the color u want to that system message

oh thank you i solve  😄

Link to comment
Share on other sites

  • 0

h5 Supports colors from packet also @aonniemnoi

thanks aswell @Brado

        writeEx(0x39);
        writeD(_type); // 0 - system messages, 1 - your defined text
        writeD(_sysMessageId); // system message id (_type must be 0 otherwise no effect)
        writeD(_text_align.ordinal() + 1 ); 
        writeD(0x00); // ?
        writeD(_big_font ? 0 : 1); 
        writeD(_color); // HEX COLOR
        writeD(0x00); // ?
        writeD(_effect ? 1 : 0); // upper effect (0 - disabled, 1 enabled) - _position must be 2 (center) otherwise no effect
        writeD(_time);
        writeD(_event ? 0x00 : 0x01); // ?
        writeElements();

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...