Добро пожаловать дорогой гость сайта Line-age2.3dn.ru! У нас вы можете найти все для Lineage. А именно: сборки серверов, Программы,боты, защита сервера, все для сервера, гайды, советы, шаблоны и дизайны. Все бесплатно! Файлы проверены на вирусы.
Команда:. Delevel Тип: Мануал Хроніки: Interlude Опис: Мануал про те, як зробити в себе на сервері voice команду понижувальну рівень гравця. Мануал досить докладний, думаю буде корисний конфіг для pvp-сервера. Пам'ятайте що б зробити цю "примочку" у себе на сервері Вам потрібні исходники вашої збірки, і знання в області Java. Удачі в розробці!
@@ -110,5 +115,6 @@ { String command = voicedCommand; - if (voicedCommand.indexOf(" ") != -1) { + if (voicedCommand.indexOf(" ") != -1) + { command = voicedCommand.substring(0, voicedCommand.indexOf(" ")); } Index: /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/delevel.java =================================================================== --- /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/delevel.java (revision 35) +++ /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/delevel.java (revision 35) @@ -0,0 +1,46 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +package com.l2j.gameserver.handler.voicedcommandhandlers; + +import com.l2j.Config; +import com.l2j.gameserver.handler.IVoicedCommandHandler; +import com.l2j.gameserver.model.actor.instance.L2PcInstance; +import com.l2j.gameserver.model.base.Experience; + +/** + * @author l2j-team + */ +public class delevel implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = {"delevel"}; + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.equalsIgnoreCase("delevel")) + { + if (activeChar.getInventory().getInventoryItemCount(Config.DELEVEL_ADENA,0)>= Config.DELEVEL_ADENA_COUNT) + { + activeChar.destroyItemByItemId("Consume", Config.DELEVEL_ADENA, Config.DELEVEL_ADENA_COUNT, activeChar, true); + activeChar.getStat().removeExpAndSp((activeChar.getExp() - Experience.LEVEL[activeChar.getStat().getLevel() - Config.LEVEL_COUNT_DELEVEL]), 0); + } + } + return true; + + } + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Index: /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/Online.java =================================================================== --- /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/Online.java (revision 29) +++ /trunk/Game/java/com/l2j/gameserver/handler/voicedcommandhandlers/Online.java (revision 35) @@ -4,6 +4,4 @@ import com.l2j.gameserver.model.L2World; import com.l2j.gameserver.model.actor.instance.L2PcInstance; -import com.l2j.gameserver.network.SystemMessageId; -import com.l2j.gameserver.network.serverpackets.SystemMessage;
public class Online implements IVoicedCommandHandler @@ -18,5 +16,4 @@ if (command.equalsIgnoreCase("online")) { - SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); activeChar.sendMessage("Сейчас в игре " + L2World.getInstance().getAllPlayers().size() + " игроков"); } Index: /trunk/Game/java/com/l2j/gameserver/L2jTeam.java =================================================================== --- /trunk/Game/java/com/l2j/gameserver/L2jTeam.java (revision 30) +++ /trunk/Game/java/com/l2j/gameserver/L2jTeam.java (revision 35) @@ -2,6 +2,4 @@
public class L2jTeam Index: /trunk/Game/java/com/l2j/Config.java =================================================================== --- /trunk/Game/java/com/l2j/Config.java (revision 27) +++ /trunk/Game/java/com/l2j/Config.java (revision 35) @@ -1780,4 +1780,8 @@ public static boolean ALLOW_CREATE_LVL; public static int CHAR_CREATE_LVL; + public static boolean CMD_DELEVEL_ENABLED; + public static int DELEVEL_ADENA; + public static int DELEVEL_ADENA_COUNT; + public static int LEVEL_COUNT_DELEVEL;
// ******************************************************************************************* @@ -1791,4 +1795,9 @@ L2JTeamSettings.load(is); is.close(); + + CMD_DELEVEL_ENABLED = Boolean.parseBoolean(L2JTeamSettings.getProperty("AllowDelevelCommand","False")); + DELEVEL_ADENA = Integer.parseInt(L2JTeamSettings.getProperty("DelevelAdenaId","57")); + DELEVEL_ADENA_COUNT = Integer.parseInt(L2JTeamSettings.getProperty("DelevelAdenaCount","10000000")); + LEVEL_COUNT_DELEVEL = Integer.parseInt(L2JTeamSettings.getProperty("LevelCountDelevel","1")); CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(L2JTeamSettings.getProperty("CustomSpawnlistTable", "True")); SAVE_GMSPAWN_ON_CUSTOM = Boolean.valueOf(L2JTeamSettings.getProperty("SaveGmSpawnOnCustom", "True")); @@ -2438,5 +2447,5 @@ else if (pName.equalsIgnoreCase("TradeChat")) DEFAULT_TRADE_CHAT = pValue; else if (pName.equalsIgnoreCase("MenuStyle")) GM_ADMIN_MENU_STYLE = pValue; - //XXX Archid customs + else if (pName.equalsIgnoreCase("MaxPAtkSpeed")) MAX_PATK_SPEED = Integer.parseInt(pValue); else if (pName.equalsIgnoreCase("MaxMAtkSpeed")) MAX_MATK_SPEED = Integer.parseInt(pValue); Index: /trunk/Game/config/customs.properties =================================================================== --- /trunk/Game/config/customs.properties (revision 27) +++ /trunk/Game/config/customs.properties (revision 35) @@ -291,2 +291,19 @@ # Castle Circlets can be equipped only by clan members if they own a castle - default true CastleCircletsRestriction = True + + +#=======================================# +# Р’РѕР№СЃ команды # +#=======================================# + +# Разрешить использывать .delevel +AllowDelevelCommand = False + +# ИД итема для снижения уровня +DelevelAdenaId = 57 + +# Количество предетов +DelevelAdenaCount = 10000000 + +# На сколько уровней можно снизить на 1 раз +LevelCountDelevel = 1
Уважаймый гость для того чтобы скачать файл Делаем команду .delevel, надо пройти регистрацию или войти под своим логином