Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2jFrozen_GameServer
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 1118)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy)
- @@ -107,10 +107,12 @@
- {
- for (final L2PcInstance member : player.getParty().getPartyMembers())
- {
- + SpecialReward(member, Config.COUNT_ITEM_REWARD / player.getParty().getPartyMembers().size());
- RaidBossPointsManager.addPoints(member, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
- }
- }
- else
- + SpecialReward(player, Config.COUNT_ITEM_REWARD);
- RaidBossPointsManager.addPoints(player, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
- }
- @@ -120,6 +122,21 @@
- return true;
- }
- + private void SpecialReward(L2PcInstance player, int countItemReward)
- + {
- + if (Config.ENABLE_CUSTOM_DROP_RB && getNpcId() == Config.ID_RB_CUSTOM_DROP && player.isInsideRadius(getX(), getY(), getZ(), 1200, false, false) && checkCountItemInventory(Config.ID_ITEM_REQUIRED, Config.COUNT_ITEM_REQUIRED, player))
- + {
- + player.getInventory().addItem("Reward", Config.ID_ITEM_REWARD, countItemReward, player, null);
- + player.getInventory().updateDatabase();
- + }
- + }
- + public boolean checkCountItemInventory(int item_id, int countRequired, L2PcInstance player)
- + {
- + final L2ItemInstance item = player.getInventory().getItemByItemId(item_id);
- + if (item == null) return false;
- + return item.getCount() >= countRequired ? player.destroyItemByItemId("Consumed", item_id, countRequired, player, false) : false;
- + }
- +
- /**
- * Spawn all minions at a regular interval Also if boss is too far from home location at the time of this check, teleport it home.
- */
- Index: config/head/boss.properties
- ===================================================================
- --- config/head/boss.properties (revision 1118)
- +++ config/head/boss.properties (working copy)
- @@ -217,4 +217,14 @@
- IntervalOfDoorOfAlter = 5400
- # Time of closing the doors of the altar after some one zashol.
- # The value in seconds in the interval 60-600
- -TimeOfLockUpDoorOfAltar = 180
- \ No newline at end of file
- +TimeOfLockUpDoorOfAltar = 180
- +
- +# Custom Drop Raid BOSS by João Vitor Barbosa
- +# Drop for party that kill Raid Boss
- +# Default = False
- +EnableCustomDropRB = True
- +IdRBCustomDrop = 25001
- +IdItemRequired = 57
- +CountItemRequired = 200
- +IdItemReward = 5072
- +CountItemReward = 500
- \ No newline at end of file
- Index: head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- head-src/com/l2jfrozen/Config.java (revision 1118)
- +++ head-src/com/l2jfrozen/Config.java (working copy)
- @@ -3807,6 +3807,13 @@
- public static String RAID_INFO_IDS;
- public static FastList<Integer> RAID_INFO_IDS_LIST = new FastList<>();
- + public static boolean ENABLE_CUSTOM_DROP_RB;
- + public static int ID_RB_CUSTOM_DROP;
- + public static int ID_ITEM_REQUIRED;
- + public static int COUNT_ITEM_REQUIRED;
- + public static int ID_ITEM_REWARD;
- + public static int COUNT_ITEM_REWARD;
- +
- // ============================================================
- public static void loadBossConfig()
- {
- @@ -3996,6 +4003,13 @@
- }
- HPH_TIMEOFLOCKUPDOOROFALTAR *= 6000;
- + ENABLE_CUSTOM_DROP_RB = Boolean.valueOf(bossSettings.getProperty("EnableCustomDropRB", "false"));
- + ID_RB_CUSTOM_DROP = Integer.parseInt(bossSettings.getProperty("IdRBCustomDrop", "25001"));
- + ID_ITEM_REQUIRED = Integer.parseInt(bossSettings.getProperty("IdItemRequired", "57"));
- + COUNT_ITEM_REQUIRED = Integer.parseInt(bossSettings.getProperty("CountItemRequired", "200"));
- + ID_ITEM_REWARD = Integer.parseInt(bossSettings.getProperty("IdItemReward", "5072"));
- + COUNT_ITEM_REWARD = Integer.parseInt(bossSettings.getProperty("CountItemReward", "500"));
- +
- }
- catch (final Exception e)
- {
Add Comment
Please, Sign In to add comment