Jump to content
  • 0

[Help] PvP Level System


Question

Posted

Kalispera pedia..pira enan code apo edw tis proales o opios sta 80 lvl..afou pareis p.x. 100 pvp sou dinei level up dld se paei 81 kai meta p.x. sta 200 pvp  pas 82lv v ktlp.. ton perasa ola kala...paw na ton dokimasw to game..kai apla dn ginete tpt.. an borei kapios na me boithisei...

o server einai Iterlude...ala ehw anevasei ta level mehri 85.

 

Index: I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 3645)
+++ I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -5656,6 +5656,96 @@
	}

     /**
+     * PvP counts as xp after level 80.
+     *
+     */
+	public void  increaseLevelFromPvPs(int pvpKills)
+	{
+		if (getLevel() <= 80)
+			return;
+		{
+			if (Config.ALLOW_PVP_LEVEL_SYSTEM && getLevel() >= 81 && getLevel() < 86)
+			{
+    			if ((getLevel() == 81 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T1)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T2)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T1 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 82 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T2)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T3)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T2 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 83 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T3)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T4)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T3 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 84 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T4)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T5)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T4 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 85 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T5)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T6)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T5 +" pvps and leveled up!");
+				}
+			}
+		}
+	}
+	
+    /**
      * Increase the pvp kills count and send the info to the player
      *
      */
@@ -5664,6 +5754,9 @@
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);

+        increaseLevelFromPvPs(getPvpKills());
+        broadcastUserInfo();
+        
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
         sendPacket(new ExBrExtraUserInfo(this));

 

Index: I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(revision 3645)
+++ I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(working copy)
@@ -793,6 +793,24 @@
	public static String DATAPACK_VERSION;
	public static int PVP_NORMAL_TIME;
	public static int PVP_PVP_TIME;
+    public static boolean ALLOW_PVP_LEVEL_SYSTEM;
+    public static int PVP_LEVEL_AM-beep-T1;
+    public static int PVP_LEVEL_AM-beep-T2;
+    public static int PVP_LEVEL_AM-beep-T3;
+    public static int PVP_LEVEL_AM-beep-T4;
+    public static int PVP_LEVEL_AM-beep-T5;
	public static enum IdFactoryType
	{
		Compaction,
@@ -2454,6 +2472,24 @@

		else if (pName.equalsIgnoreCase("PvPVsNormalTime")) PVP_NORMAL_TIME = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PvPVsPvPTime")) PVP_PVP_TIME = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("AllowPvPLevelSystem")) ALLOW_PVP_LEVEL_SYSTEM = Boolean.parseBoolean(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t1")) PVP_LEVEL_AM-beep-T1 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t2")) PVP_LEVEL_AM-beep-T2 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t3")) PVP_LEVEL_AM-beep-T3 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t4")) PVP_LEVEL_AM-beep-T4 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t5")) PVP_LEVEL_AM-beep-T5 = Integer.parseInt(pValue);
	else if (pName.equalsIgnoreCase("GlobalChat")) DEFAULT_GLOBAL_CHAT = pValue;
		else if (pName.equalsIgnoreCase("TradeChat")) DEFAULT_TRADE_CHAT = pValue;
		else if (pName.equalsIgnoreCase("GMAdminMenuStyle")) GM_ADMIN_MENU_STYLE = pValue;

 

12 answers to this question

Recommended Posts

  • 0
Posted

Kalispera pedia..pira enan code apo edw tis proales o opios sta 80 lvl..afou pareis p.x. 100 pvp sou dinei level up dld se paei 81 kai meta p.x. sta 200 pvp  pas 82lv v ktlp.. ton perasa ola kala...paw na ton dokimasw to game..kai apla dn ginete tpt.. an borei kapios na me boithisei...

o server einai Iterlude...ala ehw anevasei ta level mehri 85.

 

Index: I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 3645)
+++ I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -5656,6 +5656,96 @@
	}

     /**
+     * PvP counts as xp after level 80.
+     *
+     */
+	public void  increaseLevelFromPvPs(int pvpKills)
+	{
+		if (getLevel() <= 80)
+			return;
+		{
+			if (Config.ALLOW_PVP_LEVEL_SYSTEM && getLevel() >= 81 && getLevel() < 86)
+			{
+    			if ((getLevel() == 81 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T1)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T2)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T1 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 82 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T2)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T3)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T2 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 83 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T3)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T4)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T3 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 84 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T4)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T5)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T4 +" pvps and leveled up!");
+				}
+				else if ((getLevel() == 85 && pvpKills >= (Config.PVP_LEVEL_AM-beep-T5)) && (pvpKills < (Config.PVP_LEVEL_AM-beep-T6)))
+				{
+					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
+					sendMessage("You reached " + Config.PVP_LEVEL_AM-beep-T5 +" pvps and leveled up!");
+				}
+			}
+		}
+	}
+	
+    /**
      * Increase the pvp kills count and send the info to the player
      *
      */
@@ -5664,6 +5754,9 @@
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);

+        increaseLevelFromPvPs(getPvpKills());
+        broadcastUserInfo();
+        
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
         sendPacket(new ExBrExtraUserInfo(this));

 

Index: I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(revision 3645)
+++ I:/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(working copy)
@@ -793,6 +793,24 @@
	public static String DATAPACK_VERSION;
	public static int PVP_NORMAL_TIME;
	public static int PVP_PVP_TIME;
+    public static boolean ALLOW_PVP_LEVEL_SYSTEM;
+    public static int PVP_LEVEL_AM-beep-T1;
+    public static int PVP_LEVEL_AM-beep-T2;
+    public static int PVP_LEVEL_AM-beep-T3;
+    public static int PVP_LEVEL_AM-beep-T4;
+    public static int PVP_LEVEL_AM-beep-T5;
	public static enum IdFactoryType
	{
		Compaction,
@@ -2454,6 +2472,24 @@

		else if (pName.equalsIgnoreCase("PvPVsNormalTime")) PVP_NORMAL_TIME = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PvPVsPvPTime")) PVP_PVP_TIME = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("AllowPvPLevelSystem")) ALLOW_PVP_LEVEL_SYSTEM = Boolean.parseBoolean(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t1")) PVP_LEVEL_AM-beep-T1 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t2")) PVP_LEVEL_AM-beep-T2 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t3")) PVP_LEVEL_AM-beep-T3 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t4")) PVP_LEVEL_AM-beep-T4 = Integer.parseInt(pValue);
+		else if (pName.equalsIgnoreCase("PvPLevelAm-beep-t5")) PVP_LEVEL_AM-beep-T5 = Integer.parseInt(pValue);
	else if (pName.equalsIgnoreCase("GlobalChat")) DEFAULT_GLOBAL_CHAT = pValue;
		else if (pName.equalsIgnoreCase("TradeChat")) DEFAULT_TRADE_CHAT = pValue;
		else if (pName.equalsIgnoreCase("GMAdminMenuStyle")) GM_ADMIN_MENU_STYLE = pValue;

 

 

Dokimases na to peraseis sto enterworld ton kodika opos einai?

  • 0
Posted

na to perasi me ta -beep- opos einai ???

des ligo eleos ti na perasi afou lipoune ta aparetita

 

public static int PVP_LEVEL_AM-beep-T1;

 

to 8ema einai ti egrafe sto simio -beep-

 

leo mipos einai ets opos se mena ??? a m o u n t

public static int PVP_LEVEL_AMOUNT1;

  • 0
Posted

na to perasi me ta -beep- opos einai ???

des ligo eleos ti na perasi afou lipoune ta aparetita

 

public static int PVP_LEVEL_AM-beep-T1;

 

to 8ema einai ti egrafe sto simio -beep-

Sobarepsou agori m sinexeia asxeta post kaneis ayta ta beep = mount to forum ta kaneis etsi opou eixe AMOUNT dn simenei oti to patch t itane etsi

  • 0
Posted

Sobarepsou agori m sinexeia asxeta post kaneis ayta ta beep = -beep-t to forum ta kaneis etsi opou eixe A-beep-T dn simenei oti to patch t itane etsi

giati ipa oti to code itan ets ???

des ka8ara ti dixno

  • 0
Posted

to AM-beep-  to ehw aferesei apo pantou gt mou ebgaze error.. to pack einai L2j..

 

etci to ehw perasei..

Index: I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 3645)
+++ I:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -5656,6 +5656,96 @@

//PvP counts as xp after level 80.
     
  	public void  increaseLevelFromPvPs(int pvpKills)
	{
		if (getLevel() <= 80)
			return;
		{
			if (Config.ALLOW_PVP_LEVEL_SYSTEM && getLevel() >= 81 && getLevel() < 86)
			{
    			if ((getLevel() == 80 && pvpKills >= (Config.PVP_LEVEL_T1)) && (pvpKills < (Config.PVP_LEVEL_T2)))
				{
					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
					sendMessage("You reached " + Config.PVP_LEVEL_T1 +" pvps and leveled up!");
				}
				else if ((getLevel() == 81 && pvpKills >= (Config.PVP_LEVEL_T2)) && (pvpKills < (Config.PVP_LEVEL_T3)))
				{
					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
					sendMessage("You reached " + Config.PVP_LEVEL_T2 +" pvps and leveled up!");
				}
				else if ((getLevel() == 82 && pvpKills >= (Config.PVP_LEVEL_T3)) && (pvpKills < (Config.PVP_LEVEL_T4)))
				{
					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
					sendMessage("You reached " + Config.PVP_LEVEL_T3 +" pvps and leveled up!");
				}
				else if ((getLevel() == 83 && pvpKills >= (Config.PVP_LEVEL_T4)) && (pvpKills < (Config.PVP_LEVEL_T5)))
				{
					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
					sendMessage("You reached " + Config.PVP_LEVEL_T4 +" pvps and leveled up!");
				}
				else if ((getLevel() == 84 && pvpKills >= (Config.PVP_LEVEL_T5)) && (pvpKills < (Config.PVP_LEVEL_T6)))
				{
					addExpAndSp(Experience.LEVEL[getLevel() + 1], 0);
					sendMessage("You reached " + Config.PVP_LEVEL_T5 +" pvps and leveled up!");
				}
			}
		}
	}

    /**

 

		//Increase level from pvp
	increaseLevelFromPvPs(getPvpKills());
	broadcastUserInfo();

Guest
This topic is now closed to further replies.


  • Posts

    • We can help your Telegram group or channel grow fast with real, targeted Telegram members, safely and efficiently.   Our Telegram Member Add service lets you add members to Telegram group or channel from real, active communities — not bots or fakes.   With this Telegram group growth service, you’ll see results within hours, backed by clear reporting and safe automation.   ✅ What We Offer   • Done-for-you Telegram Member Add campaigns (Groups · Channels) • Targeted Telegram members from real, active users • Fast growth — up to 10K members in 24 hours • English-speaking or regional audiences (US · UK · EU) • Fully managed Telegram channel growth service with reports & analytics   💡 Why Choose Us   We don’t use spam or fake accounts. Our process safely adds members to your Telegram group or channel through verified multi-account setups, proxy rotation, and opt-out compliance. This ensures lasting growth and minimizes churn. Every campaign is managed by experts using tested Telegram infrastructure and growth systems. We also recommend combining Member Add with Telegram Mass DM for better engagement and retention after join.   🧩 Works Best For   • Businesses or communities launching new Telegram channels • Crypto, SaaS, and marketing projects needing visibility • Influencers and agencies growing multiple Telegram groups • Anyone seeking a reliable Telegram group growth service with real members 📩 To Get More Information   Telegram : @TeleLoopPulse   Website : https://telegramgrowthstudio.com/telegram-member-add.html
    • well,its SharedCreatureData.h problem.   /* 0398 */ //WCHAR m_sResurrectSpellerName[25];   this variable will cause L2server.exe crash...  
    • Custom High Five server L2insolence will open 2025-10-17 21:00 GMT+2 ! ! ! Web site: http://www.l2insolence.eu All info updates on Discord: https://discord.gg/duMjnj3y9A Last wipe was more then 1 year ago. We have custom skill, farm zones, materials for items to buy. Custom wepons, armor, jewels and more. All items in game have own stats. With custom looks. Glowing etc. Rates XP, SP: 25x Spoil and Drop: 10x Adena: 20x Server Hard Farm Enchantment Safe enchant Weapon: +20099 Safe enchant Armor: +20099 Max enchant Weapon: +20099 Max enchant Armor: +20099 Normal scrolls: 100% Blessed scrolls: 100% You can use scrolls or item enchant NPC to make +++ abd life beter. NPC Buffer There's an NPC buffer in all of our main towns: Aden, Giran and Goddard. It supplies Prophet Buffs, Songs and Dances for a small fee. Include all buff. We have custom self buffs learned with npc with custom stats. Global Gatekeeper GM Shop with normal items and custom ones, vote NPC, Event NPC, item upgrader NPC. Raid Bosses, every zone have its own boss and drops for rare mats. Olympiad The olympiad is ongoing every two weeks. Meaning if you become a hero you will have your hero status for two weeks. And hero have own custom stats on items.
  • Topics

×
×
  • 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