Jump to content

[Share]Quake PvP System


Recommended Posts

Okey fine a made something but i don't know if it's really working because i didn't tested becuase i don't have a server on my laptop xD

This system is like on cs dota or w/e when you kill some ppl in a row it says Monster kill killing spree and balls

Now in this system when some1 kills in a row it is written in announcements

i don't know if it is already shared but if yes just delete my topic

the code is 100% mine so just don't tell me that i c/p

 

Okey we start

This is for last rev l2j CT3 but it can be made for other chronicles too

 

We go to model.actor.instance.l2pcinstance.java

 

press cntrl+f for seach and put parameters

private int _newbie;

after that insert this code

/**Quake System*/
private int quakeSystem = 0;

Alright now press again cntrl+f and search for

setPvpKills(getPvpKills() + 1);

after that insert this line

quakeSystem++;

Ok so in each pvp we add +1 quake point

 

not let's make the announce ments

 

After quakeSystem++;

leave one line and add this code

       switch(quakeSystem) {
       	case 4:
       		 Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
       		 break;
       	case 6:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
       		break;
       	case 8:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Killing Spree!");
       		break;
       	case 10:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Monster Kill!");
       		break;
       	case 12:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is Unstoppable!");
       		break;
       	case 14:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on an Ultra Kill!");
       		break;
       	case 16:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is Godlike");
       		break;
       	case 18:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is Wicked Sick!");
       		break;
       	case 20:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Ludricrous Kill!");
       		break;
       	case 24:
       		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");
       		 default:
       			 ;
       }

You can change it however you want

 

now go to final step

if player dies set his quake points 0

 

Again cntrl+f and search for

reviveRequest(this, null, false);

so it looks like

reviveRequest(this, null, false);

}

now here we add our new line and looks like that

		reviveRequest(this, null, false);
	}
	quakeSystem = 0;

And that's it

it's ready

Here a patch to apply easier way :D

### Eclipse Workspace Patch 1.0
#P L2J_CT3
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 3433)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -35,6 +35,7 @@
import javolution.util.FastMap;
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.GmListTable;
@@ -543,9 +544,13 @@
	/** Bitmask used to keep track of one-time/newbie quest rewards*/
	private int _newbie;

+	/**Quake System*/
+	private int quakeSystem = 0;
+	
	private boolean _noble = false;
	private boolean _hero = false;
-
+  
+	
	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2Npc _lastFolkNpc = null;

@@ -5410,6 +5415,7 @@
		{
			reviveRequest(this, null, false);
		}
+		quakeSystem = 0;
		return true;
	}

@@ -5621,6 +5627,42 @@
     {
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
+        quakeSystem++;
+        
+        switch(quakeSystem) {
+        	case 4:
+        		 Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
+        		 break;
+        	case 6:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
+        		break;
+        	case 8:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Killing Spree!");
+        		break;
+        	case 10:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Monster Kill!");
+        		break;
+        	case 12:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is Unstoppable!");
+        		break;
+        	case 14:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on an Ultra Kill!");
+        		break;
+        	case 16:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is Godlike");
+        		break;
+        	case 18:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is Wicked Sick!");
+        		break;
+        	case 20:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Ludricrous Kill!");
+        		break;
+        	case 24:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Holy Shit!");
+        		 default:
+        			 ;
+        }
+        

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));

For any bugs or if it is not working reply here

Link to comment
Share on other sites

wow.!i will feeling like playing Counter Strike 1.6!

thanks Maestro!

ye it should work when i see the code :]

i was going to do it ,but you are faster xD

btw nice simple way and a clean code.. gratz

hope you`ll get +1 for it :]

Nice Code but.... :) In the mass pvp?? (200 players etc)? ^^ 200 announce with names? xD

Amazing code!+1 by me.

 

Keep on Maestro ;)

Thanks for all the good comments and the karma guys ::)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



×
×
  • Create New...