- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
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.
Question
mikemaster
i use acis interlude pack revision 310 and while i am trying to add this code:
// '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; + }i get errors in these sections
Edited by mikemasterpublic boolean addPvp(L2Playable vp) -----> illegal modifier for the variable addPvp; only final is permitted
and the method addPvp(L2Playable vp) is undefined for the type L2PcInstance
5 answers to this question
Recommended Posts