Jump to content

Recommended Posts

Posted

Πολυ καλο και για low,mid αλλα και για pvp rate servers.

Μπορει να γινει και με database connections , εγω το εκανα χωρις.

 

Ολοι οι clanleaders θελουν να βοηθησουν τα members τους να ντυθουν, αλλα δεν εχουν παντα τα items να τους δωσουν. Ε λοιπον με αυτο θα μπορουν να βοηθησουν τα members τους κανοντας pvp. Οταν ενας clanleader παρει 6 pvp στη σειρα , ολα τα members της clan παιρνουν reward.Ολα ομως, ειτε ειναι online , ειτε offline.Ετσι θα μπορουν να βοηθανε τα members τους κανοντας pvp. Οσοι ηταν offline , οταν μπενουν ενημερωνωνται για το reward επισης και το παιρνουν φυσικα.

 

Καντε στον φακελο data ενα αρχειο .txt με ονομα members και αφηστε το κενο.


### Eclipse Workspace Patch 1.0
#P Chr.6GMS
Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -46,6 +46,7 @@
import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.LeaderHelp;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.ClanHall;
import net.sf.l2j.gameserver.model.entity.Couple;
@@ -251,6 +252,13 @@

         SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);
         Announcements.getInstance().showAnnouncements(activeChar);
+        
+        if(LeaderHelp.isMember(activeChar))
+        {
+        	activeChar.getInventory().addItem("", 2807, 25, activeChar, null);
+        	activeChar.sendMessage("You rewarded with items for your clan's leader pvps rows");
+        	LeaderHelp.remove(activeChar.getName());
+        }

		Quest.playerEnter(activeChar);
		activeChar.sendPacket(new QuestList());
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -105,6 +105,7 @@
import net.sf.l2j.gameserver.model.L2SkillLearn;
import net.sf.l2j.gameserver.model.L2Summon;
import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.LeaderHelp;
import net.sf.l2j.gameserver.model.MacroList;
import net.sf.l2j.gameserver.model.PcFreight;
import net.sf.l2j.gameserver.model.PcInventory;
@@ -364,6 +365,8 @@

	private boolean _isIn7sDungeon = false;

+	private int _leaderSpree = 0;
+	
     private boolean _inJail = false;
     private long _jailTimer = 0;
     private ScheduledFuture<?> _jailTask;
@@ -1010,6 +1013,7 @@
		_newbie = isNewbie;
	}

