Jump to content

[Share]OverEnchant Fix! (Anti-Hacker)


Nefer

Recommended Posts

You forgot pets, pets got enchant level too and it's pretty high.

 

If you use it you'll ban many innocent people.

 

False, but for security...

 

add :

 

if (i.isEquipable())

 

for (L2ItemInstance i : activeChar.getInventory().getItems())
	{
		if (!activeChar.isGM())
		{	
if (i.isEquipable())
{
		   if (i.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || i.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || i.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
		   {
			//Delete Item Over enchanted
			activeChar.getInventory().destroyItem(null, i, activeChar, null);
			//Message to Player
                                activeChar.sendMessage("[server]:You have Items over enchanted you will be kikked!");
			//If Audit is only a Kick, with this the player goes in Jail for 1.200 minutes
			activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1200);
                                //Punishment e log in audit
			Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " have item Overenchanted ", Config.DEFAULT_PUNISH);
                        //Log in console
			_log.info("#### ATTENCTION ####");
			_log.info(i+" item has been removed from player.");
                }
		}
	}
}

Link to comment
Share on other sites

I am not wrong, i tried it on my server and the system started banning people with striders.

 

I figured it out and fixed it. Well, i'm using interlude so, i don't know if it's the same on other clients too.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
Guest
This topic is now closed to further replies.



×
×
  • Create New...