Jump to content
  • 0

{Help}Pws Mporw


Question

Posted

pws mporw auto to code anti na allazei to xroma ston titlo na allazei to name tou titlou? sto config ekei 8elw poio poli thanks

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: config/players.properties
===================================================================
--- config/players.properties	(revision 2)
+++ config/players.properties	(working copy)
@@ -288,4 +288,12 @@
 MaxBuffsAmount = 20
 
 # Store buffs/debuffs on user logout?
-StoreSkillCooltime = True
\ No newline at end of file
+StoreSkillCooltime = True
+
+#=============================================================
+#         Config Color PvP System
+#=============================================================
+# PvP Title color system.
+AllowPvpTitleColorSystem = True
+# PvP Title colors, works like: pvps,color;pvps,color;
+PvpColors = 100,00FFFF;200,FFFF00;400,8E236B;600,FF2400;1000,0000FF;2000,FF00FF;5000,000000;10000,545454;15000,FF0000;

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 2)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -24,7 +24,9 @@
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 import java.util.StringTokenizer;
 import java.util.logging.Logger;
@@ -484,6 +486,10 @@
 	public static boolean STORE_SKILL_COOLTIME;
 	public static int BUFFS_MAX_AMOUNT;
 	
+	/** PvP Color System */
+	public static boolean ALLOW_PVP_TITLE_COLOR_SYSTEM;
+	public static Map<Integer, Integer> PVP_COLORS = new HashMap<>();
+	
 	// --------------------------------------------------
 	// Server
 	// --------------------------------------------------
@@ -1089,7 +1095,16 @@
 			
 			BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
 			STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);
+			ALLOW_PVP_TITLE_COLOR_SYSTEM = Boolean.parseBoolean(players.getProperty("AllowPvpTitleColorSystem", "false"));
 			
+			String pvp_colors = players.getProperty("PvpColors", "100,FFFF00");
+			String pvp_colors_splitted_1[] = pvp_colors.split(";");
+			for (String s : pvp_colors_splitted_1)
+			{
+			String pvp_colors_splitted_2[] = s.split(",");
+			PVP_COLORS.put(Integer.parseInt(pvp_colors_splitted_2[0]), Integer.decode("0x"+pvp_colors_splitted_2[1]));
+			}
+
 			// server
 			ExProperties server = load(SERVER_FILE);
 			
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 2)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -256,6 +256,10 @@
 		// Attacker or spectator logging into a siege zone will be ported at town.
 		if (!activeChar.isGM() && (!activeChar.isInSiege() || activeChar.getSiegeState() < 2) && activeChar.isInsideZone(ZoneId.SIEGE))
 			activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
+				if (Config.ALLOW_PVP_TITLE_COLOR_SYSTEM)
+			        {
+			                activeChar.colorsCheck();
+			        }
 	}
 	
 	private static void engage(L2PcInstance cha)

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 2)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -1909,7 +1909,21 @@
 	{
 		return _pvpKills;
 	}
-	
+		       public void colorsCheck()
+		       {
+		               if (Config.ALLOW_PVP_TITLE_COLOR_SYSTEM)
+		               {
+		                       for (int i : Config.PVP_COLORS.keySet())
+		                       {
+		                               if (getPvpKills() >= i)
+		                               {
+		                                       getAppearance().setTitleColor(Config.PVP_COLORS.get(i));
+		                                       broadcastUserInfo();
+		                               }
+		                       }
+		               }
+		             } 
+		    
 	/**
 	 * Set PvP Kills of the L2PcInstance (number of player killed during a PvP).
 	 * @param pvpKills A value.
@@ -4283,7 +4297,10 @@
 			{
 				// Add PvP point to attacker.
 				setPvpKills(getPvpKills() + 1);
-				
+			if (Config.ALLOW_PVP_TITLE_COLOR_SYSTEM)
+			{
+			colorsCheck();
+			}
 				// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
 				sendPacket(new UserInfo(this));
 			}

 

solved

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.


  • Posts

    • Lol good joke.   If I'd be the one contacting yo then I'd say at least 50% in advance because you can basically just fuck off when things doesn't go your way, and then you as a developer just wasted days or even weeks of time with development.
    • "Just make your own game!" sounds simple until you’ve tried it. I did, with Epic Dragon World and learned the hard way that "open source" often means "free labor for resellers." The MIT license became a buffet for people to grab code, rebrand it and ghost the project. Even basic collaboration collapsed because everyone wanted their vision, not *a* vision. NCSoft’s lawyers aren’t theoretical. They’re a sword of Damocles. Even if you rebuild a client from scratch, if it feels like Lineage 2, they’ll come knocking. Ask the Chrono Trigger fangame corpses how that goes. MMOs are hospice care. The genre’s on life support, kept alive by whales and nostalgia. Look at Throne and Liberty, NCSoft’s own "successor" to L2, flopping harder than a 2004 PKer in ToI. Classic reboots (WoW, L2) are bandaids, not resurrections. This is the hobby. Optimizing old systems, reverse-engineering spaghetti code and preserving janky mechanics is the fun part. Monetizing it turns it into customer service hell. No thanks. Community? What community? The L2 scene is 90% resellers, 10% players who’ll quit the second they don’t get +16 on day one. Both asking how to install Java and why running the uncompiled server does not work.
    • Dear players, Open beta test for C3 begins today at 19:00 server time (GMT +2). 💰 All participants who find bugs during OBT will be rewarded with Coin of Luck (CoL): - 1 CoL for each staticmesh issue found — e.g., walking through textures, etc., - 2 CoL or more for server-side issues, depending on their severity., We strongly recommend reviewing the quest list - when switching to Chronicle 3, the total number of quests should match the number shown in the upper right corner of the window and correspond to the quest count from Chronicle 2. To log into the game, use the same data you use to access the Airin server. 📌 Download client: Google Drive
    • 🔥 Sale Alert! 🔥 Twitter Accounts with 50 Followers — now on SALE! Looking to launch a project or warm up your account base fast? We’ve got starter Twitter accounts with ~50 followers at a sweet price. 💰 Limited-time offer – while stock lasts! ✅ Organic-Looking ✅ Clean & Safe ✅ Perfect for boosting credibility 📦 Instant delivery
  • 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