Jump to content
  • 0

Question

Posted

I wanted to ask if anyone know the code/place for the next thing.

character "Dex" has killed 3 times there will be an Announce: Dex is domnating.

Dex has killed 6times there will be announce : Dex is Unstoppable.!

and more.. if anyone can help please do it!!

"Announcement ,not any other chat".

7 answers to this question

Recommended Posts

  • 0
Posted

Just add how much case's you want in the same way, just change the number. Number = how much pvp you need in a row to announce a spree.

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 224)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -35,6 +35,7 @@
import javolution.util.FastSet;
import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.GameTimeController;
import net.sf.l2j.gameserver.GeoData;
import net.sf.l2j.gameserver.ItemsAutoDestroy;
@@ -4525,6 +4526,8 @@
		if (is-beep-ted())
			stopFeed();

+		spreeKills = 0;
+		
		synchronized (this)
		{
			if (isFakeDeath())
@@ -4783,8 +4786,38 @@
      * Increase the pvp kills count and send the info to the player
      *
      */
+	private int spreeKills = 0;
+	
     public void increasePvpKills()
     {
+    	spreeKills++;
+    	
+    	switch(spreeKills)
+    	{
+    	case 1:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has drawn the first blood!");
+    		break;
+    		
+    	case 2:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has scored a double kill!");
+    		break;
+    		
+    	case 3:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has scored a triple kill!");
+    		break;
+    		
+    	default:
+    		;
+    	}
+    	
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);

  • 0
Posted

SweeTs, your example doesn't reset number when you die (it should) :P.

 

Yeah, you're right*, I forgot about spreeKills = 0; in doDie() :P

 

Here you go fixed code:

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 224)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -35,6 +35,7 @@
import javolution.util.FastSet;
import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.GameTimeController;
import net.sf.l2j.gameserver.GeoData;
import net.sf.l2j.gameserver.ItemsAutoDestroy;
@@ -4525,6 +4526,8 @@
		if (is-beep-ted())
			stopFeed();

+		spreeKills = 0;
+		
		synchronized (this)
		{
			if (isFakeDeath())
@@ -4783,8 +4786,38 @@
      * Increase the pvp kills count and send the info to the player
      *
      */
+	private int spreeKills = 0;
+	
     public void increasePvpKills()
     {
+    	spreeKills++;
+    	
+    	switch(spreeKills)
+    	{
+    	case 1:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has drawn the first blood!");
+    		break;
+    		
+    	case 2:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has scored a double kill!");
+    		break;
+    		
+    	case 3:
+    		Announcements.getInstance().announceToAll("" + this.getName()+ " has scored a triple kill!");
+    		break;
+    		
+    	default:
+    		;
+    	}
+    	
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);

 

* - like always, damn Falcon's eye :D

  • 0
Posted

can u code it to post "after 3 kills $player is Dominating

after 6 kills "player is Unstoppable

after 9 kills "Player is GodLike? please!

 

Ummm, just change mine code (case 1: => case 3:, case2: => case 6: and so on..) and change the text, it's not hard.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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