Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gameserver/model/actor/L2Attackable.java
- if (item != null)
- {
- // Check if the autoLoot mode is active
- if ((isRaid() && Config.AUTO_LOOT_RAID) || (!isRaid() && Config.AUTO_LOOT))
- + if (Arrays.binarySearch(Config.AUTO_LOOT_LIST_EXCLUDE_ITEMS, item.getId()) >= 0)
- + dropItem(player, item); // drop the item on the ground
- + else
- player.doAutoLoot(this, item); // Give this or these Item(s) to the L2PcInstance that has killed the L2Attackable
- else
- dropItem(player, item); // drop the item on the ground
- // Broadcast message if RaidBoss was defeated
- if (isRaid() && !isRaidMinion())
- broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DIED_DROPPED_S3_S2).addCharName(this).addItemName(item.getId()).addNumber(item.getCount()));
- }
- /////////////////////////////////////////////////////////////////////////////////////////
- Config.java
- /** Auto-loot */
- public static boolean AUTO_LOOT;
- +public static String AUTO_LOOT_EXCLUDE_ITEMS;
- +public static int[] AUTO_LOOT_LIST_EXCLUDE_ITEMS;
- public static boolean AUTO_LOOT_HERBS;
- public static boolean AUTO_LOOT_RAID;
- AUTO_LOOT = server.getProperty("AutoLoot", false);
- +AUTO_LOOT_EXCLUDE_ITEMS = server.getProperty("AutoLootExcludeItems", "1341,1342,1343,1344,1345");
- +array = AUTO_LOOT_EXCLUDE_ITEMS.split(",");
- +AUTO_LOOT_LIST_EXCLUDE_ITEMS = new int[array.length];
- +for (int i = 0; i < array.length; i++)
- +AUTO_LOOT_LIST_EXCLUDE_ITEMS[i] = Integer.parseInt(array[i]);
- +// sorting so binarySearch can be used later
- +Arrays.sort(AUTO_LOOT_LIST_EXCLUDE_ITEMS);
- /////////////////////////////////////////////////////////////////////////////////////////
- config/server.properties
- # Items ID Cannot Auto Picked
- # Arrows IDS = 1341,1342,1343,1344,1345
- AutoLootExcludeItems = 1341,1342,1343,1344,1345,1047,1048,1049,1050,1051,\
- 1052,1053,1054,1055,1056,1057,1058,1059,1095,1096,\
- 1097,1098,1099,1150,1151,1152,1400,1401,1402,1403,\
- 1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,\
- 1414,1415,1416,1417,1418,1512,1513,1514,1515,1516,\
- 1517,1667,1668,1669,1670,1671,3039,3040,3041,3042,\
- 3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,\
- 3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,\
- 3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,\
- 3073,3074,3075,3076,3077,3078,3079,3080,3081,3082,\
- 3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,\
- 3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,\
- 3429,3430,3431,3432,3941,3942,3944,4200,4201,4203,\
- 4206,4207,4208,4906,4907,4908,4909,4910,4911,4912,\
- 4913,4914,4916,4917,4918,4919,4920,4922,4923,4924,\
- 4928,4929,4930,4931,4932,4933,4934,4935,5809,5810,\
- 5811,5812,5813,5814,5815,5816,7638,7639,7640,7641,\
- 7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,\
- 7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,\
- 7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,\
- 1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,\
- 1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,\
- 1856,3103,3104,3105,3106,3107,3108,3109,3110,3111,\
- 3112,3113,3114,3115,3116,3117,3118,4204,4205,4925,\
- 4926,4927,6350,6351,6395,6396,6397
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement