Jump to content

Recommended Posts

Posted

if someone kill the some character more than 1 time dont take pvp point

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

      // Check if it's pvp

	String attacker = getClient().getConnection().getInetAddress().getHostAddress();
	String attacked = targetPlayer.getClient().getConnection().getInetAddress().getHostAddress();

	if (attacker.equals(attacked))
	{
		sendMessage("What you though? You cannot use dumb exploit's NOOB!");
		return;
	}
	if (
			(
					checkIfPvP(target) &&            //   Can pvp and
					targetPlayer.getPvpFlag() != 0   //   Target player has pvp flag set
			) ||                                     // or
			(
					isInsideZone(ZONE_PVP) &&         		 //   Player is inside pvp zone and
					targetPlayer.isInsideZone(ZONE_PVP) 	 //   Target player is inside pvp zone
			)
	)
	{
            increasePvpKills();
	}
	else                                                                        // Target player doesn't have pvp flag set
	{
            // check about wars
            if (targetPlayer.getClan() != null && getClan() != null)
            {
                if (getClan().isAtWarWith(targetPlayer.getClanId()))
                {
                    if (targetPlayer.getClan().isAtWarWith(getClanId()))
                    {
                        // 'Both way war' -> 'PvP Kill'
                        increasePvpKills();
                        return;
                    }
                }
            }
            
            // 'No war' or 'One way war' -> 'Normal PK'
    		if (attacker.equals(attacked))
    		{
    			sendMessage("What you though? You cannot use dumb exploit's NOOB!");
    			return;
    		}
            else if (targetPlayer.getKarma() > 0)                                        // Target player has karma
		{
			if ( Config.KARMA_AWARD_PK_KILL )
			{
                    increasePvpKills();
			}
		}
		else if (targetPlayer.getPvpFlag() == 0)                                                                    // Target player doesn't have karma
		{
			if (attacker.equals(attacked))
			{
				sendMessage("What you though? You cannot use dumb exploit's NOOB!");
				return;
			}

Osiris Code

Posted

if someone kill the some character more than 1 time dont take pvp point (lol)

well for faction server's it may be good (propablY)

but for the boting pvp protection you can make something else like :

if someone try to increase his pvp point's from the SAME IP ADDRESS

      // Check if it's pvp

	String attacker = getClient().getConnection().getInetAddress().getHostAddress();
	String attacked = targetPlayer.getClient().getConnection().getInetAddress().getHostAddress();

	if (attacker.equals(attacked))
	{
		sendMessage("What you though? You cannot use dumb exploit's NOOB!");
		return;
	}
	if (
			(
					checkIfPvP(target) &&            //   Can pvp and
					targetPlayer.getPvpFlag() != 0   //   Target player has pvp flag set
			) ||                                     // or
			(
					isInsideZone(ZONE_PVP) &&         		 //   Player is inside pvp zone and
					targetPlayer.isInsideZone(ZONE_PVP) 	 //   Target player is inside pvp zone
			)
	)
	{
           increasePvpKills();
	}
	else                                                                        // Target player doesn't have pvp flag set
	{
           // check about wars
           if (targetPlayer.getClan() != null && getClan() != null)
           {
               if (getClan().isAtWarWith(targetPlayer.getClanId()))
               {
                   if (targetPlayer.getClan().isAtWarWith(getClanId()))
                   {
                       // 'Both way war' -> 'PvP Kill'
                       increasePvpKills();
                       return;
                   }
               }
           }
           
           // 'No war' or 'One way war' -> 'Normal PK'
   		if (attacker.equals(attacked))
   		{
   			sendMessage("What you though? You cannot use dumb exploit's NOOB!");
   			return;
   		}
           else if (targetPlayer.getKarma() > 0)                                        // Target player has karma
		{
			if ( Config.KARMA_AWARD_PK_KILL )
			{
                   increasePvpKills();
			}
		}
		else if (targetPlayer.getPvpFlag() == 0)                                                                    // Target player doesn't have karma
		{
			if (attacker.equals(attacked))
			{
				sendMessage("What you though? You cannot use dumb exploit's NOOB!");
				return;
			}

this is the protection for same IP w/e and your's it's correct

Posted

if someone kill the some character more than 1 time dont take pvp point (lol)

well for faction server's it may be good (propablY)

but for the boting pvp protection you can make something else like :

if someone try to increase his pvp point's from the SAME IP ADDRESS

       // Check if it's pvp

	String attacker = getClient().getConnection().getInetAddress().getHostAddress();
	String attacked = targetPlayer.getClient().getConnection().getInetAddress().getHostAddress();

	if (attacker.equals(attacked))
	{
		sendMessage("What you though? You cannot use dumb exploit's NOOB!");
		return;
	}
	if (
			(
					checkIfPvP(target) &&            //   Can pvp and
					targetPlayer.getPvpFlag() != 0   //   Target player has pvp flag set
			) ||                                     // or
			(
					isInsideZone(ZONE_PVP) &&         		 //   Player is inside pvp zone and
					targetPlayer.isInsideZone(ZONE_PVP) 	 //   Target player is inside pvp zone
			)
	)
	{
            increasePvpKills();
	}
	else                                                                        // Target player doesn't have pvp flag set
	{
            // check about wars
            if (targetPlayer.getClan() != null && getClan() != null)
            {
                if (getClan().isAtWarWith(targetPlayer.getClanId()))
                {
                    if (targetPlayer.getClan().isAtWarWith(getClanId()))
                    {
                        // 'Both way war' -> 'PvP Kill'
                        increasePvpKills();
                        return;
                    }
                }
            }
            
            // 'No war' or 'One way war' -> 'Normal PK'
    		if (attacker.equals(attacked))
    		{
    			sendMessage("What you though? You cannot use dumb exploit's NOOB!");
    			return;
    		}
            else if (targetPlayer.getKarma() > 0)                                        // Target player has karma
		{
			if ( Config.KARMA_AWARD_PK_KILL )
			{
                    increasePvpKills();
			}
		}
		else if (targetPlayer.getPvpFlag() == 0)                                                                    // Target player doesn't have karma
		{
			if (attacker.equals(attacked))
			{
				sendMessage("What you though? You cannot use dumb exploit's NOOB!");
				return;
			}

this is the protection for same IP w/e and your's it's correct

lolz0r is so hard to understand the code? the code means you cant take pvp if you kill more than 1 time the some character not from the some ip....
Posted

same ip protection in big servers highly increase the network traffic...conclusion not a good idea to have it

I had it on dw and there was no problem.

Posted

lolz0r is so hard to understand the code? the code means you cant take pvp if you kill more than 1 time the some character not from the some ip....

but for the boting pvp protection you can make something else like :

if someone try to increase his pvp point's from the SAME IP ADDRESS

 

First of all learn to read Second start to learn English understood Mr. Krashito?

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

    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Yes, just keep this post=)
  • 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