Jump to content

IoNuTzU01

Members
  • Posts

    31
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by IoNuTzU01

  1. I try and is same.. Pvp no bug,no reward pvp point. Pk bug in dual box work reward pk point.
  2. This is My L2PcInstance.java : http://pastebin.com/aAzVv0TV I forgot to say i Use L2jAcis Rev 315
  3. Ok i will give now : public class AntiFeedManager { public static final int GAME_ID = 0; final Map<Integer,Long> _lastDeathTimes; private final TIntObjectHashMap<Map<Integer, Connections>> _eventIPs; public static final AntiFeedManager getInstance() { return SingletonHolder._instance; } protected AntiFeedManager() { _lastDeathTimes = new ConcurrentHashMap<>(); _eventIPs = new TIntObjectHashMap<>(); } /** * Set time of the last player's death to current * @param objectId Player's objectId */ public final void setLastDeathTime(int objectId) { _lastDeathTimes.put(objectId, System.currentTimeMillis()); ThreadPoolManager.getInstance().scheduleGeneral(new DeleteDeathTime(objectId), 120000); } private class DeleteDeathTime implements Runnable { int id; public DeleteDeathTime(int objectId) { id = objectId; } @Override public void run() { _lastDeathTimes.remove(id); } } /** * Check if current kill should be counted as non-feeded. * @param attacker Attacker character * @param target Target character * @return True if kill is non-feeded. */ public final boolean check(L2Character attacker, L2Character target) { if (!Config.ANTIFEED_ENABLE) return true; if (target == null) return false; final L2PcInstance targetPlayer = target.getActingPlayer(); if (targetPlayer == null) return false; if (Config.ANTIFEED_INTERVAL > 0 && _lastDeathTimes.containsKey(targetPlayer.getObjectId())) return (System.currentTimeMillis() - _lastDeathTimes.get(targetPlayer.getObjectId())) > Config.ANTIFEED_INTERVAL; if (Config.ANTIFEED_DUALBOX && attacker != null) { final L2PcInstance attackerPlayer = attacker.getActingPlayer(); if (attackerPlayer == null) return false; final L2GameClient targetClient = targetPlayer.getClient(); final L2GameClient attackerClient = attackerPlayer.getClient(); if (targetClient == null || attackerClient == null || targetClient.isDetached() || attackerClient.isDetached()) // unable to check ip address return !Config.ANTIFEED_DISCONNECTED_AS_DUALBOX; return !targetClient.getConnection().getInetAddress().equals(attackerClient.getConnection().getInetAddress()); } return true; } /** * Clears all timestamps */ public final void clear() { _lastDeathTimes.clear(); } /** * Register new event for dualbox check. * Should be called only once. * @param eventId */ public final void registerEvent(int eventId) { if (!_eventIPs.containsKey(eventId)) _eventIPs.put(eventId, new HashMap<Integer, Connections>()); } /** * Decreasing number of active connection from player's IP address * @param eventId * @param player * @return true if success and false if any problem detected. */ public final boolean removePlayer(int eventId, L2PcInstance player) { final L2GameClient client = player.getClient(); if (client == null) return false; // unable to determine IP address final Map<Integer, Connections> event = _eventIPs.get(eventId); if (event == null) return false; // no such event registered final Integer addrHash = Integer.valueOf(client.getConnection().getInetAddress().hashCode()); Connections conns = event.get(addrHash); if (conns == null) return false; // address not registered synchronized (event) { if (conns.testAndDecrement()) event.remove(addrHash); } return true; } /** * Remove player connection IP address from all registered events lists. * @param client */ public final void onDisconnect(L2GameClient client) { if (client == null) return; final Integer addrHash = Integer.valueOf(client.getConnection().getInetAddress().hashCode()); _eventIPs.forEachValue(new DisconnectProcedure(addrHash)); } /** * Clear all entries for this eventId. * @param eventId */ public final void clear(int eventId) { final Map<Integer, Connections> event = _eventIPs.get(eventId); if (event != null) event.clear(); } protected static final class Connections { private int _num = 0; /** * and false if maximum number is reached. * @param max * @return true if successfully incremented number of connections */ public final synchronized boolean testAndIncrement(int max) { if (_num < max) { _num++; return true; } return false; } /** * @return true if all connections are removed */ public final synchronized boolean testAndDecrement() { if (_num > 0) _num--; return _num == 0; } } private static final class DisconnectProcedure implements TObjectProcedure<Map<Integer, Connections>> { private final Integer _addrHash; public DisconnectProcedure(Integer addrHash) { _addrHash = addrHash; }
  4. I don't add only this text in my config i add completly code and work perfect... but only pk have bug i say not and pvp
  5. I add this code on my config: # ================================================================ # Anti feed protection # ================================================================ # This option will enable antifeed for pvp/pk/clanrep points AntiFeedEnable = True # If set to True, kills from dualbox will not increase pvp/pk points # and clan reputation will not be transferred AntiFeedDualbox = False # If set to True, server will count disconnected (unable to determine ip address) # as dualbox AntiFeedDisconnectedAsDualbox = False # If character died faster than timeout - pvp/pk points for killer will not increase # and clan reputation will not be transferred AntiFeedInterval = 120 In dual box i try and pvp not work so i don't give pvp point but at pk is the bug when i make pk in dual box i take pk point. So where is the problem? Please help me.
  6. 1.Pet not give XP 2.Enchant Skill problem.Example:When i enchant +2 on Power Spoil Festival and i use say me atack failed.
  7. I use L2Gold Trance pack and i have this problem with multiplicate items and multiskill.
  8. Need Anti Phx java code for items and multiskill.
  9. Look for L2jAcis New Code Topzone/Hopzone Vote Reward!!!
  10. Yes it work Tnk's,But i have 1 problem does not occur how much ++ is on Npc.
  11. I need a Donation Npc with Donate Coin. Example : For +16 weapon required donate coin,but i can't make to give from a ingredient a weapons/armors ++. This is all,Help me Tnk's.
  12. And in multisell? Like this : <!-- Arcana Mace - Acumen --> <item id="1"> <ingredient id="57" count="80000000"/> <production id="6608" count="1" enchant="5"/> </item>
  13. Look for Enchanted Items At Shop L2j Acis Java Code.
×
×
  • Create New...