Jump to content
  • 0

java code help


kokkinidisjim

Question

pedia dn ksero ama ginete alla thelo enan java code

1)otan pernoun pvp 3 fores to idio atoma sinexomena na min pernoune pvp ke pk

2)otan pernoune char p ine sto idio id na min pernoune pvp/pk

ginete ??? ty :P

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

1)Αυτό εδώ είναι,όταν ένας χώσει τον ίδιον πάνω από μία φορά δεν παίρνει pvp,τώρα εάν το θές για τρείς φορές,πειραξέτο λίγο.(φυσικά εάν ξέρεις).

Index: src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 7252)
+++ src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -731,7 +731,9 @@
     private boolean _IsWearingFormalWear = false;

	// Current force buff this caster is casting to a target
-	protected ForceBuff _forceBuff;    
+	protected ForceBuff _forceBuff;   
+
+	private int _lastKillerId = 0;
     
     /** Skill casting information (used to queue when several skills are cast in a short time) **/
     public class SkillDat
@@ -4498,7 +4500,8 @@
				)
		)
		{
-            increasePvpKills();
+			if (targetPlayer.getLastKillerId() != getObjectId())
+				increasePvpKills();
             // give faction pvp points
             if (Config.FACTION_ENABLED
                 && targetPlayer.getSide() != getSide()
@@ -4533,7 +4536,8 @@
             if (clanWarKill)
             {
                 // 'Both way war' -> 'PvP Kill' 
-                increasePvpKills();
+            	if (targetPlayer.getLastKillerId() != getObjectId())
+            		increasePvpKills();
                 return;
             }
             
@@ -4550,6 +4554,7 @@
                 increasePkKillsAndKarma(targetPlayer.getLevel());
			}
		}
+		targetPlayer.setLastKillerId(getObjectId());
     }
     
     /**
@@ -11194,4 +11199,14 @@
	public void updateFOSTitleFlag(){
		FortressSiege.setTitleSiegeFlags(this);
	}
+
+	public final int getLastKillerId()
+	{
+		return _lastKillerId;
+	}
+
+	public final void setLastKillerId(int id)
+	{
+		_lastKillerId = id;
+	}
}

Credits:Savormix

Link to comment
Share on other sites

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
Answer this question...

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

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