Jump to content
  • 0

Pvp Pk Color


l22expert

Question

5 answers to this question

Recommended Posts

  • 0

http://www.maxcheaters.com/topic/141971-rank-pvp-system-374-il-h5l2jserver-frozen-acis/?hl=system

exei kai PvP Pk Color system auto edw kai einai kai gia freya opote den tha xreiasteis na to kaneis kai adapt

 

twra mono gia pvp pk color system dokimase auto edw

 

 

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 82)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -34,6 +34,7 @@
import java.util.logging.Logger;

import javolution.util.FastList;
+import javolution.util.FastMap;
import net.sf.l2j.util.StringUtil;

/**
@@ -60,6 +61,7 @@
public static final String SERVER_FILE = "./config/server.properties";
public static final String SIEGE_FILE = "./config/siege.properties";
public static final String TELNET_FILE = "./config/telnet.properties";
+ private static final String PVP_COLOR_SYSTEM_CONFIG_FILE = "./config/pvpcolorsystem.properties";

/**--------------------------------------------------
// Variable Definitions
@@ -642,6 +644,11 @@
public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = 5; // default 5

//--------------------------------------------------
+
+ public static String PVPS_COLORS;
+ public static FastMap<Integer, Integer> PVPS_COLORS_LIST;
+ public static String PKS_COLORS;
+ public static FastMap<Integer, Integer> PKS_COLORS_LIST;

/**
* This class initializes all global variables for configuration.<br>
@@ -653,6 +660,60 @@
{
_log.info("Loading gameserver configuration files.");

+ try
+ {
+ Properties pvpcolor = new Properties();
+ InputStream is = new FileInputStream(new File(PVP_COLOR_SYSTEM_CONFIG_FILE));
+ pvpcolor.load(is);
+ is.close();
+
+ PVPS_COLORS = pvpcolor.getProperty("PvpsColors", "");
+ PVPS_COLORS_LIST = new FastMap<Integer, Integer>();
+
+ String[] splitted_pvps_colors = PVPS_COLORS.split(";");
+
+ for(String iii:splitted_pvps_colors)
+ {
+
+ String[] pvps_colors = iii.split(",");
+
+ if(pvps_colors.length != 2)
+ {
+ System.out.println("Invalid properties.");
+ }
+ else
+ {
+ PVPS_COLORS_LIST.put(Integer.parseInt(pvps_colors[0]), Integer.decode("0x" + pvps_colors[1]));
+ }
+
+ }
+
+ PKS_COLORS = pvpcolor.getProperty("PksColors", "");
+ PKS_COLORS_LIST = new FastMap<Integer, Integer>();
+
+ String[] splitted_pks_colors = PKS_COLORS.split(";");
+
+ for(String iii:splitted_pks_colors)
+ {
+
+ String[] pks_colors = iii.split(",");
+
+ if(pks_colors.length != 2)
+ {
+ System.out.println("Invalid properties.");
+ }
+ else
+ {
+ PKS_COLORS_LIST.put(Integer.parseInt(pks_colors[0]), Integer.decode("0x" + pks_colors[1]));
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new Error("Server failed to load "+PVP_COLOR_SYSTEM_CONFIG_FILE+" file.");
+ }
// Clans settings
try
{
Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (revision 82)
+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (working copy)
@@ -33,6 +33,7 @@
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.GmListTable;
import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.datatables.ClanTable;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.model.L2Object;
@@ -638,7 +639,10 @@
player.setCurrentCp(cpval);
player.setPvpFlag(pvpflagval);
player.setPvpKills(pvpkillsval);
+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(player);
player.setPkKills(pkkillsval);
+ pvpcolor.updateTitleColor(player);

// Save the changed parameters to the database.
player.store();
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 82)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -50,6 +50,7 @@
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.ai.L2CharacterAI;
import net.sf.l2j.gameserver.ai.L2PlayerAI;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.communitybbs.BB.Forum;
import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager;
@@ -4640,6 +4641,10 @@
{
// Add karma to attacker and increase its PK counter
setPvpKills(getPvpKills() + 1);
+
+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(this);
+ pvpcolor.updateTitleColor(this);

// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
Index: java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java
===================================================================
--- java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java (revision 0)
+++ java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java (revision 0)
@@ -0,0 +1,53 @@
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package net.sf.l2j.gameserver.anarchy;
+
+import java.util.Set;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ *
+ * @author Anarchy
+ */
+public class PvPColorSystem
+{
+ public void updateNameColor(L2PcInstance player)
+ {
+ Set<Integer> pvpscolors = Config.PVPS_COLORS_LIST.keySet();
+ for (Integer i : pvpscolors)
+ {
+ if (player.getPvpKills() >= i)
+ {
+ player.getAppearance().setNameColor(Config.PVPS_COLORS_LIST.get(i));
+ }
+ }
+ }
+ public void updateTitleColor(L2PcInstance player)
+ {
+ Set<Integer> pkscolors = Config.PKS_COLORS_LIST.keySet();
+ for (Integer i : pkscolors)
+ {
+ if (player.getPkKills() >= i)
+ {
+ player.getAppearance().setTitleColor(Config.PKS_COLORS_LIST.get(i));
+ }
+ }
+ }
+}
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 82)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)
@@ -27,6 +27,7 @@
import net.sf.l2j.gameserver.Olympiad;
import net.sf.l2j.gameserver.SevenSigns;
import net.sf.l2j.gameserver.TaskPriority;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
@@ -85,6 +86,10 @@
{
L2PcInstance activeChar = getClient().getActiveChar();

+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(activeChar);
+ pvpcolor.updateTitleColor(activeChar);
+
if (activeChar == null)
{
_log.warning("EnterWorld failed! activeChar is null...");
Index: config/pvpcolorsystem.properties
===================================================================
--- config/pvpcolorsystem.properties (revision 0)
+++ config/pvpcolorsystem.properties (revision 0)
@@ -0,0 +1,9 @@
+# Advanced pvp/pk color system, by Anarchy.
+
+# PvP Name color System.
+# It works like: pvps,color;pvps,color, eg. 100,00FF00;200,FF0000;300,0000FF;.
+PvpsColors = 100,00FF00;
+
+# Pk Title color System.
+# It works like: pks,color;pks,color, eg. 100,00FF00;200,FF0000;300,0000FF;.
+PksColors = 100,00FF00;
\ No newline at end of file

 

einai o kwdikas tou anarchy 

Link to comment
Share on other sites

  • 0

http://www.maxcheaters.com/topic/141971-rank-pvp-system-374-il-h5l2jserver-frozen-acis/?hl=system

exei kai PvP Pk Color system auto edw kai einai kai gia freya opote den tha xreiasteis na to kaneis kai adapt

 

twra mono gia pvp pk color system dokimase auto edw

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 82)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -34,6 +34,7 @@
import java.util.logging.Logger;

import javolution.util.FastList;
+import javolution.util.FastMap;
import net.sf.l2j.util.StringUtil;

/**
@@ -60,6 +61,7 @@
public static final String SERVER_FILE = "./config/server.properties";
public static final String SIEGE_FILE = "./config/siege.properties";
public static final String TELNET_FILE = "./config/telnet.properties";
+ private static final String PVP_COLOR_SYSTEM_CONFIG_FILE = "./config/pvpcolorsystem.properties";

/**--------------------------------------------------
// Variable Definitions
@@ -642,6 +644,11 @@
public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = 5; // default 5

//--------------------------------------------------
+
+ public static String PVPS_COLORS;
+ public static FastMap<Integer, Integer> PVPS_COLORS_LIST;
+ public static String PKS_COLORS;
+ public static FastMap<Integer, Integer> PKS_COLORS_LIST;

/**
* This class initializes all global variables for configuration.<br>
@@ -653,6 +660,60 @@
{
_log.info("Loading gameserver configuration files.");

+ try
+ {
+ Properties pvpcolor = new Properties();
+ InputStream is = new FileInputStream(new File(PVP_COLOR_SYSTEM_CONFIG_FILE));
+ pvpcolor.load(is);
+ is.close();
+
+ PVPS_COLORS = pvpcolor.getProperty("PvpsColors", "");
+ PVPS_COLORS_LIST = new FastMap<Integer, Integer>();
+
+ String[] splitted_pvps_colors = PVPS_COLORS.split(";");
+
+ for(String iii:splitted_pvps_colors)
+ {
+
+ String[] pvps_colors = iii.split(",");
+
+ if(pvps_colors.length != 2)
+ {
+ System.out.println("Invalid properties.");
+ }
+ else
+ {
+ PVPS_COLORS_LIST.put(Integer.parseInt(pvps_colors[0]), Integer.decode("0x" + pvps_colors[1]));
+ }
+
+ }
+
+ PKS_COLORS = pvpcolor.getProperty("PksColors", "");
+ PKS_COLORS_LIST = new FastMap<Integer, Integer>();
+
+ String[] splitted_pks_colors = PKS_COLORS.split(";");
+
+ for(String iii:splitted_pks_colors)
+ {
+
+ String[] pks_colors = iii.split(",");
+
+ if(pks_colors.length != 2)
+ {
+ System.out.println("Invalid properties.");
+ }
+ else
+ {
+ PKS_COLORS_LIST.put(Integer.parseInt(pks_colors[0]), Integer.decode("0x" + pks_colors[1]));
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new Error("Server failed to load "+PVP_COLOR_SYSTEM_CONFIG_FILE+" file.");
+ }
// Clans settings
try
{
Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (revision 82)
+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (working copy)
@@ -33,6 +33,7 @@
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.GmListTable;
import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.datatables.ClanTable;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.model.L2Object;
@@ -638,7 +639,10 @@
player.setCurrentCp(cpval);
player.setPvpFlag(pvpflagval);
player.setPvpKills(pvpkillsval);
+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(player);
player.setPkKills(pkkillsval);
+ pvpcolor.updateTitleColor(player);

// Save the changed parameters to the database.
player.store();
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 82)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -50,6 +50,7 @@
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.ai.L2CharacterAI;
import net.sf.l2j.gameserver.ai.L2PlayerAI;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.communitybbs.BB.Forum;
import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager;
@@ -4640,6 +4641,10 @@
{
// Add karma to attacker and increase its PK counter
setPvpKills(getPvpKills() + 1);
+
+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(this);
+ pvpcolor.updateTitleColor(this);

// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
Index: java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java
===================================================================
--- java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java (revision 0)
+++ java/net/sf/l2j/gameserver/anarchy/PvPColorSystem.java (revision 0)
@@ -0,0 +1,53 @@
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package net.sf.l2j.gameserver.anarchy;
+
+import java.util.Set;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ *
+ * @author Anarchy
+ */
+public class PvPColorSystem
+{
+ public void updateNameColor(L2PcInstance player)
+ {
+ Set<Integer> pvpscolors = Config.PVPS_COLORS_LIST.keySet();
+ for (Integer i : pvpscolors)
+ {
+ if (player.getPvpKills() >= i)
+ {
+ player.getAppearance().setNameColor(Config.PVPS_COLORS_LIST.get(i));
+ }
+ }
+ }
+ public void updateTitleColor(L2PcInstance player)
+ {
+ Set<Integer> pkscolors = Config.PKS_COLORS_LIST.keySet();
+ for (Integer i : pkscolors)
+ {
+ if (player.getPkKills() >= i)
+ {
+ player.getAppearance().setTitleColor(Config.PKS_COLORS_LIST.get(i));
+ }
+ }
+ }
+}
Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 82)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)
@@ -27,6 +27,7 @@
import net.sf.l2j.gameserver.Olympiad;
import net.sf.l2j.gameserver.SevenSigns;
import net.sf.l2j.gameserver.TaskPriority;
+import net.sf.l2j.gameserver.anarchy.PvPColorSystem;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
@@ -85,6 +86,10 @@
{
L2PcInstance activeChar = getClient().getActiveChar();

+ PvPColorSystem pvpcolor = new PvPColorSystem();
+ pvpcolor.updateNameColor(activeChar);
+ pvpcolor.updateTitleColor(activeChar);
+
if (activeChar == null)
{
_log.warning("EnterWorld failed! activeChar is null...");
Index: config/pvpcolorsystem.properties
===================================================================
--- config/pvpcolorsystem.properties (revision 0)
+++ config/pvpcolorsystem.properties (revision 0)
@@ -0,0 +1,9 @@
+# Advanced pvp/pk color system, by Anarchy.
+
+# PvP Name color System.
+# It works like: pvps,color;pvps,color, eg. 100,00FF00;200,FF0000;300,0000FF;.
+PvpsColors = 100,00FF00;
+
+# Pk Title color System.
+# It works like: pks,color;pks,color, eg. 100,00FF00;200,FF0000;300,0000FF;.
+PksColors = 100,00FF00;
\ No newline at end of file

einai o kwdikas tou anarchy 

exaristo gia to endiaferon alla den mou kani ine gia interlude kai to link pou katebasa gia greya kai afto den mou kani ena katharo re cis pedia pvp pk color system gia freya l2j

Link to comment
Share on other sites

  • 0

ti enweis den sou kanei ? katevases to RPS gia freya kai pou se evgale provlima ? apla apply patch kantw

twra ston kwdika pou sou edwse kane auto pou sou eipe o Cobra prospatha na to peraseis kai opou exeis errors apla postare edw 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • i tryed to copy the admin    serverinfo.htm  to the communityboard.  the command  %onlineALL%  but it does not work.   any advice?   <html><title>Admin Server Info</title><body> <center> <table width=270> <tr> <td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td width=180><center>Server Info</center></td> <td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> </tr> </table> <br> <font color="LEVEL">General:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>OS:</td> <td><font color="00FF00">%os_name%</font></td> </tr> <tr> <td>OS version:</td> <td><font color="00FF00">%os_ver%</font></td> </tr> <tr> <td>Server slots:</td> <td><font color="00FF00">%slots%</font></td> </tr> <tr> <td>Server UpTime:</td> <td><font color="00FF00">%serverUpTime%</font></td> </tr> <tr> <td>Server Time:</td> <td><font color="00FF00">%serverTime%</font></td> </tr> <tr> <td>Game Time:</td> <td><font color="00FF00">%gameTime% (%dayNight%)</font></td> </tr> <tr> <td>Pathfinding:</td> <td><font color="00FF00">%geodata%</font></td> </tr> </table> <br> <font color="LEVEL">Players:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Total players count:</td> <td><font color="00FF00">%onlineAll%</font></td> </tr> <tr> <td>Offline trade count:</td> <td><font color="00FF00">%offlineTrade%</font></td> </tr> <tr> <td>Online GM count:</td> <td><font color="00FF00">%onlineGM%</font></td> </tr> <tr> <td>Real player count:</td> <td><font color="00FF00">%onlineReal%</font></td> </tr> </table> <br> <font color="LEVEL">Memory:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Used Memory:</td> <td><font color="00FF00">%usedMem% MB</font></td> </tr> <tr> <td>Free Memory:</td> <td><font color="00FF00">%freeMem% MB</font></td> </tr> <tr> <td>Total Memory:</td> <td><font color="00FF00">%totalMem% MB</font></td> </tr> </table> </center> </body></html>  
    • IntelliJ IDE has native support for Gradle, as far as I'm aware.
    • please is any one here that can  take the surces from grable to normal eclipse and reshare it here cause i don't have any clue how to install them On Eclipse 😕  if is any one here that can understand how those surces can be instaled please any help gonna be perfect iven i can  pay bay paypal. thanks
    • Wts A/S grade gear (armors weapons jewelery) Great Wolf with top eq Kokabora lvl 55+  Baium zaken frintezza   ADENA - 1kk - 0.25$ (big stock)   I can sell grand khavatarii with noblesse and subclass with email (can be with gear or clear)    Payment by PayPal, can use middleman   PM here  
  • 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