Jump to content

[Share]Custom Titile for pvp


Recommended Posts

   1.
      Index: src/net/sf/l2j/Config.java
   2.
      ===================================================================
   3.
      --- src/net/sf/l2j/Config.java  (revision 117)
   4.
      +++ src/net/sf/l2j/Config.java  (working copy)
   5.
      @@ -870,6 +870,29 @@
   6.
           public static int L2JMOD_CHAMPION_REWARD_ID;
   7.
           public static int L2JMOD_CHAMPION_REWARD_QTY;
   8.
           
   9.
      +    /** Custom Title for PvPs */
  10.
      +    public static boolean PVP_TITLE_SYSTEM_ENABLED;
  11.
      +    public static int PVP_AMOUNT1;
  12.
      +    public static int PVP_AMOUNT2;
  13.
      +    public static int PVP_AMOUNT3;
  14.
      +    public static int PVP_AMOUNT4;
  15.
      +    public static int PVP_AMOUNT5;
  16.
      +    public static int PVP_AMOUNT6;
  17.
      +    public static int PVP_AMOUNT7;
  18.
      +    public static int PVP_AMOUNT8;
  19.
      +    public static int PVP_AMOUNT9;
  20.
      +    public static int PVP_AMOUNT10;
  21.
      +    public static String TITLE_FOR_PVP_AMOUNT1;
  22.
      +    public static String TITLE_FOR_PVP_AMOUNT2;
  23.
      +    public static String TITLE_FOR_PVP_AMOUNT3;
  24.
      +    public static String TITLE_FOR_PVP_AMOUNT4;
  25.
      +    public static String TITLE_FOR_PVP_AMOUNT5;
  26.
      +    public static String TITLE_FOR_PVP_AMOUNT6;
  27.
      +    public static String TITLE_FOR_PVP_AMOUNT7;
  28.
      +    public static String TITLE_FOR_PVP_AMOUNT8;
  29.
      +    public static String TITLE_FOR_PVP_AMOUNT9;
  30.
      +    public static String TITLE_FOR_PVP_AMOUNT10;
  31.
      +    
  32.
           public static boolean USE_CR_ITEM;
  33.
           public static int CR_ITEM_MIN_CLAN_LVL;
  34.
           public static int CR_ITEM_REPS_TO_BE_AWARDED;
  35.
      @@ -2069,6 +2092,29 @@
  36.
                       L2JMOD_CHAMPION_REWARD_ID             = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemID", "6393"));
  37.
                       L2JMOD_CHAMPION_REWARD_QTY            = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1"));
  38.
       
  39.
      +                /** Custom Title for PvPs */
  40.
      +                PVP_TITLE_SYSTEM_ENABLED               = Boolean.parseBoolean(L2JModSettings.getProperty("EnableCustomTitleSystem", "false"));
  41.
      +                PVP_AMOUNT1                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount1", "0"));
  42.
      +                PVP_AMOUNT2                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount2", "0"));
  43.
      +                PVP_AMOUNT3                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount3", "0"));
  44.
      +                PVP_AMOUNT4                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount4", "0"));
  45.
      +                PVP_AMOUNT5                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount5", "0"));
  46.
      +                PVP_AMOUNT6                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount6", "0"));
  47.
      +                PVP_AMOUNT7                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount7", "0"));
  48.
      +                PVP_AMOUNT8                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount8", "0"));
  49.
      +                PVP_AMOUNT9                    = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount9", "0"));
  50.
      +                PVP_AMOUNT10           = Integer.parseInt(L2JModSettings.getProperty("PvPsAmmount10", "0"));
  51.
      +                TITLE_FOR_PVP_AMOUNT1          = L2JModSettings.getProperty("TitleForAmmount1", "something");
  52.
      +                TITLE_FOR_PVP_AMOUNT2          = L2JModSettings.getProperty("TitleForAmmount2", "something");
  53.
      +                TITLE_FOR_PVP_AMOUNT3          = L2JModSettings.getProperty("TitleForAmmount3", "something");
  54.
      +                TITLE_FOR_PVP_AMOUNT4          = L2JModSettings.getProperty("TitleForAmmount4", "something");
  55.
      +                TITLE_FOR_PVP_AMOUNT5          = L2JModSettings.getProperty("TitleForAmmount5", "something");
  56.
      +                TITLE_FOR_PVP_AMOUNT6          = L2JModSettings.getProperty("TitleForAmmount6", "something");
  57.
      +                TITLE_FOR_PVP_AMOUNT7          = L2JModSettings.getProperty("TitleForAmmount7", "something");
  58.
      +                TITLE_FOR_PVP_AMOUNT8          = L2JModSettings.getProperty("TitleForAmmount8", "something");
  59.
      +                TITLE_FOR_PVP_AMOUNT9          = L2JModSettings.getProperty("TitleForAmmount9", "something");
  60.
      +                TITLE_FOR_PVP_AMOUNT10         = L2JModSettings.getProperty("TitleForAmmount10", "something");
  61.
      +                
  62.
                       USE_CR_ITEM = Boolean.parseBoolean(L2JModSettings.getProperty("EnableTheClanRepPointsItem", "False"));
  63.
                       CR_ITEM_MIN_CLAN_LVL = Integer.parseInt(L2JModSettings.getProperty("ClanLevelNeededForCR", "7"));
  64.
                       CR_ITEM_REPS_TO_BE_AWARDED = Integer.parseInt(L2JModSettings.getProperty("HowManyClanRepsToGive", "500"));
  65.
      Index: src/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  66.
      ===================================================================
  67.
      --- src/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 117)
  68.
      +++ src/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  69.
      @@ -3799,6 +3799,57 @@
  70.
               }
  71.
              }
  72.
             
  73.
      +       public void updatePvpRelatedStuff(int pvpKillAmount)
  74.
      +       {
  75.
      +               if (Config.PVP_TITLE_SYSTEM_ENABLED)
  76.
      +               {
  77.
      +                       if (isGM())
  78.
      +                               return;
  79.
      +                       {
  80.
      +                               if ((pvpKillAmount >= (Config.PVP_AMOUNT1)) && (pvpKillAmount <= (Config.PVP_AMOUNT2)))
  81.
      +                               {
  82.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT1);
  83.
      +                               }
  84.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT2)) && (pvpKillAmount <= (Config.PVP_AMOUNT3)))
  85.
      +                               {
  86.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT2);
  87.
      +                               }
  88.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT3)) && (pvpKillAmount <= (Config.PVP_AMOUNT4)))
  89.
      +                               {
  90.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT3);
  91.
      +                               }
  92.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT4)) && (pvpKillAmount <= (Config.PVP_AMOUNT5)))
  93.
      +                               {
  94.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT4);
  95.
      +                               }
  96.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT5)) && (pvpKillAmount <= (Config.PVP_AMOUNT6)))
  97.
      +                               {
  98.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT5);
  99.
      +                               }
