CostyKiller

Prevent full inventory

Dec 3rd, 2020
622
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java
  2. ===================================================================
  3. --- dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java   (revision 7857)
  4. +++ dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java   (working copy)
  5. @@ -20,6 +20,7 @@
  6.  import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  7.  import org.l2jmobius.gameserver.model.clan.ClanPrivilege;
  8.  import org.l2jmobius.gameserver.model.holders.SkillHolder;
  9. +import org.l2jmobius.gameserver.network.SystemMessageId;
  10.  import org.l2jmobius.gameserver.network.clientpackets.RequestAcquireSkill;
  11.  
  12.  import ai.AbstractNpcAI;
  13. @@ -146,6 +147,11 @@
  14.                     htmltext = "courtmagician-06.html";
  15.                     break;
  16.                 }
  17. +               if (player.getInventory().getSize() == player.getInventoryLimit())
  18. +               {
  19. +                   player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_FULL);
  20. +                   break;
  21. +               }
  22.                
  23.                 final int categoryChance = getRandom(100);
  24.                 if (categoryChance <= 5)
  25.  
RAW Paste Data