Jump to content

Recommended Posts

Posted

System Configuration options:

#------------------------------------
#-      Custom PvP Reward System       -
#------------------------------------
# INFO: For better system view disable this option:
# EnablePkInfo = False

# Enable Custom Pvp Reward System
CustomPvpRewardEnabled = True

# If the same player to kill, then after X times the reward Will not Increase (0 - Disabled)
CustomPvpRewardProtection = 2

# If the same player to kill, then after X times the reward Will not Increase,
# but it can be reset every Y portion of time (in minutes) from first daily kill (0 - disabled).
# It's reset only daily kills counter.
# Default: 0, Preferred: 1440 [24h].
CustomPvpRewardProtectionReset = 0

# Reward item id
CustomPvpRewardItemId = 6392
# Reward item amount
CustomPvpRewardAmmount = 1

# Minimum player level to obtain reward.
CustomPvpRewardMinLvl = 1

# Gives reward for kill PK player
CustomPvpPkReward = true
#------------------------------------

 

Screenshots:

img1v.png

img2uo.png

img3q.png

 

Patch is easy to implementation, only 4 lines in L2PcInstance, 1 CustomPvpRewardSystem class, 1 sql procedure, 1 sql table, and pvp.properties patch.

 

INFO: This system not ingerate in current pvp reward system. both system can work together, but better turn on one of both.

 

http://www.4shared.com/rar/DIOb4EDv/cprs_10.html

 

SYSTEM CREATED BY matthewmaster04

BIG BIG THANKS TO HIM!!!

Posted

Hi

I did it for Freya l2jserver

 

Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 5550)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -264,6 +264,7 @@
import com.l2jserver.gameserver.util.Util;
import com.l2jserver.util.Point3D;
import com.l2jserver.util.Rnd;
+import com.l2jserver.gameserver.model.actor.instance.PvpRewardSystem;