100.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT6)) && (pvpKillAmount <= (Config.PVP_AMOUNT7)))
101.
      +                               {
102.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT6);
103.
      +                               }
104.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT7)) && (pvpKillAmount <= (Config.PVP_AMOUNT8)))
105.
      +                               {
106.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT7);
107.
      +                               }
108.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT8)) && (pvpKillAmount <= (Config.PVP_AMOUNT9)))
109.
      +                               {
110.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT8);
111.
      +                               }
112.
      +                               else if ((pvpKillAmount >= (Config.PVP_AMOUNT9)) && (pvpKillAmount <= (Config.PVP_AMOUNT10)))
113.
      +                               {
114.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT9);
115.
      +                               }
116.
      +                               else if (pvpKillAmount >= (Config.PVP_AMOUNT10))
117.
      +                               {
118.
      +                                       setTitle(Config.TITLE_FOR_PVP_AMOUNT10);
119.
      +                               }
120.
      +                       }
121.
      +               }
122.
      +       }
123.
      +      
124.
              public void updateRanks(int pvpKillAmount)
125.
              {
126.
                              if (Config.ENABLE_RANKING_SYSTEM)
127.
      @@ -4992,6 +5043,12 @@
128.
               // Add karma to attacker and increase its PK counter
129.
               setPvpKills(getPvpKills() + 1);
130.
               
131.
      +        if (Config.PVP_TITLE_SYSTEM_ENABLED)
132.
      +        {
133.
      +               updatePvpRelatedStuff(getPvpKills());
134.
      +               broadcastUserInfo();
135.
      +        }
136.
      +        
137.
               if (Config.ENABLE_DOMINATION_SYSTEM)
138.
               {
139.
                      quakeSystem++;
140.
      Index: src/config/l2jmods.properties
141.
      ===================================================================
142.
      --- src/config/l2jmods.properties       (revision 117)
143.
      +++ src/config/l2jmods.properties       (working copy)
144.
      @@ -29,6 +29,46 @@
145.
       ChampionRewardItemQty = 1
146.
       
147.
       #---------------------------------------------------------------
148.
      +# PvPs Title (Like ranking) Change
149.
      +#---------------------------------------------------------------
150.
      +
151.
      +# Enable the sys?
152.
      +EnableCustomTitleSystem = False
153.
      +
154.
      +# Set the proper values below.
155.
      +# For each pvp ammount, set the proper title.
156.
      +
157.
      +PvPsAmmount1 = 10
158.
      +TitleForAmmount1 = something
159.
      +
160.
      +PvPsAmmount2 = 20
161.
      +TitleForAmmount2 = something
162.
      +
163.
      +PvPsAmmount3 = 30
164.
      +TitleForAmmount3 = something
165.
      +
166.
      +PvPsAmmount4 = 40
167.
      +TitleForAmmount4 = something
168.
      +
169.
      +PvPsAmmount5 = 50
170.
      +TitleForAmmount5 = something
171.
      +
172.
      +PvPsAmmount6 = 60
173.
      +TitleForAmmount6 = something
174.
      +
175.
      +PvPsAmmount7 = 70
176.
      +TitleForAmmount7 = something
177.
      +
178.
      +PvPsAmmount8 = 80
179.
      +TitleForAmmount8 = something
180.
      +
181.
      +PvPsAmmount9 = 90
182.
      +TitleForAmmount9 = something
183.
      +
184.
      +PvPsAmmount10 = 100
185.
      +TitleForAmmount10 = something
186.
      +
187.
      +#---------------------------------------------------------------
188.
       # Wedding System (by evill33t)                    
189.
       #---------------------------------------------------------------
190.
       #True Allows Wedding, False disables Wedding.
191.
      Index: src/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
192.
      ===================================================================
193.
      --- src/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java     (revision 117)
194.
      +++ src/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java     (working copy)
195.
      @@ -322,6 +322,11 @@
196.
                      Quest.playerEnter(activeChar);
197.
                      activeChar.sendPacket(new QuestList());
198.
                     
199.
      +               if (activeChar.getPvpKills()>=(Config.PVP_AMOUNT1) && (Config.PVP_TITLE_SYSTEM_ENABLED))
200.
      +               {
201.
      +                       activeChar.updatePvpRelatedStuff(activeChar.getPvpKills());
202.
      +               }
203.
      +              
204.
                      if (Config.ENABLE_RANKING_SYSTEM)
205.
                      {
206.
                              if (activeChar.getPvpKills()>=(Config.PVPS_NEEDED_FOR_INTERMEDIATE) && activeChar.getPvpKills()<(Config.PVPS_NEEDED_FOR_MASTER))

Credit: thanks Coyote™ for help me and me...

Link to comment
Share on other sites

Credit: thanks Coyote™ for help me and me...

 

1) You didn't do anything, just c/p what I added on pastebin.

2) I'm bored of shares like, pvps = title or pvps = color and since I own the copyrights, Locked.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
    • we sell website templates, make websites to order. Great selection at very good prices. My contacts discord : advert1231 telegram : https://t.me/ggwpins  
  • Topics

×
×
  • Create New...