Jump to content

Recommended Posts

Posted

 

                                                              PVP REWARD

 

 

In this code i want to add an extra line with //Dont reward if target kill time < 240 sec.. with simlpy words

if char1 kills char2 second time  before 240 seconds have passed he get no reward...i pay 10 eyros for that line

via paypal after pm me ..and if someone give this for free the 10 eyros will go to forum as donation!!!The code

must be tested l2j hi5.

 

 

 

==========================================================================================================

2)  Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

    ===================================================================

    --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (revision 4425)

    +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (working copy)

    @@ -5790,7 +5790,7 @@

                            targetPlayer.isInsideZone(ZONE_PVP)      //  Target player is inside pvp zone

                    )

            )

    -          increasePvpKills(target);

    +          increasePvpKills(targetPlayer);

            else

                // Target player doesn't have pvp flag set

            {

    @@ -5802,7 +5802,7 @@

                        && getPledgeType() != L2Clan.SUBUNIT_ACADEMY)

                {

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

    -              increasePvpKills(target);

    +              increasePvpKills(targetPlayer);

                    return;

                }

             

    @@ -5810,7 +5810,7 @@

                if (targetPlayer.getKarma() > 0)                                  // Target player has karma

                {

                    if (Config.KARMA_AWARD_PK_KILL)

    -                  increasePvpKills(target);

    +                  increasePvpKills(targetPlayer);

                }

                else if (targetPlayer.getPvpFlag() == 0)                    // Target player doesn't have karma

                {

    @@ -5825,17 +5825,79 @@

        * Increase the pvp kills count and send the info to the player

        *

        */

    -  public void increasePvpKills(L2Character target)

    +  public void increasePvpKills(L2PcInstance target)

        {

            if (target instanceof L2PcInstance

                    && AntiFeedManager.getInstance().check(this, target))

            {

                // Add karma to attacker and increase its PK counter

                setPvpKills(getPvpKills() + 1);

    -         

    +

                // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter

                sendPacket(new UserInfo(this));

                sendPacket(new ExBrExtraUserInfo(this));

    +         

    +          //Dont reward if same clan

    +          if(getClan() != null && target.getClan() != null && getClan() == target.getClan())

    +         

    +              {

    +              return;

    +              }

    +             

    +          //Dont reward if same alliance

    +          if(getAllyId() > 0 && target.getAllyId() > 0 && getAllyId() == target.getAllyId())

    +         

    +              {

    +              return;

    +              }

    +             

    +          //Dont reward if target level < 76

    +          if(target.getLevel() < 76)

    +         

    +              {

    +              return;

    +              }

    +             

    +          //Dont reward if pdef < 500

    +          if(target.getPDef(getLockedTarget()) < 500)

    +         

    +              {

    +              return;

    +              }

    +             

    +         

    +             

    +          //Dont reward if same party 

    +          if(this.getParty() != null && target.getParty() != null)

    +         

    +              {

    +              if(this.getParty().equals(target.getParty()))

    +             

    +                  {

    +                  return;

    +                  }

    +                 

    +              }

    +             

    +          //Dont reward if same ip

    +          String ip1 = this.getClient().getConnection().getInetAddress().getHostAddress();

    +          String ip2 = target.getClient().getConnection().getInetAddress().getHostAddress();

    +             

    +          if (ip1.equals(ip2))

    +         

    +              {

    +              return;

    +              }

    +                 

    +          //Reward every PvP win

    +          addItem("Loot", 4037, 1, this, true);

            }

        }

Posted

Lol it's already coded in your pack...

                                                                  if (target instanceof L2PcInstance

                    && AntiFeedManager.getInstance().check(this, target))

 

l2jmods.properties -> control + F -> AntiFeedInterval

Posted

yes you are right ...well am new in hi5 and i speak with many devs about this before i make this topic and nobody knew it...so reward goes to forum ..locked

Posted

yes you are right ...well am new in hi5 and i speak with many devs about this before i make this topic and nobody knew it...so reward goes to forum ..locked

 

kk

 

done.

Guest
This topic is now closed to further replies.


  • Posts

    • There is a ready-made option and the possibility to work according to "Wishlist"
    • Contact me, Discord: xbaus
    • WTB GRACIA FINAL INTERFACE
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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