/**
  * This class represents all player characters in the world.
@@ -5340,7 +5341,11 @@
			L2PcInstance pk = killer.getActingPlayer();

			TvTEvent.onKill(killer, this);
-			
+			if(Config.CUSTOM_PVP_REWARD_ENABLED)
+							{
+								PvpRewardSystem.doCustomPvpReward(pk, this);
+							}
+							
			if (atEvent && pk != null)
			{
				pk.kills.add(getName());
Index: java/com/l2jserver/gameserver/model/actor/instance/PvpRewardSystem.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/PvpRewardSystem.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/actor/instance/PvpRewardSystem.java	(revision 0)
@@ -0,0 +1,180 @@
+/*
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.actor.instance;
+
+
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.logging.Logger;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.datatables.ItemTable;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.templates.item.L2Item;
+
+import com.l2jserver.L2DatabaseFactory;
+
+
+/**
+ * @author Matthew Mazan
+ *
+ */
+public class PvpRewardSystem {
+	
+	private static Logger _log = Logger.getLogger(PvpRewardSystem.class.getName());
+	
+	/** 
+	 * Executed when kill player (from victim side)
+	 * @param killer
+	 * @param victim
+	 */
+	public static void doCustomPvpReward(L2PcInstance killer, L2PcInstance victim)
+	{
+		//int error_code = 0;
+		int kills = 0;
+		int kills_today = 0;
+		long kill_time = 0;
+		
+		long sys_time = System.currentTimeMillis();
+		long prot_time = (1000 * 60 * Config.CUSTOM_PVP_REWARD_PROTECTION_RESET);
+		
+		Connection con = null;
+		try{
+			con = L2DatabaseFactory.getInstance().getConnection();
+			PreparedStatement statement = con.prepareStatement("CALL CPRS_add(?,?,?,?)"); //query returns updated killer data
+			statement.setInt(1, killer.getObjectId());
+			statement.setInt(2, victim.getObjectId());
+			statement.setLong(3, sys_time);
+			statement.setLong(4, prot_time);
+			
+			ResultSet rset = statement.executeQuery();
+			
+			while(rset.next()){
+				//error_code = rset.getInt("error_code");
+				kills = rset.getInt("kills");
+				kills_today = rset.getInt("kills_today");
+				kill_time = rset.getLong("kill_time");
+				break;
+			}
+			rset.close();
+			statement.close();
+		}catch(SQLException e){
+			e.printStackTrace();
+		}
+		finally{
+			L2DatabaseFactory.close(con);
+		}
+		
+		
+		if(kills_today <= Config.CUSTOM_PVP_REWARD_PROTECTION){
+			if(killer !=null){
+				addItemRewardForKiller(killer, victim);
+			}
+		}else{
+			if((Config.CUSTOM_PVP_PK_REWARD)&&(killer.getKarma() == 0)){
+				if(Config.CUSTOM_PVP_REWARD_PROTECTION > 0){
+					if((Config.CUSTOM_PVP_REWARD_ENABLED)){
+						if(Config.CUSTOM_PVP_REWARD_PROTECTION_RESET == 0){
+							killer.sendMessage("Reward has been awarded for kill this player!");
+						}else{
+							killer.sendMessage("Reward has been awarded for kill this player today!");
+							killer.sendMessage("Next for "+calculateTimeToString(sys_time, kill_time));
+						}
+					}
+				}
+			}
+		}
+
+		
+		
+		if(kills > 1){
+			String timeStr1 = "times";
+			if(kills_today == 1){ timeStr1 = "time"; }
+			String msgVictim1 = killer.getName() + " killed you " + kills + " times.";
+			String msgVictim2 = killer.getName() + " killed you " + kills + " times ( "+ kills_today +" "+timeStr1+" today ).";
+			String msgKiller1 = "You have killed " + victim.getName() + " " + kills + " times.";
+			String msgKiller2 = "You have killed " + killer.getName() + " " + kills + " times ( "+ kills_today +" "+timeStr1+" today ).";
+			
+			if(Config.CUSTOM_PVP_REWARD_PROTECTION_RESET == 0){
+				victim.sendMessage(msgVictim1);
+				killer.sendMessage(msgKiller1);
+			}else{
+				victim.sendMessage(msgVictim2);
+				killer.sendMessage(msgKiller2);
+			}
+		}else{
+			victim.sendMessage("This is the first time you have been killed by " + killer.getName() + ".");
+			killer.sendMessage("You have killed " + victim.getName() + " for the first time."); 
+		}
+
+		killer = null;
+		victim = null;
+		
+	}
+	
+	/**
+	 * Adds the item reward.
+	 *
+	 * @param killer Player who killed.
+	 * @param victim victim Player.
+	 */
+	public static void addItemRewardForKiller(L2PcInstance killer, L2PcInstance victim){	
+		//Anti FARM Reward, level player >= reward_min_lvl
+		if((Config.CUSTOM_PVP_REWARD_MIN_LVL > victim.getLevel())||(Config.CUSTOM_PVP_REWARD_MIN_LVL > killer.getLevel()))
+		{
+			killer.sendMessage("Rewards are awarded on "+ Config.CUSTOM_PVP_REWARD_MIN_LVL + "+ level.");
+		}else{
+	        //IP check
+			if(killer.getClient()!=null)
+			if(killer.getClient().getConnection().getInetAddress() != victim.getClient().getConnection().getInetAddress())
+			{
+	
+				if((killer.getKarma() == 0)&&(killer.getPvpFlag() > 0)||((Config.CUSTOM_PVP_PK_REWARD)&&(killer.getKarma() == 0)&&(victim.getKarma() > 0))){
+					if(Config.CUSTOM_PVP_REWARD_ENABLED)
+					{
+						L2Item reward = ItemTable.getInstance().getTemplate(Config.CUSTOM_PVP_REWARD_ID);
+						
+						//killer.getInventory().addItem("Winning PvP", Config.CUSTOM_PVP_REWARD_ID, Config.PVP_REWARD_A-beep-T, killer, null);
+						killer.addItem("PvP Reward", Config.CUSTOM_PVP_REWARD_ID, Config.PVP_REWARD_A-beep-T, killer, false);
+						killer.sendMessage("You have earned " + Config.PVP_REWARD_A-beep-T + " x " + reward.getName() + ".");
+					}
+				}
+			}else{
+				 victim.sendMessage("Farm is punishable with Ban! Don't kill your Box!");
+		        _log.warning("PVP POINT FARM ATTEMPT: " + victim.getName() + " AND " + killer.getName() +" HAVE SAME IP!");
+			}
+		}
+	}
+	
+	private static String calculateTimeToString(long sys_time, long kill_time){
+		long TimeToRewardInMilli = ((kill_time + (1000 * 60 * Config.CUSTOM_PVP_REWARD_PROTECTION_RESET)) - sys_time);
+        long TimeToRewardHours = TimeToRewardInMilli / (60 * 60 * 1000);
+        long TimeToRewardMinutes = (TimeToRewardInMilli % (60 * 60 * 1000)) / (60 *1000);
+        long TimeToRewardSeconds = (TimeToRewardInMilli % (60 * 1000)) / (1000);
+        
+        String H = Long.toString(TimeToRewardHours);
+        String M = Long.toString(TimeToRewardMinutes);
+        String S = Long.toString(TimeToRewardSeconds);
+        if(TimeToRewardMinutes <= 9){ M = "0" + M; }
+        if(TimeToRewardSeconds <= 9){ S = "0" + S; }
+        
+        return H+":"+M+":"+S;
+	}
+	
+}
+
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 5550)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -81,8 +81,10 @@
	public static final String GRANDBOSS_CONFIG_FILE = "./config/Grandboss.properties";
	public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.properties";
	public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
