Advertisement
Fabbian

Pvp/Pk

Apr 9th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 1118)
  6. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
  7. @@ -7603,6 +7603,27 @@
  8. }
  9. }
  10. }
  11. +
  12. + if (Config.ANNOUNCE_PK_PVP && pk != null && !pk.isGM())
  13. + {
  14. + String msg = "";
  15. + if (getPvpFlag() == 0)
  16. + {
  17. + msg = Config.ANNOUNCE_PK_MSG.replace("$killer", pk.getName()).replace("$target", getName());
  18. + if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
  19. + Announcements.getInstance().announceToAll(SystemMessage.getSystemMessage(SystemMessageId.S1).addString(msg));
  20. + else
  21. + Announcements.getInstance().announceToAll(msg);
  22. + }
  23. + else if (getPvpFlag() != 0)
  24. + {
  25. + msg = Config.ANNOUNCE_PVP_MSG.replace("$killer", pk.getName()).replace("$target", getName());
  26. + if (Config.ANNOUNCE_PK_PVP_NORMAL_MESSAGE)
  27. + Announcements.getInstance().announceToAll(SystemMessage.getSystemMessage(SystemMessageId.S1).addString(msg));
  28. + else
  29. + Announcements.getInstance().announceToAll(msg);
  30. + }
  31. + }
  32. }
  33.  
  34. // Unsummon Cubics
  35. Index: head-src/com/l2jfrozen/Config.java
  36. ===================================================================
  37. --- head-src/com/l2jfrozen/Config.java (revision 1118)
  38. +++ head-src/com/l2jfrozen/Config.java (working copy)
  39. @@ -2170,6 +2170,11 @@
  40. public static String PM_TEXT2;
  41. public static boolean NEW_PLAYER_EFFECT;
  42.  
  43. + public static boolean ANNOUNCE_PK_PVP;
  44. + public static boolean ANNOUNCE_PK_PVP_NORMAL_MESSAGE;
  45. + public static String ANNOUNCE_PK_MSG;
  46. + public static String ANNOUNCE_PVP_MSG;
  47. +
  48. // ============================================================
  49. public static void loadFrozenConfig()
  50. {
  51. @@ -2191,6 +2196,11 @@
  52. PM_TEXT2 = frozenSettings.getProperty("PMText2", "Vote for us every 24h");
  53. NEW_PLAYER_EFFECT = Boolean.parseBoolean(frozenSettings.getProperty("NewPlayerEffect", "True"));
  54.  
  55. + ANNOUNCE_PK_PVP = Boolean.parseBoolean(frozenSettings.getProperty("AnnouncePkPvP", "False"));
  56. + ANNOUNCE_PK_PVP_NORMAL_MESSAGE = Boolean.parseBoolean(frozenSettings.getProperty("AnnouncePkPvPNormalMessage", "True"));
  57. + ANNOUNCE_PK_MSG = frozenSettings.getProperty("AnnouncePkMsg", "$killer has slaughtered $target");
  58. + ANNOUNCE_PVP_MSG = frozenSettings.getProperty("AnnouncePvpMsg", "$killer has defeated $target");
  59. +
  60. }
  61. catch (final Exception e)
  62. {
  63. Index: config/frozen/frozen.properties
  64. ===================================================================
  65. --- config/frozen/frozen.properties (revision 1118)
  66. +++ config/frozen/frozen.properties (working copy)
  67. @@ -22,4 +22,23 @@
  68.  
  69. # New players get fireworks the first time they log in
  70. # Default: False
  71. -NewPlayerEffect = False
  72. \ No newline at end of file
  73. +NewPlayerEffect = False
  74. +
  75. +#-==========================================================-#
  76. +# Advanced Pvp & Pk Announce System
  77. +#-==========================================================-#
  78. +# Enable/Disable show announce who killed who
  79. +# Default: False
  80. +AnnouncePkPvP = False
  81. +
  82. +# Announce this as normal system message
  83. +# Default: True
  84. +AnnouncePkPvPNormalMessage = True
  85. +
  86. +# Default Pk message template.
  87. +# Configs: $killer, $target
  88. +AnnouncePkMsg = Player $killer has slaughtered $target .
  89. +
  90. +# Default PvP message template.
  91. +# variables: $killer, $target
  92. +AnnouncePvpMsg = Player $killer has defeated $target .
  93. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement