Advertisement
warc222

Command Up-Lvl By Dagger For L2Jfrozen Last Rev

Oct 10th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. //This code provides lvl 80 character
  2.  
  3.  
  4. ===================================================================
  5. Config.java (revision 0)
  6. ===================================================================
  7. + public static boolean ENABLE_CMD_UPLEVEL;
  8. + public static boolean UPLEVEL_ITEM_ID;
  9. + public static boolean UPLEVEL_ITEM_COUNT;
  10. public static String ALLOWED_SKILLS;
  11. public static String ALLOWED_SKILLS;
  12. public static FastList<Integer> ALLOWED_SKILLS_LIST = new FastList<>();
  13.  
  14.  
  15.  
  16.  
  17.  
  18. + ENABLE_CMD_UPLEVEL = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnableUpSystem", "True"));
  19. + UPLEVEL_ITEM_ID = Boolean.parseBoolean(L2JFrozenSettings.getProperty("UpLevelItemID", "57"));
  20. + UPLEVEL_ITEM_COUNT = Boolean.parseBoolean(L2JFrozenSettings.getProperty("UpLevelItemCount", "1"));
  21. ALT_SERVER_NAME_ENABLED = Boolean.parseBoolean(L2JFrozenSettings.getProperty("ServerNameEnabled", "false"));
  22. ANNOUNCE_TO_ALL_SPAWN_RB = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceToAllSpawnRb", "false"));
  23.  
  24.  
  25.  
  26. ===================================================================
  27. gameserver/handler/VoicedCommandHandler.java
  28. ===================================================================
  29. import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Voting;
  30. import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding;
  31. + import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.UpLevel;
  32.  
  33.  
  34.  
  35.  
  36. + if (Config.ENABLE_CMD_UPLEVEL)
  37. + registerVoicedCommandHandler(new UpLevel());
  38. + if (Config.BANKING_SYSTEM_ENABLED)
  39. + {
  40. + registerVoicedCommandHandler(new BankingCmd());
  41. + }
  42.  
  43.  
  44. if (Config.CTF_COMMAND)
  45. {
  46. registerVoicedCommandHandler(new CTFCmd());
  47. }
  48. ===================================================================
  49. gameserver/handler/voicedcommandhandlers/UpLevel.java (revision 0)
  50. ===================================================================
  51. package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
  52.  
  53. import java.text.SimpleDateFormat;
  54.  
  55. import com.l2jfrozen.Config;
  56. import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
  57. import com.l2jfrozen.gameserver.model.PcInventory;
  58. import com.l2jfrozen.gameserver.model.L2World;
  59. import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
  60. import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  61. import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
  62. import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
  63. import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
  64.  
  65. /*
  66. * Edited By Dagger
  67. */
  68. public class UpLevel implements IVoicedCommandHandler
  69. {
  70. private static final String[] VOICED_COMMANDS = {"up"};
  71.  
  72. public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  73. {
  74. if (command.equalsIgnoreCase("up"))
  75. {
  76. {
  77. activeChar.getInventory().destroyItemByItemId("", Config.UPLEVEL_ITEM_ID, Config.UPLEVEL_ITEM_COUNT, activeChar, activeChar.getTarget());
  78. activeChar.getStat().addExp(activeChar.getStat().getExpForLevel(81));
  79. activeChar.sendMessage("Felicidades : "+activeChar.getName()+" Ha Ganado un LvL usando el comando .up ! .");
  80. }
  81. }
  82. return false;
  83. }
  84. public String[] getVoicedCommandList()
  85. {
  86. return VOICED_COMMANDS;
  87. }
  88. }
  89. //No New line
  90. ===================================================================
  91. gameserver.config.functions.l2jfrozen.properties
  92. ===================================================================
  93. # Npc Protector Message
  94. ProtectorMessage = Hey Tu ! aqui no se puede matar !!!
  95. +#
  96. +#Comando .up ( Enable = True | Disable = False )
  97. +#Subir de nivel 80 al personaje
  98. +EnableUpSystem = True
  99. +UpLevelItemID = 57
  100. +UpLevelItemCount = 10000000
  101. //No New Line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement