Axelut

Level Reward aCis

Sep 14th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. diff --git a/aCis_gameserver/config/players.properties b/aCis_gameserver/config/players.properties
  2. index 812a6e7..1a5d603 100644
  3. --- a/aCis_gameserver/config/players.properties
  4. +++ b/aCis_gameserver/config/players.properties
  5. @@ -45,6 +45,10 @@
  6. # Transformations for pk players, the transformation type has to be NPC.
  7. TransformId = 0
  8.  
  9. +# Level Reward
  10. +ListLevel = 25,26,27,28,29,30,31,32,33,34,35,36,37
  11. +RewardLevel = 57-10000000
  12. +
  13. #=============================================================
  14. # Inventory / Warehouse
  15. #=============================================================
  16. diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
  17. index 2ee0339..fe35d87 100644
  18. --- a/aCis_gameserver/java/net/sf/l2j/Config.java
  19. +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
  20. @@ -339,6 +339,8 @@
  21. public static boolean ALT_GAME_DELEVEL;
  22. public static int DEATH_PENALTY_CHANCE;
  23. public static int TRANSFORM_NPC_ID;
  24. + public static int[] LIST_LEVEL;
  25. + public static IntIntHolder[] LEVEL_REWARD_ITEM;
  26.  
  27. /** Inventory & WH */
  28. public static int INVENTORY_MAXIMUM_NO_DWARF;
  29. @@ -973,6 +975,8 @@
  30. ALT_GAME_DELEVEL = players.getProperty("Delevel", true);
  31. DEATH_PENALTY_CHANCE = players.getProperty("DeathPenaltyChance", 20);
  32. TRANSFORM_NPC_ID = players.getProperty("TransformId", 0);
  33. + LEVEL_REWARD_ITEM = players.parseIntIntList("RewardLevel", "0-0");
  34. + LIST_LEVEL = players.getProperty("ListLevel", new int[]{80,81,82,83,84,85});
  35.  
  36. INVENTORY_MAXIMUM_NO_DWARF = players.getProperty("MaximumSlotsForNoDwarf", 80);
  37. INVENTORY_MAXIMUM_DWARF = players.getProperty("MaximumSlotsForDwarf", 100);
  38. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  39. index bf67be0..f44d500 100644
  40. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  41. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  42. @@ -3,6 +3,7 @@
  43. import java.util.Map;
  44.  
  45. import net.sf.l2j.commons.random.Rnd;
  46. +import net.sf.l2j.commons.util.ArraysUtil;
  47.  
  48. import net.sf.l2j.Config;
  49. import net.sf.l2j.gameserver.data.manager.DuelManager;
  50. @@ -23,6 +24,7 @@
  51. import net.sf.l2j.gameserver.model.actor.instance.Servitor;
  52. import net.sf.l2j.gameserver.model.entity.Duel.DuelState;
  53. import net.sf.l2j.gameserver.model.group.Party;
  54. +import net.sf.l2j.gameserver.model.holder.IntIntHolder;
  55. import net.sf.l2j.gameserver.model.olympiad.OlympiadGameManager;
  56. import net.sf.l2j.gameserver.model.olympiad.OlympiadGameTask;
  57. import net.sf.l2j.gameserver.model.pledge.Clan;
  58. @@ -632,6 +634,15 @@
  59. qs.getQuest().notifyEvent("CE40", null, _actor);
  60. }
  61.  
  62. + if (Config.LIST_LEVEL.length > 0)
  63. + {
  64. + if (ArraysUtil.contains(Config.LIST_LEVEL, getLevel()))
  65. + {
  66. + for (IntIntHolder reward : Config.LEVEL_REWARD_ITEM)
  67. + _actor.addItem("Level Reward", reward.getId(), reward.getValue(), null, true);
  68. + }
  69. + }
  70. +
  71. setCp(getMaxCp());
  72.  
  73. _actor.broadcastPacket(new SocialAction(_actor, 15));
Add Comment
Please, Sign In to add comment