Jump to content

Question

5 answers to this question

Recommended Posts

  • 0
Posted

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 

  • 0
Posted

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

  • 0
Posted

An den mporhs na kaneis oute ena adapt kai ta theleis ola etoima paratato kalytera.

 

Tha sou synistousa na prospathishs kai opou kolas ela edw na se voythisoume.

  • 0
Posted

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 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.



×
×
  • Create New...