Jump to content

Question

Posted

Hi, I would like to handle a buffer an ACIS 382 rev as far as I know db best pack.
Code: https: //maxcheaters.com/topic/223485-npc-player-buffer-acis/#comment-2688248
The problem is not found in the PlayerBuffer.java file
import net.sf.l2j.gameserver.data.BufferTable;
import net.sf.l2j.gameserver.model.actor.ai.CtrlIntention;
😞
Does not find much fragment in the code.

PlayerBuffer.java file

Quote

@Override
   public void onAction(Player player)
   {
       if (this != player.getTarget())
       {
           player.setTarget(this);
           player.sendPacket(new MyTargetSelected(getObjectId(), 0));
           player.sendPacket(new ValidateLocation(this));
       }
       else
       {
           if (!canInteract(player))
               player.getAI().setIntention(CtrlIntention.INTERACT, this);
           else
           {

if (player.getInventory().getInventoryItemCount(Config.PVOTE_BUFF_ITEM_ID, 0) >= 1)
               {
                   player.getInventory().destroyItemByItemId("VoteCoins", Config.PVOTE_BUFF_ITEM_ID, 1, player, null);
                   player.getInventory().updateDatabase();
                   player.sendPacket(new ItemList(player, true));
                   player.sendMessage(1 + " Vote eye destroyed.");
               }
               else
               {
                   player.sendMessage("You dont have enough (" + 1 + ") vote item for buff.");
                   return;
               }
           }
           
           if (votebuff != null)
           {
               if (player.getInventory().getInventoryItemCount(Config.PVOTE_BUFF_ITEM_ID, 0) >= Config.PVOTE_BUFF_ITEM_COUNT)
               {
                   player.getInventory().destroyItemByItemId("VoteCoins", Config.PVOTE_BUFF_ITEM_ID, Config.PVOTE_BUFF_ITEM_COUNT, player, null);
                   player.getInventory().updateDatabase();
                   player.sendPacket(new ItemList(player, true));
                   player.sendMessage(Config.PVOTE_BUFF_ITEM_COUNT + " vote stone destroyed.");
               }
               else
               {
                   player.sendMessage("You dont have enough (" + Config.PVOTE_BUFF_ITEM_COUNT + ") vote item for buff.");
                   return;
               }
           }

Where everything is written in red in capital letters. Config.java file

Quote

 PBUFFER_MAX_SCHEMES = players.getProperty("BufferMaxSchemesPerChar", 4);
               PBUFFER_MAX_SKILLS = players.getProperty("BufferMaxSkillsPerScheme", 24);
               PBUFFER_STATIC_BUFF_COST = players.getProperty("BufferStaticCostPerBuff", -1);
               PBUFFER_BUFFS = players.getProperty("BufferBuffs");
               
               PFIGHTER_SET = players.getProperty("FighterSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
               PMAGE_SET = players.getProperty("MageSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
               
               String[] FighterList = PFIGHTER_SET.split(",");
               PFIGHTER_SET_LIST = new int[FighterList.length];
               for (int i = 0; i < FighterList.length; i++)
                   PFIGHTER_SET_LIST[i] = Integer.parseInt(FighterList[i]);
               
               String[] MageList = PMAGE_SET.split(",");
               PMAGE_SET_LIST = new int[MageList.length];
               for (int i = 0; i < MageList.length; i++)
                   PMAGE_SET_LIST[i] = Integer.parseInt(MageList[i]);
               
               PBUFFER_BUFFLIST = new HashMap<>();
               for (String skillInfo : PBUFFER_BUFFS.split(";"))
               {
                   final String[] infos = skillInfo.split(",");
                   PBUFFER_BUFFLIST.put(Integer.valueOf(infos[0]), new BuffSkillHolder(Integer.valueOf(infos[0]), Integer.valueOf(infos[1]), infos[2], skillInfo));
               }
               
               PRESTRICT_USE_BUFFER_ON_PVPFLAG = players.getProperty("RestrictUseBufferOnPvPFlag", true);
               PRESTRICT_USE_BUFFER_IN_COMBAT = players.getProperty("RestrictUseBufferInCombat", true);
               
               PVOTE_BUFF_ITEM_ID = players.getProperty("VoteBuffItemId", 57);
               PVOTE_BUFF_ITEM_COUNT = players.getProperty("VoteBuffItemCount", 1);
               
               PFIGHTER_SKILL_LIST = new ArrayList<>();
               for (String skill_id : players.getProperty("FighterSkillList", "").split(";"))
                   PFIGHTER_SKILL_LIST.add(Integer.parseInt(skill_id));
               
               PMAGE_SKILL_LIST = new ArrayList<>();
               for (String skill_id : players.getProperty("MageSkillList", "").split(";"))
                   PMAGE_SKILL_LIST.add(Integer.parseInt(skill_id));
        

 

 

1 answer to this question

Recommended Posts

  • 0
Posted

that is because you are using different acis versions , that buffer was shared on another acis version your version is more updated" .. anyway i think you can adapt it if you need help leave your discord here

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...