L2JLisvus

Would you like to react to this message? Create an account in a few clicks or log in to continue.

3 posters

    mod announce pvp/pk [Gift]

    SCRASH0
    SCRASH0


    Posts : 203
    Join date : 2019-03-07

    mod announce pvp/pk [Gift] Empty mod announce pvp/pk [Gift]

    Post  SCRASH0 2nd June 2019, 01:51

    I come here to share with you this mod that I adapted for the project.
    Hope you like it.
    I'm posting because I really like this project even though I'm not Brazilian, but it's the best I know.
    and DnR helps me whenever I need it.

    L2PcInstance.java
    Code:
    ---java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 0)

    +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)

    @@ 5023 +5025 @@
     if (target instanceof L2PcInstance)
     {
     increasePvpKills();
    + if (Config.ANNOUNCE_PVP_KILL)
    + Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Derrotou Player " + target.getName()));
     }
     }


    @@ 5061 +5064 @@

     increasePkKillsAndKarma(targetPlayer.getLevel(), target instanceof L2PcInstance);
     }
    + if (Config.ANNOUNCE_PK_KILL)
    + Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Assassinou Player " + target.getName()));
     }
     }

    Config.java

    Code:
    ===================================================================

    ---java/net/sf/l2j/Config.java (revision 0)

    +++ java/net/sf/l2j/Config.java (working copy)


    @@ 1332 +5034 @@

              public static int BUFFS_MAX_AMOUNT;

    +        public static boolean ANNOUNCE_PVP_KILL;
    +        public static boolean ANNOUNCE_PK_KILL;


    @@ 1804 +1806 @@

              STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);

    + ANNOUNCE_PVP_KILL = Boolean.parseBoolean(otherSettings.getProperty("AnnouncePvPKill", "False"));
    + ANNOUNCE_PK_KILL = Boolean.parseBoolean(otherSettings.getProperty("AnnouncePkKill", "False"));

    


    config/other.properties

    Code:
    ===================================================================

    --- config/other.properties    (revision 1)

    +++ config/other.properties    (working copy)

    # Disable all chat in jail (except normal one)
    JailDisableChat = True
    +
    +#=============================================================
    +#                    Announce PvP and Pk
    +#=============================================================
    +# Announce PvP Kill
    +AnnouncePvPKill = True

    +# Announce Pk Kills
    +AnnouncePkKill = True
    legionarios
    legionarios


    Posts : 42
    Join date : 2016-06-17
    Age : 42
    Location : san luis

    mod announce pvp/pk [Gift] Empty Re: mod announce pvp/pk [Gift]

    Post  legionarios 16th March 2020, 07:25

    Hi, could someone give me a guide on how to copy those files and make a patch.diff to be able to apply the patch automatically from Team -> Apply Patch -> file with eclipse please

    Code:
    -----------------------------------------------------------------------------------------------
    ---java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 0)

    +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)

    @@ 5023 +5025 @@
    if (target instanceof L2PcInstance)
    {
    increasePvpKills();
    + if (Config.ANNOUNCE_PVP_KILL)
    + Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Derrotou Player " + target.getName()));
    }
    }


    @@ 5061 +5064 @@

    increasePkKillsAndKarma(targetPlayer.getLevel(), target instanceof L2PcInstance);
    }
    + if (Config.ANNOUNCE_PK_KILL)
    + Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Player " +getName()+ " Assassinou Player " + target.getName()));
    }
    }

    ===================================================================

    ---java/net/sf/l2j/Config.java (revision 0)

    +++ java/net/sf/l2j/Config.java (working copy)


    @@ 1332 +5034 @@

             public static int BUFF?S?_MA?X_AMOUNT;

    +        public static boolean ANNOUNCE_PVP_KILL;
    +        public static boolean ANNOUNCE_PK_KILL;


    @@ 1804 +1806 @@

             STORE_SKILL_COOLTIME ??= players.getProperty("StoreSkillCooltime", true);

    + ANNOUNCE_PVP_KILL = Boolean.parseBoolean(otherSettings.getProperty("AnnouncePvPKill", "False"));
    + ANNOUNCE_PK_KILL = Boolean.parseBoolean(otherSettings.getProperty("AnnouncePkKill", "False"));

    ===================================================================

    --- config/other.properties    (revision 1)

    +++ config/other.properties    (working copy)

    # Disable all chat in jail (except normal one)
    JailDisableChat = True
    +
    +#=============================================================
    +#                    Announce PvP and Pk
    +#=============================================================
    +# Announce PvP Kill
    +AnnouncePvPKill = True

    +# Announce Pk Kills
    +AnnouncePkKill = True
    Karakan
    Karakan


    Posts : 756
    Join date : 2013-10-04

    mod announce pvp/pk [Gift] Empty Re: mod announce pvp/pk [Gift]

    Post  Karakan 16th March 2020, 12:58

    Edited your post. Please use [code] tags, if you post code blocks next time.
    SCRASH0
    SCRASH0


    Posts : 203
    Join date : 2019-03-07

    mod announce pvp/pk [Gift] Empty Re: mod announce pvp/pk [Gift]

    Post  SCRASH0 10th May 2020, 18:52

    Karakan wrote:Edited your post. Please use [code] tags, if you post code blocks next time.


    if you didn't notice you already have this tag

    Sponsored content


    mod announce pvp/pk [Gift] Empty Re: mod announce pvp/pk [Gift]

    Post  Sponsored content


      Current date/time is 19th May 2024, 13:00