Advertisement
ChristianMacedo

Nobles Kill Barakiel L2jLisvus C4

Jul 5th, 2022 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P l2j-lisvus-main
  3. diff --git gameserver\data\scripts\ai\individual\BossCustomNoblesLastHist.java -- local onde criar arquivo
  4. new file mode 100644
  5. index 0000000..06df9c6
  6. --- /dev/null
  7. +++ gameserver\data\scripts\ai\individual\BossCustomNoblesLastHist.java -- Local da pasta gameserver
  8. @@ -0,0 +1,60 @@
  9. +package ai.individual;
  10. +
  11. +import net.sf.l2j.Config;
  12. +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
  13. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  14. +import net.sf.l2j.gameserver.model.quest.Quest;
  15. +import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
  16. +
  17. +/**
  18. + *
  19. + * @author S.Christian
  20. + *
  21. + */
  22. +
  23. +public class BossCustomNoblesLastHist extends Quest
  24. +{
  25. + public BossCustomNoblesLastHist()
  26. + {
  27. + super(-1, "BossCustomNoblesLastHist", "ai");
  28. +
  29. + addKillId(Config.BOSS_CUSTOM_NOBLES_ID);
  30. + }
  31. + public static void main(String[] args)
  32. + {
  33. + // Quest class
  34. + new BossCustomNoblesLastHist();
  35. + }
  36. + @Override
  37. + public String onKill(L2NpcInstance npc, L2PcInstance player, boolean isPet)
  38. + {
  39. + if (player.getParty() != null)
  40. + {
  41. + for (L2PcInstance members : player.getParty().getPartyMembers())
  42. + {
  43. +
  44. + if (!members.isInsideRadius(npc, Config.DISTANCE_FOR_RENEWAL_NOBLES_PARTY, false, false))
  45. + {
  46. + members.sendMessage("You were too far away from Event Boss. You've missed the chance of becoming Noblesse!");
  47. + continue;
  48. + }
  49. + if(members.isDead() || members.isNoble())
  50. + {
  51. + members.sendMessage("You can't is Action.");
  52. + continue;
  53. + }
  54. + if(Config.ENABLE_RAIDBOSS_NOBLES)
  55. + if (!members.isNoble())
  56. + {
  57. + members.setNoble(true);
  58. + members.getInventory().addItem("Noblesse Tiara", 7694, 1, members, null);
  59. + members.broadcastPacket(new SocialAction(members.getObjectId(), 16));
  60. + members.sendMessage("Congratulations! All party members have obtained Noblesse Status");
  61. + }
  62. + }
  63. + }
  64. +
  65. + return null;
  66. + }
  67. +
  68. +}
  69. \ No newline at end of file
  70. diff --git java/config/Custom.properties java
  71. index ac00dc7..5c921f0 100644
  72. --- java/config/Custom.properties
  73. +++ java/config/Custom.properties
  74. @@ -331,7 +331,20 @@
  75. OfflineDisconnectFinished = True
  76.  
  77. # If set to True, name color will be changed when entering offline mode
  78. OfflineSetNameColor = False
  79.  
  80. # Color of the name in offline mode (if OfflineSetNameColor = True)
  81. OfflineNameColor = 808080
  82. +
  83. +#================================================
  84. +# BossEvent Nobles
  85. +#================================================
  86. +#Enable Status nobles for kill boss?
  87. +EnableBossEventLastHit = True
  88. +
  89. +#ID RAIDBOSS EVENT LAST HIST
  90. +BossLastHitID = 10325
  91. +
  92. +#Distance renewal status nobles for party
  93. +BossLastHitDistance = 2000
  94. +
  95. diff --git java/net/sf/l2j/Config.java
  96. index 88ec0a3..6ff54ca 100644
  97. --- java/net/sf/l2j/Config.java
  98. +++ java/net/sf/l2j/Config.java
  99. @@ -116,12 +116,16 @@
  100. /** Number of seconds the IP ban will last, default 10 minutes */
  101. public static int LOGIN_BLOCK_AFTER_BAN;
  102.  
  103. /** Hostname of the Game Server */
  104. public static String GAMESERVER_HOSTNAME;
  105.  
  106. + public static boolean ENABLE_RAIDBOSS_NOBLES;
  107. + public static int BOSS_CUSTOM_NOBLES_ID;
  108. + public static int DISTANCE_FOR_RENEWAL_NOBLES_PARTY;
  109. +
  110. // Access to database
  111. /** Driver to access to database */
  112. public static String DATABASE_DRIVER;
  113. /** Path to access to database */
  114. public static String DATABASE_URL;
  115. /** Database login */
  116. @@ -1962,12 +1966,16 @@
  117. catch (Exception e)
  118. {
  119. e.printStackTrace();
  120. throw new Error("Failed to Load " + CUSTOM_FILE + " File.");
  121. }
  122.  
  123. + BOSS_CUSTOM_NOBLES_ID = Integer.parseInt(customSettings.getProperty("BossLastHitID", "1"));
  124. + DISTANCE_FOR_RENEWAL_NOBLES_PARTY = Integer.parseInt(customSettings.getProperty("BossLastHitDistance", "1"));
  125. + ENABLE_RAIDBOSS_NOBLES = Boolean.parseBoolean(customSettings.getProperty("EnableBossEventLastHit", "true"));
  126. +
  127. ANTIBUFF_SHIELD_ENABLE = Boolean.valueOf(customSettings.getProperty("AntibuffShieldEnable", "false"));
  128. SKILL_REUSE_INDEPENDENT = Boolean.valueOf(customSettings.getProperty("SkillReuseIndependent", "false"));
  129.  
  130. PASSWORD_CHANGE_ENABLE = Boolean.valueOf(customSettings.getProperty("PasswordChangeEnable", "false"));
  131.  
  132. CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(customSettings.getProperty("CustomSpawnlistTable", "false"));
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement