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

    • Hello in general you can use an effect from another weapon but this does not mean the effect will be positioned correctly and that’s completely normal. Sometimes the effect follows the shape of the weapon and it needs to be edited manually. If you need to adjust the effect’s position then in weapongrp you will find a line like this:     LineageEffect.c_u004 is the effect, and the values after it: 0.000000 0.000000 0.000000 1.000000 1.300000 represent the position X, Y, Z and 2 weapon-specific adjustments These are the values you need to modify instead of zeros try different numbers for X, Y or Z to move the effect into the correct position
    • HURRY TO BUY ADENU ONLY THE BEST PRICES!!
    • 12-07-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • Hundreds of players have already jumped into the world of L2Elixir x3, and the server grows bigger every day! A truly international community is forming — EU, NA, LATAM, Asia — all gathering for the same purpose: To relive the L2Elixir era the right way. Join now and be part of the early wave!   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   🎄 Christmas Event Activated! 🎄 Craft your Ordinary or Special Christmas Tree, place it outside of a peace zone, and enjoy festive outfits, boosted EXP/SP, Adena, and Drop Rates, plus the Holiday Festival buff  (more HP/MP/CP, higher P.Def/P.Atk/M.Atk, faster movement, reduced MP cost!) every 12-hours! 🎁 Santa’s Hourly Gifts While you’re actively farming, Santa appears worldwide to drop special rewards such as: Special Christmas Tree Christmas Red Sock Santa’s Weapon Exchange Ticket (12h) Gift from Santa Santa Hats & Rudolph accessories Agathion: Rudolph Chest of Experience Shadow Hats Scrolls Event b.soe / b.rez Loot Crates 🔥 Santa’s Weapon Ticket Gives you a D/C/B-grade weapon based on your level, randomly enchanted +4 to +10!  4-hour expiration time. Celebrate, fight, farm — and let Santa upgrade your holidays! 🎅✨
    • what do u mean i want to change the normal weapons some weapons are working perftect some not getting th effect and the arcana has the effect above the weapons as u see ... i dont what is the probkenm
  • 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