Jump to content

Nefer

Members
  • Posts

    183
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Nefer

  1. 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.");
                    }
    		}
    	}
    }

  2. can u make a code for vips too? to not get dc/remove the weapon if he have an overenchanted item. Because theres a phx code that can give u the enchant level that u want (for example 19) if server max is +19 and i want for vips only to wear these weapons. Max enchant rate=16 and for vips +19. if i change the code to

     

    if (item.isEquipable())
    		{
    
    
    +			 if (!activeChar.isGM() && item.getEnchantLevel(19) > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel(8) > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel(8) > Config.ENCHANT_MAX_JEWELRY)
    +             {				
    +                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
    +                    activeChar.closeNetConnection();
    +                    return;
    +             }

    Then normal players that can use phx will get a +19 weapon without dc.

     

    Is vip an Event?

     

    I don't know this event, but i can do an exaple with TvT Event:

     

    if (!TvTEvent.startFight() || !TvTEvent.startParticipation())
    			{	
    
    			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
                 {				
                        activeChar.sendMessage("You have been kicked for using an item overenchanted!");
                        activeChar.closeNetConnection();
                        return;
                 }
    			}
    

     

    Do you want know this?

  3. Yes all credits to me :)

     

     

    Update!

     

    Add this in gameserver.network.clientpackets.UseItem.java

    if (item.isEquipable())
    		{
    
    
    +			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
    +             {				
    +                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
    +                    activeChar.closeNetConnection();
    +                    return;
    +             }
    

     

     

     

    This Update is very important because with this new code if a player creates an item overenchanted and not log out, he will be kicked if he equips the Item, and when he re logs he will be jailed, kikked ecc ecc... ;)

     

     

     

    Bye

  4. Hi boys,

     

    I don't post most in this Forum, but is very good and i decided to post a little fix that can be very very usefull.

     

    Maybe other people are post this fix, but i didn't see it.

     

    This is my fix:

     

    In Enterworld.java

     

    add all this:

     

    (Update 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.");
                    }
    		}
    	}
    }
    

     

    Update!

     

    Add this in gameserver.network.clientpackets.UseItem.java

    if (item.isEquipable())
    		{
    
    
    +			 if (!activeChar.isGM() && item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON || item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR || item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY)
    +             {				
    +                    activeChar.sendMessage("You have been kicked for using an item overenchanted!");
    +                    activeChar.closeNetConnection();
    +                    return;
    +             }
    

     

    This is simple code but very good.

     

    If a player (not gm) logs in the server with item enchanted over the Max enchant, he will be kicked, the item over enchanted will be deleted and he will put in Jail for 1.200 minutes.

     

    Update!

     

    This Update is very important because with this new code if a player creates an item overenchanted and not log out, he will be kicked if he equips the Item, and when he re logs he will be jailed, kikked ecc ecc... ;)

     

    Sry for my english :D

     

    Ps: All Credits to me  :-*

     

     

    Bye

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