L2Shares

StartingLevel

Dec 26th, 2018
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.17 KB | None | 0 0
  1. Index: config/players.properties
  2. ===================================================================
  3. --- config/players.properties   (revision 34)
  4. +++ config/players.properties   (working copy)
  5. @@ -5,6 +5,9 @@
  6.  # Use custom title for new players
  7.  StartingTitle = L2Shares.com
  8.  
  9. +# Starting level for new players
  10. +StartingLevel = 1
  11. +
  12.  # Use custom starting location for new players
  13.  # Disable = 0,0,0
  14.  StartingLocation = 83513,148612,-3407
  15. Index: java/net/sf/l2j/Config.java
  16. ===================================================================
  17. --- java/net/sf/l2j/Config.java (revision 34)
  18. +++ java/net/sf/l2j/Config.java (working copy)
  19. @@ -347,6 +347,7 @@
  20.    
  21.     /** Startup */
  22.     public static String STARTING_TITLE;
  23. +   public static int STARTING_LEVEL;
  24.     public static Location STARTING_LOCATION;
  25.    
  26.     /** Misc */
  27. @@ -1029,6 +1030,7 @@
  28.     {
  29.         final ExProperties players = initProperties(PLAYERS_FILE);
  30.         STARTING_TITLE = players.getProperty("StartingTitle", "L2Shares.com");
  31. +       STARTING_LEVEL = players.getProperty("StartingLevel", 1);
  32.         STARTING_LOCATION = parseLocation(players.getProperty("StartingLocation", "0,0,0"));
  33.        
  34.         USE_DEFAULT_PRICE = players.getProperty("UseDefaultItemPrices", true);
  35. Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
  36. ===================================================================
  37. --- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java   (revision 33)
  38. +++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java   (working copy)
  39. @@ -12,6 +12,7 @@
  40.  import net.sf.l2j.gameserver.model.World;
  41.  import net.sf.l2j.gameserver.model.actor.instance.Player;
  42.  import net.sf.l2j.gameserver.model.actor.template.PlayerTemplate;
  43. +import net.sf.l2j.gameserver.model.base.Experience;
  44.  import net.sf.l2j.gameserver.model.base.Sex;
  45.  import net.sf.l2j.gameserver.model.holder.skillnode.GeneralSkillNode;
  46.  import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
  47. @@ -115,6 +116,8 @@
  48.             return;
  49.         }
  50.        
  51. +       player.addExpAndSp(Experience.LEVEL[Config.STARTING_LEVEL], 0);
  52. +      
  53.         player.setCurrentCp(0);
  54.         player.setCurrentHp(player.getMaxHp());
  55.         player.setCurrentMp(player.getMaxMp());
Advertisement
Add Comment
Please, Sign In to add comment