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

    • Sell ready interlude server files, with all popular features and tested, stable source + fully functional premium geodata for free.   Features include: Events: DM CTF TVT LM Dressme system Custom Buffer GM Shop Custom community board Donation manager  Auto Farm   Album: sell c6 — ImgBB   Test Server online: Patch link: https://drive.google.com/file/d/1mvEbv9XESsvfWwc638xFyyzyESeE2U95/view?usp=drive_link Auto acc create and auto admin   Price: 300$. Discord: l2retro
    • Faltan demasiados archivos,  y lógicas en clases claves como L2pcInstance, entre otras. si bien muchas cosas están y el flujo es valorable.  Gracias por tu esfuerzo es bastante... pero realmente no esta completo el código, falta que subas todas las modificaciones en clases colaterales... podrías intentar subir un diff de todo el mod  completo de tu pack y bueno ahí si que cada uno adapte... pero faltan muchas cosas, dudo que haya gente que lo haya echo funcionar con esto... 
    • I know people who have fully bypassed and reversed AAC. One day, they might even release the full source code, but for now, they’re still making money off it. I won’t name anyone, but it’s clear that there aren’t any truly solid anticheats for Lineage2. As I’ve said before, kernel level anticheats are the only real solution. Anything that runs as Internal and injects gets flagged, and your account ends up getting kicked or banned. That’s just how most games handle it nowadays. To TL;DR the whole thing cheating will always exist because there are people out there smart enough to bypass any protection and run private cheats. Public cheats are always detected eventually, so I don’t see any point in buying AAC, especially when they claim it blocks adr, which simply isn’t true.
    • 🌐 Website: https://l2adonis.com 📅 GRAND OPENING: July 18, 2025 – 20:00 (UTC+2) 💬 Discord: https://discord.com/invite/tZBj8JxAwx 🚫 No auto-farm • No auto-macro • No pay-to-win • No custom   Some Basic Info's (More detalied info's on website)  EXP/SP: x25  Adena: x15  Drop: x15  Spoil: x15  Seal Stones: x15  Raid Boss Drop: x10  Epic Boss Drop: x1  Manor: x10  Safe Enchant: +4  Max Enchant: +16  Normal Scroll Chance: 50%  Blessed Scroll Chance: 66% (If enchant fail item remain +4)  Buff Slots (30+4 extra with Divine Inspiration)  Dances/Songs Slots 14  Auto-learn skills  ⚔️ Real PvP • Real Progression • Retail-like experience JOIN NOW and relive the real L2 experience!
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchihamkt.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt
  • 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