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?

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
Reply to this topic...

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


  • Posts

    • [GR]se trollari o giannakis agorina moy ? sto paizei admin k psaronis ?[GR]
    • Introducing the Payment System Script for Your Lineage 2 Gaming Website This script provides automated integration of popular payment systems (PayPal, Stripe, Morune, Freekassa, Betatransfer, Primepayments) with the Lineage 2 server to process in-game purchases. Its primary features include secure payment processing, user data verification, fraud protection, and automatic allocation of in-game items. Key Features: Support for Popular Payment Systems: The script supports integration with PayPal, Stripe, Morune, Freekassa, Betatransfer, and Primepayments, offering flexibility in choosing a provider. Server Configuration: Multi-Server Support: Users can select the target server from the list of available servers (e.g., Server 1, Server 2) to ensure the transaction is routed to the correct destination. Transaction Personalization: A character name input field allows identifying the recipient of the items in the game, reducing the risk of allocation errors. Flexible Amount Input: The amount input field lets users specify the desired quantity of items within set limits (e.g., from 1 to 10,000). Item Allocation to items_delayed: Upon successful payment processing, items are credited to the items_delayed table, from which players can retrieve them via the game interface. (Customization available for servers using character_items, items, or item_delivery tables.) Universal Webhook URL: To configure webhooks in the payment system, specify the path to the webhook.php file on your site. This path is universal for all payment systems. Example: https://yoursite.com/webhook.php The script will automatically process data received from the payment system. Security and Fraud Protection: Built-in protection against SQL injections through secure data handling. Validation of payment data via the selected payment system's API. Logging of operations to monitor suspicious activities. Customizable Design: The script can be easily tailored to fit your website's design. Price: $120 Note: The list of supported payment systems will be expanded based on demand and feedback. Feedback:  Telegram Discord This script is your all-in-one solution for integrating payment systems seamlessly into your Lineage 2 gaming website.  
    • Introducing the Payment System Script for Your Lineage 2 Gaming Website This script provides automated integration of popular payment systems (PayPal, Stripe, Morune, Freekassa, Betatransfer, Primepayments) with the Lineage 2 server to process in-game purchases. Its primary features include secure payment processing, user data verification, fraud protection, and automatic allocation of in-game items. Key Features: Support for Popular Payment Systems: The script supports integration with PayPal, Stripe, Morune, Freekassa, Betatransfer, and Primepayments, offering flexibility in choosing a provider. Server Configuration: Multi-Server Support: Users can select the target server from the list of available servers (e.g., Server 1, Server 2) to ensure the transaction is routed to the correct destination. Transaction Personalization: A character name input field allows identifying the recipient of the items in the game, reducing the risk of allocation errors. Flexible Amount Input: The amount input field lets users specify the desired quantity of items within set limits (e.g., from 1 to 10,000). Item Allocation to items_delayed: Upon successful payment processing, items are credited to the items_delayed table, from which players can retrieve them via the game interface. (Customization available for servers using character_items, items, or item_delivery tables.) Universal Webhook URL: To configure webhooks in the payment system, specify the path to the webhook.php file on your site. This path is universal for all payment systems. Example: https://yoursite.com/webhook.php The script will automatically process data received from the payment system. Security and Fraud Protection: Built-in protection against SQL injections through secure data handling. Validation of payment data via the selected payment system's API. Logging of operations to monitor suspicious activities. Customizable Design: The script can be easily tailored to fit your website's design. Price: $120 Note: The list of supported payment systems will be expanded based on demand and feedback. Feedback:  Telegram Discord This script is your all-in-one solution for integrating payment systems seamlessly into your Lineage 2 gaming website.  
  • Topics

×
×
  • Create New...