Суть состоит в том, что игроку теперь можно самому выбирать: становится ли он Newbie или нет.
При входе игроку задается вопрос: Newbie ли он? И при положительном ответе ваш статус изменяется на Newbie.
Code
Enterworld.java
if (activeChar.isNewbie())
{
activeChar.sendMessage("Are you new?Press .yes if you are");
}
}
Code
--- java/net/sf/l2j/gameserver/GameServer.java (revision 147)
+++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
@@ -209,6 +209,7 @@
import net.sf.l2j.gameserver.handler.usercommandhandlers.PartyInfo;
import net.sf.l2j.gameserver.handler.usercommandhandlers.Time;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Banking;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Yes;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stats;
import net.sf.l2j.gameserver.idfactory.IdFactory;
@@ -625,8 +626,10 @@
if(Config.BANKING_SYSTEM_ENABLED)
_voicedCommandHandler.registerVoicedCommandHandler(new Banking());
+
+ if(Config.Yes)
+ _voicedCommandHandler.registerVoicedCommandHandler(new Yes());
-
_log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers.");
Now Make
Code
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 147)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -963,6 +963,7 @@
public static boolean ALT_GAME_FLAGED_PLAYER_CAN_USE_GK;
public static boolean SHOW_WELCOME_HTML_ON_PLAYER_LOGIN;
public static int TRADE_UNITS;
+ public static boolean Yes;
/** Custom Project Modifications - End */
/** FloodProtector - Start */
@@ -2069,6 +2070,7 @@
STARTING_TITLE = L2JModSettings.getProperty("StartingTitle", "Something");
SHOW_WELCOME_HTML_ON_PLAYER_LOGIN = Boolean.parseBoolean(L2JModSettings.getProperty("ShowWelcomeHtmlOnLogin"
, "False"));
TRADE_UNITS = Integer.parseInt(L2JModSettings.getProperty("TradeUnits", "250"));
+ Yes = Boolean.parseBoolean(L2JModSettings.getProperty("Yes", "True"));
/** Custom Project Modifications - End */
Now make yes.java to voiced command handlers
Code:
Code
Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Yes.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Yes.java (revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Yes.java (revision 0)
@@ -0,0 +1,39 @@
/*
* 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 2, 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.