Advertisement
Sarada-L2

Champion C4 Last Version L2jLisvus

Oct 15th, 2023
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.79 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P core
  3. diff --git java/config/Custom.properties
  4. index ac00dc7..cdf1f97 100644
  5. --- java/config/Custom.properties
  6. +++ java/config/Custom.properties
  7. @@ -80,60 +80,65 @@
  8. # To set all champion mobs to Passive (not aggro), set true.
  9. ChampionPassive = False
  10. # Chance for a mob to became champion (in percents) - 0 to disable
  11. ChampionFrequency = 5
  12. # Title of all Champion Mobs
  13. ChampionTitle = Champion
  14. # Min and max lvl allowed for a mob to be champion.
  15. ChampionMinLevel = 20
  16. ChampionMaxLevel = 70
  17. # Hp multiplier
  18. ChampionHp = 8
  19. # Hp Regen Multiplier
  20. ChampionHpRegen = 1.
  21. # Rewards multiplier (drop rate * champion rewards rate)
  22. ChampionRewards = 8.
  23. # Adenas & seal stones rewards multiplier (adenas & seal stones drop rate * champion adenas rewards rate)
  24. ChampionAdenasRewards = 1.
  25. # Atk bonus for champion (changes apply on patk & matk)
  26. ChampionAtk = 1.
  27. # Spd Atk bonus for champion (changes apply on patkspd & matkspd)
  28. ChampionSpdAtk = 1.
  29. # Chance to obtain a specified reward item from a higher lvl champion (in percents) default is off using glittering medal as reward
  30. ChampionRewardLowerLvlItemChance = 0
  31. # Chance to obtain a specified reward item from a lower lvl champion (in percents) default is off using glittering medal as reward
  32. ChampionRewardHigherLvlItemChance = 0
  33. # Specified reward item ID
  34. ChampionRewardItemID = 6393
  35. # Specified reward item random quantity
  36. ChampionRewardItemQty = 1
  37.  
  38. +# Enable aura from champion mobs
  39. +# 0 - no aura / 1 - blue aura / 2 - red aura
  40. +# Default = 0
  41. +ChampionEnableAura = 1
  42.  
  43. # ------------------------------------------------------------
  44. # Enable Auto Target
  45. # ------------------------------------------------------------
  46. # Allows players to auto-target NPCs that dealt damage to them,
  47. # provided that they haven't got any other target at that time.
  48. # This setting is also useful for attacks from mobs stuck inside walls.
  49. EnableAutoTargetNPC = False
  50.  
  51. # ------------------------------------------------------------
  52. # Show NPC Crest
  53. # ------------------------------------------------------------
  54. # Shows clan and alliance crests for territory NPCs.
  55. ShowNpcCrest = False
  56.  
  57. # ------------------------------------------------------------
  58. # Choose any kind of subclass to any Village Master
  59. # ------------------------------------------------------------
  60. # Allows players to choose any kind of subclass to any village master
  61. ChooseAllSubClassesEveryWhere = False
  62.  
  63. # ------------------------------------------------------------
  64. # Auto Noblesse Status At Login
  65. # ------------------------------------------------------------
  66. # Give noblesse status to all characters at login
  67. AutoNoblesseAtLogin = False
  68.  
  69. # ------------------------------------------------------------
  70. # Allow Enchanting Hero Items
  71. # ------------------------------------------------------------
  72. # Allows players to enchant a hero weapon.
  73. diff --git java/net/sf/l2j/Config.java
  74. index 189f5e5..0fcb19c 100644
  75. --- java/net/sf/l2j/Config.java
  76. +++ java/net/sf/l2j/Config.java
  77. @@ -994,60 +994,61 @@
  78.  
  79. /** Allow players to keep subclass skills ? */
  80. public static boolean KEEP_SUBCLASS_SKILLS;
  81.  
  82. /** Allow use Event Managers for change occupation ? */
  83. public static boolean ALLOW_CLASS_MASTERS;
  84. public static ClassMasterSettings CLASS_MASTER_SETTINGS;
  85. public static boolean ALLOW_ENTIRE_TREE;
  86. public static boolean ALTERNATE_CLASS_MASTER;
  87.  
  88. /** Auto rewarding players */
  89. public static boolean ALLOW_AUTO_REWARDER;
  90. public static int AUTO_REWARD_DELAY;
  91. public static int AUTO_REWARD_ID;
  92. public static int AUTO_REWARD_COUNT;
  93.  
  94. /** Allow players to view all available classes to the same village master */
  95. public static boolean CHANGE_SUBCLASS_EVERYWHERE;
  96.  
  97. /** Auto Noblesse status at login */
  98. public static boolean AUTO_NOBLE_STATUS;
  99.  
  100. /** Allow enchanting hero items */
  101. public static boolean ALLOW_HERO_ENCHANT;
  102.  
  103. /** Maximum clients per IP */
  104. public static int MAX_CLIENTS_PER_IP;
  105.  
  106. /** Use /block command as an AntiBuff shield */
  107. public static boolean ANTIBUFF_SHIELD_ENABLE;
  108. + public static int L2JMOD_CHAMPION_ENABLE_AURA;
  109.  
  110. /** Allow atk/casting spd affect skill reuse delay */
  111. public static boolean SKILL_REUSE_INDEPENDENT;
  112.  
  113. /** Allow password change using .changepassword voiced command */
  114. public static boolean PASSWORD_CHANGE_ENABLE;
  115.  
  116. /** Enable custom data tables ? */
  117. public static boolean CUSTOM_SPAWNLIST_TABLE;
  118. public static boolean SAVE_GMSPAWN_ON_CUSTOM;
  119. public static boolean CUSTOM_NPC_TABLE;
  120. public static boolean CUSTOM_NPC_SKILLS_TABLE;
  121. public static boolean CUSTOM_MINIONS_TABLE;
  122. public static boolean CUSTOM_ITEM_TABLES;
  123. public static boolean CUSTOM_ARMORSETS_TABLE;
  124. public static boolean CUSTOM_TELEPORT_TABLE;
  125. public static boolean CUSTOM_DROPLIST_TABLE;
  126. public static boolean CUSTOM_MERCHANT_TABLES;
  127. public static boolean CUSTOM_MULTISELL_LOAD;
  128.  
  129. /** Champion Mod */
  130. public static boolean CHAMPION_ENABLE;
  131. public static boolean CHAMPION_PASSIVE;
  132. public static int CHAMPION_FREQUENCY;
  133. public static String CHAMPION_TITLE;
  134. public static int CHAMP_MIN_LVL;
  135. public static int CHAMP_MAX_LVL;
  136. public static int CHAMPION_HP;
  137. public static float CHAMPION_REWARDS;
  138. public static float CHAMPION_ADENAS_REWARDS;
  139. @@ -2658,78 +2659,79 @@
  140. ALT_OLY_CLASSED = Integer.parseInt(olympiadSettings.getProperty("AltOlyClassedParticipants", "5"));
  141. ALT_OLY_REG_DISPLAY = Integer.parseInt(olympiadSettings.getProperty("AltOlyRegistrationDisplayNumber","10"));
  142. ALT_OLY_NONCLASSED = Integer.parseInt(olympiadSettings.getProperty("AltOlyNonClassedParticipants", "9"));
  143. ALT_OLY_BATTLE_REWARD_ITEM = Integer.parseInt(olympiadSettings.getProperty("AltOlyBattleRewItem", "6651"));
  144. ALT_OLY_CLASSED_RITEM_C = Integer.parseInt(olympiadSettings.getProperty("AltOlyClassedRewItemCount", "50"));
  145. ALT_OLY_NONCLASSED_RITEM_C = Integer.parseInt(olympiadSettings.getProperty("AltOlyNonClassedRewItemCount", "30"));
  146. ALT_OLY_COMP_RITEM = Integer.parseInt(olympiadSettings.getProperty("AltOlyCompRewItem", "6651"));
  147. ALT_OLY_GP_PER_POINT = Integer.parseInt(olympiadSettings.getProperty("AltOlyGPPerPoint", "1000"));
  148. ALT_OLY_HERO_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyHeroPoints", "300"));
  149. ALT_OLY_RANK1_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyRank1Points", "100"));
  150. ALT_OLY_RANK2_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyRank2Points", "75"));
  151. ALT_OLY_RANK3_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyRank3Points", "55"));
  152. ALT_OLY_RANK4_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyRank4Points", "40"));
  153. ALT_OLY_RANK5_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyRank5Points", "30"));
  154. ALT_OLY_MAX_POINTS = Integer.parseInt(olympiadSettings.getProperty("AltOlyMaxPoints", "10"));
  155. ALT_OLY_LOSE_POINTS_ON_TIE = Boolean.valueOf(olympiadSettings.getProperty("AltOlyLosePointsOnTie", "true"));
  156. ALT_OLY_SHOW_MONTHLY_WINNERS = Boolean.valueOf(olympiadSettings.getProperty("AltOlyShowMonthlyWinners", "true"));
  157. ALT_OLY_ENCHANT_LIMIT = Integer.parseInt(olympiadSettings.getProperty("AltOlyEnchantLimit", "-1"));
  158.  
  159. // Custom settings
  160. Properties customSettings = new Properties();
  161. try (InputStream is = new FileInputStream(new File(CUSTOM_FILE)))
  162. {
  163. customSettings.load(is);
  164. }
  165. catch (Exception e)
  166. {
  167. e.printStackTrace();
  168. throw new Error("Failed to Load " + CUSTOM_FILE + " File.");
  169. }
  170. ANTIBUFF_SHIELD_ENABLE = Boolean.valueOf(customSettings.getProperty("AntibuffShieldEnable", "false"));
  171. SKILL_REUSE_INDEPENDENT = Boolean.valueOf(customSettings.getProperty("SkillReuseIndependent", "false"));
  172.  
  173. PASSWORD_CHANGE_ENABLE = Boolean.valueOf(customSettings.getProperty("PasswordChangeEnable", "false"));
  174.  
  175. CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(customSettings.getProperty("CustomSpawnlistTable", "false"));
  176. SAVE_GMSPAWN_ON_CUSTOM = Boolean.valueOf(customSettings.getProperty("SaveGmSpawnOnCustom", "false"));
  177. CUSTOM_NPC_TABLE = Boolean.valueOf(customSettings.getProperty("CustomNpcTable", "false"));
  178. CUSTOM_NPC_SKILLS_TABLE = Boolean.valueOf(customSettings.getProperty("CustomNpcSkillsTable", "false"));
  179. CUSTOM_MINIONS_TABLE = Boolean.valueOf(customSettings.getProperty("CustomMinionsTable", "false"));
  180. CUSTOM_ITEM_TABLES = Boolean.valueOf(customSettings.getProperty("CustomItemTables", "false"));
  181. CUSTOM_ARMORSETS_TABLE = Boolean.valueOf(customSettings.getProperty("CustomArmorSetsTable", "false"));
  182. CUSTOM_TELEPORT_TABLE = Boolean.valueOf(customSettings.getProperty("CustomTeleportTable", "false"));
  183. CUSTOM_DROPLIST_TABLE = Boolean.valueOf(customSettings.getProperty("CustomDroplistTable", "false"));
  184. CUSTOM_MERCHANT_TABLES = Boolean.valueOf(customSettings.getProperty("CustomMerchantTables", "false"));
  185. CUSTOM_MULTISELL_LOAD = Boolean.valueOf(customSettings.getProperty("CustomMultisellLoad", "false"));
  186. + if (L2JMOD_CHAMPION_ENABLE_AURA != 0 && L2JMOD_CHAMPION_ENABLE_AURA != 1 && L2JMOD_CHAMPION_ENABLE_AURA != 2) L2JMOD_CHAMPION_ENABLE_AURA = 0;
  187. + L2JMOD_CHAMPION_ENABLE_AURA = Integer.parseInt(customSettings.getProperty("ChampionEnableAura", "0"));
  188. CHAMPION_ENABLE = Boolean.valueOf(customSettings.getProperty("ChampionEnable", "false"));
  189. CHAMPION_PASSIVE = Boolean.valueOf(customSettings.getProperty("ChampionPassive", "false"));
  190. CHAMPION_FREQUENCY = Integer.parseInt(customSettings.getProperty("ChampionFrequency", "0"));
  191. CHAMPION_TITLE = customSettings.getProperty("ChampionTitle", "Champion");
  192. CHAMP_MIN_LVL = Integer.parseInt(customSettings.getProperty("ChampionMinLevel", "20"));
  193. CHAMP_MAX_LVL = Integer.parseInt(customSettings.getProperty("ChampionMaxLevel", "70"));
  194. CHAMPION_HP = Integer.parseInt(customSettings.getProperty("ChampionHp", "8"));
  195. CHAMPION_HP_REGEN = Float.parseFloat(customSettings.getProperty("ChampionHpRegen", "1."));
  196. CHAMPION_REWARDS = Float.parseFloat(customSettings.getProperty("ChampionRewards", "8."));
  197. CHAMPION_ADENAS_REWARDS = Float.parseFloat(customSettings.getProperty("ChampionAdenasRewards", "1."));
  198. CHAMPION_ATK = Float.parseFloat(customSettings.getProperty("ChampionAtk", "1."));
  199. CHAMPION_SPD_ATK = Float.parseFloat(customSettings.getProperty("ChampionSpdAtk", "1."));
  200. CHAMPION_REWARD_LOWER_CHANCE = Integer.parseInt(customSettings.getProperty("ChampionRewardLowerLvlItemChance", "0"));
  201. CHAMPION_REWARD_HIGHER_CHANCE = Integer.parseInt(customSettings.getProperty("ChampionRewardHigherLvlItemChance", "0"));
  202. CHAMPION_REWARD_ID = Integer.parseInt(customSettings.getProperty("ChampionRewardItemID", "6393"));
  203. CHAMPION_REWARD_QTY = Integer.parseInt(customSettings.getProperty("ChampionRewardItemQty", "1"));
  204.  
  205. ALLOW_AUTO_REWARDER = Boolean.valueOf(customSettings.getProperty("AllowAutoRewarder", "False"));
  206. AUTO_REWARD_DELAY = Integer.parseInt(customSettings.getProperty("AutoRewardDelay", "1200"));
  207. AUTO_REWARD_ID = Integer.parseInt(customSettings.getProperty("AutoRewardID", "57"));
  208. AUTO_REWARD_COUNT = Integer.parseInt(customSettings.getProperty("AutoRewardCount", "1000"));
  209.  
  210. Boost_EXP_COMMAND = Boolean.parseBoolean(customSettings.getProperty("SpExpCommand", "False"));
  211. AUTO_TARGET_NPC = Boolean.parseBoolean(customSettings.getProperty("EnableAutoTargetNPC", "False"));
  212. SHOW_NPC_CREST = Boolean.parseBoolean(customSettings.getProperty("ShowNpcCrest", "False"));
  213. CHANGE_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(customSettings.getProperty("ChooseAllSubClassesEveryWhere", "False"));
  214. AUTO_NOBLE_STATUS = Boolean.parseBoolean(customSettings.getProperty("AutoNoblesseAtLogin", "False"));
  215. ALLOW_HERO_ENCHANT = Boolean.parseBoolean(customSettings.getProperty("AllowEnchantHeroItems", "False"));
  216. MAX_CLIENTS_PER_IP = Integer.parseInt(customSettings.getProperty("MaximumClientsPerIP", "0"));
  217. ENABLE_REAL_TIME = Boolean.parseBoolean(customSettings.getProperty("EnableRealTime", "False"));
  218. diff --git java/net/sf/l2j/gameserver/network/serverpackets/NpcInfo.java
  219. index 9384b83..985e1e4 100644
  220. --- java/net/sf/l2j/gameserver/network/serverpackets/NpcInfo.java
  221. +++ java/net/sf/l2j/gameserver/network/serverpackets/NpcInfo.java
  222. @@ -196,48 +196,54 @@
  223. writeD(_swimRunSpd); // swimspeed
  224. writeD(_swimWalkSpd); // swimspeed
  225. writeD(_flRunSpd);
  226. writeD(_flWalkSpd);
  227. writeD(_flyRunSpd);
  228. writeD(_flyWalkSpd);
  229. writeF(_movementMultiplier);
  230. writeF(_attackSpeedMultiplier);
  231. writeF(collisionRadius);
  232. writeF(collisionHeight);
  233. writeD(_rhand); // right hand weapon
  234. writeD(_chest);
  235. writeD(_lhand); // left hand weapon
  236. writeC(1); // name above char 1=true ... ??
  237. writeC(_cha.isRunning() ? 1 : 0); // char always running
  238. writeC(_cha.isInCombat() ? 1 : 0);
  239. writeC(_isAlikeDead ? 1 : 0);
  240. writeC(_showSpawnAnimation ? 2 : _val); // 0=teleported 1=default 2=summoned
  241. writeS(_name);
  242. writeS(_title);
  243. writeD(_playableFlag);
  244. writeD(_pvpFlag);
  245. writeD(_karma);
  246.  
  247. writeD(_cha.getAbnormalEffect()); // C2
  248. writeD(_clanId); // clan id
  249. writeD(_clanCrest); // crest id
  250. writeD(_allyId); // ally id
  251. writeD(_allyCrest); // all crest
  252. writeC(0000); // C2
  253. - writeC(_auraColor); // Title color 0=client default
  254. + if (Config.CHAMPION_ENABLE)
  255. + {
  256. + writeC(_cha.isChampion() ? Config.L2JMOD_CHAMPION_ENABLE_AURA : 0);
  257. + }
  258. + else
  259. + {
  260. + writeC(_auraColor); // Title color 0=client default
  261. + }
  262. writeF(collisionRadius);
  263. writeF(collisionHeight);
  264. writeD(0x00); // C4
  265. }
  266.  
  267. /*
  268. * (non-Javadoc)
  269. * @see net.sf.l2j.gameserver.serverpackets.L2GameServerPacket#getType()
  270. */
  271. @Override
  272. public String getType()
  273. {
  274. return _S__22_NPCINFO;
  275. }
  276. }
  277. \ No newline at end of file
  278.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement