Jump to content
  • 0

Java problem..


Bleadd

Question

Hello everybody

 

Before all, i use aCis rev 185

I make some restrictions about pvp like these modifications :

 

public void onKillUpdatePvPKarma(L2Character target)

{

 

if (target == null) return;

if (!(target instanceof L2Playable)) return;

 

L2PcInstance targetPlayer = target.getActingPlayer();

L2PcInstance targetp = (L2PcInstance)getTarget();

    String ip = getClient().getConnection().getInetAddress().getHostAddress();

    String ip2 = targetPlayer.getClient().getConnection().getInetAddress().getHostAddress();

 

if (targetPlayer == null) return;                                          // Target player is null

if (targetPlayer == this) return;                                          // Target player is self

 

if (isCursedWeaponEquipped())

{

CursedWeaponsManager.getInstance().increaseKills(_cursedWeaponEquippedId);

return;

}

 

// If in duel and you kill (only can kill l2summon), do nothing

if (isInDuel() && targetPlayer.isInDuel()) return;

 

        // If in Arena, do nothing

if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))

return;

 

        // Check if it's pvp

if ((checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 && (ip != ip2) && (getParty() != targetPlayer.getParty()) && (getClanId() != targetPlayer.getClanId()))

|| (isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))

&& (ip != ip2)

&& (getParty() != targetPlayer.getParty())

&& (getClanId() != targetPlayer.getClanId()))

            increasePvpKills();

// Target player doesn't have pvp flag set

else

{

// check about wars

if (targetPlayer.getClan() != null && getClan() != null

&& getClan().isAtWarWith(targetPlayer.getClanId())

&& targetPlayer.getClan().isAtWarWith(getClanId())

&& targetPlayer.getPledgeType() != L2Clan.SUBUNIT_ACADEMY

&& getPledgeType() != L2Clan.SUBUNIT_ACADEMY

&& (ip != ip2)

&& (getParty() != targetPlayer.getParty())

&& (getClanId() != targetPlayer.getClanId()))

{

// 'Both way war' -> 'PvP Kill'

increasePvpKills();

}

 

            // 'No war' or 'One way war' -> 'Normal PK'

            if (targetPlayer.getKarma() > 0)

{

if (Config.KARMA_AWARD_PK_KILL && (ip != ip2) && (getParty() != targetPlayer.getParty()) && (getClanId() != targetPlayer.getClanId()))

                    increasePvpKills();

}

else if (targetPlayer.getPvpFlag() == 0)

                increasePkKillsAndKarma(targetPlayer.getLevel());

}

}

 

But when restriction aren't respected (so when players are in party, or same ip, or same clan), anti feed work. But when all restriction are respected, i don't get any pvp points .. Why?

 

Cordially,

Gara

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

if ((checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 && (ip != ip2) && (getParty() != targetPlayer.getParty()) && (getClanId() != targetPlayer.getClanId()))

            || (isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))

              && (ip != ip2)

              && (getParty() != targetPlayer.getParty())

              && (getClanId() != targetPlayer.getClanId()))

 

this is all false.. you dont need it on check pvp ..

Link to comment
Share on other sites

  • 0

sorry for double post but try this is more easy to add and effective.

 

  private void addItemReword(L2PcInstance targetPlayer)
  {
+
+
+	    //Anti feed Clan - Ally
+        if((getClanId() > 0 && targetPlayer.getClanId() > 0 && getClanId() == targetPlayer.getClanId()) || (getAllyId() > 0 && targetPlayer.getAllyId() > 0 && getAllyId() == targetPlayer.getAllyId()))
+        {
+        this.sendMessage("You are not allowed to farm pvp/pk points!");
+         _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and" + targetPlayer.getName() +". CLAN or ALLY.");
+        return;
+        }
+
+        //Anti Feed if player is under level 40
+        if(targetPlayer.getLevel() < 40)
+        {
+        this.sendMessage("You are not allowed to farm pvp/pk points!");
+        _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and" + targetPlayer.getName() +". NEWBIE PG.");
+        return;
+        }
+
+        //Anti Feed on Party   
+        if(this.getParty() != null && targetPlayer.getParty() != null)
+        {
+          if(this.getParty().equals(targetPlayer.getParty()))
+          {
+           this.sendMessage("Farm is punishable with Ban! Don't kill your party!");
+           _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and" + targetPlayer.getName() +". PARTY.");
+           return;
+          }        
+        }
+
+        //Anti Feed Same IP 
+        String ip1 = this.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress();
+        String ip2 = targetPlayer.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress();
+
+        if (ip1.equals(ip2))
+        {
+        this.sendMessage("Farm is punishable with Ban! Don't kill your party!");
+        _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and " + targetPlayer.getName() +". SAME IP.");
+        return;
+        }
+		
+	

credits to akken on gp paradise topic

Link to comment
Share on other sites

  • 0

And where i call addItemReword(targetPlayer); ?

 

Edit : i've found the solution, i'm waiting a friend, to see the pvp with different ip. For the moment, antifeed work.

Link to comment
Share on other sites

  • 0

And where i call addItemReword(targetPlayer); ?

 

Edit : i've found the solution, i'm waiting a friend, to see the pvp with different ip. For the moment, antifeed work.

 

on my pack i had additemreword , so possibility is to find by you own the possition , anyway ok

Link to comment
Share on other sites

  • 0

My antifeed work.

 

I had remplace all increasepvpkills(); by addItemReword(TargetPlayer);

 

And at the end of AddItemReword class, i add increasepvpkillst();

 

Works fine, can lock.

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.



  • Posts

    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: Our cheat for Valorant is the best and safest solution for this game. The cheat supports all the most necessary functions such as aimbot. We also support esp, since our esp (visual) is not displayed in screenshots or videos, for example when streaming. Therefore, we cannot be detected by the Riot Vanguard anti-cheat. We offer you the best value for money cheats on the market for this game. SUPPORTED ANTI-CHEATS: (read more on official website) - Riot Vanguard AC: Undetected & Safe Our Valorant cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Bone (Head, Neck, Body, Arms, Stomach) - Customizable Smooth - Customizable Fov Size / Fov Circle - Anti Shake Aim - Aimkey - Auto Shot - RCS ESP: - ESP Players - Player Corpse - Player Box - Filled Box - Line ESP - Player Skeleton - Player Health - Distance ESP MISC: - Online config - No Recoil - Radar (A Separate Radar that shows locations of the enemies) REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: Yes - Supported game modes: Windowed, Borderless - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website. SCREENSHOTS: - Check on official website.
    • Welcome to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 60.99 $ 2016 Discord Account : 10.50 $ 2017 Discord Account :4.99 $ 2018 Discord Account : 3.99 $ 2019 Discord Account : 2.99 $ 2020 Discord Account :1.99$ 2021 Discord Account :1.50$ 2022 Discord Account :0.99$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
    • WTS valakas-antharas-zaken-baium-qa on x1 l2 reborn. A better price will be made if u choose to purchace all of it. Middleman @PUFA   NOTE: dont even bother to pm me if u only want 1 epic.the minimum trade will be anth+valakas+baium or anth+valakas.or 1 dragon+baium.      
    • I'm trying to change some skills but I can't open the l2ini with the l2pe
  • Topics

×
×
  • Create New...