L2JLisvus

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

3 posters

    COIN AIO BUFFER

    avatar
    natan55


    Posts : 7
    Join date : 2021-04-04

    COIN AIO BUFFER Empty COIN AIO BUFFER

    Post  natan55 12th May 2022, 15:32

    Would it be possible to add some kind of currency to turn the character into AIO Buffer?

    thank you all !
    SCRASH0
    SCRASH0


    Posts : 203
    Join date : 2019-03-07

    COIN AIO BUFFER Empty Re: COIN AIO BUFFER

    Post  SCRASH0 26th July 2022, 01:01

    natan55 wrote:Would it be possible to add some kind of currency to turn the character into AIO Buffer?

    thank you all !

    yes i did it on my server, for both aiox and vip.


    however, you will have to have at least an understanding of basic java.
    because you will have to add the code to the code that already exists in the project to implement in the project.
    because you will have to put the aio to gain skill and Dual aio.
    and protection for the mayor not to leave the cities.
    avatar
    kallone


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

    COIN AIO BUFFER Empty Re: COIN AIO BUFFER

    Post  kallone 31st July 2023, 17:42

    natan55 wrote:Would it be possible to add some kind of currency to turn the character into AIO Buffer?

    thank you all !

    package net.sf.l2j.gameserver.handler.itemhandlers;
    new: NobleCustomItem.java
    Code:
    // www.l2destruction.com
    // 75x
    // www.l2destruction.com
    // Source File Name:   NobleCustomItem.java

    package net.sf.l2j.gameserver.handler.itemhandlers;

    import net.sf.l2j.Config;
    import net.sf.l2j.gameserver.datatables.CharNameTable;
    import net.sf.l2j.gameserver.handler.IItemHandler;
    import net.sf.l2j.gameserver.model.L2ItemInstance;
    import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
    import net.sf.l2j.gameserver.model.base.Experience;
    import net.sf.l2j.gameserver.network.serverpackets.SocialAction;

    public class AioCustomItem
        implements IItemHandler
    {

        public AioCustomItem()
        {
        }

        @Override
     public void useItem(L2PlayableInstance playable, L2ItemInstance item)
        {
         if (Config.AIO_BUFFER_NAME_PREFIX != null)
     {
         playable.setName(Config.AIO_BUFFER_NAME_PREFIX + playable.getName());
     
     }
     // Restore
         playable.setCurrentCp(playable.getMaxCp());
         playable.setCurrentHp(playable.getMaxHp());
         playable.setCurrentMp(playable.getMaxMp());
            if(Config.AIO_CUSTOM_ITEMS)
            {
                if(!(playable instanceof L2PcInstance))
                    return;
                L2PcInstance activeChar = (L2PcInstance)playable;
                if(activeChar.isAIOBuffer())
                {
                    activeChar.sendMessage("You Are Already A *AIO*!.");
                } else
                {
                    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));
                    activeChar.setIsAIOBuffer(true);
                    // Set level to maximum if needed
                 long pXp = activeChar.getExp();
             long tXp = Experience.LEVEL[Config.MAX_PLAYER_LEVEL];
             if (pXp < tXp)
             {
             activeChar.addExpAndSp(tXp - pXp, 0);
             }      
                    activeChar.sendMessage("You Are Now a *AIO*,You Are Granted With *AIO* Status , And *AIO* Skills.");
                    activeChar.broadcastUserInfo();
                    playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
                }
            }
        }

        @Override
     public int[] getItemIds()
        {
            return ITEM_IDS;
        }

        private static final int ITEM_IDS[] = { Config.AIO_COIN_ID1};

    }


    go to package net.sf.l2j.gameserver.handler;

    ItemHandler.java

    Code:
    public void load()
     {
     +registerItemHandler(new NobleCustomItem());

    open config.java
    Code:
       +/** Properties ini for L2Destruction Noblesse Item By  KallonE */
       +public static final String AIOITEM = "./config/CustomMods/AioItem.ini";

    +
                        +// Aio item
                             +Properties AioItem = new Properties();
                             +try (InputStream is = new FileInputStream(new File(AIOITEM)))
                             +{
                             +   AioItem.load(is);
                             +}
                             +catch (Exception e)
                             +{
                             +   e.printStackTrace();
                             +   throw new Error("Failed to Load " + AIOITEM + " File.");
                             +}
                             +
                             +AIO_CUSTOM_ITEMS = Boolean.parseBoolean(AioItem.getProperty("EnableAioCustomItem", "true"));
                             +AIO_COIN_ID1 = Integer.parseInt(AioItem.getProperty("AioCoin", "7840"));






       +/** *AIO* Item L2Destruction KallonE */
       +public static boolean    AIO_CUSTOM_ITEMS;
       +public static int AIO_COIN_ID1;




    go to gameserver\config\CustomMods and creat AioItem.ini


    and put these codes


    +#============================================================#
    +# Custom Aio Item Configuration L2Destruction #
    +#============================================================#
    +# Aio Custom Item Configuration.
    +AioCoin = 7860
    +# When ActiveChar will use this item will gain Aio Status.
    +EnableAioCustomItem = True





    SCRASH0 likes this post


    Sponsored content


    COIN AIO BUFFER Empty Re: COIN AIO BUFFER

    Post  Sponsored content


      Current date/time is 7th May 2024, 05:59