Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java
- ===================================================================
- --- D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 1004)
- +++ D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy)
- @@ -25,6 +25,7 @@
- import com.l2jfrozen.gameserver.model.L2Summon;
- import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
- import com.l2jfrozen.gameserver.network.SystemMessageId;
- +import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
- import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
- import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
- import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
- @@ -87,24 +87,60 @@
- if(player != null)
- {
- + // RaidBoss auto noble START
- + if (Config.ALLOW_AUTO_NOBLESS_FROM_BOSS)
- + {
- + if (getNpcId() == Config.BOSS_ID) //Barakiel as default.
- + {
- + if (player.getParty() != null)
- + {
- + for (L2PcInstance member : player.getParty().getPartyMembers())
- + {
- + if (member.isNoble() == true)
- + {
- + member.sendMessage("["+Config.SERVER_NAME+"]:" + "Your party gained nobless status for defeating " + getName() + "!");
- + }
- + else
- + {
- + if (member.isInsideRadius(getX(), getY(), getZ(), Config.RADIUS_TO_RAID, false, false)) //to prevent exploit
- + {
- + member.setNoble(true);
- + member.sendMessage("["+Config.SERVER_NAME+"]:" + "You and your party gained nobless status for defeating " + getName() + "!");
- + member.broadcastPacket(new SocialAction(member.getObjectId(), 16)); //Special effect or all!
- + }
- + else
- + member.sendMessage("["+Config.SERVER_NAME+"]:" + "Your party killed " + getName() + "! But you were to far away and earned nothing...");
- + }
- + }
- + }
- + else if ((player.getParty() == null) && (player.isNoble() == false))
- + {
- + player.setNoble(true);
- + player.sendMessage("["+Config.SERVER_NAME+"]:" + "You gained nobless status for defeating " + getName() + "!");
- + player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
- + }
- + }
- + }
- + // RaidBoss auto noble END
- SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);
- broadcastPacket(msg);
- msg = null;
- Index: D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/Config.java (revision 1004)
- +++ D:/L2 Olympiad/Servas/Absolute/head-src/com/l2jfrozen/Config.java (working copy)
- public static String PVP2_CUSTOM_MESSAGE;
- + //============================================================
- + /* Auto Nobless FROM BOSS */
- + public static int BOSS_ID; // Barakiel retail like
- + public static boolean ALLOW_AUTO_NOBLESS_FROM_BOSS;
- + public static String SERVER_NAME;
- + public static int RADIUS_TO_RAID;
- + // ============================================================
- public static void loadL2JFrozenConfig()
- @@ -2517,8 +2550,12 @@
- PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
- + /* Auto Nobless FROM BOSS */
- + ALLOW_AUTO_NOBLESS_FROM_BOSS = Boolean.valueOf(L2JFrozenSettings.getProperty("AllowAutoNoblessFromBoss", "True"));
- + BOSS_ID = Integer.parseInt(L2JFrozenSettings.getProperty("BossId", "25325")); //Barakiel retail like
- + RADIUS_TO_RAID = Integer.parseInt(L2JFrozenSettings.getProperty("RadiusToRaid", "1000"));
- + SERVER_NAME = L2JFrozenSettings.getProperty("ServerName", "L2-Frozen");
- }
- catch(Exception e)
- ===================================================================
- gameserver\config\functions\l2jfrozen.properties
- PvP2CustomMeesage = You have been teleported to PvP Zone 2!
- + # ----------------------------------------------
- + # Auto Nobless from RaidBoss -
- + # ----------------------------------------------
- +
- + # Allow auto nobless from RaidBosses?
- + AllowAutoNoblessFromBoss = True
- +
- + # RaidBoss id from which player will get nobless ( if autonobless enabled)
- + BossId = 25325
- +
- + # The player has to be inside this radius around the RaidBoss in order to get Nobless!
- + # Default: 1000 (the most optimal option and not recommended to change :))
- + RadiusToRaid = 1000
- +
- + # Server will broadcast if you or your party killed the boss.
- + ServerName = L2-Frozen
- # -----------------------------------------
- # Protector System Config -
- # -----------------------------------------
- Credits: Token & Tortex
- Version: 1.0
Add Comment
Please, Sign In to add comment