L2JLisvus

Would you like to react to this message? Create an account in a few clicks or log in to continue.

2 posters

    Enchant Armor Effects By KallonE

    avatar
    kallone


    Posts : 73
    Join date : 2013-05-27
    Age : 32
    Location : http://l2destruction.com/

    Enchant Armor Effects By KallonE Empty Enchant Armor Effects By KallonE

    Post  kallone 15th April 2023, 00:10

    I decided to post this code for you who use L2JLisvus!
    Many people don't want to make it for previous summers, so decide to make it for you!!!

    Enchant Armor Effects By KallonE Effect10


    remembering that all parts of the set have to be +16


    Code:
    Index: java/net/sf/l2j/gameserver/model/Inventory.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/model/Inventory.java
    +++ java/net/sf/l2j/gameserver/model/Inventory.java
    @@ -364,6 +364,10 @@
                                _log.warning("Inventory.ArmorSetListener: Incorrect skill: "+armorSet.getShieldSkillId()+".");
                        }
                     }
    +                                                if (armorSet.isEnchanted16(player))
      +                                  {
        +                                    player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLAME);
          +                              }
                 }
              }
          public void notifyUnequiped(int slot, L2ItemInstance item)
           {
     +        if (!(getOwner() instanceof L2PcInstance))
      +            return;
    +
      +          L2PcInstance player = (L2PcInstance)getOwner();           
           
    if (remove)
                {
      +           player.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLAME);
                    if (removeSkillId1 != 0)




    Index: java/net/sf/l2j/gameserver/model/L2ArmorSet.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/model/L2ArmorSet.java
    +++ java/net/sf/l2j/gameserver/model/L2ArmorSet.java
    @@ -175,4 +175,32 @@
     
           return containAll(_chest,legs,head,gloves,feet);
          
       }
    +      
    +       public boolean isEnchanted16(L2PcInstance player)
    +       {
    +           // Player don't have full set
    +           if(!containAll(player))
    +               return false;
    +   
    +           Inventory inv = player.getInventory();
    +   
    +           L2ItemInstance chestItem  = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    +           L2ItemInstance legsItem  = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
    +           L2ItemInstance headItem  = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
    +           L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
    +           L2ItemInstance feetItem  = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
    +   
    +           if(chestItem.getEnchantLevel() < 16)
    +               return false;
    +           if(_legs != 0 && legsItem.getEnchantLevel() < 16)
    +               return false;
    +           if(_gloves != 0 && glovesItem.getEnchantLevel() < 16)
    +               return false;
    +           if(_head != 0 && headItem.getEnchantLevel() < 16)
    +               return false;
    +           if(_feet != 0 && feetItem.getEnchantLevel() < 16)
    +               return false;
    +   
    +           return true;
    +       }
       public boolean containAll(int chest, int legs, int head, int gloves, int feet)


    put these files inside the system:
    avatar
    speedwel


    Posts : 7
    Join date : 2020-08-04

    Enchant Armor Effects By KallonE Empty Re: Enchant Armor Effects By KallonE

    Post  speedwel 23rd April 2023, 21:51


    Did not work
    avatar
    kallone


    Posts : 73
    Join date : 2013-05-27
    Age : 32
    Location : http://l2destruction.com/

    Enchant Armor Effects By KallonE Empty Re: Enchant Armor Effects By KallonE

    Post  kallone 24th April 2023, 17:31

    speedwel wrote:
    Did not work

    show me the error please!


    put in Inventory.java {Import}


    import net.sf.l2j.gameserver.model.L2ArmorSet;

    Sponsored content


    Enchant Armor Effects By KallonE Empty Re: Enchant Armor Effects By KallonE

    Post  Sponsored content


      Current date/time is 19th May 2024, 12:23