+


+	
	//--------------------------------------------------
	// L2J Variable Definitions
	//--------------------------------------------------
@@ -725,7 +727,16 @@
	public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
	public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
	public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
+	public static int CUSTOM_PVP_REWARD_PROTECTION_RESET;
+	public static int CUSTOM_PVP_REWARD_PROTECTION;
+	public static boolean CUSTOM_PVP_PK_REWARD;
+	public static boolean CUSTOM_PVP_REWARD_ENABLED;
+	public static int CUSTOM_PVP_REWARD_MIN_LVL;
+	public static int CUSTOM_PVP_REWARD_ID;
+	public static int PVP_REWARD_A-beep-T;

+	
+	
	//--------------------------------------------------
	// NPC Settings
	//--------------------------------------------------
@@ -2246,7 +2257,14 @@

					L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False"));
					L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False"));
-					
+					CUSTOM_PVP_REWARD_PROTECTION_RESET = Integer.parseInt(L2JModSettings.getProperty("CustomPvpRewardProtectionReset", "0"));
+					CUSTOM_PVP_REWARD_PROTECTION = Integer.parseInt(L2JModSettings.getProperty("CustomPvpRewardProtection", "2"));
+					CUSTOM_PVP_PK_REWARD = Boolean.parseBoolean(L2JModSettings.getProperty("CustomPvpPkReward", "true"));
+					CUSTOM_PVP_REWARD_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("CustomPvpRewardEnabled", "true"));
+					CUSTOM_PVP_REWARD_MIN_LVL = Integer.parseInt(L2JModSettings.getProperty("CustomPvpRewardMinLvl", "1"));
+					CUSTOM_PVP_REWARD_ID = Integer.parseInt(L2JModSettings.getProperty("CustomPvpRewardItemId", "6392"));
+					PVP_REWARD_A-beep-T = Integer.parseInt(L2JModSettings.getProperty("CustomPvpRewardA-beep-t", "1"));
+
					if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
					{
						TVT_EVENT_ENABLED = false;

 

had a problem here

 

 

if(kills_today <= Config.CUSTOM_PVP_REWARD_PROTECTION){

if(victim.checkAntiFarm(killer)){

addItemRewardForKiller(killer, victim);

}

}else{

if((Config.CUSTOM_PVP_PK_REWARD)&&(killer.getKarma() == 0)){

 

so i changed for

 

if(kills_today <= Config.CUSTOM_PVP_REWARD_PROTECTION){

if(killer !=null){

addItemRewardForKiller(killer, victim);

}

}else{

if((Config.CUSTOM_PVP_PK_REWARD)&&(killer.getKarma() == 0)){

 

in l2pcinstance isnothing about "checkAntiFarm"

Posted

if(kills_today <= Config.CUSTOM_PVP_REWARD_PROTECTION){

if (AntiFeedManager.getInstance().check(killer, victim)){

addItemRewardForKiller(killer, victim);

}

}else{

 

or maybe am i wrong

Posted

Hello, today i want present new features in my system:

+ Rank Points

+ Player Ranks

 

INFO: All files are in cprs_1.5.rar, in attachment.

It's compatible with L2jFrozen rev.948, for other needed some work, but DB core is universal :D

 

Screen:

50656140049330477517.jpg

 

Config file:

#------------------------------------
#- 	  Custom PvP Reward System	    -
#------------------------------------
# INFO: For better system view disable this option:
# EnablePkInfo = False

# Enable Custom Pvp Reward System
CustomPvpRewardEnabled = False

# If the same player to kill, then after X times the reward Will not Increase (0 - Disabled)
CustomPvpRewardProtection = 0

# If the same player to kill, then after X times the reward Will not Increase, 
# but it can be reset every Y portion of time (in minutes) from first daily kill (0 - disabled).
# It's reset only daily kills counter.
# Default: 1440, Preferred: 1440 [24h].
# INFO: Used in Rank System too.
CustomPvpRewardProtectionReset = 1440

# Reward item id
CustomPvpRewardItemId = 6392
# Reward item amount
CustomPvpRewardAmmount = 1

# Minimum player level to obtain reward.
CustomPvpRewardMinLvl = 1

# Gives reward for kill PK player
CustomPvpPkReward = true

#------------------------------------------------
# Enable Ranks. 								-
#------------------------------------------------
# INFO: CustomPvpRewardEnabled can be disabled.
CustomPvpRankEnabled = false

# Rank names (first element is the best):
# Format: name1,name2,name3
# Example: CustomPvpRankName = God finger,Mass killer,Killer,No Rank
CustomPvpRankName = Rank 1,Rank 2,Rank3

# INFO: Be careful with points. MySql database allow DECIMAL(20) total rank_points.

# Rank require points (first element is points count for obtain 1st rank title, in example: God finger):
# Format: count1,count2,count3
# (count1 > count2 > count3) > 0
# Example: CustomPvpRankMinPoints = 10000,1000,400,1
# IMPORTANT: property elements count must be same like in CustomPvpRankName.
CustomPvpRankMinPoints = 300,100,50

# Example: For God finger kills reward is 100 points.
# Format: count1,count2,count3
# IMPORTANT: properties count must be same like in CustomPvpRankName.
CustomPvpRankPointsForKill = 100,30,15

# If the same player to kill, then after X times the points will not increase (0 - Disabled).
# If CustomPvpRankFarmProtect = 3, then it return 0 Rank Points for kill 4 time the same player.
CustomPvpRankFarmProtect = 0

# Enable other points counting for players.
# If enabled CustomPvpRankPointsForKill is ignored.
# Example: CustomPvpRankKillPointsDown = 100,50,10,1,0
# For first daily kill awards 100, 2nd kill give 50, ... , 0.
CustomPvpRankKillPointsDownEnabled = false
CustomPvpRankKillPointsDown = 100,50,10,1,0

# Shout current Points info to killer & victim.
CustomPvpRankShoutInfo = true

# Enable Rank Points for kill innocent players. (PK mode ON)
CustomPvpRankAwardPK = false

#------------------------------------ 

 

PS. Thx for using ;)

 

PS. Sorry for english in code but i am from poland :D

 

Download:

http://www64.zippyshare.com/v/72548404/file.html

 

http://www.4shared.com/rar/-TWIDSTU/cprs_15.html

 

Guest
This topic is now closed to further replies.



  • Posts

    • Hello guys i was wondering , how all new servers are having interlude files with classic client developed how they want i mean l2reborn , l2 ovc ,l2 dex , l2 flauron etc has interlude files with classic client  where they found this client or where to buy who is making those clients i have interlude files already developed i need to addapt classic client to interlude files  but with not all theses extra skills items etc   
    • I ended up sorting a similar mess by working with a team that handled everything from discovery to launch and kept things super clear. Their business website design approach made it easy for me to get a site that actually fit my goals, plus I kept full ownership of everything. The long-term support and simple pricing structure saved me a ton of headaches down the road.
    • Interface sources for P447 (7s update) for Classic/Essence   NWindow + InterfaceClassic + L2Editor + L2ClientDat Mobius + XDat Editor   Download
    • Hey there, welcome to the community – no worries about being new, we all started exactly where you are. Let me break this down based on what you’re trying to achieve with your Interlude‑Classic idea.   What you’re describing is actually a pretty popular concept: basically Interlude gameplay and balance, but with Classic‑style UI and a cleaner overall user experience. A “hybrid client”, not a full chronicle change.   Projects that have done something similar or are worth studying:   Lucera 2 – You’re right about this one. They use a custom client that blends Interlude gameplay with a more modern/Classic‑like interface. Their UI work (inventory, skill bar, lobby, etc.) is a good reference point.   L2J Mobius – Not exactly your target, but it’s very flexible and has a lot of examples of customizations and adaptations between chronicles.   Smaller custom projects – There are (or were) a few hybrid attempts using Interlude server files with heavily modified clients, but most are private or closed‑source, so you mainly get ideas, not ready‑to-use files.   Where the real challenge is (the client side):   What you want is possible, but the heavy lifting is on the client, not the server. The main pain points usually are:   Making sure interface files are compatible between chronicles (UI textures, layouts, systemmsg, etc.).   L2Font and localization edits: titles, chat, system messages – a small mistake here can break visuals or cause weird text issues.   Character selection / lobby screens: if you take them from another chronicle, you have to adapt them carefully so they don’t conflict with Interlude data.   Inventory, status bars and shortcuts: they must still work with Interlude’s item/skill structure and packet format, or you’ll get visual desyncs and client errors.   About multi‑protocol:   You’re correct that multi‑protocol is often used by projects that want to support different client versions or custom blends. In your case, it can help “talk” properly with a customized client while keeping an Interlude base server. It doesn’t magically fix everything, but it gives you more flexibility on how client and server exchange data.   Quick chronicle breakdown (relevant for your idea):   2.0–2.6: Early, simpler mechanics, good base for old‑school vibes.   2.7: More skills and better balance, often used as a base for custom projects.   2.9.5: A “bridge” between old and new, very common choice for hybrid or heavily modded setups.   3.0+: Adds Kamael and systems you said you don’t want, so you’d mainly use it as a reference, not as a direct base.   My honest recommendation:   Start from a solid Interlude base (files you understand and can actually maintain). Interlude still has the most support, tools and community knowledge.   Focus first on UI/interface modifications instead of trying to change core mechanics. Use Lucera‑style clients and similar projects as visual/technical reference.   Consider a multi‑protocol setup only after you’re comfortable with a normal Interlude client; otherwise you’ll just stack complexity.   Join active L2J / client‑mod Discords and forums. There are specific channels for interface, system edits and client reverse‑engineering where people share tips and tools.   What I would avoid at the beginning:   No intentar mezclar tres o cuatro chronicles a la vez; con uno bien entendido + UI custom ya tienes más que suficiente trabajo.   No subestimar la parte de cliente; muchas veces es más complicada y más frágil que el lado del servidor.   No saltarte el testeo en entorno local; los híbridos rompen cosas pequeñas (tooltips raros, skills que crashean el cliente, UI bugueada) si no pruebas bien.   Resources worth checking:   L2J forums and old MaxCheaters threads about faction/hybrid servers and client mods.   GitHub repos with client tools and interface mods (even si no son exactamente tu chronicle, te sirven como ejemplo).   Discord communities focused on L2 client development; ahí es donde se mueve hoy la parte “seria” del modding.   The good news: what you want is achievable, just not “plug & play”. It will require patience, testing and a bit of learning on both server and client sides. If you share exactly which files/pack you’re planning to use and what you want your UI to look like, people here (me included) can give you more concrete, step‑by‑step advice.
    • I’m done with Lineage 2. Not because I “grew up”, not because I “don’t have time for games” anymore, but because this game has slowly turned into everything it was supposed to be against.   Let’s be honest: most people are not playing Lineage 2 anymore. They are running 5–10 boxes, macros and scripts, setting up their characters and going to watch Netflix. The core loop isn’t PvP, clan wars or raids – it’s AFK grinding and praying your gear upgrades don’t fail.   The game used to be about outplaying your enemy with positioning, timing and coordination. Now it’s about:   Who has more boxes logged in.   Who is willing to swipe the credit card harder.   Who abuses the most broken script, cheat or exploit before it gets “patched”.   And let’s talk about pay‑to‑win. You can pretend it’s “supporting the server” all you want, but when someone can buy power that takes others months (or is literally impossible) to reach, that’s not support, that’s buying victories. When top players are just walking credit cards with epics, donations and event gear, you don’t have competition, you have a spending contest.   The community? It’s just as bad. Most “friends” are temporary party members until they find a better CP, clan or donation package. Drama, backstabbing, ninja looting, clan leaders selling clan resources, spies in Discord – it’s more like a cheap political simulator than an MMO. People talk about “honor” and “fair play”, then log their 10th box, run radar and target through walls.   And private servers… So many promises: “long‑term project”, “no corruption”, “no over‑enchant items”, “balanced gameplay”. Then after a few weeks you see:   Admin friends with full gear “testing”.   Hidden donations or “special offers” for “supporters”.   GMs closing their eyes to obvious abuse because it’s their buddies or biggest donors. Every wipe and every “fresh start” is just another cycle of the same lie, and we all pretend “this time will be different”.   The saddest part? Most of us know all this and still keep coming back because Lineage 2 has an insane core – the world, the classes, the adrenaline of real PvP, the politics, the sieges. But that core is buried under layers of greed, abuse, bots, scripts, egos and fake promises.   So here is the brutal truth: Lineage 2 is not a hardcore competitive MMORPG anymore. It’s a casino disguised as nostalgia, kept alive by whales, box armies and people too addicted or too hopeful to finally let go.   If you’re still playing, ask yourself honestly: Are you having fun, or are you just grinding, coping and praying that “next server” will finally be the one that isn’t corrupt, pay‑to‑win or dead in three months?   For me, I’m out. Flame me, defend the game, call me salty – I don’t care. But deep down, most of you know I’m not lying.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..