Jump to content
  • 0

[Help] Quak System Alternative...


Question

Posted

Hello everyone i seach a quake ssytem update.

 

For example when i kill X player on speer i get this in the chat

 

+        	case 4:
+        		 Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
+        		 break;

 

I want a alternative.

 

When i dead in the chat i can see this

 

THE PLAYER (Player Kill me) stoped the rampage to (my character name) with (number kill i get before dead)

 

### 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));

 

Thanks you

Recommended Posts

  • 0
Posted

Still lazy :)

 

You must to create a table with spree variables

	quakeSystem = 0;
	if (quakeSystem > 1)
		Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);

  • 0
Posted

Yeh but if i want add more?

 

For example if the player get the

 

quake 4 and he dead before the quake 6, they will send in global chat

 

X  "The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem

 

and if the player is on Quake 6 before the next quake they will send in global chat

 

"The player "+target.getName()+ "stoped the Dominating to "+this.getName()+"with "+quakeSystem

  • 0
Posted

Ok if i understand i need change this

 

+        	case 4:
+        		 Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
+        		 break;
+        	case 6:
+        		Announcements.getInstance().announceToAll("" + this.getName()+ " is on a Rampage!");
+        		break;

 

by this

 

if (quakeSystem < 4)
Announcements.getInstance().announceToAll("" + this.getName()+ " is Dominating!");
else if (quakeSystem > 4 && quakeSystem < 6)
Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);

 

right no more line to add?

  • 0
Posted

Still lazy :)

 

You must to create a table with spree variables

	quakeSystem = 0;
	if (quakeSystem > 1)
		Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);

 

hey xAddytzu i didnt wanted to open new topic so i posted here. i tried what you said but take a look please.

 

{
        super.doRevive();
        updateEffectIcons();
        sendPacket(new EtcStatusUpdate(this));
        _reviveRequested = 0;
        _revivePower = 0;
        spreeKills = 0;
        quakeSystem = 0;
        if (quakeSystem > 1)
            Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);
        if (isInParty() && getParty().isInDimensionalRift())
        {
            if (!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
                getParty().getDimensionalRift().memberRessurected(this);
        }
    }

 

error:

[javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]             Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);
    [javac]                                                                     ^
    [javac] Note: C:\svneleos\L2JBrasil_CORE\java\com\it\br\gameserver\GeoEngine.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error

what am i doing wrong?

  • 0
Posted

hey xAddytzu i didnt wanted to open new topic so i posted here. i tried what you said but take a look please.

 

{
        super.doRevive();
        updateEffectIcons();
        sendPacket(new EtcStatusUpdate(this));
        _reviveRequested = 0;
        _revivePower = 0;
        spreeKills = 0;
        quakeSystem = 0;
        if (quakeSystem > 1)
            Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);
        if (isInParty() && getParty().isInDimensionalRift())
        {
            if (!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
                getParty().getDimensionalRift().memberRessurected(this);
        }
    }

 

error:

[javac] symbol  : variable target
    [javac] location: class com.it.br.gameserver.model.actor.instance.L2PcInstance
    [javac]             Announcements.getInstance().announceToAll("The player "+target.getName()+ "stoped the rampage to "+this.getName()+"with "+quakeSystem);
    [javac]                                                                     ^
    [javac] Note: C:\svneleos\L2JBrasil_CORE\java\com\it\br\gameserver\GeoEngine.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error

what am i doing wrong?

It's wrong. I will post later, brb :D

  • 0
Posted

Create the method getSpreeKills

public int getSpreeKills()

{

return spreeKills;

}

@@

spreeKills++;

for (L2PcInstance player : L2World.getInstance().getAllPlayers())

{

+ if(target.getSpreeKills() > 4)

+ player.sendPacket(new CreatureSay(0, Say2.PARTYROOM_COMMANDER, "", "The player "+getName()+ "stoped the rampage to "+target.getName()+" with "+target.getSpreeKills()));

 

switch(spreeKills)

{

 

 

brb :D I have to go.

  • 0
Posted

this is wring right :/ cause i get error

quakeSystem++;
           spreeKills++;
        for (L2PcInstance player : L2World.getInstance().getAllPlayers())
        {
            if(target.getSpreeKills() > 4)
               player.sendPacket(new CreatureSay(0, Say2.PARTYROOM_COMMANDER, "", "The player "+getName()+ "stoped the rampage to "+target.getName()+" with "+target.getSpreeKills()));

        switch(quakeSystem) {

  • 0
Posted

this is wring right :/ cause i get error

quakeSystem++;
           spreeKills++;
        for (L2PcInstance player : L2World.getInstance().getAllPlayers())
        {
            if(target.getSpreeKills() > 4)
               player.sendPacket(new CreatureSay(0, Say2.PARTYROOM_COMMANDER, "", "The player "+getName()+ "stoped the rampage to "+target.getName()+" with "+target.getSpreeKills()));

        switch(quakeSystem) {

lol`ed

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


  • Posts

    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away!   @Atom @Celestine
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away! @Celestine @Atom
  • 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