Jump to content

Question

Posted

Καλησπέρα, ψάχνω για ένα pvp protection σαν του l2jfrozen.

 

Κάπως έτσι,

 

#====================================
# Anti Farm System
#====================================
# You must put True to active the AntiFarm mod.
AntiFarmEnabled = False
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm for Party, IP, Clan and Ally.
AntiFarmParty = False
AntiFarmIP = False
AntiFarmClanAlly = False
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has level < AntiFarmMaxLvlDiff.
AntiFarmLvlDiff = False
AntiFarmMaxLvlDiff = 30
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has Pdef < AntiFarmMaxPdefDiff.
AntiFarmPdefDiff = False
AntiFarmMaxPdefDiff = 300
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has Patk < AntiFarmMaxPatkDiff.
AntiFarmPatkDiff = False
AntiFarmMaxPatkDiff = 300

 

Ψάχνω κάτι παρόμοιο για aCis, ευχαριστώ!

9 answers to this question

Recommended Posts

  • 0
Posted

  private boolean checkAntiFarm(L2PcInstance targetPlayer){

        if(Config.ANTI_FARM_ENABLED){

            //Anti FARM Clan - Ally
            if(Config.ANTI_FARM_CLAN_ALLY_ENABLED && (getClanId() > 0 && targetPlayer.getClanId() > 0 && getClanId() == targetPlayer.getClanId()) || (getAllyId() > 0 && targetPlayer.getAllyId() > 0 && getAllyId() == targetPlayer.getAllyId()))
            {
                this.sendMessage("Farm is punishable with Ban! Gm informed.");
                _log.warning("PVP POINT FARM ATTEMPT, " + this.getName() + " and " + targetPlayer.getName() +". CLAN or ALLY.");
                return false;
            }

            //Anti FARM level player < 40
            if(Config.ANTI_FARM_LVL_DIFF_ENABLED && targetPlayer.getLevel() < Config.ANTI_FARM_MAX_LVL_DIFF)
            {
                this.sendMessage("Farm is punishable with Ban! Don't kill new players! Gm informed.");
                _log.warning("PVP POINT FARM ATTEMPT, " + this.getName() + " and " + targetPlayer.getName() +". LVL DIFF.");
                return false;
            }

            //Anti FARM pdef < 300
            if(Config.ANTI_FARM_PDEF_DIFF_ENABLED && targetPlayer.getPDef(targetPlayer) < Config.ANTI_FARM_MAX_PDEF_DIFF)
            {
                this.sendMessage("Farm is punishable with Ban! Gm informed.");
                _log.warning("PVP POINT FARM ATTEMPT, " + this.getName() + " and " + targetPlayer.getName() +". MAX PDEF DIFF.");
                return false;
            }

            //Anti FARM p atk < 300
            if(Config.ANTI_FARM_PATK_DIFF_ENABLED && targetPlayer.getPAtk(targetPlayer) < Config.ANTI_FARM_MAX_PATK_DIFF)
            {
                this.sendMessage("Farm is punishable with Ban! Gm informed.");
                _log.warning("PVP POINT FARM ATTEMPT, " + this.getName() + " and " + targetPlayer.getName() +". MAX PATK DIFF.");
                return false;
            }

            //Anti FARM Party
            if(Config.ANTI_FARM_PARTY_ENABLED && this.getParty() != null
                    && targetPlayer.getParty() != null
                    && this.getParty().equals(targetPlayer.getParty()))
            {
                this.sendMessage("Farm is punishable with Ban! Gm informed.");
                _log.warning("PVP POINT FARM ATTEMPT, " + this.getName() + " and " + targetPlayer.getName() +". SAME PARTY.");
                return false;
            }

            //Anti FARM same Ip
            if(Config.ANTI_FARM_IP_ENABLED){

               if(this.getClient() != null && targetPlayer.getClient() != null)
               {
                 String ip1 = this.getClient().getConnection().getInetAddress().getHostAddress();
                 String ip2 = targetPlayer.getClient().getConnection().getInetAddress().getHostAddress();

                 if (ip1.equals(ip2))
                 {
                 this.sendMessage("Farm is punishable with Ban! Gm informed.");
                 _log.warning("PVP POINT FARM ATTEMPT: " + this.getName() + " and " + targetPlayer.getName() +". SAME IP.");
                 return false;
                 }
               }
            }
            return true;
        }
        return true;
    }

 

χρειάζεται να πάρω κάτι άλλο από άλλο αρχείο ή μόνο τα configs και είναι εντάξει?

  • 0
Posted

den paizh na einai mono afta logika...

kane search sta source ph me ta config h antifeed

ξέρω, απλά βαριέμαι να κάνω checkout :p
  • 0
Posted

exw ena alla einai xoris config an to thes pes moy.

απλά πες μου πια αρχεία χρησιμοποιεί ο κώδικας.

 

μόνο l2pcinstance?

  • 0
Posted

σε όλο το l2jfrozen έχει μόνο τις γραμμές του l2pcinstance + config.

 

άρα είμαι okay, μπορείτε να κλειδώσετε!

 

ευχαριστώ, όσους βοήθησαν.

Guest
This topic is now closed to further replies.


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