📄 config.java
字号:
public static int LV66_EXP;
public static int LV67_EXP;
public static int LV68_EXP;
public static int LV69_EXP;
public static int LV70_EXP;
public static int LV71_EXP;
public static int LV72_EXP;
public static int LV73_EXP;
public static int LV74_EXP;
public static int LV75_EXP;
public static int LV76_EXP;
public static int LV77_EXP;
public static int LV78_EXP;
public static int LV79_EXP;
public static int LV80_EXP;
public static int LV81_EXP;
public static int LV82_EXP;
public static int LV83_EXP;
public static int LV84_EXP;
public static int LV85_EXP;
public static int LV86_EXP;
public static int LV87_EXP;
public static int LV88_EXP;
public static int LV89_EXP;
public static int LV90_EXP;
public static int LV91_EXP;
public static int LV92_EXP;
public static int LV93_EXP;
public static int LV94_EXP;
public static int LV95_EXP;
public static int LV96_EXP;
public static int LV97_EXP;
public static int LV98_EXP;
public static int LV99_EXP;
// 所有怪物都可抓進化by eric1300460
public static int MAX_CE_PET_LEVEL;
public static int RANDOM_CE_PET_LEVEL;
public static int MIN_CE_LEVEL_UP_HP;
public static int MAX_CE_LEVEL_UP_HP;
public static int MIN_CE_LEVEL_UP_MP;
public static int MAX_CE_LEVEL_UP_MP;
public static boolean CE_ACTIVE;
public static int EVOLVE_HPMP_SET;
// ~所有怪物都可抓進化by eric1300460
//新增購買商店捲軸 by eric1300460
public static boolean SCROLL_SHOP;
//~新增購買商店捲軸 by eric1300460
//TODO 可設定能力值上限 by srwh
public static int MAX_ABILITY;
public static int MAX_ABILITY2;
public static int MAX_ABILITY3;
//TODO 循環公告 by 雷公
public static boolean Use_Show_Announcecycle;
public static int Show_Announcecycle_Time;
public static int Pet_Max_LV; //TODO 寵物等級
public static double RATE_XP_PET; //TODO 寵物經驗倍率
public static boolean Drop_Item; //TODO 丟棄物品刪除道具
public static int Hp_Reg_of_INHOTEL;
public static int Mp_Reg_of_INHOTEL;
public static boolean GITorF; //TODO 是否開啟給物品
public static int GI; //TODO 在線一段時間給物品 設定物品
public static int GIC; //TODO 設定數量
public static int GIT; //TODO 設定時間
public static int RESTART_TIME; //重新啟動伺服器
public static boolean OPCODE; //是否開啟顯示OPCODE
public static boolean ALL_GM; //是否開啟全部人都是GM
public static short ENCHANT_CHANCE_ATTR; //屬性卷軸衝的機率
public static boolean SHOW_HP_BAR; //顯示血條
public static boolean HACK1; //穿人外掛
public static boolean HACK2; //魔法外掛
/** Configuration files */
public static final String SERVER_CONFIG_FILE = "./config/server.properties";
public static final String RATES_CONFIG_FILE = "./config/rates.properties";
public static final String ALT_SETTINGS_FILE = "./config/altsettings.properties";
public static final String CHAR_SETTINGS_CONFIG_FILE = "./config/charsettings.properties";
public static final String OTHER_SETTINGS_CONFIG_FILE = "./config/othersettings.properties";
/** その他の設定 */
// NPCから吸えるMP限界
public static final int MANA_DRAIN_LIMIT_PER_NPC = 40;
// 一回の攻撃で吸えるMP限界(SOM、鋼鉄SOM)
public static final int MANA_DRAIN_LIMIT_PER_SOM_ATTACK = 9;
public static void load() {
_log.info("正在讀取伺服器設定...");
//*******************************************************
// othersettings.properties
try {
Properties otherSettings = new Properties();
InputStream is = new FileInputStream(new File(OTHER_SETTINGS_CONFIG_FILE));
otherSettings.load(is);
is.close();
//寵物經驗倍率
RATE_XP_PET = Double.parseDouble(otherSettings.getProperty("PetRateXp",
"1.0"));
//TODO 可設定能力值上限 by srwh
MAX_ABILITY = Integer.parseInt(otherSettings.getProperty("MaxAbility",
"25"));
MAX_ABILITY2 = Integer.parseInt(otherSettings.getProperty("MaxAbility2",
"5"));
MAX_ABILITY3 = Integer.parseInt(otherSettings.getProperty("MaxAbility3",
"25"));
//TODO 循環公告 by 雷公
Use_Show_Announcecycle = Boolean.parseBoolean(otherSettings.getProperty(
"UseShowAnnouncecycle", "false"));
Show_Announcecycle_Time = Integer.parseInt(otherSettings.getProperty(
"ShowAnnouncecycleTime", "30"));
//TODO 寵物等級
Pet_Max_LV = Integer.parseInt(otherSettings.getProperty(
"PetMaxLV", "50"));
//TODO 刪除丟棄物品
Drop_Item = Boolean.parseBoolean(otherSettings.getProperty(
"DropItem", "false"));
//TODO 盟屋、旅館回血回魔設定 by bill00148
Hp_Reg_of_INHOTEL = Integer.parseInt(otherSettings.getProperty(
"HpRegofINHOTEL", "7"));
Mp_Reg_of_INHOTEL = Integer.parseInt(otherSettings.getProperty(
"MpRegofINHOTEL", "3"));
//TODO 在線一段時間給物品
GITorF = Boolean.parseBoolean(otherSettings.getProperty(
"GITorF", "false"));
GI = Integer.parseInt(otherSettings.getProperty(
"GI", "41159"));
GIC = Integer.parseInt(otherSettings.getProperty(
"GIC", "1"));
GIT = Integer.parseInt(otherSettings.getProperty(
"GIT", "3"));
//所有怪物都可抓進化
CE_ACTIVE = Boolean.parseBoolean(otherSettings.getProperty(
"CE_ACTIVE", "0"));
MAX_CE_PET_LEVEL = Integer.parseInt(otherSettings.getProperty(
"MaxCEPetLevel", "52"));
RANDOM_CE_PET_LEVEL = Integer.parseInt(otherSettings.getProperty(
"RandomCEPetLevel", "2"));
MIN_CE_LEVEL_UP_HP = Integer.parseInt(otherSettings.getProperty(
"MinCELevelUpHp", "10"));
MAX_CE_LEVEL_UP_HP = Integer.parseInt(otherSettings.getProperty(
"MaxCELevelUpHp", "25"));
MIN_CE_LEVEL_UP_MP = Integer.parseInt(otherSettings.getProperty(
"MinCELevelUpMp", "10"));
MAX_CE_LEVEL_UP_MP = Integer.parseInt(otherSettings.getProperty(
"MaxCELevelUpMp", "25"));
EVOLVE_HPMP_SET = Integer.parseInt(otherSettings.getProperty(
"EvolveHpMpSet", "50"));
//~所有怪物都可抓進化
//新增購買商店捲軸 by eric1300460
SCROLL_SHOP = Boolean.parseBoolean(otherSettings.getProperty(
"ScrollShop", "true"));
//~新增購買商店捲軸 by eric1300460
//重新啟動伺服器
RESTART_TIME = Integer.parseInt(otherSettings.getProperty(
"RestartTime", "240"));
OPCODE = Boolean.parseBoolean(otherSettings.getProperty(
"opcode", "false"));
ALL_GM = Boolean.parseBoolean(otherSettings.getProperty(
"All_GM", "false"));
//屬性卷軸衝的機率
ENCHANT_CHANCE_ATTR = Short.parseShort(otherSettings.getProperty(
"EnchantChanceAttr", "20"));
//所有人都看的到怪物血條
SHOW_HP_BAR = Boolean.parseBoolean(otherSettings.getProperty(
"ShowHPBar", "false"));
HACK1 = Boolean.parseBoolean(otherSettings.getProperty(
"Hack1", "false"));
HACK2 = Boolean.parseBoolean(otherSettings.getProperty(
"Hack2", "false"));
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
throw new Error("Failed to Load " + SERVER_CONFIG_FILE + " File.");
}
//*******************************************************
// server.properties
try {
Properties serverSettings = new Properties();
InputStream is = new FileInputStream(new File(SERVER_CONFIG_FILE));
serverSettings.load(is);
is.close();
GAME_SERVER_HOST_NAME = serverSettings.getProperty(
"GameserverHostname", "*");
GAME_SERVER_PORT = Integer.parseInt(serverSettings.getProperty(
"GameserverPort", "2000"));
DB_DRIVER = serverSettings.getProperty("Driver",
"com.mysql.jdbc.Driver");
DB_URL = serverSettings
.getProperty("URL",
"jdbc:mysql://localhost/l1jdb?useUnicode=true&characterEncoding=big5");
DB_LOGIN = serverSettings.getProperty("Login", "root");
DB_PASSWORD = serverSettings.getProperty("Password", "");
THREAD_P_TYPE_GENERAL = Integer.parseInt(serverSettings
.getProperty("GeneralThreadPoolType", "0"), 10);
THREAD_P_SIZE_GENERAL = Integer.parseInt(serverSettings
.getProperty("GeneralThreadPoolSize", "0"), 10);
CLIENT_LANGUAGE = Integer.parseInt(serverSettings.getProperty(
"ClientLanguage", "4"));
TIME_ZONE = serverSettings.getProperty("TimeZone", "JST");
HOSTNAME_LOOKUPS = Boolean.parseBoolean(serverSettings.getProperty(
"HostnameLookups", "false"));
AUTOMATIC_KICK = Integer.parseInt(serverSettings.getProperty(
"AutomaticKick", "10"));
AUTO_CREATE_ACCOUNTS = Boolean.parseBoolean(serverSettings
.getProperty("AutoCreateAccounts", "true"));
MAX_ONLINE_USERS = Short.parseShort(serverSettings.getProperty(
"MaximumOnlineUsers", "30"));
CACHE_MAP_FILES = Boolean.parseBoolean(serverSettings.getProperty(
"CacheMapFiles", "false"));
LOAD_V2_MAP_FILES = Boolean.parseBoolean(serverSettings
.getProperty("LoadV2MapFiles", "false"));
CHECK_MOVE_INTERVAL = Boolean.parseBoolean(serverSettings
.getProperty("CheckMoveInterval", "false"));
CHECK_ATTACK_INTERVAL = Boolean.parseBoolean(serverSettings
.getProperty("CheckAttackInterval", "false"));
CHECK_SPELL_INTERVAL = Boolean.parseBoolean(serverSettings
.getProperty("CheckSpellInterval", "false"));
INJUSTICE_COUNT = Short.parseShort(serverSettings.getProperty(
"InjusticeCount", "10"));
JUSTICE_COUNT = Integer.parseInt(serverSettings.getProperty(
"JusticeCount", "4"));
CHECK_STRICTNESS = Integer.parseInt(serverSettings.getProperty(
"CheckStrictness", "102"));
LOGGING_WEAPON_ENCHANT = Byte.parseByte(serverSettings.getProperty(
"LoggingWeaponEnchant", "0"));
LOGGING_ARMOR_ENCHANT = Byte.parseByte(serverSettings.getProperty(
"LoggingArmorEnchant", "0"));
LOGGING_CHAT_NORMAL = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatNormal", "false"));
LOGGING_CHAT_WHISPER = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatWhisper", "false"));
LOGGING_CHAT_SHOUT = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatShout", "false"));
LOGGING_CHAT_WORLD = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatWorld", "false"));
LOGGING_CHAT_CLAN = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatClan", "false"));
LOGGING_CHAT_PARTY = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatParty", "false"));
LOGGING_CHAT_COMBINED = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatCombined", "false"));
LOGGING_CHAT_CHAT_PARTY = Boolean.parseBoolean(serverSettings
.getProperty("LoggingChatChatParty", "false"));
AUTOSAVE_INTERVAL = Integer.parseInt(serverSettings.getProperty(
"AutosaveInterval", "1200"), 10);
AUTOSAVE_INTERVAL_INVENTORY = Integer.parseInt(serverSettings
.getProperty("AutosaveIntervalOfInventory", "300"), 10);
SKILLTIMER_IMPLTYPE = Integer.parseInt(serverSettings.getProperty(
"SkillTimerImplType", "1"));
NPCAI_IMPLTYPE = Integer.parseInt(serverSettings.getProperty(
"NpcAIImplType", "1"));
TELNET_SERVER = Boolean.parseBoolean(serverSettings.getProperty(
"TelnetServer", "false"));
TELNET_SERVER_PORT = Integer.parseInt(serverSettings.getProperty(
"TelnetServerPort", "23"));
PC_RECOGNIZE_RANGE = Integer.parseInt(serverSettings.getProperty(
"PcRecognizeRange", "20"));
CHARACTER_CONFIG_IN_SERVER_SIDE = Boolean
.parseBoolean(serverSettings.getProperty(
"CharacterConfigInServerSide", "true"));
ALLOW_2PC = Boolean.parseBoolean(serverSettings.getProperty(
"Allow2PC", "true"));
LEVEL_DOWN_RANGE = Integer.parseInt(serverSettings.getProperty(
"LevelDownRange", "0"));
SEND_PACKET_BEFORE_TELEPORT = Boolean.parseBoolean(serverSettings
.getProperty("SendPacketBeforeTeleport", "false"));
DETECT_DB_RESOURCE_LEAKS = Boolean.parseBoolean(serverSettings
.getProperty("EnableDatabaseResourceLeaksDetection",
"false"));
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
throw new Error("Failed to Load " + SERVER_CONFIG_FILE + " File.");
}
// rates.properties
try {
Properties rateSettings = new Properties();
InputStream is = new FileInputStream(new File(RATES_CONFIG_FILE));
rateSettings.load(is);
is.close();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -