[Share] Prevent Adena Destroying when adena is more than 2.1bil

Results 1 to 17 of 17
  1. #1
    Account Upgraded | Title Enabled! kost is offline
    MemberRank
    Jun 2006 Join Date
    GreeceLocation
    1,175Posts

    [Share] Prevent Adena Destroying when adena is more than 2.1bil

    Here is a fix that when player's adena get 2.1kkk he gets a message and he cant get more adena. Works on all addAdena operations

    This is not mine im just resharing it


    Code:
    Index: E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (revision 280)
    +++ E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (working copy)
    @@ -2316,25 +2316,37 @@
                 sm.addNumber(count);
                 sendPacket(sm);
             }
    -
    +       
             if (count > 0)
    +           
             {
    +            if (_inventory.getAdena()+count>=2100000000)
    +            {
    +           
    +            sendPacket(new SystemMessage(SystemMessage.SLOTS_FULL));
    +            return;
    +            }
    +            else if (_inventory.getAdena()+count<2100000000)
    +            {
                 _inventory.addAdena(process, count, this, reference);
    -
    +           
                 // Send update packet
    -
                 if (!Config.FORCE_INVENTORY_UPDATE)
    -            {
    +                {
                     InventoryUpdate iu = new InventoryUpdate();
                     iu.addItem(_inventory.getAdenaInstance());
                     sendPacket(iu);
    +               
    +                }
                 }
    +           
                 else sendPacket(new ItemList(this, false));
    +           
             }
     
         }


  2. #2
    Gamma Droppo is offline
    MemberRank
    Jul 2004 Join Date
    ElmoreLocation
    3,051Posts
    Sweet... testing it right now... Thnxs for the share

    Droppo.-

  3. #3
    Account Upgraded | Title Enabled! terminator23 is offline
    MemberRank
    Aug 2006 Join Date
    BrazilLocation
    351Posts
    thx kost!

  4. #4
    Account Upgraded | Title Enabled! kost is offline
    MemberRank
    Jun 2006 Join Date
    GreeceLocation
    1,175Posts
    no problem. let me know if its working i havent tested it

  5. #5
    Member nospec is offline
    MemberRank
    Oct 2006 Join Date
    69Posts
    Quote Originally Posted by kost15237 View Post
    Here is a fix that when player's adena get 2.1kkk he gets a message and he cant get more adena. Works on all addAdena operations

    This is not mine im just resharing it


    Code:
    Index: E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (revision 280)
    +++ E:/L2JC_source/L2J-free_GameServer_c5/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (working copy)
    @@ -2316,25 +2316,37 @@
                 sm.addNumber(count);
                 sendPacket(sm);
             }
    -
    +       
             if (count > 0)
    +           
             {
    +            if (_inventory.getAdena()+count>=2100000000)
    +            {
    +           
    +            sendPacket(new SystemMessage(SystemMessage.SLOTS_FULL));
    +            return;
    +            }
    +            else if (_inventory.getAdena()+count<2100000000)
    +            {
                 _inventory.addAdena(process, count, this, reference);
    -
    +           
                 // Send update packet
    -
                 if (!Config.FORCE_INVENTORY_UPDATE)
    -            {
    +                {
                     InventoryUpdate iu = new InventoryUpdate();
                     iu.addItem(_inventory.getAdenaInstance());
                     sendPacket(iu);
    +               
    +                }
                 }
    +           
                 else sendPacket(new ItemList(this, false));
    +           
             }
     
         }

    can u tell me where i must edit all of this thing ? in what file ? in what folder ? coz i didn't really understand, thx...

  6. #6
    Account Upgraded | Title Enabled! terminator23 is offline
    MemberRank
    Aug 2006 Join Date
    BrazilLocation
    351Posts
    Quote Originally Posted by nospec View Post
    can u tell me where i must edit all of this thing ? in what file ? in what folder ? coz i didn't really understand, thx...
    the local is gameserver/src/main/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

  7. #7
    Alpha Member evill33t is offline
    MemberRank
    Sep 2005 Join Date
    /int/Location
    2,603Posts
    i know this patch from somewhere ... -.-

  8. #8
    Enthusiast polbat02 is offline
    MemberRank
    May 2006 Join Date
    SpainLocation
    28Posts
    just like any other good share in this forum... it all comes from the same place XDD

  9. #9
    Apprentice Vaness11 is offline
    MemberRank
    Sep 2005 Join Date
    Russia - MSKLocation
    24Posts
    Quote Originally Posted by evill33t View Post
    i know this patch from somewhere ... -.-
    yeah...

  10. #10
    Account Upgraded | Title Enabled! xXPanteRXx is offline
    MemberRank
    Jan 2006 Join Date
    Spain - Canary IslandsLocation
    482Posts
    Quote Originally Posted by evill33t View Post
    i know this patch from somewhere ... -.-
    I Like your spams.

  11. #11
    Account Upgraded | Title Enabled! kost is offline
    MemberRank
    Jun 2006 Join Date
    GreeceLocation
    1,175Posts
    this patch is from l2j-free.. i put red letters to let you know :S

  12. #12
    Alpha Member George is offline
    MemberRank
    May 2006 Join Date
    2,159Posts
    Quote Originally Posted by evill33t View Post
    i know this patch from somewhere ... -.-
    *cough* L2J-free *cough*

  13. #13
    Alpha Member evill33t is offline
    MemberRank
    Sep 2005 Join Date
    /int/Location
    2,603Posts
    patch is by vaness11

    and with my post count i dont think you can call me spamming ^^

  14. #14
    Account Upgraded | Title Enabled! xXPanteRXx is offline
    MemberRank
    Jan 2006 Join Date
    Spain - Canary IslandsLocation
    482Posts
    Quote Originally Posted by evill33t View Post
    patch is by vaness11

    and with my post count i dont think you can call me spamming ^^
    i see, you dont know whats a spam

  15. #15
    Account Upgraded | Title Enabled! EzEraL is offline
    MemberRank
    Dec 2006 Join Date
    Greece,AthensLocation
    606Posts
    Good share i tested but you must give some credits i think

  16. #16
    Valued Member Entrophy002 is offline
    MemberRank
    Jan 2006 Join Date
    I love L2EMULocation
    140Posts
    Sweet... thank

  17. #17
    Account Upgraded | Title Enabled! terminator23 is offline
    MemberRank
    Aug 2006 Join Date
    BrazilLocation
    351Posts
    omg

    the l2npcinstance is big a lot

    o0

    somebody can specify the part where I places this?

    please i need help



Advertisement