Ir para conteúdo
  • Cadastre-se
  • 0

Raid Boss Defeated Message


SCRASH0

Pergunta

alguem poderia adaptar esse mod para frozen por favor.

do rapfersan92 (Kraker)

 

 

  1. Index: config/custom.properties
  2. ===================================================================
  3. --- config/custom.properties (revision 0)
  4. +++ config/custom.properties (working copy)
  5. @@ -0,0 +1,14 @@
  6. +#=============================================================
  7. +# Custom settings
  8. +#=============================================================
  9. +# Enable / disable raid boss defeated message
  10. +# Default: false
  11. +EnableRaidBossDefeatedMsg = false
  12. +
  13. +# Choose message for raid boss defeated by clan member
  14. +# Variables: %raidboss%, %player%, %clan%
  15. +RaidBossDefeatedByClanMemberMsg = Raid Boss %raidboss% has been defeated by %player% of clan %clan%.
  16. +
  17. +# Choose message for raid boss defeated by player
  18. +# Variables: %raidboss%, %player%
  19. +RaidBossDefeatedByPlayerMsg = Raid Boss %raidboss% has been defeated by %player%.
  20. \ No newline at end of file
  21. Index: java/net/sf/l2j/Config.java
  22. ===================================================================
  23. --- java/net/sf/l2j/Config.java (revision 21)
  24. +++ java/net/sf/l2j/Config.java (working copy)
  25. @@ -43,6 +43,7 @@
  26. protected static final Logger _log = Logger.getLogger(Config.class.getName());
  27. public static final String CLANS_FILE = "./config/clans.properties";
  28. + public static final String CUSTOM_FILE = "./config/custom.properties";
  29. public static final String EVENTS_FILE = "./config/events.properties";
  30. public static final String GEOENGINE_FILE = "./config/geoengine.properties";
  31. public static final String HEXID_FILE = "./config/hexid.txt";
  32. @@ -132,6 +133,14 @@
  33. public static int CH_FRONT2_FEE;
  34. // --------------------------------------------------
  35. + // Custom settings
  36. + // --------------------------------------------------
  37. +
  38. + public static boolean ENABLE_RAID_BOSS_DEFEATED_MSG;
  39. + public static String RAID_BOSS_DEFEATED_BY_CLAN_MEMBER_MSG;
  40. + public static String RAID_BOSS_DEFEATED_BY_PLAYER_MSG;
  41. +
  42. + // --------------------------------------------------
  43. // Events settings
  44. // --------------------------------------------------
  45. @@ -761,6 +770,12 @@
  46. CH_FRONT1_FEE = clans.getProperty("ClanHallFrontPlatformFunctionFeeLvl1", 3031);
  47. CH_FRONT2_FEE = clans.getProperty("ClanHallFrontPlatformFunctionFeeLvl2", 9331);
  48. + // Custom settings
  49. + ExProperties custom = load(CUSTOM_FILE);
  50. + ENABLE_RAID_BOSS_DEFEATED_MSG = custom.getProperty("EnableRaidBossDefeatedMsg", false);
  51. + RAID_BOSS_DEFEATED_BY_CLAN_MEMBER_MSG = custom.getProperty("RaidBossDefeatedByClanMemberMsg", "Raid Boss %raidboss% has been defeated by %player% of clan %clan%.");
  52. + RAID_BOSS_DEFEATED_BY_PLAYER_MSG = custom.getProperty("RaidBossDefeatedByPlayerMsg", "Raid Boss %raidboss% has been defeated by %player%.");
  53. +
  54. // Events config
  55. ExProperties events = load(EVENTS_FILE);
  56. ALT_OLY_START_TIME = events.getProperty("AltOlyStartTime", 18);
  57. Index: java/net/sf/l2j/gameserver/model/actor/instance/L2GrandBossInstance.java
  58. ===================================================================
  59. --- java/net/sf/l2j/gameserver/model/actor/instance/L2GrandBossInstance.java (revision 21)
  60. +++ java/net/sf/l2j/gameserver/model/actor/instance/L2GrandBossInstance.java (working copy)
  61. @@ -14,6 +14,7 @@
  62. */
  63. package net.sf.l2j.gameserver.model.actor.instance;
  64. +import net.sf.l2j.Config;
  65. import net.sf.l2j.commons.random.Rnd;
  66. import net.sf.l2j.gameserver.instancemanager.RaidBossPointsManager;
  67. import net.sf.l2j.gameserver.model.actor.L2Character;
  68. @@ -22,6 +23,7 @@
  69. import net.sf.l2j.gameserver.network.SystemMessageId;
  70. import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
  71. import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
  72. +import net.sf.l2j.gameserver.util.Broadcast;
  73. /**
  74. * This class manages all Grand Bosses.
  75. @@ -73,6 +75,9 @@
  76. if (player.isNoble())
  77. Hero.getInstance().setRBkilled(player.getObjectId(), getNpcId());
  78. }
  79. +
  80. + if (Config.ENABLE_RAID_BOSS_DEFEATED_MSG)
  81. + Broadcast.announceToOnlinePlayers(player.getClan() != null ? Config.RAID_BOSS_DEFEATED_BY_CLAN_MEMBER_MSG.replace("%raidboss%", getName()).replace("%player%", killer.getName()).replace("%clan%", player.getClan().getName()) : Config.RAID_BOSS_DEFEATED_BY_PLAYER_MSG.replace("%raidboss%", getName()).replace("%player%", killer.getName()));
  82. }
  83. return true;
  84. Index: java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java
  85. ===================================================================
  86. --- java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 21)
  87. +++ java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy)
  88. @@ -29,6 +29,7 @@
  89. import net.sf.l2j.gameserver.network.SystemMessageId;
  90. import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
  91. import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
  92. +import net.sf.l2j.gameserver.util.Broadcast;
  93. /**
  94. * This class manages all RaidBoss. In a group mob, there are one master called RaidBoss and several slaves called Minions.
  95. @@ -96,6 +97,9 @@
  96. if (player.isNoble())
  97. Hero.getInstance().setRBkilled(player.getObjectId(), getNpcId());
  98. }
  99. +
  100. + if (Config.ENABLE_RAID_BOSS_DEFEATED_MSG)
  101. + Broadcast.announceToOnlinePlayers(player.getClan() != null ? Config.RAID_BOSS_DEFEATED_BY_CLAN_MEMBER_MSG.replace("%raidboss%", getName()).replace("%player%", killer.getName()).replace("%clan%", player.getClan().getName()) : Config.RAID_BOSS_DEFEATED_BY_PLAYER_MSG.replace("%raidboss%", getName()).replace("%player%", killer.getName()));
  102. }
  103. }

Concegui adapta.

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts recomendados


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.