While Adding This Code to my Server PvP Kills are no more added It should only disable same Ip/clan-party/summon kills/level difference but i doesn't count the other kills that do not violate anything Btw i am using acis
Added: a brand-new default dashboard template.
You can now add multiple game/login server builds.
Full support for running both PTS & L2J servers simultaneously, with switching between them.
Payment systems: added OmegaPay and Pally (new PayPal-style API).
Account history now stores everything: donations, items delivered to characters, referrals, transfers between game accounts, and coin transfers to another master account.
Personal Promo Code System: you can create a promo code and assign it to a user or promoter. When donating, a player can enter this promo code to receive bonus coins, and the promo code owner also receives a bonus — all fully configurable in the admin panel.
Look demo site: demo
MoMoProxy has updated more static residential proxies for USA location, anyone interested in can view: https://momoproxy.com/static-residential-proxies
Question
mikemaster
While Adding This Code to my Server PvP Kills are no more added
It should only disable same Ip/clan-party/summon kills/level difference but i doesn't count the other kills that do not violate anything
Btw i am using acis
// 'Both way war' -> 'PvP Kill' - increasePvpKills(targetPlayer); + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } return; } @@ -4419,13 +4594,65 @@ if (targetPlayer.getKarma() > 0) { if (Config.KARMA_AWARD_PK_KILL) - increasePvpKills(targetPlayer); + { + if (addPvp((L2Playable)target)) + { + increasePvpKills(targetPlayer); + } + } } else if (targetPlayer.getPvpFlag() == 0) increasePkKillsAndKarma(targetPlayer.getLevel()); } } + private boolean addPvp(L2Playable vp) + { + if (!Config.ANTI_FARM_ENALBED) + { + return true; + } + + if (Config.ANTI_FARM_SUMMON && vp instanceof L2Summon) + { + return false; + } + + L2PcInstance v = (L2PcInstance)vp; + + if (Config.ANTI_FARM_PARTY && v.getParty() == getParty()) + { + return false; + } + + if (Config.ANTI_FARM_CLAN_ALLY && (v.getClan() == getClan() || v.getAllyId() == getAllyId())) + { + return false; + } + + if (Config.ANTI_FARM_IP && v.getClient().getConnection().getInetAddress().getHostAddress() == getClient().getConnection().getInetAddress().getHostAddress()) + { + return false; + } + + if (Config.ANTI_FARM_LVL_DIFF && (v.getLevel()-getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF || getLevel()-v.getLevel() >= Config.ANTI_FARM_MAX_LVL_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PATK_DIFF && (v.getStat().getPAtk(null)-getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF || getStat().getPAtk(null)-v.getStat().getPAtk(null) >= Config.ANTI_FARM_MAX_PATK_DIFF)) + { + return false; + } + + if (Config.ANTI_FARM_PDEF_DIFF && (v.getStat().getPDef(null)-getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF || getStat().getPDef(null)-v.getStat().getPDef(null) >= Config.ANTI_FARM_MAX_PDEF_DIFF)) + { + return false; + } + + return true; + }0 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now