+	

	public void setBaseClass(int baseClass)
	{
@@ -4176,6 +4180,9 @@
			{
				pk.kills.add(getName());
			}
+			
+			if(isClanLeader() && _leaderSpree > 0)
+				_leaderSpree = 0;

			// Clear resurrect xp calculation
			setExpBeforeDeath(0);
@@ -4448,6 +4455,37 @@
     {
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
+        
+        if(isClanLeader()){
+        	_leaderSpree++;
+        	if(_leaderSpree == 6){
+        		sendMessage("You rewarded with 6 pvps in a row");
+        		getInventory().addItem("", 2807, 25, this, null);
+        		L2ClanMember[] m = null;
+				if(getClan().getMembersCount() < 2)
+        			sendMessage("You rewarded successfully but only you.");
+        		else{
+        			m = getClan().getMembers();
+				    for(L2ClanMember s : m){
+				    	if(s.isOnline()){
+				    		L2PcInstance j = s.getPlayerInstance();
+				    		j.sendMessage("Your clan leader rewarded with 6 pvps in a row so you rewarded and you");
+				    		j.getInventory().addItem("", 2807, 25, j, null);
+				    	}
+				    	else{
+				    		LeaderHelp.clanRewards.add(s.getName());
+				    	}
+				    }	
+				    if(LeaderHelp.clanRewards.isEmpty())
+				    {}
+				    else{
+				     LeaderHelp.addMembers();
+				    }
+        		
+        		_leaderSpree = 0;
+        			}
+        	}
+        }

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
Index: java/net/sf/l2j/gameserver/model/LeaderHelp.java
===================================================================
--- java/net/sf/l2j/gameserver/model/LeaderHelp.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/LeaderHelp.java	(revision 0)
@@ -0,0 +1,84 @@
+package net.sf.l2j.gameserver.model;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.util.StringTokenizer;
+import java.util.logging.Level;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import javolution.util.FastList;
+
+public class LeaderHelp{
+	
+	public static FastList<String> clanRewards = new FastList<String>();
+	static File file = new File(Config.DATAPACK_ROOT, "data/members.txt");
+	
+	public static boolean isMember(L2PcInstance j){
+		if(clanRewards.contains(j.getName()))
+			return true;
+		return false;
+	}
+	
+	public static void addMembers(){
+		FileWriter save = null;
+		try
+		{
+			save = new FileWriter(file);
+			for (int i = 0; i < clanRewards.size(); i++)
+			{
+				save.write(clanRewards.get(i));
+				save.write("\r\n");
+			}
+			save.flush();
+			save.close();
+			save = null;
+		}
+		catch (IOException e)
+		{
+			e.printStackTrace();
+		}
+	}
+	
+	public static void remove(String n){
+		clanRewards.remove(n);
+		addMembers();
+	}
+	
+	public static void onStart(){
+		LineNumberReader l = null;
+		try
+		{
+			String line = null;
+			l = new LineNumberReader(new FileReader(file));
+			while ( (line = l.readLine()) != null)
+			{
+				StringTokenizer st = new StringTokenizer(line,"\n\r");
+				if (st.hasMoreTokens())
+				{
+					String t = st.nextToken();
+					clanRewards.add(t);
+				}
+			}
+
+		}
+		catch (IOException e1)
+		{
+			e1.printStackTrace();
+		}
+		finally
+		{
+			try
+			{
+				l.close();
+			}
+			catch (Exception e2)
+			{
+			}
+		}
+	}
+	
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -221,6 +221,7 @@
import net.sf.l2j.gameserver.model.L2Manor;
import net.sf.l2j.gameserver.model.L2PetDataTable;
import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.LeaderHelp;
import net.sf.l2j.gameserver.model.entity.Hero;
import net.sf.l2j.gameserver.model.entity.TvTManager;
import net.sf.l2j.gameserver.network.L2GameClient;
@@ -604,6 +605,7 @@
			CoupleManager.getInstance();

         TaskManager.getInstance();
+        LeaderHelp.onStart();

		GmListTable.getInstance();

Posted

mpravo file polu kalo alla tha gunotan polu kalutero ean to ekanes san Event

Ti enow ? na to ekanes me Start kai End na to ksekunouses esei stis 5 to apogeuma kai na teleiwne stis 8 kwpes etsi i apo configs false true

pantos polu kalo tha to dokimasw

Posted

mpravo file polu kalo alla tha gunotan polu kalutero ean to ekanes san Event

Ti enow ? na to ekanes me Start kai End na to ksekunouses esei stis 5 to apogeuma kai na teleiwne stis 8 kwpes etsi i apo configs false true

pantos polu kalo tha to dokimasw

 

den xriazete na to kani auto kai etsi mia xara einai

Posted

Πρωτοτυπο και καλογραμμενος κωδικας. Καλη δουλεια.

Posted

Είναι κομπλε δεν λέω,αλλα δεν καταλαβαίνω γιατί δυσκολεύεις τη ζωή σου στους τελευταίους σου κώδικες..

Δεν υπάρχει λόγος για .txt όταν γίνεται ΠΟΛΥ πιο εύκολα με db connections,δεν λεω με τον τρόπο που το κάνεις εσύ είναι πιο advanced,αλλά κατα την γνώμη μου δεν υπάρχει λόγος να το κάνεις αυτό..

 

Posted

Είναι κομπλε δεν λέω,αλλα δεν καταλαβαίνω γιατί δυσκολεύεις τη ζωή σου στους τελευταίους σου κώδικες..

Δεν υπάρχει λόγος για .txt όταν γίνεται ΠΟΛΥ πιο εύκολα με db connections,δεν λεω με τον τρόπο που το κάνεις εσύ είναι πιο advanced,αλλά κατα την γνώμη μου δεν υπάρχει λόγος να το κάνεις αυτό..

πιστεψε με , το να δωσεις items σε clan members δεν ειναι τοσο απλο με database connections. πηγα να το κανω στην αρχη και ψηλο μπερδευτηκα αν θες προσπαθησε το και εσυ και θα καταλαβεις τι εννοω στη μεση του κωδικα περιπου..

 

και επισης πρεπει να μαθενω να κοιταω και τι ειναι πιο ελαφρυ για το συστημα , οχι τι ειναι πιο ευκολο.

Posted

Κανένα antibot protection δεν παίζει; μπορεί κάποιος να φτιάξει 150 char για να πάρει 150 φορές το reward.

Posted

Κανένα antibot protection δεν παίζει; μπορεί κάποιος να φτιάξει 150 char για να πάρει 150 φορές το reward.

εχει γινει share αυτο το θεωρουσα δεδομενο.

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
Reply to this topic...

×   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

    • @ERROR501, I’ve been waiting for the “big update” since last October, and at this point, it’s starting to feel like an empty promise. You’re better off implementing your own minimum detection server-side instead of relying on AAC to fix their issues; despite what their website claims about blocking everything, it clearly falls short.
    • We are taking new orders. Kindly DM us on Telegram!
    • Hello everyone!  I’d like to share an experience that might serve as a lesson for anyone planning to work with third-party protection services—specifically, Active Anticheat. I know this might sound like a strange job request, but  our player base mostly consists of veteran of Lineage 2 players who are used to using bots as part of their gameplay experience. As server administrators, we decided to adapt to our users. That’s why we approached Active Anticheat with a proposal: Allow bot usage under certain conditions. We explained everything in detail, and they agreed.   📌 February – A Promising Start On February 16th, we contacted Active Anticheat to request a custom antibot system. The idea was to kick players using bots during specific times (like sieges), but allow them to log back in without bots afterward. After a few discussions, both sides agreed on the following solution: Bots allowed during regular days. During siege events, anyone using a bot would be automatically kicked. Kicked players could log back in without using bots. The deal was priced at $5,000, which we already paid on March 31st, 2025. Active Anticheat promised delivery by the end of April, or at the latest, by May. Screenshot:  Deal 1 Deal 2   🕐 May – The Delays Begin We followed up multiple times in May, only to finally hear back on May 26th: “It won’t be ready this month. But we’re working on a big update coming in June.” That update? Still nowhere to be seen, even as I’m writing this post. Screenshot:  Delayed   🔁 Plan B – L2Walker Rejected, Adrenaline Offered With our server launch schedule getting tighter, we needed an alternative. At the end of June, we asked Active Anticheat: “Can you at least allow L2Walker access to the server?” Their response on June 28th: “L2Walker can’t be allowed. But we can allow Adrenaline (free & paid version) and L2Helper for $2,000 + $300 (for a new license).” We agreed, hoping it would be a temporary fix while waiting for the promised “big update” (which we had already paid $5,000 for, remember?). Screenshot:  New Offer 1 New Offer 2 New Offer 3   ❌ AA Failed Their setup took about a week. We ran 2–3 rounds of testing using clean clients. The result? Adrenaline (both free and paid) couldn’t connect to our server. It couldn’t detect the Lineage 2 client, because the custom Active Anticheat protection was blocking it. We reached out to Active Anticheat for support, and their response? “You should contact Adrenaline support to enable free Adrenaline for your server. Adrenaline blocks it by default when Active Anticheat is detected.” Then we tested Premium Adrenaline. And it still didn’t work. Active Anticheat stood firm: “It’s not our fault. Adrenaline blocked us—not the other way around.” Screenshot: Failed 1 Failed 2   💸 The Bitter Reality Today, we’re still waiting for answers. No reply. No fix. No update. No refund. We’ve spent a total of $7,300 and received nothing functional in return. And this, despite their full agreement with our initial plan.  
  • 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