Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 291.43 KB | None | 0 0
  1. package net.sf.l2j;
  2.  
  3. import java.io.File;
  4. import java.io.FileInputStream;
  5. import java.io.InputStream;
  6. import java.io.LineNumberReader;
  7. import java.io.PrintStream;
  8. import java.util.List;
  9. import java.util.Properties;
  10. import java.util.concurrent.TimeUnit;
  11. import java.util.logging.Logger;
  12. import javolution.text.TextBuilder;
  13. import javolution.util.FastList;
  14. import javolution.util.FastMap;
  15. import javolution.util.FastTable;
  16. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  17. import net.sf.l2j.gameserver.model.entity.EventTerritory;
  18. import net.sf.l2j.util.Location;
  19.  
  20. public final class Config
  21. {
  22. protected static final Logger _log = Logger.getLogger(Config.class.getName());
  23.  
  24.  
  25.  
  26. public static final String CONFIGURATION_FILE = "./config/server.cfg";
  27.  
  28.  
  29.  
  30. public static final String OPTIONS_FILE = "./config/options.cfg";
  31.  
  32.  
  33.  
  34. public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.cfg";
  35.  
  36.  
  37.  
  38. public static final String ID_CONFIG_FILE = "./config/idfactory.cfg";
  39.  
  40.  
  41.  
  42. public static final String OTHER_CONFIG_FILE = "./config/other.cfg";
  43.  
  44.  
  45.  
  46. public static final String RATES_CONFIG_FILE = "./config/rates.cfg";
  47.  
  48.  
  49.  
  50. public static final String ALT_SETTINGS_FILE = "./config/altsettings.cfg";
  51.  
  52.  
  53.  
  54. public static final String PVP_CONFIG_FILE = "./config/pvp.cfg";
  55.  
  56.  
  57.  
  58. public static final String GM_ACCESS_FILE = "./config/GMAccess.cfg";
  59.  
  60.  
  61.  
  62. public static final String TELNET_FILE = "./config/telnet.cfg";
  63.  
  64.  
  65.  
  66. public static final String SIEGE_CONFIGURATION_FILE = "./config/siege.cfg";
  67.  
  68.  
  69.  
  70. public static final String BANNED_IP_XML = "./config/banned.xml";
  71.  
  72.  
  73.  
  74. public static final String HEXID_FILE = "./config/hexid.txt";
  75.  
  76.  
  77.  
  78. public static final String COMMAND_PRIVILEGES_FILE = "./config/command-privileges.cfg";
  79.  
  80.  
  81.  
  82. public static final String AI_FILE = "./config/ai.cfg";
  83.  
  84.  
  85.  
  86. public static final String SEVENSIGNS_FILE = "./config/sevensigns.cfg";
  87.  
  88.  
  89.  
  90. public static final String CLANHALL_CONFIG_FILE = "./config/clanhall.cfg";
  91.  
  92.  
  93.  
  94. public static final String NPC_CONFIG_FILE = "./config/npc.cfg";
  95.  
  96.  
  97.  
  98. public static final String CUSTOM_CONFIG_FILE = "./config/custom.cfg";
  99.  
  100.  
  101.  
  102. public static final String ENCHANT_CONFIG_FILE = "./config/enchants.cfg";
  103.  
  104.  
  105.  
  106. public static final String CMD_CONFIG_FILE = "./config/commands.cfg";
  107.  
  108.  
  109.  
  110. public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
  111.  
  112.  
  113.  
  114. public static final String GEO_FILE = "./config/geodata.cfg";
  115.  
  116.  
  117.  
  118. public static final String FAKE_FILE = "./config/fakeplayers.cfg";
  119.  
  120.  
  121.  
  122. public static final String GAME_GUARD_FILE = "./config/protection.cfg";
  123.  
  124.  
  125.  
  126. public static boolean DEBUG;
  127.  
  128.  
  129.  
  130. public static boolean ASSERT;
  131.  
  132.  
  133.  
  134. public static boolean DEVELOPER;
  135.  
  136.  
  137.  
  138. public static boolean TEST_SERVER;
  139.  
  140.  
  141.  
  142. public static int[] PORTS_GAME;
  143.  
  144.  
  145.  
  146. public static int PORT_LOGIN;
  147.  
  148.  
  149. public static String LOGIN_BIND_ADDRESS;
  150.  
  151.  
  152. public static int LOGIN_TRY_BEFORE_BAN;
  153.  
  154.  
  155. public static int LOGIN_BLOCK_AFTER_BAN;
  156.  
  157.  
  158. public static String GAMESERVER_HOSTNAME;
  159.  
  160.  
  161. public static String DATABASE_DRIVER;
  162.  
  163.  
  164. public static String DATABASE_URL;
  165.  
  166.  
  167. public static String DATABASE_LOGIN;
  168.  
  169.  
  170. public static String DATABASE_PASSWORD;
  171.  
  172.  
  173. public static int DATABASE_MAX_CONNECTIONS;
  174.  
  175.  
  176. public static int MINCONNECTIONSPERPARTITION;
  177.  
  178.  
  179. public static int MAXCONNECTIONSPERPARTITION;
  180.  
  181.  
  182. public static int PARTITIONCOUNT;
  183.  
  184.  
  185. public static int ACQUIREINCREMENT;
  186.  
  187.  
  188. public static int IDLECONNECTIONTESTPERIOD;
  189.  
  190.  
  191. public static int IDLEMAXAGE;
  192.  
  193.  
  194. public static int RELEASEHELPERTHREADS;
  195.  
  196.  
  197. public static int ACQUIRERETRYDELAY;
  198.  
  199.  
  200. public static int ACQUIRERETRYATTEMPTS;
  201.  
  202.  
  203. public static int QUERYEXECUTETIMELIMIT;
  204.  
  205.  
  206. public static int CONNECTIONTIMEOUT;
  207.  
  208.  
  209. public static boolean LAZYINIT;
  210.  
  211.  
  212. public static boolean TRANSACTIONRECOVERYENABLED;
  213.  
  214.  
  215. public static int MAXIMUM_ONLINE_USERS;
  216.  
  217.  
  218. public static boolean SERVER_LIST_BRACKET;
  219.  
  220.  
  221. public static boolean SERVER_LIST_CLOCK;
  222.  
  223.  
  224. public static boolean SERVER_LIST_TESTSERVER;
  225.  
  226.  
  227. public static boolean SERVER_GMONLY;
  228.  
  229.  
  230. public static int THREAD_P_EFFECTS;
  231.  
  232.  
  233. public static int THREAD_P_GENERAL;
  234.  
  235.  
  236. public static int GENERAL_PACKET_THREAD_CORE_SIZE;
  237.  
  238.  
  239. public static int THREAD_P_PATHFIND;
  240.  
  241.  
  242. public static int THREAD_AI_EXECUTOR;
  243.  
  244.  
  245. public static int THREAD_GENERAL_EXECUTOR;
  246.  
  247.  
  248. public static int IO_PACKET_THREAD_CORE_SIZE;
  249.  
  250.  
  251. public static int GENERAL_THREAD_CORE_SIZE;
  252.  
  253.  
  254. public static int THREADING_MODEL;
  255.  
  256.  
  257. public static int NPC_AI_MAX_THREAD;
  258.  
  259.  
  260. public static int PLAYER_AI_MAX_THREAD;
  261.  
  262.  
  263. public static int THREAD_P_MOVE;
  264.  
  265.  
  266. public static boolean AUTO_LOOT;
  267.  
  268.  
  269. public static boolean AUTO_LOOT_RAID;
  270.  
  271.  
  272. public static boolean AUTO_LOOT_HERBS;
  273.  
  274.  
  275. public static String CNAME_TEMPLATE;
  276.  
  277.  
  278. public static String PET_NAME_TEMPLATE;
  279.  
  280.  
  281. public static int MAX_CHARACTERS_NUMBER_PER_ACCOUNT;
  282.  
  283.  
  284. public static String DEFAULT_GLOBAL_CHAT;
  285.  
  286.  
  287. public static String DEFAULT_TRADE_CHAT;
  288.  
  289.  
  290. public static boolean EVERYBODY_HAS_ADMIN_RIGHTS;
  291.  
  292.  
  293. public static boolean ALT_GAME_CREATION;
  294.  
  295.  
  296. public static double ALT_GAME_CREATION_SPEED;
  297.  
  298.  
  299. public static double ALT_GAME_CREATION_XP_RATE;
  300.  
  301.  
  302. public static double ALT_GAME_CREATION_SP_RATE;
  303.  
  304.  
  305. public static boolean ALT_BLACKSMITH_USE_RECIPES;
  306.  
  307.  
  308. public static boolean REMOVE_CASTLE_CIRCLETS;
  309.  
  310.  
  311. public static double ALT_WEIGHT_LIMIT;
  312.  
  313.  
  314. public static double MAGIC_CRIT_EXP;
  315.  
  316.  
  317. public static double MAGIC_CRIT_EXP_OLY;
  318.  
  319.  
  320. public static double MAGIC_DAM_EXP;
  321.  
  322.  
  323. public static double MAGIC_PDEF_EXP;
  324.  
  325.  
  326. public static boolean ALT_GAME_SKILL_LEARN;
  327.  
  328.  
  329. public static boolean AUTO_LEARN_SKILLS;
  330.  
  331.  
  332. public static boolean ALT_GAME_CANCEL_BOW;
  333.  
  334.  
  335. public static boolean ALT_GAME_CANCEL_CAST;
  336.  
  337.  
  338. public static boolean ALT_GAME_TIREDNESS;
  339.  
  340.  
  341. public static int ALT_PARTY_RANGE;
  342.  
  343.  
  344. public static int ALT_PARTY_RANGE2;
  345.  
  346.  
  347. public static boolean ALT_GAME_SHIELD_BLOCKS;
  348.  
  349.  
  350. public static int ALT_PERFECT_SHLD_BLOCK;
  351.  
  352.  
  353. public static boolean ALT_GAME_MOB_ATTACK_AI;
  354.  
  355.  
  356. public static boolean ALT_MOB_AGRO_IN_PEACEZONE;
  357.  
  358.  
  359. public static boolean ALT_GAME_FREIGHTS;
  360.  
  361.  
  362. public static int ALT_GAME_FREIGHT_PRICE;
  363.  
  364.  
  365. public static float ALT_GAME_SKILL_HIT_RATE;
  366.  
  367.  
  368. public static boolean ALT_GAME_DELEVEL;
  369.  
  370.  
  371. public static boolean ALT_GAME_MAGICFAILURES;
  372.  
  373.  
  374. public static boolean ALT_GAME_REQUIRE_CASTLE_DAWN;
  375.  
  376.  
  377. public static boolean ALT_GAME_REQUIRE_CLAN_CASTLE;
  378.  
  379.  
  380. public static int ALT_GAME_FREE_TELEPORT;
  381.  
  382.  
  383. public static boolean ALT_RECOMMEND;
  384.  
  385.  
  386. public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
  387.  
  388.  
  389. public static byte MAX_SUBCLASS;
  390.  
  391.  
  392. public static boolean ALT_GAME_VIEWNPC;
  393.  
  394.  
  395. public static int ALT_FESTIVAL_MIN_PLAYER;
  396.  
  397.  
  398. public static int ALT_MAXIMUM_PLAYER_CONTRIB;
  399.  
  400.  
  401. public static long ALT_FESTIVAL_MANAGER_START;
  402.  
  403.  
  404. public static long ALT_FESTIVAL_LENGTH;
  405.  
  406.  
  407. public static long ALT_FESTIVAL_CYCLE_LENGTH;
  408.  
  409.  
  410. public static long ALT_FESTIVAL_FIRST_SPAWN;
  411.  
  412.  
  413. public static long ALT_FESTIVAL_FIRST_SWARM;
  414.  
  415.  
  416. public static long ALT_FESTIVAL_SECOND_SPAWN;
  417.  
  418.  
  419. public static long ALT_FESTIVAL_SECOND_SWARM;
  420.  
  421.  
  422. public static long ALT_FESTIVAL_CHEST_SPAWN;
  423.  
  424.  
  425. public static int ALT_CLAN_MEMBERS_FOR_WAR;
  426.  
  427.  
  428. public static int ALT_CLAN_JOIN_DAYS;
  429.  
  430.  
  431. public static int ALT_CLAN_CREATE_DAYS;
  432.  
  433.  
  434. public static int ALT_CLAN_DISSOLVE_DAYS;
  435.  
  436.  
  437. public static int ALT_ALLY_JOIN_DAYS_WHEN_LEAVED;
  438.  
  439.  
  440. public static int ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED;
  441.  
  442.  
  443. public static int ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED;
  444.  
  445.  
  446. public static int ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED;
  447.  
  448.  
  449. public static float ALT_CLAN_REP_MUL;
  450.  
  451.  
  452. public static int ALT_CLAN_CREATE_LEVEL;
  453.  
  454.  
  455. public static int ALT_CLAN_REP_WAR;
  456.  
  457.  
  458. public static boolean ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE;
  459.  
  460.  
  461. public static boolean ALT_GAME_NEW_CHAR_ALWAYS_IS_NOBLE;
  462.  
  463.  
  464. public static int ALT_START_LEVEL;
  465.  
  466.  
  467. public static boolean ALLOW_RUPOR;
  468.  
  469.  
  470. public static int RUPOR_ID;
  471.  
  472.  
  473. public static boolean SONLINE_ANNOUNE;
  474.  
  475.  
  476. public static int SONLINE_ANNOUNCE_DELAY;
  477.  
  478.  
  479. public static boolean SONLINE_SHOW_MAXONLINE;
  480.  
  481.  
  482. public static boolean SONLINE_SHOW_MAXONLINE_DATE;
  483.  
  484.  
  485. public static boolean SONLINE_SHOW_OFFLINE;
  486.  
  487.  
  488. public static boolean SONLINE_LOGIN_ONLINE;
  489.  
  490.  
  491. public static boolean SONLINE_LOGIN_MAX;
  492.  
  493.  
  494. public static boolean SONLINE_LOGIN_DATE;
  495.  
  496.  
  497. public static boolean SONLINE_LOGIN_OFFLINE;
  498.  
  499.  
  500. public static int AUTO_ANNOUNCE_DELAY;
  501.  
  502.  
  503. public static boolean AUTO_ANNOUNCE_ALLOW;
  504.  
  505.  
  506. public static boolean ALT_ALLOW_AUGMENT_ON_OLYMP;
  507.  
  508.  
  509. public static boolean ALT_ALLOW_OFFLINE_TRADE;
  510.  
  511.  
  512. public static boolean ALT_ALLOW_AUC;
  513.  
  514.  
  515. public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
  516.  
  517.  
  518. public static boolean CASTLE_SHIELD;
  519.  
  520.  
  521. public static boolean CLANHALL_SHIELD;
  522.  
  523.  
  524. public static boolean APELLA_ARMORS;
  525.  
  526.  
  527. public static boolean OATH_ARMORS;
  528.  
  529.  
  530. public static boolean CASTLE_CROWN;
  531.  
  532.  
  533. public static boolean CASTLE_CIRCLETS;
  534.  
  535.  
  536. public static int ALT_MAX_NUM_OF_CLANS_IN_ALLY;
  537.  
  538.  
  539. public static boolean LIFE_CRYSTAL_NEEDED;
  540.  
  541.  
  542. public static boolean SP_BOOK_NEEDED;
  543.  
  544.  
  545. public static boolean ES_SP_BOOK_NEEDED;
  546.  
  547.  
  548. public static boolean LOG_CHAT;
  549.  
  550.  
  551. public static boolean LOG_ITEMS;
  552.  
  553.  
  554. public static FastList<Integer> LOG_MULTISELL_ID = new FastList();
  555.  
  556.  
  557.  
  558. public static boolean ALT_PRIVILEGES_ADMIN;
  559.  
  560.  
  561.  
  562. public static boolean ALT_PRIVILEGES_SECURE_CHECK;
  563.  
  564.  
  565.  
  566. public static int ALT_PRIVILEGES_DEFAULT_LEVEL;
  567.  
  568.  
  569.  
  570. public static int ALT_OLY_START_TIME;
  571.  
  572.  
  573.  
  574. public static int ALT_OLY_MIN;
  575.  
  576.  
  577.  
  578. public static long ALT_OLY_CPERIOD;
  579.  
  580.  
  581.  
  582. public static long ALT_OLY_BATTLE;
  583.  
  584.  
  585.  
  586. public static long ALT_OLY_BWAIT;
  587.  
  588.  
  589.  
  590. public static long ALT_OLY_IWAIT;
  591.  
  592.  
  593.  
  594. public static long ALT_OLY_WPERIOD;
  595.  
  596.  
  597.  
  598. public static long ALT_OLY_VPERIOD;
  599.  
  600.  
  601.  
  602. public static boolean ALT_OLY_SAME_IP;
  603.  
  604.  
  605.  
  606. public static boolean ALT_OLY_SAME_HWID;
  607.  
  608.  
  609.  
  610. public static int ALT_OLY_ENCHANT_LIMIT;
  611.  
  612.  
  613.  
  614. public static int ALT_OLY_MINCLASS;
  615.  
  616.  
  617.  
  618. public static int ALT_OLY_MINNONCLASS;
  619.  
  620.  
  621.  
  622. public static boolean ALT_OLY_MP_REG;
  623.  
  624.  
  625.  
  626. public static int ALT_MANOR_REFRESH_TIME;
  627.  
  628.  
  629.  
  630. public static int ALT_MANOR_REFRESH_MIN;
  631.  
  632.  
  633.  
  634. public static int ALT_MANOR_APPROVE_TIME;
  635.  
  636.  
  637.  
  638. public static int ALT_MANOR_APPROVE_MIN;
  639.  
  640.  
  641.  
  642. public static int ALT_MANOR_MAINTENANCE_PERIOD;
  643.  
  644.  
  645.  
  646. public static boolean ALT_MANOR_SAVE_ALL_ACTIONS;
  647.  
  648.  
  649.  
  650. public static int ALT_MANOR_SAVE_PERIOD_RATE;
  651.  
  652.  
  653.  
  654. public static int ALT_LOTTERY_PRIZE;
  655.  
  656.  
  657.  
  658. public static int ALT_LOTTERY_TICKET_PRICE;
  659.  
  660.  
  661.  
  662. public static float ALT_LOTTERY_5_NUMBER_RATE;
  663.  
  664.  
  665.  
  666. public static float ALT_LOTTERY_4_NUMBER_RATE;
  667.  
  668.  
  669.  
  670. public static float ALT_LOTTERY_3_NUMBER_RATE;
  671.  
  672.  
  673.  
  674. public static int ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
  675.  
  676.  
  677.  
  678. public static boolean NOEPIC_QUESTS;
  679.  
  680.  
  681.  
  682. public static boolean ALT_EPIC_JEWERLY;
  683.  
  684.  
  685.  
  686. public static boolean ONE_AUGMENT;
  687.  
  688.  
  689.  
  690. public static boolean JOB_WINDOW;
  691.  
  692.  
  693.  
  694. public static boolean USE_SOULSHOTS;
  695.  
  696.  
  697.  
  698. public static boolean USE_ARROWS;
  699.  
  700.  
  701.  
  702. public static int MAX_PATK_SPEED;
  703.  
  704.  
  705.  
  706. public static int MAX_MATK_SPEED;
  707.  
  708.  
  709. public static int MAX_MAX_HP;
  710.  
  711.  
  712. public static boolean DISABLE_GRADE_PENALTY;
  713.  
  714.  
  715. public static boolean DISABLE_WEIGHT_PENALTY;
  716.  
  717.  
  718. public static int FS_TIME_ATTACK;
  719.  
  720.  
  721. public static int FS_TIME_COOLDOWN;
  722.  
  723.  
  724. public static int FS_TIME_ENTRY;
  725.  
  726.  
  727. public static int FS_TIME_WARMUP;
  728.  
  729.  
  730. public static int FS_PARTY_MEMBER_COUNT;
  731.  
  732.  
  733. public static int RIFT_MIN_PARTY_SIZE;
  734.  
  735.  
  736. public static int RIFT_SPAWN_DELAY;
  737.  
  738.  
  739. public static int RIFT_MAX_JUMPS;
  740.  
  741.  
  742. public static int RIFT_AUTO_JUMPS_TIME_MIN;
  743.  
  744.  
  745. public static int RIFT_AUTO_JUMPS_TIME_MAX;
  746.  
  747.  
  748. public static int RIFT_ENTER_COST_RECRUIT;
  749.  
  750.  
  751. public static int RIFT_ENTER_COST_SOLDIER;
  752.  
  753.  
  754. public static int RIFT_ENTER_COST_OFFICER;
  755.  
  756.  
  757. public static int RIFT_ENTER_COST_CAPTAIN;
  758.  
  759.  
  760. public static int RIFT_ENTER_COST_COMMANDER;
  761.  
  762.  
  763. public static int RIFT_ENTER_COST_HERO;
  764.  
  765.  
  766. public static int MAX_CHAT_LENGTH;
  767.  
  768.  
  769. public static int CRUMA_TOWER_LEVEL_RESTRICT;
  770.  
  771.  
  772. public static float RIFT_BOSS_ROOM_TIME_MUTIPLY;
  773.  
  774.  
  775. public static int GM_ACCESSLEVEL;
  776.  
  777.  
  778. public static int GM_MIN;
  779.  
  780.  
  781. public static int GM_ALTG_MIN_LEVEL;
  782.  
  783.  
  784. public static int GM_ANNOUNCE;
  785.  
  786.  
  787. public static int GM_BAN;
  788.  
  789.  
  790. public static int GM_BAN_CHAT;
  791.  
  792.  
  793. public static int GM_CREATE_ITEM;
  794.  
  795.  
  796. public static int GM_DELETE;
  797.  
  798.  
  799. public static int GM_KICK;
  800.  
  801.  
  802. public static int GM_MENU;
  803.  
  804.  
  805. public static int GM_GODMODE;
  806.  
  807.  
  808. public static int GM_CHAR_EDIT;
  809.  
  810.  
  811. public static int GM_CHAR_EDIT_OTHER;
  812.  
  813.  
  814. public static int GM_CHAR_VIEW;
  815.  
  816.  
  817. public static int GM_NPC_EDIT;
  818.  
  819.  
  820. public static int GM_NPC_VIEW;
  821.  
  822.  
  823. public static int GM_TELEPORT;
  824.  
  825.  
  826. public static int GM_TELEPORT_OTHER;
  827.  
  828.  
  829. public static int GM_RESTART;
  830.  
  831.  
  832. public static int GM_MONSTERRACE;
  833.  
  834.  
  835. public static int GM_RIDER;
  836.  
  837.  
  838. public static int GM_ESCAPE;
  839.  
  840.  
  841. public static int GM_FIXED;
  842.  
  843.  
  844. public static int GM_CREATE_NODES;
  845.  
  846.  
  847. public static int GM_ENCHANT;
  848.  
  849.  
  850. public static int GM_DOOR;
  851.  
  852.  
  853. public static int GM_RES;
  854.  
  855.  
  856. public static int GM_PEACEATTACK;
  857.  
  858.  
  859. public static int GM_HEAL;
  860.  
  861.  
  862. public static int GM_UNBLOCK;
  863.  
  864.  
  865. public static int GM_CACHE;
  866.  
  867.  
  868. public static int GM_TALK_BLOCK;
  869.  
  870.  
  871. public static int GM_TEST;
  872.  
  873.  
  874. public static boolean GM_DISABLE_TRANSACTION;
  875.  
  876.  
  877. public static int GM_TRANSACTION_MIN;
  878.  
  879.  
  880. public static int GM_TRANSACTION_MAX;
  881.  
  882.  
  883. public static int GM_CAN_GIVE_DAMAGE;
  884.  
  885.  
  886. public static int GM_DONT_TAKE_EXPSP;
  887.  
  888.  
  889. public static int GM_DONT_TAKE_AGGRO;
  890.  
  891.  
  892. public static int GM_REPAIR = 75;
  893.  
  894.  
  895.  
  896.  
  897. public static float RATE_XP;
  898.  
  899.  
  900.  
  901.  
  902. public static float RATE_SP;
  903.  
  904.  
  905.  
  906.  
  907. public static float RATE_PARTY_XP;
  908.  
  909.  
  910.  
  911.  
  912. public static float RATE_PARTY_SP;
  913.  
  914.  
  915.  
  916.  
  917. public static float RATE_QUESTS_REWARD;
  918.  
  919.  
  920.  
  921.  
  922. public static float RATE_DROP_ADENA;
  923.  
  924.  
  925.  
  926.  
  927. public static float RATE_DROP_ADENAMUL;
  928.  
  929.  
  930.  
  931.  
  932. public static float RATE_CONSUMABLE_COST;
  933.  
  934.  
  935.  
  936. public static float RATE_DROP_ITEMS;
  937.  
  938.  
  939.  
  940. public static float RATE_DROP_ITEMS_BY_RAID;
  941.  
  942.  
  943.  
  944. public static float RATE_DROP_ITEMS_BY_GRANDRAID;
  945.  
  946.  
  947.  
  948. public static float RATE_DROP_SPOIL;
  949.  
  950.  
  951.  
  952. public static int RATE_DROP_MANOR;
  953.  
  954.  
  955.  
  956. public static float RATE_DROP_QUEST;
  957.  
  958.  
  959.  
  960. public static float RATE_KARMA_EXP_LOST;
  961.  
  962.  
  963.  
  964. public static float RATE_SIEGE_GUARDS_PRICE;
  965.  
  966.  
  967.  
  968. public static float ALT_GAME_EXPONENT_XP;
  969.  
  970.  
  971.  
  972. public static float ALT_GAME_EXPONENT_SP;
  973.  
  974.  
  975.  
  976. public static float RATE_DROP_COMMON_HERBS;
  977.  
  978.  
  979.  
  980. public static float RATE_DROP_MP_HP_HERBS;
  981.  
  982.  
  983.  
  984. public static float RATE_DROP_GREATER_HERBS;
  985.  
  986.  
  987.  
  988. public static float RATE_DROP_SUPERIOR_HERBS;
  989.  
  990.  
  991.  
  992. public static float RATE_DROP_SPECIAL_HERBS;
  993.  
  994.  
  995.  
  996. public static int PLAYER_DROP_LIMIT;
  997.  
  998.  
  999.  
  1000. public static int PLAYER_RATE_DROP;
  1001.  
  1002.  
  1003.  
  1004. public static int PLAYER_RATE_DROP_ITEM;
  1005.  
  1006.  
  1007.  
  1008. public static int PLAYER_RATE_DROP_EQUIP;
  1009.  
  1010.  
  1011.  
  1012. public static int PLAYER_RATE_DROP_EQUIP_WEAPON;
  1013.  
  1014.  
  1015.  
  1016. public static float PET_XP_RATE;
  1017.  
  1018.  
  1019.  
  1020. public static int PET_FOOD_RATE;
  1021.  
  1022.  
  1023.  
  1024. public static float SINEATER_XP_RATE;
  1025.  
  1026.  
  1027.  
  1028. public static int KARMA_DROP_LIMIT;
  1029.  
  1030.  
  1031.  
  1032. public static int KARMA_RATE_DROP;
  1033.  
  1034.  
  1035.  
  1036. public static int KARMA_RATE_DROP_ITEM;
  1037.  
  1038.  
  1039.  
  1040. public static int KARMA_RATE_DROP_EQUIP;
  1041.  
  1042.  
  1043.  
  1044. public static int KARMA_RATE_DROP_EQUIP_WEAPON;
  1045.  
  1046.  
  1047.  
  1048. public static int AUTODESTROY_ITEM_AFTER;
  1049.  
  1050.  
  1051.  
  1052. public static int HERB_AUTO_DESTROY_TIME;
  1053.  
  1054.  
  1055.  
  1056. public static String PROTECTED_ITEMS;
  1057.  
  1058.  
  1059.  
  1060. public static List<Integer> LIST_PROTECTED_ITEMS = new FastList();
  1061.  
  1062. public static boolean DESTROY_DROPPED_PLAYER_ITEM;
  1063.  
  1064. public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM;
  1065.  
  1066. public static boolean SAVE_DROPPED_ITEM;
  1067.  
  1068. public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD;
  1069.  
  1070. public static int SAVE_DROPPED_ITEM_INTERVAL;
  1071.  
  1072. public static boolean CLEAR_DROPPED_ITEM_TABLE;
  1073.  
  1074. public static boolean PRECISE_DROP_CALCULATION;
  1075.  
  1076. public static boolean MULTIPLE_ITEM_DROP;
  1077.  
  1078. public static int COORD_SYNCHRONIZE;
  1079.  
  1080. public static int DELETE_DAYS;
  1081.  
  1082. public static File DATAPACK_ROOT;
  1083.  
  1084. public static int MAX_DRIFT_RANGE;
  1085.  
  1086. public static boolean ALLOWFISHING;
  1087.  
  1088. public static boolean ALLOW_MANOR;
  1089.  
  1090. public static boolean JAIL_IS_PVP;
  1091.  
  1092. public static boolean JAIL_DISABLE_CHAT;
  1093.  
  1094. public static L2WalkerAllowed ALLOW_L2WALKER_CLIENT;
  1095.  
  1096. public static boolean AUTOBAN_L2WALKER_ACC;
  1097.  
  1098. public static int L2WALKER_REVISION;
  1099.  
  1100. public static boolean GM_EDIT;
  1101.  
  1102. public static boolean ALLOW_DISCARDITEM;
  1103.  
  1104. public static boolean ALLOW_FREIGHT;
  1105.  
  1106. public static boolean ALLOW_WAREHOUSE;
  1107.  
  1108. public static boolean WAREHOUSE_CACHE;
  1109.  
  1110. public static int WAREHOUSE_CACHE_TIME;
  1111.  
  1112. public static boolean ALLOW_WEAR;
  1113.  
  1114. public static int WEAR_DELAY;
  1115.  
  1116. public static int WEAR_PRICE;
  1117.  
  1118. public static boolean ALLOW_LOTTERY;
  1119.  
  1120. public static boolean ALLOW_RACE;
  1121.  
  1122. public static boolean ALLOW_WATER;
  1123.  
  1124. public static boolean ALLOW_RENTPET;
  1125.  
  1126. public static boolean ALLOW_BOAT;
  1127.  
  1128. public static boolean ALLOW_RAID_BOSS_PUT;
  1129. public static boolean ALLOW_RAID_BOSS_HEAL;
  1130. public static boolean ALLOW_CURSED_WEAPONS;
  1131.  
  1132. public static enum L2WalkerAllowed
  1133. {
  1134. True,
  1135. False,
  1136. GM;
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143. private L2WalkerAllowed() {}
  1144. }
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151. public static boolean ALLOW_NPC_WALKERS;
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157. public static int PACKET_LIFETIME;
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163. public static int WYVERN_SPEED;
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169. public static int STRIDER_SPEED;
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175. public static int WATER_SPEED;
  1176.  
  1177.  
  1178.  
  1179.  
  1180. public static boolean ALLOW_WYVERN_UPGRADER;
  1181.  
  1182.  
  1183.  
  1184.  
  1185. public static int MIN_PROTOCOL_REVISION;
  1186.  
  1187.  
  1188.  
  1189.  
  1190. public static int MAX_PROTOCOL_REVISION;
  1191.  
  1192.  
  1193.  
  1194.  
  1195. public static boolean SHOW_PROTOCOL_VERSIONS;
  1196.  
  1197.  
  1198.  
  1199.  
  1200. public static int MIN_NPC_ANIMATION;
  1201.  
  1202.  
  1203.  
  1204.  
  1205. public static int MAX_NPC_ANIMATION;
  1206.  
  1207.  
  1208.  
  1209.  
  1210. public static int MIN_MONSTER_ANIMATION;
  1211.  
  1212.  
  1213.  
  1214.  
  1215. public static int MAX_MONSTER_ANIMATION;
  1216.  
  1217.  
  1218.  
  1219.  
  1220. public static boolean ACTIVATE_POSITION_RECORDER;
  1221.  
  1222.  
  1223.  
  1224.  
  1225. public static boolean USE_3D_MAP;
  1226.  
  1227.  
  1228.  
  1229.  
  1230. public static String COMMUNITY_TYPE;
  1231.  
  1232.  
  1233.  
  1234.  
  1235. public static String BBS_DEFAULT;
  1236.  
  1237.  
  1238.  
  1239.  
  1240. public static boolean SHOW_LEVEL_COMMUNITYBOARD;
  1241.  
  1242.  
  1243.  
  1244.  
  1245. public static boolean SHOW_STATUS_COMMUNITYBOARD;
  1246.  
  1247.  
  1248.  
  1249.  
  1250. public static int NAME_PAGE_SIZE_COMMUNITYBOARD;
  1251.  
  1252.  
  1253.  
  1254.  
  1255. public static int NAME_PER_ROW_COMMUNITYBOARD;
  1256.  
  1257.  
  1258.  
  1259.  
  1260. public static int MAX_ITEM_IN_PACKET;
  1261.  
  1262.  
  1263.  
  1264.  
  1265. public static boolean CHECK_KNOWN;
  1266.  
  1267.  
  1268.  
  1269.  
  1270. public static int GAME_SERVER_LOGIN_PORT;
  1271.  
  1272.  
  1273.  
  1274.  
  1275. public static String GAME_SERVER_LOGIN_HOST;
  1276.  
  1277.  
  1278.  
  1279.  
  1280. public static String INTERNAL_HOSTNAME;
  1281.  
  1282.  
  1283.  
  1284.  
  1285. public static String EXTERNAL_HOSTNAME;
  1286.  
  1287.  
  1288.  
  1289.  
  1290. public static int PATH_NODE_RADIUS;
  1291.  
  1292.  
  1293.  
  1294.  
  1295. public static int NEW_NODE_ID;
  1296.  
  1297.  
  1298.  
  1299.  
  1300. public static int SELECTED_NODE_ID;
  1301.  
  1302.  
  1303.  
  1304.  
  1305. public static int LINKED_NODE_ID;
  1306.  
  1307.  
  1308.  
  1309.  
  1310. public static String NEW_NODE_TYPE;
  1311.  
  1312.  
  1313.  
  1314.  
  1315. public static boolean SERVER_NEWS;
  1316.  
  1317.  
  1318.  
  1319.  
  1320. public static boolean SHOW_NPC_LVL;
  1321.  
  1322.  
  1323.  
  1324.  
  1325. public static boolean FORCE_INVENTORY_UPDATE;
  1326.  
  1327.  
  1328.  
  1329.  
  1330. public static boolean ALLOW_GUARDS;
  1331.  
  1332.  
  1333.  
  1334.  
  1335. public static boolean ALLOW_CLASS_MASTERS;
  1336.  
  1337.  
  1338.  
  1339.  
  1340. public static final FastMap<Integer, EventReward> CLASS_MASTERS_PRICES = new FastMap().shared("Config.CLASS_MASTERS_PRICES");
  1341.  
  1342.  
  1343.  
  1344. public static boolean ALLOW_CLAN_LEVEL;
  1345.  
  1346.  
  1347.  
  1348. public static boolean REWARD_SHADOW;
  1349.  
  1350.  
  1351.  
  1352. public static int IP_UPDATE_TIME;
  1353.  
  1354.  
  1355.  
  1356. public static String SERVER_VERSION;
  1357.  
  1358.  
  1359.  
  1360. public static String SERVER_BUILD_DATE;
  1361.  
  1362.  
  1363.  
  1364. public static String DATAPACK_VERSION;
  1365.  
  1366.  
  1367.  
  1368. public static int ZONE_TOWN;
  1369.  
  1370.  
  1371.  
  1372. public static boolean IS_CRAFTING_ENABLED;
  1373.  
  1374.  
  1375.  
  1376. public static int INVENTORY_MAXIMUM_NO_DWARF;
  1377.  
  1378.  
  1379.  
  1380. public static int INVENTORY_MAXIMUM_DWARF;
  1381.  
  1382.  
  1383.  
  1384. public static int INVENTORY_MAXIMUM_GM;
  1385.  
  1386.  
  1387.  
  1388. public static int WAREHOUSE_SLOTS_NO_DWARF;
  1389.  
  1390.  
  1391.  
  1392. public static int WAREHOUSE_SLOTS_DWARF;
  1393.  
  1394.  
  1395.  
  1396. public static int WAREHOUSE_SLOTS_CLAN;
  1397.  
  1398.  
  1399.  
  1400. public static int FREIGHT_SLOTS;
  1401.  
  1402.  
  1403.  
  1404. public static int KARMA_MIN_KARMA;
  1405.  
  1406.  
  1407.  
  1408. public static int KARMA_MAX_KARMA;
  1409.  
  1410.  
  1411.  
  1412. public static int KARMA_XP_DIVIDER;
  1413.  
  1414.  
  1415.  
  1416. public static int KARMA_LOST_BASE;
  1417.  
  1418.  
  1419.  
  1420. public static boolean KARMA_DROP_GM;
  1421.  
  1422.  
  1423.  
  1424. public static boolean KARMA_AWARD_PK_KILL;
  1425.  
  1426.  
  1427.  
  1428. public static int KARMA_PK_LIMIT;
  1429.  
  1430.  
  1431.  
  1432. public static String KARMA_NONDROPPABLE_PET_ITEMS;
  1433.  
  1434.  
  1435.  
  1436. public static String KARMA_NONDROPPABLE_ITEMS;
  1437.  
  1438.  
  1439.  
  1440. public static List<Integer> KARMA_LIST_NONDROPPABLE_PET_ITEMS = new FastList();
  1441.  
  1442.  
  1443.  
  1444. public static List<Integer> KARMA_LIST_NONDROPPABLE_ITEMS = new FastList();
  1445.  
  1446.  
  1447.  
  1448. public static String NONDROPPABLE_ITEMS;
  1449.  
  1450.  
  1451.  
  1452. public static List<Integer> LIST_NONDROPPABLE_ITEMS = new FastList();
  1453.  
  1454.  
  1455.  
  1456. public static String PET_RENT_NPC;
  1457.  
  1458.  
  1459.  
  1460. public static List<Integer> LIST_PET_RENT_NPC = new FastList();
  1461.  
  1462.  
  1463. public static int PVP_NORMAL_TIME;
  1464.  
  1465.  
  1466. public static int PVP_PVP_TIME;
  1467.  
  1468.  
  1469. public static boolean ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE;
  1470.  
  1471.  
  1472. public static boolean ALT_GAME_KARMA_PLAYER_CAN_SHOP;
  1473.  
  1474.  
  1475. public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
  1476.  
  1477.  
  1478. public static boolean ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
  1479.  
  1480.  
  1481. public static boolean ALT_GAME_KARMA_PLAYER_CAN_TRADE;
  1482.  
  1483.  
  1484. public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
  1485.  
  1486.  
  1487. public static int ALT_PLAYER_PROTECTION_LEVEL;
  1488.  
  1489.  
  1490. public static boolean L2JMOD_CHAMPION_ENABLE;
  1491.  
  1492.  
  1493. public static int L2JMOD_CHAMPION_FREQUENCY;
  1494.  
  1495.  
  1496. public static int L2JMOD_CHAMP_MIN_LVL;
  1497.  
  1498. public static int L2JMOD_CHAMP_MAX_LVL;
  1499.  
  1500. public static int L2JMOD_CHAMPION_HP;
  1501.  
  1502. public static double L2JMOD_CHAMPION_REWARDS_CHANCE;
  1503.  
  1504. public static double L2JMOD_CHAMPION_REWARDS_COUNT;
  1505.  
  1506. public static double L2JMOD_CHAMPION_REWARDS_EXP;
  1507.  
  1508. public static double L2JMOD_CHAMPION_REWARDS_SP;
  1509.  
  1510. public static double L2JMOD_CHAMPION_ADENAS_REWARDS;
  1511.  
  1512. public static float L2JMOD_CHAMPION_HP_REGEN;
  1513.  
  1514. public static float L2JMOD_CHAMPION_ATK;
  1515.  
  1516. public static float L2JMOD_CHAMPION_SPD_ATK;
  1517.  
  1518. public static boolean L2JMOD_CHAMPION_REWARD;
  1519.  
  1520. public static FastList<EventReward> L2JMOD_CHAMPION_REWARD_LIST = new FastList();
  1521.  
  1522. public static boolean L2JMOD_CHAMPION_AURA;
  1523.  
  1524. public static boolean TVT_EVENT_ENABLED;
  1525.  
  1526. public static int TVT_EVENT_INTERVAL;
  1527. public static int TVT_EVENT_PARTICIPATION_TIME;
  1528. public static int TVT_EVENT_RUNNING_TIME;
  1529. public static int TVT_EVENT_PARTICIPATION_NPC_ID;
  1530. public static FastList<Location> TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new FastList();
  1531. public static int TVT_EVENT_MIN_PLAYERS_IN_TEAMS;
  1532. public static int TVT_EVENT_MAX_PLAYERS_IN_TEAMS;
  1533. public static int TVT_EVENT_RESPAWN_TELEPORT_DELAY;
  1534. public static int TVT_EVENT_START_LEAVE_TELEPORT_DELAY;
  1535. public static String TVT_EVENT_TEAM_1_NAME;
  1536. public static FastList<Location> TVT_EVENT_TEAM_1_COORDINATES = new FastList();
  1537. public static String TVT_EVENT_TEAM_2_NAME;
  1538. public static FastList<Location> TVT_EVENT_TEAM_2_COORDINATES = new FastList();
  1539. public static FastList<Location> TVT_RETURN_COORDINATES = new FastList();
  1540. public static final List<int[]> TVT_EVENT_REWARDS = new FastList();
  1541. public static int TVT_EVENT_REWARDS_TOP_KILLS;
  1542. public static final List<int[]> TVT_EVENT_REWARDS_TOP = new FastList();
  1543. public static boolean TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED;
  1544. public static boolean TVT_EVENT_POTIONS_ALLOWED;
  1545. public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
  1546. public static final List<Integer> TVT_EVENT_DOOR_IDS = new FastList();
  1547.  
  1548. public static byte TVT_EVENT_MIN_LVL;
  1549.  
  1550. public static byte TVT_EVENT_MAX_LVL;
  1551.  
  1552. public static boolean TVT_NO_PASSIVE;
  1553.  
  1554. public static boolean TVT_REWARD_CHECK;
  1555.  
  1556. public static boolean TVT_REWARD_TOP;
  1557.  
  1558. public static int TVT_TELE_PROTECT;
  1559.  
  1560. public static boolean TVT_TEAM_PROTECT;
  1561.  
  1562. public static boolean TVT_NO_DEADS;
  1563.  
  1564. public static boolean L2JMOD_ALLOW_WEDDING;
  1565.  
  1566. public static int L2JMOD_WEDDING_INTERVAL;
  1567.  
  1568. public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY;
  1569.  
  1570. public static boolean L2JMOD_WEDDING_TELEPORT;
  1571.  
  1572. public static int L2JMOD_WEDDING_TELEPORT_PRICE;
  1573.  
  1574. public static int L2JMOD_WEDDING_TELEPORT_DURATION;
  1575.  
  1576. public static boolean L2JMOD_WEDDING_SAMESEX;
  1577.  
  1578. public static boolean L2JMOD_WEDDING_FORMALWEAR;
  1579.  
  1580. public static int L2JMOD_WEDDING_COIN;
  1581.  
  1582. public static int L2JMOD_WEDDING_PRICE;
  1583.  
  1584. public static String L2JMOD_WEDDING_COINNAME;
  1585.  
  1586. public static int L2JMOD_WEDDING_DIVORCE_COIN;
  1587.  
  1588. public static int L2JMOD_WEDDING_DIVORCE_PRICE;
  1589.  
  1590. public static String L2JMOD_WEDDING_DIVORCE_COINNAME;
  1591.  
  1592. public static boolean L2JMOD_WEDDING_BOW;
  1593.  
  1594. public static boolean KICK_L2WALKER;
  1595.  
  1596. public static boolean ALLOW_RAID_PVP;
  1597.  
  1598. public static long CP_REUSE_TIME;
  1599.  
  1600. public static long MANA_RESTORE;
  1601.  
  1602. public static int ANTIBUFF_SKILLID;
  1603.  
  1604. public static int BLOW_CHANCE_FRONT;
  1605.  
  1606. public static int BLOW_CHANCE_BEHIND;
  1607.  
  1608. public static int BLOW_CHANCE_SIDE;
  1609. public static double BLOW_DAMAGE_HEAVY;
  1610. public static double BLOW_DAMAGE_LIGHT;
  1611. public static double BLOW_DAMAGE_ROBE;
  1612. public static boolean ALLOW_HERO_SUBSKILL;
  1613. public static byte SUB_START_LVL;
  1614. public static int RUN_SPD_BOOST;
  1615. public static int MAX_RUN_SPEED;
  1616. public static int MAX_PCRIT_RATE;
  1617. public static int MAX_MCRIT_RATE;
  1618. public static boolean ALT_SUBCLASS_SKILLS;
  1619. public static boolean SPAWN_CHAR;
  1620. public static int SPAWN_X;
  1621. public static int SPAWN_Y;
  1622. public static int SPAWN_Z;
  1623. public static int ENCHANT_CHANCE_WEAPON_CRYSTAL;
  1624. public static int ENCHANT_CHANCE_ARMOR_CRYSTAL;
  1625. public static int ENCHANT_CHANCE_JEWELRY_CRYSTAL;
  1626. public static int ENCHANT_CHANCE_NEXT;
  1627. public static int ENCHANT_FAILED_NUM;
  1628. public static float MAGIC_CHANCE_BEFORE_NEXT;
  1629. public static float MAGIC_CHANCE_AFTER_NEXT;
  1630. public static float WEAPON_CHANCE_BEFORE_NEXT;
  1631. public static float WEAPON_CHANCE_AFTER_NEXT;
  1632. public static final List<Float> ARMOR_ENCHANT_TABLE = new FastList();
  1633. public static final List<Float> FULL_ARMOR_ENCHANT_TABLE = new FastList();
  1634.  
  1635.  
  1636. public static boolean USE_CHAT_FILTER;
  1637.  
  1638. public static List<String> FILTER_LIST = new FastList();
  1639.  
  1640. public static String CHAT_FILTER_PUNISHMENT;
  1641.  
  1642. public static int CHAT_FILTER_PUNISHMENT_PARAM1;
  1643.  
  1644. public static int CHAT_FILTER_PUNISHMENT_PARAM2;
  1645.  
  1646. public static boolean COUNT_PACKETS = false;
  1647.  
  1648.  
  1649.  
  1650. public static boolean DUMP_PACKET_COUNTS = false;
  1651.  
  1652.  
  1653.  
  1654. public static int DUMP_INTERVAL_SECONDS = 60;
  1655. public static IdFactoryType IDFACTORY_TYPE;
  1656. public static boolean BAD_ID_CHECKING;
  1657. public static ObjectMapType MAP_TYPE;
  1658. public static ObjectSetType SET_TYPE;
  1659. public static boolean EFFECT_CANCELING;
  1660.  
  1661. public static enum IdFactoryType { Compaction,
  1662. BitSet,
  1663. Stack;
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670. private IdFactoryType() {}
  1671. }
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677. public static enum ObjectMapType
  1678. {
  1679. L2ObjectHashMap,
  1680. WorldObjectMap;
  1681.  
  1682.  
  1683. private ObjectMapType() {}
  1684. }
  1685.  
  1686. public static enum ObjectSetType
  1687. {
  1688. L2ObjectHashSet,
  1689. WorldObjectSet;
  1690.  
  1691.  
  1692.  
  1693. private ObjectSetType() {}
  1694. }
  1695.  
  1696.  
  1697.  
  1698. public static boolean AUTODELETE_INVALID_QUEST_DATA;
  1699.  
  1700.  
  1701. public static int ENCHANT_MAX_WEAPON;
  1702.  
  1703.  
  1704. public static int ENCHANT_MAX_ARMOR;
  1705.  
  1706.  
  1707. public static int ENCHANT_MAX_JEWELRY;
  1708.  
  1709.  
  1710. public static int ENCHANT_SAFE_MAX;
  1711.  
  1712.  
  1713. public static int ENCHANT_SAFE_MAX_FULL;
  1714.  
  1715.  
  1716. public static double HP_REGEN_MULTIPLIER;
  1717.  
  1718.  
  1719. public static double MP_REGEN_MULTIPLIER;
  1720.  
  1721.  
  1722. public static double CP_REGEN_MULTIPLIER;
  1723.  
  1724.  
  1725. public static double RAID_HP_REGEN_MULTIPLIER;
  1726.  
  1727.  
  1728. public static double RAID_MP_REGEN_MULTIPLIER;
  1729.  
  1730.  
  1731. public static double RAID_DEFENCE_MULTIPLIER;
  1732.  
  1733.  
  1734. public static double RAID_MINION_RESPAWN_TIMER;
  1735.  
  1736.  
  1737. public static float RAID_MIN_RESPAWN_MULTIPLIER;
  1738.  
  1739.  
  1740. public static float RAID_MAX_RESPAWN_MULTIPLIER;
  1741.  
  1742.  
  1743. public static int STARTING_ADENA;
  1744.  
  1745.  
  1746. public static boolean DEEPBLUE_DROP_RULES;
  1747.  
  1748.  
  1749. public static int UNSTUCK_INTERVAL;
  1750.  
  1751.  
  1752. public static boolean IS_TELNET_ENABLED;
  1753.  
  1754.  
  1755. public static int DEATH_PENALTY_CHANCE;
  1756.  
  1757.  
  1758. public static int AUGMENT_BASESTAT;
  1759.  
  1760.  
  1761. public static int AUGMENT_SKILL_NORM;
  1762.  
  1763.  
  1764. public static int AUGMENT_SKILL_MID;
  1765.  
  1766.  
  1767. public static int AUGMENT_SKILL_HIGH;
  1768.  
  1769.  
  1770. public static int AUGMENT_SKILL_TOP;
  1771.  
  1772.  
  1773. public static boolean AUGMENT_EXCLUDE_NOTDONE;
  1774.  
  1775.  
  1776. public static int PLAYER_FAKEDEATH_UP_PROTECTION;
  1777.  
  1778.  
  1779. public static String PARTY_XP_CUTOFF_METHOD;
  1780.  
  1781.  
  1782. public static int PARTY_XP_CUTOFF_LEVEL;
  1783.  
  1784.  
  1785. public static double PARTY_XP_CUTOFF_PERCENT;
  1786.  
  1787.  
  1788. public static double RESPAWN_RESTORE_CP;
  1789.  
  1790.  
  1791. public static double RESPAWN_RESTORE_HP;
  1792.  
  1793.  
  1794. public static double RESPAWN_RESTORE_MP;
  1795.  
  1796.  
  1797. public static boolean RESPAWN_RANDOM_ENABLED;
  1798.  
  1799. public static int RESPAWN_RANDOM_MAX_OFFSET;
  1800.  
  1801. public static int MAX_PVTSTORE_SLOTS_DWARF;
  1802.  
  1803. public static int MAX_PVTSTORE_SLOTS_OTHER;
  1804.  
  1805. public static boolean STORE_SKILL_COOLTIME;
  1806.  
  1807. public static boolean SHOW_LICENCE;
  1808.  
  1809. public static boolean FORCE_GGAUTH;
  1810.  
  1811. public static int DEFAULT_PUNISH;
  1812.  
  1813. public static int DEFAULT_PUNISH_PARAM;
  1814.  
  1815. public static boolean ACCEPT_NEW_GAMESERVER;
  1816.  
  1817. public static int SERVER_ID;
  1818.  
  1819. public static byte[] HEX_ID;
  1820.  
  1821. public static boolean ACCEPT_ALTERNATE_ID;
  1822.  
  1823. public static int REQUEST_ID;
  1824.  
  1825. public static final boolean RESERVE_HOST_ON_LOGIN = false;
  1826.  
  1827. public static int MINIMUM_UPDATE_DISTANCE;
  1828.  
  1829. public static int KNOWNLIST_FORGET_DELAY;
  1830.  
  1831. public static int MINIMUN_UPDATE_TIME;
  1832.  
  1833. public static boolean ANNOUNCE_MAMMON_SPAWN;
  1834.  
  1835. public static boolean LAZY_CACHE;
  1836.  
  1837. public static boolean GM_HERO_AURA;
  1838.  
  1839. public static boolean GM_STARTUP_INVULNERABLE;
  1840.  
  1841. public static boolean GM_STARTUP_INVISIBLE;
  1842.  
  1843. public static boolean GM_STARTUP_SILENCE;
  1844.  
  1845. public static boolean GM_STARTUP_AUTO_LIST;
  1846.  
  1847. public static String GM_ADMIN_MENU_STYLE;
  1848.  
  1849. public static boolean PETITIONING_ALLOWED;
  1850.  
  1851. public static int MAX_PETITIONS_PER_PLAYER;
  1852.  
  1853. public static int MAX_PETITIONS_PENDING;
  1854.  
  1855. public static boolean BYPASS_VALIDATION;
  1856.  
  1857. public static boolean ONLY_GM_ITEMS_FREE;
  1858.  
  1859. public static boolean GMAUDIT;
  1860.  
  1861. public static boolean AUTO_CREATE_ACCOUNTS;
  1862.  
  1863. public static boolean FLOOD_PROTECTION;
  1864.  
  1865. public static int FAST_CONNECTION_LIMIT;
  1866.  
  1867. public static int NORMAL_CONNECTION_TIME;
  1868.  
  1869. public static int FAST_CONNECTION_TIME;
  1870.  
  1871. public static int MAX_CONNECTION_PER_IP;
  1872.  
  1873. public static boolean GAMEGUARD_ENFORCE;
  1874.  
  1875. public static boolean GAMEGUARD_PROHIBITACTION;
  1876.  
  1877. public static int DWARF_RECIPE_LIMIT;
  1878.  
  1879. public static int COMMON_RECIPE_LIMIT;
  1880.  
  1881. public static boolean GRIDS_ALWAYS_ON;
  1882.  
  1883. public static int GRID_NEIGHBOR_TURNON_TIME;
  1884.  
  1885. public static int GRID_NEIGHBOR_TURNOFF_TIME;
  1886.  
  1887. public static long CH_TELE_FEE_RATIO;
  1888.  
  1889. public static int CH_TELE1_FEE;
  1890.  
  1891. public static int CH_TELE2_FEE;
  1892.  
  1893. public static long CH_ITEM_FEE_RATIO;
  1894.  
  1895. public static int CH_ITEM1_FEE;
  1896.  
  1897. public static int CH_ITEM2_FEE;
  1898.  
  1899. public static int CH_ITEM3_FEE;
  1900.  
  1901. public static long CH_MPREG_FEE_RATIO;
  1902.  
  1903. public static int CH_MPREG1_FEE;
  1904.  
  1905. public static int CH_MPREG2_FEE;
  1906.  
  1907. public static int CH_MPREG3_FEE;
  1908.  
  1909. public static int CH_MPREG4_FEE;
  1910.  
  1911. public static int CH_MPREG5_FEE;
  1912.  
  1913. public static long CH_HPREG_FEE_RATIO;
  1914.  
  1915. public static int CH_HPREG1_FEE;
  1916.  
  1917. public static int CH_HPREG2_FEE;
  1918.  
  1919. public static int CH_HPREG3_FEE;
  1920.  
  1921. public static int CH_HPREG4_FEE;
  1922.  
  1923. public static int CH_HPREG5_FEE;
  1924.  
  1925. public static int CH_HPREG6_FEE;
  1926.  
  1927. public static int CH_HPREG7_FEE;
  1928.  
  1929. public static int CH_HPREG8_FEE;
  1930.  
  1931. public static int CH_HPREG9_FEE;
  1932.  
  1933. public static int CH_HPREG10_FEE;
  1934.  
  1935. public static int CH_HPREG11_FEE;
  1936.  
  1937. public static int CH_HPREG12_FEE;
  1938.  
  1939. public static int CH_HPREG13_FEE;
  1940.  
  1941. public static long CH_EXPREG_FEE_RATIO;
  1942.  
  1943. public static int CH_EXPREG1_FEE;
  1944.  
  1945. public static int CH_EXPREG2_FEE;
  1946.  
  1947. public static int CH_EXPREG3_FEE;
  1948.  
  1949. public static int CH_EXPREG4_FEE;
  1950.  
  1951. public static int CH_EXPREG5_FEE;
  1952.  
  1953. public static int CH_EXPREG6_FEE;
  1954.  
  1955. public static int CH_EXPREG7_FEE;
  1956.  
  1957. public static long CH_SUPPORT_FEE_RATIO;
  1958.  
  1959. public static int CH_SUPPORT1_FEE;
  1960.  
  1961. public static int CH_SUPPORT2_FEE;
  1962.  
  1963. public static int CH_SUPPORT3_FEE;
  1964.  
  1965. public static int CH_SUPPORT4_FEE;
  1966.  
  1967. public static int CH_SUPPORT5_FEE;
  1968.  
  1969. public static int CH_SUPPORT6_FEE;
  1970.  
  1971. public static int CH_SUPPORT7_FEE;
  1972.  
  1973. public static int CH_SUPPORT8_FEE;
  1974.  
  1975. public static long CH_CURTAIN_FEE_RATIO;
  1976.  
  1977. public static int CH_CURTAIN1_FEE;
  1978.  
  1979. public static int CH_CURTAIN2_FEE;
  1980.  
  1981. public static long CH_FRONT_FEE_RATIO;
  1982.  
  1983. public static int CH_FRONT1_FEE;
  1984.  
  1985. public static int CH_FRONT2_FEE;
  1986.  
  1987. public static int GEODATA;
  1988.  
  1989. public static int GEO_TYPE;
  1990.  
  1991. public static boolean FORCE_GEODATA;
  1992.  
  1993. public static boolean GEO_SHOW_LOAD;
  1994.  
  1995. public static boolean ACCEPT_GEOEDITOR_CONN;
  1996.  
  1997. public static int MAP_MIN_X;
  1998.  
  1999. public static int MAP_MAX_X;
  2000.  
  2001. public static int MAP_MIN_Y;
  2002.  
  2003. public static int MAP_MAX_Y;
  2004.  
  2005. public static String GEO_L2J_PATH;
  2006.  
  2007. public static String GEO_OFF_PATH;
  2008.  
  2009. public static boolean PATHFIND_OPTIMIZE;
  2010.  
  2011. public static int BUFFS_MAX_AMOUNT;
  2012.  
  2013. public static int BUFFS_PET_MAX_AMOUNT;
  2014.  
  2015. public static boolean ALT_DEV_NO_QUESTS;
  2016.  
  2017. public static boolean ALT_DEV_NO_SPAWNS;
  2018.  
  2019. public static int MASTERACCESS_LEVEL;
  2020.  
  2021. public static final String SERVICE_FILE = "./config/services.cfg";
  2022.  
  2023. public static int STOCK_SERTIFY;
  2024.  
  2025. public static int SERTIFY_PRICE;
  2026.  
  2027. public static int FIRST_BALANCE;
  2028.  
  2029. public static int DONATE_COIN;
  2030.  
  2031. public static String DONATE_COIN_NEMA;
  2032.  
  2033. public static int DONATE_RATE;
  2034.  
  2035. public static int NALOG_NPS;
  2036.  
  2037. public static String VAL_NAME;
  2038.  
  2039. public static int PAGE_LIMIT;
  2040.  
  2041. public static int AUGMENT_COIN;
  2042.  
  2043. public static int ENCHANT_COIN;
  2044.  
  2045. public static String AUGMENT_COIN_NAME;
  2046.  
  2047. public static String ENCHANT_COIN_NAME;
  2048.  
  2049. public static int AUGMENT_PRICE;
  2050.  
  2051. public static int ENCHANT_PRICE;
  2052.  
  2053. public static int CLAN_COIN;
  2054.  
  2055. public static String CLAN_COIN_NAME;
  2056.  
  2057. public static int CLAN_POINTS;
  2058.  
  2059. public static int CLAN_POINTS_PRICE;
  2060.  
  2061. public static int CLAN_SKILLS_PRICE;
  2062.  
  2063. public static int AUGSALE_COIN;
  2064.  
  2065. public static int AUGSALE_PRICE;
  2066.  
  2067. public static String AUGSALE_COIN_NAME;
  2068.  
  2069. public static final FastMap<Integer, Integer> AUGSALE_TABLE = new FastMap().shared("Config.AUGSALE_TABLE");
  2070.  
  2071. public static int SOB_ID;
  2072.  
  2073. public static int SOB_NPC;
  2074.  
  2075. public static int SOB_COIN;
  2076.  
  2077. public static int SOB_PRICE_ONE;
  2078.  
  2079. public static int SOB_PRICE_TWO;
  2080.  
  2081. public static String SOB_COIN_NAME;
  2082. public static boolean ALLOW_DSHOP;
  2083. public static boolean ALLOW_DSKILLS;
  2084. public static boolean ALLOW_CSHOP;
  2085. public static int BBS_AUC_ITEM_COIN;
  2086. public static int BBS_AUC_ITEM_PRICE;
  2087. public static String BBS_AUC_ITEM_NAME;
  2088. public static int BBS_AUC_AUG_COIN;
  2089. public static int BBS_AUC_AUG_PRICE;
  2090. public static String BBS_AUC_AUG_NAME;
  2091. public static int BBS_AUC_SKILL_COIN;
  2092. public static int BBS_AUC_SKILL_PRICE;
  2093. public static String BBS_AUC_SKILL_NAME;
  2094. public static int BBS_AUC_HERO_COIN;
  2095. public static int BBS_AUC_HERO_PRICE;
  2096. public static String BBS_AUC_HERO_NAME;
  2097. public static final FastMap<Integer, String> BBS_AUC_MONEYS = new FastMap().shared("Config.BBS_AUC_MONEYS");
  2098.  
  2099.  
  2100. public static int BBS_AUC_EXPIRE_DAYS;
  2101.  
  2102. public static int BUFFER_ID;
  2103.  
  2104. public static boolean BUFF_CANCEL;
  2105.  
  2106. public static final FastMap<Integer, Integer> M_BUFF = new FastMap().shared("Config.M_BUFF");
  2107. public static final FastMap<Integer, Integer> F_BUFF = new FastMap().shared("Config.F_BUFF");
  2108. public static final FastTable<Integer> F_PROFILE_BUFFS = new FastTable();
  2109.  
  2110. public static final FastTable<Integer> C_ALLOWED_BUFFS = new FastTable();
  2111. public static boolean POST_CHARBRIEF;
  2112. public static String POST_BRIEFAUTHOR;
  2113. public static String POST_BRIEFTHEME;
  2114. public static String POST_BRIEFTEXT;
  2115. public static String POST_NPCNAME;
  2116. public static EventReward POST_BRIEF_ITEM;
  2117. public static String MASTER_NPCNAME;
  2118. public static int MCLAN_COIN;
  2119. public static String MCLAN_COIN_NAME;
  2120. public static int CLAN_LVL6;
  2121. public static int CLAN_LVL7;
  2122. public static int CLAN_LVL8;
  2123. public static final String EVENT_FILE = "./config/events.cfg";
  2124. public static boolean MASS_PVP;
  2125. public static long MPVP_RTIME;
  2126. public static long MPVP_REG;
  2127. public static long MPVP_ANC;
  2128. public static long MPVP_TP;
  2129. public static long MPVP_PR;
  2130. public static long MPVP_WT;
  2131. public static long MPVP_MAX;
  2132. public static long MPVP_NEXT;
  2133. public static int MPVP_MAXC;
  2134. public static int MPVP_NPC;
  2135. public static Location MPVP_NPCLOC;
  2136.  
  2137. public static class EventReward {
  2138. public int id;
  2139. public int count;
  2140. public int count_max;
  2141. public int chance;
  2142.  
  2143. public EventReward(int id, int count, int chance) {
  2144. this.id = id;
  2145. this.count = count;
  2146. this.chance = chance;
  2147. }
  2148.  
  2149. public EventReward(int id, int count_min, int count_max, int chance) {
  2150. this.id = id;
  2151. count = count_min;
  2152. this.count_max = count_max;
  2153. this.chance = chance;
  2154. }
  2155. }
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171. public static FastList<Location> MPVP_TPLOC = new FastList();
  2172. public static FastList<Location> MPVP_CLOC = new FastList();
  2173.  
  2174. public static int MPVP_CREW;
  2175.  
  2176. public static int MPVP_CREWC;
  2177.  
  2178. public static int MPVP_EREW;
  2179. public static int MPVP_EREWC;
  2180. public static int MPVP_LVL;
  2181. public static int MPVP_MAXP;
  2182. public static boolean MPVP_NOBL;
  2183. public static boolean TVT_NOBL;
  2184. public static boolean ALLOW_SCH;
  2185. public static int SCH_TIMEBOSS;
  2186. public static int SCH_TIME1;
  2187. public static int SCH_TIME2;
  2188. public static int SCH_TIME3;
  2189. public static int SCH_TIME4;
  2190. public static int SCH_TIME5;
  2191. public static int SCH_TIME6;
  2192. public static long SCH_NEXT;
  2193. public static int SCH_RESTART;
  2194. public static int SCH_MOB1;
  2195. public static int SCH_MOB2;
  2196. public static int SCH_MOB3;
  2197. public static int SCH_MOB4;
  2198. public static int SCH_MOB5;
  2199. public static int SCH_MOB6;
  2200. public static int SCH_BOSS;
  2201. public static boolean SCH_ALLOW_SHOP;
  2202. public static int SCH_SHOP;
  2203. public static int SCH_SHOPTIME;
  2204. public static boolean OPEN_SEASON;
  2205. public static int OS_NEXT;
  2206. public static int OS_RESTART;
  2207. public static int OS_BATTLE;
  2208. public static int OS_FAIL_NEXT;
  2209. public static int OS_REGTIME;
  2210. public static int OS_ANNDELAY;
  2211. public static int OS_MINLVL;
  2212. public static int OS_MINPLAYERS;
  2213. public static final FastList<EventReward> OS_REWARDS = new FastList();
  2214.  
  2215. public static boolean ELH_ENABLE;
  2216. public static long ELH_ARTIME;
  2217. public static long ELH_REGTIME;
  2218. public static long ELH_ANNDELAY;
  2219. public static long ELH_TPDELAY;
  2220. public static long ELH_NEXT;
  2221. public static int ELH_MINLVL;
  2222. public static int ELH_MINP;
  2223. public static int ELH_MAXP;
  2224. public static int ELH_NPCID;
  2225. public static Location ELH_NPCLOC;
  2226. public static String ELH_NPCTOWN;
  2227. public static Location ELH_TPLOC;
  2228. public static int ELH_TICKETID;
  2229. public static int ELH_TICKETCOUNT;
  2230. public static final FastList<EventReward> ELH_REWARDS = new FastList();
  2231. public static int ELH_HERO_DAYS;
  2232. public static boolean ELH_HIDE_NAMES;
  2233. public static boolean ELH_FORBID_MAGIC;
  2234. public static String ELH_ALT_NAME;
  2235. public static final FastList<Integer> ELH_FORB_POTIONS = new FastList();
  2236.  
  2237. public static final FastTable<Integer> FC_ALLOWITEMS = new FastTable();
  2238.  
  2239. public static boolean ALLOW_XM_SPAWN;
  2240. public static final FastList<EventReward> XM_DROP = new FastList();
  2241.  
  2242. public static long XM_TREE_LIFE;
  2243. public static boolean ALLOW_MEDAL_EVENT;
  2244. public static final FastList<EventReward> MEDAL_EVENT_DROP = new FastList();
  2245.  
  2246. public static boolean EBC_ENABLE;
  2247. public static long EBC_ARTIME;
  2248. public static long EBC_REGTIME;
  2249. public static long EBC_ANNDELAY;
  2250. public static long EBC_TPDELAY;
  2251. public static long EBC_DEATHLAY;
  2252. public static long EBC_NEXT;
  2253. public static int EBC_MINLVL;
  2254. public static int EBC_MINP;
  2255. public static int EBC_MAXP;
  2256. public static int EBC_NPCID;
  2257. public static Location EBC_NPCLOC;
  2258. public static String EBC_NPCTOWN;
  2259. public static int EBC_BASE1ID;
  2260. public static String EBC_BASE1NAME;
  2261. public static int EBC_BASE2ID;
  2262. public static String EBC_BASE2NAME;
  2263. public static Location EBC_BASE1_LOC;
  2264. public static Location EBC_BASE2_LOC;
  2265. public static int EBC_TICKETID;
  2266. public static int EBC_TICKETCOUNT;
  2267. public static final FastList<EventReward> EBC_REWARDS = new FastList();
  2268. public static String EBC_BASE1TITLE;
  2269. public static String EBC_BASE2TITLE;
  2270. public static FastList<Location> EBC_TPLOC1 = new FastList();
  2271. public static FastList<Location> EBC_TPLOC2 = new FastList();
  2272. public static FastList<Location> EBC_RETURN_COORDINATES = new FastList();
  2273.  
  2274. public static boolean EENC_ENABLE;
  2275. public static long EENC_ARTIME;
  2276. public static long EENC_REGTIME;
  2277. public static long EENC_ANNDELAY;
  2278. public static long EENC_TPDELAY;
  2279. public static long EENC_FINISH;
  2280. public static long EENC_NEXT;
  2281. public static int EENC_MINLVL;
  2282. public static int EENC_MINP;
  2283. public static int EENC_MAXP;
  2284. public static int EENC_NPCID;
  2285. public static Location EENC_NPCLOC;
  2286. public static String EENC_NPCTOWN;
  2287. public static Location EENC_TPLOC;
  2288. public static int EENC_TICKETID;
  2289. public static int EENC_TICKETCOUNT;
  2290. public static final FastList<EventReward> EENC_REWARDS = new FastList();
  2291. public static final FastMap<Integer, FastList<Location>> EENC_POINTS = new FastMap().shared("Config.EENC_POINTS");
  2292.  
  2293. public static boolean ANARCHY_ENABLE;
  2294. public static int ANARCHY_DAY;
  2295. public static int ANARCHY_HOUR;
  2296. public static long ANARCHY_DELAY;
  2297. public static final FastList<Integer> ANARCHY_TOWNS = new FastList();
  2298.  
  2299. public static boolean FIGHTING_ENABLE;
  2300.  
  2301. public static int FIGHTING_DAY;
  2302.  
  2303. public static int FIGHTING_HOUR;
  2304.  
  2305. public static long FIGHTING_REGTIME;
  2306.  
  2307. public static long FIGHTING_ANNDELAY;
  2308.  
  2309. public static long FIGHTING_TPDELAY;
  2310.  
  2311. public static long FIGHTING_FIGHTDELAY;
  2312.  
  2313. public static int FIGHTING_MINLVL;
  2314.  
  2315. public static int FIGHTING_MINP;
  2316. public static int FIGHTING_MAXP;
  2317. public static int FIGHTING_TICKETID;
  2318. public static int FIGHTING_TICKETCOUNT;
  2319. public static int FIGHTING_NPCID;
  2320. public static Location FIGHTING_NPCLOC;
  2321. public static Location FIGHTING_TPLOC;
  2322. public static boolean EVENTS_SAME_IP;
  2323. public static boolean TVT_SAME_HWID;
  2324. public static int DEADLOCKCHECK_INTERVAL;
  2325. public static int RESTART_HOUR;
  2326. public static boolean ALLOW_FAKE_PLAYERS;
  2327. public static int FAKE_PLAYERS_PERCENT;
  2328. public static int FAKE_PLAYERS_DELAY;
  2329. public static final FastTable<Integer> F_OLY_ITEMS = new FastTable();
  2330.  
  2331. public static boolean INVIS_SHOW;
  2332.  
  2333. public static long NPC_SPAWN_DELAY;
  2334.  
  2335. public static int NPC_SPAWN_TYPE;
  2336. public static int MULT_ENCH;
  2337. public static final FastMap<Integer, Integer> MULT_ENCHS = new FastMap().shared("Config.MULT_ENCHS");
  2338.  
  2339. public static long CLAN_CH_CLEAN;
  2340.  
  2341. public static boolean CHECK_SKILLS;
  2342.  
  2343. public static boolean CLEAR_BUFF_ONDEATH;
  2344.  
  2345. public static float ONLINE_PERC;
  2346.  
  2347. public static String SERVER_SERIAL_KEY;
  2348.  
  2349. public static boolean CMD_MENU;
  2350.  
  2351. public static boolean VS_NOEXP;
  2352.  
  2353. public static boolean VS_NOREQ;
  2354.  
  2355. public static boolean VS_VREF;
  2356.  
  2357. public static boolean VS_VREF_NAME;
  2358.  
  2359. public static boolean VS_ONLINE;
  2360.  
  2361. public static boolean VS_AUTORESTAT;
  2362.  
  2363. public static boolean VS_CHATIGNORE;
  2364. public static boolean VS_AUTOLOOT;
  2365. public static boolean VS_TRADERSIGNORE;
  2366. public static boolean VS_PATHFIND;
  2367. public static boolean VS_SKILL_CHANCES;
  2368. public static boolean VS_ANIM_SHOTS;
  2369. public static boolean VS_HWID;
  2370. public static boolean VS_PWD;
  2371. public static boolean VS_EMAIL;
  2372. public static boolean CMD_ADENA_COL;
  2373. public static EventReward CMD_AC_ADENA;
  2374. public static EventReward CMD_AC_COL;
  2375. public static int CMD_AC_ADENA_LIMIT;
  2376. public static int CMD_AC_COL_LIMIT;
  2377. public static boolean CMD_EVENTS;
  2378. public static int MAX_BAN_CHAT;
  2379. public static boolean VS_CKEY;
  2380. public static boolean VS_CKEY_CHARLEVEL;
  2381. public static int PWHERO_COIN;
  2382. public static int PWHERO_PRICE;
  2383. public static int PWHERO_FPRICE;
  2384. public static int PWHERO_MINDAYS;
  2385. public static int PWHERO_TRANPRICE;
  2386. public static String PWHERO_COINNAME;
  2387. public static int PWCSKILLS_COIN;
  2388. public static int PWCSKILLS_PRICE;
  2389. public static String PWCSKILLS_COINNAME;
  2390. public static int PWENCHSKILL_COIN;
  2391. public static int PWENCHSKILL_PRICE;
  2392. public static String PWENCHSKILL_COINNAME;
  2393. public static int PWCNGSKILLS_COIN;
  2394. public static int PWCNGSKILLS_PRICE;
  2395. public static String PWCNGSKILLS_COINNAME;
  2396. public static final FastMap<Integer, Integer> PWCSKILLS = new FastMap().shared("Config.PWCSKILLS");
  2397. public static boolean PWTCOLOR_PAYMENT;
  2398. public static int PWNCOLOR_COIN;
  2399. public static int PWNCOLOR_PRICE;
  2400.  
  2401. public static class AltBColor
  2402. {
  2403. AltBColor(int hex, String color) {
  2404. this.hex = hex;
  2405. this.color = color;
  2406. }
  2407.  
  2408. public int hex;
  2409. public String color; }
  2410.  
  2411. public static String PWNCOLOR_COINNAME;
  2412. public static int PWTCOLOR_COIN;
  2413. public static int PWTCOLOR_PRICE;
  2414. public static String PWTCOLOR_COINNAME;
  2415. public static final FastMap<Integer, AltBColor> PWCOLOURS = new FastMap().shared("Config.PWCOLOURS");
  2416.  
  2417. public static int PWCNGCLASS_COIN;
  2418.  
  2419. public static int PWCNGCLASS_PRICE;
  2420.  
  2421. public static String PWCNGCLASS_COINNAME;
  2422.  
  2423. public static int EXPOSTB_COIN;
  2424.  
  2425. public static int EXPOSTB_PRICE;
  2426. public static String EXPOSTB_NAME;
  2427. public static int EXPOSTA_COIN;
  2428. public static int EXPOSTA_PRICE;
  2429. public static String EXPOSTA_NAME;
  2430. public static boolean PREMIUM_ENABLE;
  2431. public static int PREMIUM_COIN;
  2432. public static int PREMIUM_PRICE;
  2433. public static String PREMIUM_COINNAME;
  2434. public static final FastMap<Integer, Integer> PREMIUM_DAY_PRICES = new FastMap().shared("Config.PREMIUM_DAY_PRICES");
  2435. public static double PREMIUM_EXP;
  2436. public static double PREMIUM_SP;
  2437. public static double PREMIUM_ITEMDROP;
  2438. public static double PREMIUM_ITEMDROPMUL;
  2439. public static double PREMIUM_SPOILRATE;
  2440. public static double PREMIUM_ADENAMUL;
  2441. public static double PREMIUM_PCCAFE_MUL;
  2442. public static double PREMIUM_AQURE_SKILL_MUL;
  2443. public static int PREMIUM_AUGMENT_RATE;
  2444. public static int PREMIUM_ENCH_ITEM;
  2445. public static int PREMIUM_ENCH_SKILL;
  2446. public static int PREMIUM_CURSED_RATE;
  2447. public static boolean PREMIUM_ANY_SUBCLASS;
  2448. public static boolean PREMIUM_CHKSKILLS;
  2449. public static boolean PREMIUM_PKDROP_OFF;
  2450. public static boolean PREMIUM_ANOOUNCE;
  2451. public static boolean PREMIUM_ENCHANT_FAIL;
  2452. public static String PREMIUM_ANNOUNCE_PHRASE;
  2453. public static String PREMIUM_NAME_PREFIX;
  2454. public static int PREMIUM_START_DAYS;
  2455. public static final FastList<Integer> PREMIUM_PROTECTED_ITEMS = new FastList();
  2456.  
  2457. public static String VOTE_SERVER_PREFIX;
  2458.  
  2459. public static boolean L2TOP_ENABLE;
  2460.  
  2461. public static String L2TOP_SERV_URL;
  2462.  
  2463. public static int L2TOP_UPDATE_DELAY;
  2464.  
  2465. public static int L2TOP_OFFLINE_ITEM;
  2466. public static int L2TOP_OFFLINE_COUNT;
  2467. public static String L2TOP_OFFLINE_LOC;
  2468. public static final FastList<EventReward> L2TOP_ONLINE_REWARDS = new FastList();
  2469.  
  2470. public static int L2TOP_LOGTYPE;
  2471. public static boolean MMOTOP_ENABLE;
  2472. public static String MMOTOP_STAT_LINK;
  2473. public static int MMOTOP_UPDATE_DELAY;
  2474. public static int MMOTOP_OFFLINE_ITEM;
  2475. public static int MMOTOP_OFFLINE_COUNT;
  2476. public static String MMOTOP_OFFLINE_LOC;
  2477. public static final FastList<EventReward> MMOTOP_ONLINE_REWARDS = new FastList();
  2478.  
  2479.  
  2480. public static int MMOTOP_LOGTYPE;
  2481.  
  2482. public static boolean RAID_CUSTOM_DROP;
  2483.  
  2484. public static final FastList<EventReward> NPC_RAID_REWARDS = new FastList();
  2485. public static final FastList<EventReward> NPC_EPIC_REWARDS = new FastList();
  2486.  
  2487. public static long ANTARAS_CLOSE_PORT;
  2488.  
  2489. public static long ANTARAS_UPDATE_LAIR;
  2490.  
  2491. public static long ANTARAS_MIN_RESPAWN;
  2492.  
  2493. public static long ANTARAS_MAX_RESPAWN;
  2494.  
  2495. public static long ANTARAS_RESTART_DELAY;
  2496.  
  2497. public static long ANTARAS_SPAWN_DELAY;
  2498.  
  2499. public static long VALAKAS_CLOSE_PORT;
  2500.  
  2501. public static long VALAKAS_UPDATE_LAIR;
  2502.  
  2503. public static long VALAKAS_MIN_RESPAWN;
  2504.  
  2505. public static long VALAKAS_MAX_RESPAWN;
  2506.  
  2507. public static long VALAKAS_RESTART_DELAY;
  2508. public static long VALAKAS_SPAWN_DELAY;
  2509. public static long BAIUM_CLOSE_PORT;
  2510. public static long BAIUM_UPDATE_LAIR;
  2511. public static long BAIUM_MIN_RESPAWN;
  2512. public static long BAIUM_MAX_RESPAWN;
  2513. public static long BAIUM_RESTART_DELAY;
  2514. public static long AQ_MIN_RESPAWN;
  2515. public static long AQ_MAX_RESPAWN;
  2516. public static long AQ_RESTART_DELAY;
  2517. public static long AQ_PLAYER_MAX_LVL;
  2518. public static long AQ_NURSE_RESPAWN;
  2519. public static long ZAKEN_MIN_RESPAWN;
  2520. public static long ZAKEN_MAX_RESPAWN;
  2521. public static long ZAKEN_RESTART_DELAY;
  2522. public static long ZAKEN_PLAYER_MAX_LVL;
  2523. public static boolean ALLOW_HIT_NPC;
  2524. public static boolean KILL_NPC_ATTACKER;
  2525. public static boolean ANNOUNCE_EPIC_STATES;
  2526. public static boolean ENCHANT_ALT_PACKET;
  2527. public static boolean ENCHANT_PENALTY;
  2528. public static int ENCHANT_ALT_MAGICCAHNCE;
  2529. public static int ENCHANT_ALT_MAGICCAHNCE_BLESS;
  2530. public static final FastMap<Integer, Integer> ENCHANT_ALT_MAGICSTEPS = new FastMap().shared("Config.ENCHANT_ALT_MAGICSTEPS");
  2531. public static int ENCHANT_ALT_WEAPONCAHNCE;
  2532. public static int ENCHANT_ALT_WEAPONCAHNCE_BLESS;
  2533. public static final FastMap<Integer, Integer> ENCHANT_ALT_WEAPONSTEPS = new FastMap().shared("Config.ENCHANT_ALT_WEAPONSTEPS");
  2534.  
  2535. public static int ENCHANT_ALT_WEAPONFAILBLESS;
  2536. public static int ENCHANT_ALT_WEAPONFAILCRYST;
  2537. public static int ENCHANT_ALT_ARMORCAHNCE;
  2538. public static int ENCHANT_ALT_ARMORCAHNCE_BLESS;
  2539. public static final FastMap<Integer, Integer> ENCHANT_ALT_ARMORSTEPS = new FastMap().shared("Config.ENCHANT_ALT_ARMORSTEPS");
  2540.  
  2541. public static int ENCHANT_ALT_ARMORFAILBLESS;
  2542. public static int ENCHANT_ALT_ARMORFAILCRYST;
  2543. public static int ENCHANT_ALT_JEWERLYCAHNCE;
  2544. public static int ENCHANT_ALT_JEWERLYCAHNCE_BLESS;
  2545. public static final FastMap<Integer, Integer> ENCHANT_ALT_JEWERLYSTEPS = new FastMap().shared("Config.ENCHANT_ALT_JEWERLYSTEPS");
  2546.  
  2547. public static int ENCHANT_ALT_JEWERLYFAILBLESS;
  2548.  
  2549. public static int ENCHANT_ALT_JEWERLYFAILCRYST;
  2550.  
  2551. public static boolean ENCHANT_HERO_WEAPONS;
  2552. public static boolean ENCH_ANTI_CLICK;
  2553. public static int ENCH_ANTI_CLICK_STEP;
  2554. public static int ENCH_ANTI_CLICK_TYPE;
  2555. public static final FastList<Integer> BLESS_BONUSES = new FastList();
  2556. public static final FastList<Integer> BLESS_BONUSES2 = new FastList();
  2557. public static int BLESS_BONUS_ENCH1;
  2558. public static int BLESS_BONUS_ENCH2;
  2559. public static boolean ENCH_SHOW_CHANCE;
  2560. public static int ENCHANT_ALT_STEP;
  2561. public static boolean ALLOW_PVPPK_REWARD;
  2562. public static int PVPPK_INTERVAL;
  2563. public static PvpColor PVPPK_PENALTY;
  2564. public static boolean PVPPK_IPPENALTY;
  2565. public static boolean PVPPK_HWIDPENALTY;
  2566. public static boolean EVENT_KILL_REWARD;
  2567. public static boolean TVT_KILL_REWARD;
  2568. public static boolean MASSPVP_KILL_REWARD;
  2569. public static boolean LASTHERO_KILL_REWARD;
  2570. public static boolean CAPBASE_KILL_REWARD;
  2571.  
  2572. public static class PvpColor {
  2573. PvpColor(int nick, int title) { this.nick = nick;
  2574. this.title = title; }
  2575.  
  2576. public int nick;
  2577.  
  2578. PvpColor(String type, int nick, int title) { this.type = type;
  2579. this.nick = nick;
  2580. this.title = title;
  2581. }
  2582.  
  2583. public int title;
  2584. public String type;
  2585. }
  2586.  
  2587. public static class PvpTitleBonus { public int min;
  2588. public int max;
  2589. public String title;
  2590. public int skillId;
  2591. public int skillLvl;
  2592.  
  2593. PvpTitleBonus(String title, int min, int max, int skillId, int skillLvl) { this.title = title;
  2594. this.min = min;
  2595. this.max = max;
  2596. this.skillId = skillId;
  2597. this.skillLvl = skillLvl;
  2598. }
  2599.  
  2600. public boolean isInRange(int pvp) {
  2601. return (pvp >= min) && (pvp <= max);
  2602. }
  2603. }
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614. public static final FastList<PvpColor> PVPPK_EXP_SP = new FastList();
  2615. public static final FastList<EventReward> PVPPK_PVPITEMS = new FastList();
  2616. public static final FastList<EventReward> EVENT_KILLSITEMS = new FastList();
  2617. public static final FastList<EventReward> TVT_KILLSITEMS = new FastList();
  2618. public static final FastList<EventReward> MASSPVP_KILLSITEMS = new FastList();
  2619. public static final FastList<EventReward> CAPBASE_KILLSITEMS = new FastList();
  2620. public static final FastList<EventReward> LASTHERO_KILLSITEMS = new FastList();
  2621. public static final FastList<EventReward> PVPPK_PKITEMS = new FastList();
  2622. public static boolean ALLOW_PVPBONUS_STEPS;
  2623. public static final FastMap<Integer, PvpColor> PVPBONUS_ITEMS = new FastMap().shared("Config.PVPBONUS_ITEMS");
  2624. public static final FastList<PvpTitleBonus> PVPBONUS_TITLE = new FastList();
  2625. public static final FastMap<Integer, PvpColor> PVPBONUS_COLORS = new FastMap().shared("Config.PVPBONUS_COLORS");
  2626. public static final FastList<Integer> PVPBONUS_COLORS_NAME = new FastList();
  2627. public static final FastList<Integer> PVPBONUS_COLORS_TITLE = new FastList();
  2628.  
  2629. public static int PVPPK_STEP;
  2630. public static long PVPPK_STEPBAN;
  2631. public static boolean PVPPK_REWARD_ZONE;
  2632. public static boolean PVP_TITLE_SKILL;
  2633. public static final FastMap<Integer, EventReward> MULTVIP_CARDS = new FastMap().shared("Config.MULTVIP_CARDS");
  2634.  
  2635. public static boolean SIEGE_REWARD_CLAN;
  2636. public static boolean CASTLE_SIEGE_REWARD_STATIC;
  2637. public static final FastMap<Integer, FastList<EventReward>> CASTLE_SIEGE_REWARDS = new FastMap().shared("Config.CASTLE_SIEGE_REWARDS");
  2638. public static final FastMap<Integer, FastList<EventReward>> CASTLE_RPOTECT_REWARDS = new FastMap().shared("Config.CASTLE_RPOTECT_REWARDS");
  2639.  
  2640. public static boolean ALLOW_APELLA_BONUSES;
  2641.  
  2642. public static boolean BBS_ONLY_PEACE;
  2643.  
  2644. public static final FastList<Integer> TVT_WHITE_POTINS = new FastList();
  2645.  
  2646. public static int ALT_OLY_REG_DISPLAY = 100;
  2647. public static int ALT_OLY_BATTLE_REWARD_ITEM = 13722;
  2648. public static int ALT_OLY_CLASSED_RITEM_C = 50;
  2649. public static int ALT_OLY_NONCLASSED_RITEM_C = 40;
  2650. public static int ALT_OLY_RANDOM_TEAM_RITEM_C = 30;
  2651. public static int ALT_OLY_TEAM_RITEM_C = 50;
  2652. public static int ALT_OLY_COMP_RITEM = 13722;
  2653. public static int ALT_OLY_GP_PER_POINT = 1000;
  2654. public static int ALT_OLY_HERO_POINTS = 180;
  2655. public static int ALT_OLY_RANK1_POINTS = 120;
  2656. public static int ALT_OLY_RANK2_POINTS = 80;
  2657. public static int ALT_OLY_RANK3_POINTS = 55;
  2658. public static int ALT_OLY_RANK4_POINTS = 35;
  2659. public static int ALT_OLY_RANK5_POINTS = 20;
  2660.  
  2661. public static boolean SHOW_ENTER_WARNINGS = false;
  2662.  
  2663. public static boolean PC_CAFE_ENABLED;
  2664.  
  2665. public static int PC_CAFE_INTERVAL;
  2666.  
  2667. public static PvpColor PC_CAFE_BONUS;
  2668. public static int PC_CAFE_DOUBLE_CHANCE;
  2669. public static int WEBSERVER_REFRESH_STATS;
  2670. public static int WEBSERVER_PORT;
  2671. public static String WEBSERVER_FOLDER;
  2672. public static String WEBSERVER_PAGE;
  2673. public static int ALT_BUFF_TIMEMUL;
  2674. public static final FastMap<Integer, Integer> ALT_BUFF_TIME = new FastMap().shared("Config.ALT_BUFF_TIME");
  2675.  
  2676. public static final FastMap<Integer, Integer> ALT_SKILL_CHANSE = new FastMap().shared("Config.ALT_SKILL_CHANSE");
  2677.  
  2678. public static boolean HERO_ITEMS_PENALTY;
  2679.  
  2680. public static final FastList<Integer> ALT_MAGIC_WEAPONS = new FastList();
  2681.  
  2682. public static final FastMap<Integer, Integer> CUSTOM_STRT_ITEMS = new FastMap().shared("Config.CUSTOM_STRT_ITEMS");
  2683.  
  2684. public static boolean ACADEMY_CLASSIC;
  2685.  
  2686. public static int ACADEMY_POINTS;
  2687.  
  2688. public static boolean ACADEMY_BONUS_ON;
  2689.  
  2690. public static boolean DISABLE_FORCES;
  2691.  
  2692. public static int MAX_TRADE_ENCHANT;
  2693.  
  2694. public static int ALT_OLYMPIAD_PERIOD;
  2695. public static boolean ALLOW_CURSED_QUESTS;
  2696. public static boolean BBS_CURSED_SHOP;
  2697. public static boolean BBS_CURSED_TELEPORT;
  2698. public static boolean BBS_CURSED_BUFF;
  2699. public static String CHAT_FILTER_STRING;
  2700. public static final FastTable<String> CHAT_FILTER_STRINGS = new FastTable();
  2701.  
  2702. public static int ALT_SIEGE_INTERVAL;
  2703.  
  2704. public static final FastMap<Integer, Integer> ENCHANT_LIMITS = new FastMap().shared("Config.ENCHANT_LIMITS");
  2705.  
  2706. public static boolean SOULSHOT_ANIM;
  2707.  
  2708. public static boolean PROTECT_GATE_PVP;
  2709.  
  2710. public static boolean PROTECT_OLY_SOB;
  2711.  
  2712. public static int WEDDING_ANSWER_TIME;
  2713.  
  2714. public static int RESURECT_ANSWER_TIME;
  2715.  
  2716. public static int SUMMON_ANSWER_TIME;
  2717. public static int MAX_HENNA_BONUS;
  2718. public static final FastList<Integer> ALT_FIXED_REUSES = new FastList();
  2719. public static final FastList<Integer> ALT_FIXED_CASTS = new FastList();
  2720.  
  2721. public static int MAX_AUGMENTS_BUFFS;
  2722.  
  2723. public static boolean ALT_ANY_SUBCLASS;
  2724.  
  2725. public static boolean ALT_ANY_SUBCLASS_OVERCRAF;
  2726.  
  2727. public static EventTerritory TVT_POLY;
  2728.  
  2729. public static EventTerritory LASTHERO_POLY;
  2730.  
  2731. public static EventTerritory MASSPVP_POLY;
  2732. public static EventTerritory BASECAPTURE_POLY;
  2733. public static boolean ALT_AUGMENT_HERO;
  2734. public static final FastList<Integer> PROTECTED_BUFFS = new FastList();
  2735.  
  2736. public static double SKILLS_CHANCE_MIN;
  2737.  
  2738. public static double SKILLS_CHANCE_MAX;
  2739.  
  2740. public static double SKILLS_CHANCE_MIN_OLY;
  2741.  
  2742. public static double SKILLS_CHANCE_MAX_OLY;
  2743.  
  2744. public static String STARTUP_TITLE;
  2745.  
  2746. public static long PICKUP_PENALTY;
  2747.  
  2748. public static boolean DISABLE_BOSS_INTRO;
  2749. public static boolean DEATH_REFLECT;
  2750. public static boolean ALT_RESTORE_OFFLINE_TRADE;
  2751. public static long ALT_OFFLINE_TRADE_LIMIT;
  2752. public static boolean ALLOW_FAKE_PLAYERS_PLUS;
  2753. public static int FAKE_PLAYERS_PLUS_COUNT;
  2754. public static long FAKE_PLAYERS_PLUS_DELAY_SPAWN;
  2755. public static int FAKE_PLAYERS_PLUS_COUNT_FIRST;
  2756. public static long FAKE_PLAYERS_PLUS_DELAY_FIRST;
  2757. public static int FAKE_PLAYERS_PLUS_DELAY_SPAWN_FIRST;
  2758. public static int FAKE_PLAYERS_PLUS_DELAY_DESPAWN_FIRST;
  2759. public static long FAKE_PLAYERS_PLUS_DESPAWN_FIRST;
  2760. public static int FAKE_PLAYERS_PLUS_COUNT_NEXT;
  2761. public static long FAKE_PLAYERS_PLUS_DELAY_NEXT;
  2762. public static int FAKE_PLAYERS_PLUS_DELAY_SPAWN_NEXT;
  2763. public static int FAKE_PLAYERS_PLUS_DELAY_DESPAWN_NEXT;
  2764. public static long FAKE_PLAYERS_PLUS_DESPAWN_NEXT;
  2765. public static PvpColor FAKE_PLAYERS_ENCHANT;
  2766. public static final FastList<Integer> FAKE_PLAYERS_NAME_CLOLORS = new FastList();
  2767. public static final FastList<Integer> FAKE_PLAYERS_TITLE_CLOLORS = new FastList();
  2768.  
  2769. public static boolean ALT_OFFLINE_TRADE_ONLINE;
  2770.  
  2771. public static boolean PROTECT_SAY;
  2772.  
  2773. public static long PROTECT_SAY_BAN;
  2774.  
  2775. public static int PROTECT_SAY_COUNT;
  2776.  
  2777. public static long PROTECT_SAY_INTERVAL;
  2778.  
  2779. public static boolean CACHED_SERVER_STAT;
  2780.  
  2781. public static boolean ALLOW_FALL;
  2782.  
  2783. public static boolean KARMA_PK_NPC_DROP;
  2784.  
  2785. public static int ENCH_NPC_CAHNCE;
  2786.  
  2787. public static PvpColor ENCH_NPC_MINMAX;
  2788.  
  2789. public static int ENCH_MONSTER_CAHNCE;
  2790. public static PvpColor ENCH_MONSTER_MINMAX;
  2791. public static int ENCH_GUARD_CAHNCE;
  2792. public static PvpColor ENCH_GUARD_MINMAX;
  2793. public static boolean ENCH_STACK_SCROLLS;
  2794. public static int CLANHALL_PAYMENT;
  2795. public static int MIRAGE_CHANCE;
  2796. public static boolean SUMMON_CP_PROTECT;
  2797. public static final FastList<Integer> FORBIDDEN_BOW_CLASSES = new FastList();
  2798. public static final FastList<Integer> FORBIDDEN_BOW_CLASSES_OLY = new FastList();
  2799. public static final FastList<Integer> FORBIDDEN_FIST_CLASSES = new FastList();
  2800. public static final FastList<Integer> FORBIDDEN_DUAL_CLASSES = new FastList();
  2801.  
  2802. public static boolean ALLOW_NPC_CHAT;
  2803.  
  2804. public static int MNPC_CHAT_CHANCE;
  2805.  
  2806. public static int FRINTA_MMIN_PARTIES;
  2807.  
  2808. public static int FRINTA_MMIN_PLAYERS;
  2809.  
  2810. public static boolean FORBIDDEN_EVENT_ITMES;
  2811.  
  2812. public static int VS_AUTOLOOT_VAL;
  2813. public static int VS_PATHFIND_VAL;
  2814. public static int VS_SKILL_CHANCES_VAL;
  2815. public static PvpColor WEDDING_COLORS;
  2816. public static final FastMap<Integer, Integer> OLY_MAGE_BUFFS = new FastMap().shared("Config.OLY_MAGE_BUFFS");
  2817. public static final FastMap<Integer, Integer> OLY_FIGHTER_BUFFS = new FastMap().shared("Config.OLY_FIGHTER_BUFFS");
  2818.  
  2819. public static boolean MULTISSELL_PROTECT;
  2820.  
  2821. public static boolean MULTISSELL_ERRORS;
  2822.  
  2823. public static int CHEST_CHANCE;
  2824.  
  2825. public static boolean WEBSTAT_ENABLE;
  2826.  
  2827. public static int WEBSTAT_INTERVAL;
  2828.  
  2829. public static int WEBSTAT_INTERVAL2;
  2830.  
  2831. public static int WEBSTAT_INTERVAL3;
  2832.  
  2833. public static boolean WEBSTAT_KILLS;
  2834.  
  2835. public static boolean WEBSTAT_CHEATS;
  2836.  
  2837. public static int WEBSTAT_ENCHANT;
  2838.  
  2839. public static boolean WEBSTAT_EPICLOOT;
  2840.  
  2841. public static boolean ALT_OLY_RELOAD_SKILLS;
  2842.  
  2843. public static int MOB_DEBUFF_CHANCE;
  2844. public static boolean QUED_ITEMS_ENABLE;
  2845. public static int QUED_ITEMS_INTERVAL;
  2846. public static int QUED_ITEMS_LOGTYPE;
  2847. public static double RATE_MUL_SEAL_STONE;
  2848. public static float RATE_DROP_SEAL_STONE;
  2849. public static boolean EVENT_SPECIAL_DROP;
  2850. public static double RATE_DROP_ITEMSRAIDMUL;
  2851. public static double RATE_DROP_ITEMSGRANDMUL;
  2852. public static boolean FC_INSERT_INVENTORY;
  2853. public static int OLY_MAX_WEAPON_ENCH;
  2854. public static int OLY_MAX_ARMOT_ENCH;
  2855. public static final FastList<Integer> NPC_HIT_PROTECTET = new FastList();
  2856.  
  2857.  
  2858. public static boolean CONSOLE_ADVANCED;
  2859.  
  2860. public static boolean BARAKIEL_NOBLESS;
  2861.  
  2862. public static boolean GAMEGUARD_ENABLED;
  2863.  
  2864. public static int GAMEGUARD_KEY = -1;
  2865.  
  2866. public static int GAMEGUARD_INTERVAL;
  2867.  
  2868. public static int GAMEGUARD_PUNISH;
  2869.  
  2870. public static boolean GAMEGUARD_LOG;
  2871.  
  2872. public static boolean NOBLES_ENABLE;
  2873.  
  2874. public static int SNOBLE_COIN;
  2875.  
  2876. public static int SNOBLE_PRICE;
  2877.  
  2878. public static String SNOBLE_COIN_NAME;
  2879.  
  2880. public static int MAX_EXP_LEVEL;
  2881.  
  2882. public static boolean FREE_PVP;
  2883.  
  2884. public static boolean PROTECT_GRADE_PVP;
  2885.  
  2886. public static boolean CLEAR_OLY_BAN;
  2887.  
  2888. public static boolean GIVE_ITEM_PET;
  2889.  
  2890. public static boolean DISABLE_PET_FEED;
  2891. public static boolean ENCHANT_ALT_FORMULA;
  2892. public static boolean SIEGE_GUARDS_SPAWN;
  2893. public static long TELEPORT_PROTECTION;
  2894. public static int MAX_MATKSPD_DELAY;
  2895. public static int MAX_PATKSPD_DELAY;
  2896. public static int MAX_MATK_CALC;
  2897. public static int MAX_MDEF_CALC;
  2898. public static int MIN_ATKSPD_DELAY;
  2899. public static boolean CASTLE_SIEGE_SKILLS_DELETE;
  2900. public static final FastMap<Integer, EventReward> CASTLE_SIEGE_SKILLS = new FastMap().shared("Config.CASTLE_SIEGE_SKILLS");
  2901.  
  2902. public static int FAKE_MAX_PATK_BOW;
  2903.  
  2904. public static int FAKE_MAX_MDEF_BOW;
  2905.  
  2906. public static int FAKE_MAX_PSPD_BOW;
  2907.  
  2908. public static int FAKE_MAX_PDEF_BOW;
  2909.  
  2910. public static int FAKE_MAX_MATK_BOW;
  2911.  
  2912. public static int FAKE_MAX_MSPD_BOW;
  2913.  
  2914. public static int FAKE_MAX_HP_BOW;
  2915.  
  2916. public static int FAKE_MAX_PATK_MAG;
  2917. public static int FAKE_MAX_MDEF_MAG;
  2918. public static int FAKE_MAX_PSPD_MAG;
  2919. public static int FAKE_MAX_PDEF_MAG;
  2920. public static int FAKE_MAX_MATK_MAG;
  2921. public static int FAKE_MAX_MSPD_MAG;
  2922. public static int FAKE_MAX_HP_MAG;
  2923. public static int FAKE_MAX_PATK_HEAL;
  2924. public static int FAKE_MAX_MDEF_HEAL;
  2925. public static int FAKE_MAX_PSPD_HEAL;
  2926. public static int FAKE_MAX_PDEF_HEAL;
  2927. public static int FAKE_MAX_MATK_HEAL;
  2928. public static int FAKE_MAX_MSPD_HEAL;
  2929. public static int FAKE_MAX_HP_HEAL;
  2930. public static Location NPC_HIT_LOCATION;
  2931. public static int KICK_USED_ACCOUNT_TRYES;
  2932. public static int RAID_CLANPOINTS_REWARD;
  2933. public static int EPIC_CLANPOINTS_REWARD;
  2934. public static boolean DISABLE_CLAN_REQUREMENTS;
  2935. public static Location ZAKEN_SPAWN_LOC;
  2936. public static int BBS_CNAME_COIN;
  2937. public static int BBS_CNAME_PRICE;
  2938. public static String BBS_CNAME_VAL;
  2939. public static final FastList<Integer> HIPPY_ITEMS = new FastList();
  2940.  
  2941. public static boolean PROTECT_MOBS_ITEMS;
  2942.  
  2943. public static int BOSS_ZONE_MAX_ENCH;
  2944.  
  2945. public static int MOUNT_EXPIRE;
  2946.  
  2947. public static final FastList<Integer> BOSS_ITEMS = new FastList();
  2948.  
  2949. public static final FastList<Integer> FORB_CURSED_SKILLS = new FastList();
  2950.  
  2951. public static int HEALSUM_ANIM;
  2952. public static long HEALSUM_DELAY;
  2953. public static final FastMap<Integer, EventReward> HEALING_SUMMONS = new FastMap().shared("Config.HEALING_SUMMONS");
  2954.  
  2955. public static boolean ALLOW_UNIQ_SKILLS;
  2956. public static final FastMap<Integer, Integer> UNIQ_SKILLS = new FastMap().shared("Config.UNIQ_SKILLS");
  2957.  
  2958. public static boolean OLY_RELOAD_SKILLS_BEGIN;
  2959.  
  2960. public static boolean OLY_RELOAD_SKILLS_END;
  2961.  
  2962. public static boolean NPC_CHECK_RANGE;
  2963.  
  2964. public static int NPC_CHECK_MAX_RANGE;
  2965.  
  2966. public static int FS_PARTY_RANGE;
  2967.  
  2968. public static int FS_CYCLE_MIN;
  2969.  
  2970. public static boolean FS_WALL_DOORS;
  2971. public static boolean EAT_ENCH_SCROLLS;
  2972. public static boolean FORB_EVENT_REG_TELE;
  2973. public static boolean EVERYBODE_HERO;
  2974. public static final FastList<EventReward> ALT_HERO_REWARDS = new FastList();
  2975.  
  2976. public static boolean ALLOW_PC_NPC;
  2977.  
  2978. public static boolean VOTE_NCS_SPAWN;
  2979.  
  2980. public static long FRINTA_UPDATE_LAIR;
  2981.  
  2982. public static long FRINTA_MIN_RESPAWN;
  2983.  
  2984. public static long FRINTA_MAX_RESPAWN;
  2985. public static long FRINTA_RESTART_DELAY;
  2986. public static long FRINTA_SPAWN_DELAY;
  2987. public static int ALT_START_SP;
  2988. public static final FastMap<Integer, Integer> NPC_CHASE_RANGES = new FastMap().shared("Config.NPC_CHASE_RANGES");
  2989.  
  2990. public static boolean HTMPARA_WELCOME;
  2991.  
  2992. public static boolean ENABLE_LOC_COMMAND;
  2993.  
  2994. public static boolean RESET_OLY_ENCH;
  2995.  
  2996. public static boolean OLY_ANTI_BUFF;
  2997.  
  2998. public static final FastList<Integer> MOUNTABLE_PETS = new FastList();
  2999.  
  3000. public static boolean RESET_MIRACLE_VALOR;
  3001.  
  3002. public static boolean TVT_HIDE_NAMES;
  3003.  
  3004. public static String TVT_ALT_NAME;
  3005.  
  3006. public static boolean ANNOUNCE_CASTLE_OWNER;
  3007.  
  3008. public static boolean STACK_LIFE_STONE;
  3009. public static boolean ALLOW_BE;
  3010. public static int BE_EGG_ID;
  3011. public static long BE_LIMIT;
  3012. public static long BE_RESTART;
  3013. public static long BE_NEXTTIME;
  3014. public static Location BE_EGG_LOC;
  3015. public static final FastList<EventReward> BE_REWARDS = new FastList();
  3016. public static final FastMap<Integer, Integer> BE_GUARDS = new FastMap().shared("Config.BE_GUARDS");
  3017.  
  3018. public static int OFFTRADE_COIN;
  3019.  
  3020. public static int OFFTRADE_PRICE;
  3021. public static String OFFTRADE_COIN_NAME;
  3022. public static final FastMap<Integer, Integer> EPIC_JEWERLY_CHANCES = new FastMap().shared("Config.EPIC_JEWERLY_CHANCES");
  3023.  
  3024. public static boolean ALLOW_GUILD_MOD;
  3025. public static boolean ALLOW_GUILD_AURA;
  3026. public static final FastMap<Integer, String> GUILD_MOD_NAMES = new FastMap().shared("Config.GUILD_MOD_NAMES");
  3027. public static int GUILD_MOD_COIN;
  3028. public static int GUILD_MOD_PRICE;
  3029. public static String GUILD_MOD_COIN_NAME;
  3030. public static int GUILD_MOD_PENALTYS_MAX;
  3031. public static final FastMap<Integer, Integer> GUILD_MOD_MASKS = new FastMap().shared("Config.GUILD_MOD_MASKS");
  3032. public static final FastList<EventReward> GUILD_MOD_REWARDS = new FastList();
  3033.  
  3034. public static boolean GUILD_BALANCE_TEAM;
  3035.  
  3036. public static boolean BOSS_ZONE_LOGOUT;
  3037. public static final FastList<Integer> FORBID_NPC_HELLO = new FastList();
  3038.  
  3039. public static int WORLD_X_MIN;
  3040. public static int WORLD_X_MAX;
  3041. public static int WORLD_Y_MIN;
  3042. public static int WORLD_Y_MAX;
  3043. public static boolean GEODATA_CELLFINDING;
  3044. public static float LOW_WEIGHT;
  3045. public static float MEDIUM_WEIGHT;
  3046. public static float HIGH_WEIGHT;
  3047. public static boolean ADVANCED_DIAGONAL_STRATEGY;
  3048. public static boolean DEBUG_PATH;
  3049. public static float DIAGONAL_WEIGHT;
  3050. public static String PATHFIND_BUFFERS;
  3051. public static int MAX_POSTFILTER_PASSES;
  3052. public static final String EOL = System.getProperty("line.separator");
  3053.  
  3054. public static boolean BUFFER_ALLOW_PEACE;
  3055.  
  3056. public static boolean OLY_ALT_REWARD;
  3057.  
  3058. public static EventReward OLY_ALT_REWARD_ITEM;
  3059.  
  3060. public static String OLY_ALT_REWARD_ITEM_NAME;
  3061.  
  3062. public static int OLY_ALT_REWARD_TYPE;
  3063.  
  3064. public static boolean TRADE_ZONE_ENABLE;
  3065.  
  3066. public static EventReward CP_RESTORE;
  3067.  
  3068. public static boolean CHGSEX_ENABLE;
  3069.  
  3070. public static int CHGSEX_COIN;
  3071. public static int CHGSEX_PRICE;
  3072. public static String CHGSEX_COIN_NAME;
  3073. public static boolean CHGCLASS_ENABLE;
  3074. public static int CHGCLASS_COIN;
  3075. public static int CHGCLASS_PRICE;
  3076. public static String CHGCLASS_COIN_NAME;
  3077. public static int MIN_HIT_TIME;
  3078. public static boolean SHOW_BOSS_RESPAWNS;
  3079. public static final FastList<Integer> FORBIDDEN_WH_ITEMS = new FastList();
  3080.  
  3081. public static final FastList<Integer> FORB_OLY_SKILLS = new FastList();
  3082. public static final FastList<Integer> FORB_EVENT_SKILLS = new FastList();
  3083.  
  3084. public static boolean ALLOW_DEBUFFS_IN_TOWN;
  3085.  
  3086. public static boolean CHECK_SIEGE_TELE;
  3087.  
  3088. public static boolean CAN_DROP_AUGMENTS;
  3089.  
  3090. public static int GLD_80LVL_COIN;
  3091. public static int GLD_80LVL_PRICE;
  3092. public static int GLD_HEROCHAT_COIN;
  3093. public static int GLD_HEROCHAT_PRICE;
  3094. public static boolean ALT_SUBCLASS_PHOENIX;
  3095. public static final FastMap<Integer, Integer> PETS_ACTION_SKILLS = new FastMap().shared("Config.ALT_SIEGE_GUARD_PRICES");
  3096.  
  3097. public static final FastMap<Integer, Long> ANNOUNCE_RAID_SPAWNS = new FastMap().shared("Config.ANNOUNCE_RAID_SPAWNS");
  3098.  
  3099. public static long SUMMON_DELAY;
  3100.  
  3101. public static final FastList<Integer> PET_RENT_PRICES = new FastList();
  3102.  
  3103.  
  3104. public static int PET_RENT_COIN;
  3105.  
  3106.  
  3107. public static String PET_RENT_COIN_NAME;
  3108.  
  3109. public static boolean PVP_ZONE_REWARDS;
  3110.  
  3111. public static boolean CUSTOM_CHEST_DROP;
  3112.  
  3113. public static boolean ALLOW_CRYSTAL_SCROLLS;
  3114.  
  3115. public static boolean ALLP_ZONE;
  3116.  
  3117. public static boolean DISABLE_REFLECT_ON_MOBS;
  3118.  
  3119. public static boolean LVLUP_RELOAD_SKILLS;
  3120.  
  3121. public static boolean EVENT_REG_POPUP;
  3122.  
  3123. public static int EVENT_REG_POPUPLVL;
  3124.  
  3125. public static boolean CHAT_NEW_FILTER_TEST;
  3126.  
  3127. public static boolean CHAT_GM_BROADCAST;
  3128.  
  3129. public static final FastList<String> CHAT_GM_BROADCAST_LIST = new FastList();
  3130. public static final FastList<String> SPAM_FILTER_LIST = new FastList();
  3131. public static final FastList<String> SPAM_FILTER_DIGITS_LIST = new FastList();
  3132.  
  3133. public static int SAY_PM_COUNT;
  3134.  
  3135. public static long SAY_PM_INTERVAL;
  3136.  
  3137. public static int SAY_PM_BAN_TYPE;
  3138.  
  3139. public static long SAY_PM_BAN_TIME;
  3140.  
  3141. public static boolean ADVANCED_CHAT_FILTER;
  3142.  
  3143. public static int CHAT_LEVEL;
  3144. public static boolean TVT_SHOW_KILLS;
  3145. public static boolean RESET_EVOLY_ENCH;
  3146. public static int CHANGE_SUB_DELAY;
  3147. public static boolean RELOAD_SUB_SKILL;
  3148. public static boolean CHECK_PVP_ZONES;
  3149. public static boolean PVP_DELAY;
  3150. public static long CHECK_PVP_DELAY;
  3151. public static boolean CATS_GUARD;
  3152. public static int CLANHALL_FEE_ID;
  3153. public static boolean CH_AUCTION_TOWNS;
  3154. public static boolean CH_FEE_CASTLE;
  3155. public static final FastList<String> CH_AUC_TOWNS_LIST = new FastList();
  3156.  
  3157. public static int CHAR_CREATE_ENCHANT;
  3158.  
  3159. public static boolean TOWN_PVP_REWARD;
  3160.  
  3161. public static boolean AUTO_SKILL_ATTACK;
  3162.  
  3163. public static int RAID_VORTEX_CHANCE;
  3164.  
  3165. public static final FastList<Integer> WHITE_SKILLS = new FastList();
  3166.  
  3167. public static boolean MOB_PVP_FLAG;
  3168. public static int MOB_PVP_FLAG_CONUT;
  3169. public static final FastList<Integer> MOB_PVP_FLAG_LIST = new FastList();
  3170.  
  3171. public static final FastMap<Integer, EventReward> SUPER_MOBS = new FastMap().shared("Config.SUPER_MOBS");
  3172.  
  3173. public static boolean CASTLE_BONUS_SKILLS;
  3174.  
  3175. public static boolean PREMIUM_MOBS;
  3176. public static final FastList<Integer> PREMIUM_MOBS_LIST = new FastList();
  3177.  
  3178. public static final FastList<Integer> CUSTOM_AUG_SKILLS = new FastList();
  3179.  
  3180. public static boolean SHOW_KILLER_INFO;
  3181.  
  3182. public static boolean SHOW_KILLER_INFO_ITEMS;
  3183.  
  3184. public static boolean REWARD_PVP_ZONE;
  3185. public static boolean REWARD_PVP_ZONE_CLAN;
  3186. public static boolean REWARD_PVP_ZONE_PARTY;
  3187. public static boolean REWARD_PVP_ZONE_HWID;
  3188. public static boolean REWARD_PVP_ZONE_IP;
  3189. public static int REWARD_PVP_ZONE_ANNOUNCE;
  3190. public static boolean PREMIUM_ITEMS;
  3191. public static final FastList<Integer> PREMIUM_ITEMS_LIST = new FastList();
  3192.  
  3193. public static boolean MOB_FIXED_DAMAGE;
  3194. public static final FastMap<Integer, Double> MOB_FIXED_DAMAGE_LIST = new FastMap().shared("Config.MOB_FIXED_DAMAGE_LIST");
  3195.  
  3196. public static boolean TATOO_SKILLS;
  3197. public static final FastMap<Integer, Integer> TATOO_SKILLS_LIST = new FastMap().shared("Config.TATOO_SKILLS_LIST");
  3198.  
  3199. public static boolean RUNNING_ON_VDS;
  3200.  
  3201. public static int SCHEDULED_THREAD_POOL_SIZE;
  3202.  
  3203. public static int EXECUTOR_THREAD_POOL_SIZE;
  3204. public static final FastList<Integer> STOP_SUB_BUFFS = new FastList();
  3205.  
  3206. public static boolean ARMORSETS_XML;
  3207.  
  3208. public static boolean NPC_DEWALKED_ZONE;
  3209.  
  3210. public static double FIXED_DAMAGE_TO_BOSS;
  3211.  
  3212. public static boolean SET_PHONE_NUBER;
  3213.  
  3214. public static boolean DS_ALL_SUBS;
  3215.  
  3216. public static boolean ACP_ENGINE;
  3217.  
  3218. public static int ACP_MP;
  3219.  
  3220. public static int ACP_HP;
  3221.  
  3222. public static int ACP_CP;
  3223.  
  3224. public static int ACP_DELAY;
  3225.  
  3226. public static boolean TALK_MOVE_DELAY;
  3227.  
  3228.  
  3229. public static void loadServerCfg()
  3230. {
  3231.  
  3232. try
  3233. {
  3234. Properties serverSettings = new Properties();
  3235. InputStream is = new FileInputStream(new File("./config/server.cfg"));
  3236. serverSettings.load(is);
  3237. is.close();
  3238.  
  3239. GAMESERVER_HOSTNAME = serverSettings.getProperty("GameserverHostname");
  3240.  
  3241. String[] ports = serverSettings.getProperty("GameserverPort", "7777").split(",");
  3242. PORTS_GAME = new int[ports.length];
  3243. int i = 0;
  3244. for (String port : ports) {
  3245. PORTS_GAME[i] = Integer.parseInt(port);
  3246. i++;
  3247. }
  3248.  
  3249. EXTERNAL_HOSTNAME = serverSettings.getProperty("ExternalHostname", "*");
  3250. INTERNAL_HOSTNAME = serverSettings.getProperty("InternalHostname", "*");
  3251.  
  3252. GAME_SERVER_LOGIN_PORT = Integer.parseInt(serverSettings.getProperty("LoginPort", "9014"));
  3253. GAME_SERVER_LOGIN_HOST = serverSettings.getProperty("LoginHost", "127.0.0.1");
  3254.  
  3255. REQUEST_ID = Integer.parseInt(serverSettings.getProperty("RequestServerID", "0"));
  3256. ACCEPT_ALTERNATE_ID = Boolean.parseBoolean(serverSettings.getProperty("AcceptAlternateID", "True"));
  3257.  
  3258. DATABASE_DRIVER = serverSettings.getProperty("Driver", "com.mysql.jdbc.Driver");
  3259. DATABASE_URL = serverSettings.getProperty("URL", "jdbc:mysql://localhost/l2jdb");
  3260. DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
  3261. DATABASE_PASSWORD = serverSettings.getProperty("Password", "");
  3262. DATABASE_MAX_CONNECTIONS = Integer.parseInt(serverSettings.getProperty("MaximumDbConnections", "10"));
  3263.  
  3264. MINCONNECTIONSPERPARTITION = Integer.parseInt(serverSettings.getProperty("MinConnectionsPerPartition", "10"));
  3265. MAXCONNECTIONSPERPARTITION = Integer.parseInt(serverSettings.getProperty("MaxConnectionsPerPartition", "30"));
  3266. PARTITIONCOUNT = Integer.parseInt(serverSettings.getProperty("PartitionCount", "5"));
  3267. ACQUIREINCREMENT = Integer.parseInt(serverSettings.getProperty("AcquireIncrement", "5"));
  3268. IDLECONNECTIONTESTPERIOD = Integer.parseInt(serverSettings.getProperty("IdleConnectionTestPeriod", "10"));
  3269. IDLEMAXAGE = Integer.parseInt(serverSettings.getProperty("IdleMaxAge", "10"));
  3270. RELEASEHELPERTHREADS = Integer.parseInt(serverSettings.getProperty("ReleaseHelperThreads", "5"));
  3271. ACQUIRERETRYDELAY = Integer.parseInt(serverSettings.getProperty("AcquireRetryDelay", "7000"));
  3272. ACQUIRERETRYATTEMPTS = Integer.parseInt(serverSettings.getProperty("AcquireRetryAttempts", "5"));
  3273. QUERYEXECUTETIMELIMIT = Integer.parseInt(serverSettings.getProperty("QueryExecuteTimeLimit", "0"));
  3274. CONNECTIONTIMEOUT = Integer.parseInt(serverSettings.getProperty("ConnectionTimeout", "0"));
  3275.  
  3276. LAZYINIT = Boolean.parseBoolean(serverSettings.getProperty("LazyInit", "False"));
  3277. TRANSACTIONRECOVERYENABLED = Boolean.parseBoolean(serverSettings.getProperty("TransactionRecoveryEnabled", "False"));
  3278.  
  3279. DATAPACK_ROOT = new File(serverSettings.getProperty("DatapackRoot", ".")).getCanonicalFile();
  3280.  
  3281. CNAME_TEMPLATE = serverSettings.getProperty("CnameTemplate", ".*");
  3282. PET_NAME_TEMPLATE = serverSettings.getProperty("PetNameTemplate", ".*");
  3283.  
  3284. MAX_CHARACTERS_NUMBER_PER_ACCOUNT = Integer.parseInt(serverSettings.getProperty("CharMaxNumber", "0"));
  3285. MAXIMUM_ONLINE_USERS = Integer.parseInt(serverSettings.getProperty("MaximumOnlineUsers", "100"));
  3286.  
  3287. MIN_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MinProtocolRevision", "660"));
  3288. MAX_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MaxProtocolRevision", "665"));
  3289. SHOW_PROTOCOL_VERSIONS = Boolean.parseBoolean(serverSettings.getProperty("ShowProtocolsInConsole", "False"));
  3290. if (MIN_PROTOCOL_REVISION > MAX_PROTOCOL_REVISION) {
  3291. throw new Error("MinProtocolRevision is bigger than MaxProtocolRevision in server configuration file.");
  3292. }
  3293. DEADLOCKCHECK_INTERVAL = Integer.parseInt(serverSettings.getProperty("DeadLockCheck", "0"));
  3294. RESTART_HOUR = Integer.parseInt(serverSettings.getProperty("AutoRestartHour", "0"));
  3295. SERVER_SERIAL_KEY = serverSettings.getProperty("SerialKey", "None");
  3296. if ((SERVER_SERIAL_KEY.equals("None")) || (SERVER_SERIAL_KEY.length() < 40))
  3297. {
  3298.  
  3299.  
  3300.  
  3301.  
  3302. SERVER_SERIAL_KEY = "wq34t43gt34t4g4ge4g";
  3303. }
  3304.  
  3305. WEBSERVER_REFRESH_STATS = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serverSettings.getProperty("WebServerRefreshTime", "15")));
  3306. WEBSERVER_PORT = Integer.parseInt(serverSettings.getProperty("WebServerPort", "0"));
  3307. WEBSERVER_FOLDER = serverSettings.getProperty("WebServerFolder", "data/webserver/");
  3308. WEBSERVER_PAGE = serverSettings.getProperty("WebServerIndex", "index.html");
  3309.  
  3310. WEBSTAT_ENABLE = Boolean.parseBoolean(serverSettings.getProperty("WebStatEnable", "False"));
  3311. WEBSTAT_INTERVAL = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serverSettings.getProperty("WebStatRefreshTime", "5")));
  3312. WEBSTAT_INTERVAL2 = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serverSettings.getProperty("WebStatRefreshTimeEx", "30")));
  3313.  
  3314. WEBSTAT_INTERVAL3 = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serverSettings.getProperty("WebStatRefreshTimeOa", "5")));
  3315. WEBSTAT_ENCHANT = Integer.parseInt(serverSettings.getProperty("WebStatEnchant", "-1"));
  3316. WEBSTAT_KILLS = Boolean.parseBoolean(serverSettings.getProperty("WebStatKills", "False"));
  3317. WEBSTAT_CHEATS = Boolean.parseBoolean(serverSettings.getProperty("WebStatCheats", "False"));
  3318. WEBSTAT_EPICLOOT = Boolean.parseBoolean(serverSettings.getProperty("WebStatEpicLoot", "False"));
  3319.  
  3320. CONSOLE_ADVANCED = Boolean.parseBoolean(serverSettings.getProperty("WindowsAdvancedConsole", "False"));
  3321.  
  3322. RUNNING_ON_VDS = Boolean.parseBoolean(serverSettings.getProperty("RunningOnVDS", "False"));
  3323. }
  3324. catch (Exception e) {
  3325. e.printStackTrace();
  3326. throw new Error("Failed to Load ./config/server.cfg File.");
  3327. }
  3328. }
  3329.  
  3330. public static void loadCatsGuardCfg() {
  3331. try {
  3332. Properties cg = new Properties();
  3333. InputStream is2 = new FileInputStream(new File("./catsguard/catsguard.cfg"));
  3334. cg.load(is2);
  3335. is2.close();
  3336. CATS_GUARD = Boolean.parseBoolean(cg.getProperty("Enabled", "False"));
  3337. } catch (Exception e) {
  3338. CATS_GUARD = false;
  3339. }
  3340. }
  3341.  
  3342. public static final int NCPUS = Runtime.getRuntime().availableProcessors();
  3343.  
  3344. public static void loadOptionsCfg() {
  3345. LIST_PROTECTED_ITEMS.clear();
  3346. LOG_MULTISELL_ID.clear();
  3347. try
  3348. {
  3349. Properties optionsSettings = new Properties();
  3350. InputStream is = new FileInputStream(new File("./config/options.cfg"));
  3351. optionsSettings.load(is);
  3352. is.close();
  3353.  
  3354. EVERYBODY_HAS_ADMIN_RIGHTS = Boolean.parseBoolean(optionsSettings.getProperty("EverybodyHasAdminRights", "false"));
  3355.  
  3356. DEBUG = Boolean.parseBoolean(optionsSettings.getProperty("Debug", "false"));
  3357. ASSERT = Boolean.parseBoolean(optionsSettings.getProperty("Assert", "false"));
  3358. DEVELOPER = Boolean.parseBoolean(optionsSettings.getProperty("Developer", "false"));
  3359. TEST_SERVER = Boolean.parseBoolean(optionsSettings.getProperty("TestServer", "false"));
  3360. SERVER_LIST_TESTSERVER = Boolean.parseBoolean(optionsSettings.getProperty("TestServer", "false"));
  3361.  
  3362. SERVER_LIST_BRACKET = Boolean.valueOf(optionsSettings.getProperty("ServerListBrackets", "false")).booleanValue();
  3363. SERVER_LIST_CLOCK = Boolean.valueOf(optionsSettings.getProperty("ServerListClock", "false")).booleanValue();
  3364. SERVER_GMONLY = Boolean.valueOf(optionsSettings.getProperty("ServerGMOnly", "false")).booleanValue();
  3365.  
  3366. AUTODESTROY_ITEM_AFTER = Integer.parseInt(optionsSettings.getProperty("AutoDestroyDroppedItemAfter", "0"));
  3367. HERB_AUTO_DESTROY_TIME = Integer.parseInt(optionsSettings.getProperty("AutoDestroyHerbTime", "15")) * 1000;
  3368. PROTECTED_ITEMS = optionsSettings.getProperty("ListOfProtectedItems");
  3369. LIST_PROTECTED_ITEMS = new FastList();
  3370. String[] arrayOfString1 = PROTECTED_ITEMS.split(",");int i = arrayOfString1.length; for (String str1 = 0; str1 < i; str1++) { id = arrayOfString1[str1];
  3371. LIST_PROTECTED_ITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  3372. }
  3373. DESTROY_DROPPED_PLAYER_ITEM = Boolean.valueOf(optionsSettings.getProperty("DestroyPlayerDroppedItem", "false")).booleanValue();
  3374. DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.valueOf(optionsSettings.getProperty("DestroyEquipableItem", "false")).booleanValue();
  3375. SAVE_DROPPED_ITEM = Boolean.valueOf(optionsSettings.getProperty("SaveDroppedItem", "false")).booleanValue();
  3376. EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.valueOf(optionsSettings.getProperty("EmptyDroppedItemTableAfterLoad", "false")).booleanValue();
  3377. SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(optionsSettings.getProperty("SaveDroppedItemInterval", "0")) * 60000;
  3378. CLEAR_DROPPED_ITEM_TABLE = Boolean.valueOf(optionsSettings.getProperty("ClearDroppedItemTable", "false")).booleanValue();
  3379.  
  3380. PRECISE_DROP_CALCULATION = Boolean.valueOf(optionsSettings.getProperty("PreciseDropCalculation", "True")).booleanValue();
  3381. MULTIPLE_ITEM_DROP = Boolean.valueOf(optionsSettings.getProperty("MultipleItemDrop", "True")).booleanValue();
  3382.  
  3383. ONLY_GM_ITEMS_FREE = Boolean.valueOf(optionsSettings.getProperty("OnlyGMItemsFree", "True")).booleanValue();
  3384.  
  3385. ALLOW_WAREHOUSE = Boolean.valueOf(optionsSettings.getProperty("AllowWarehouse", "True")).booleanValue();
  3386. WAREHOUSE_CACHE = Boolean.valueOf(optionsSettings.getProperty("WarehouseCache", "False")).booleanValue();
  3387. WAREHOUSE_CACHE_TIME = Integer.parseInt(optionsSettings.getProperty("WarehouseCacheTime", "15"));
  3388. ALLOW_FREIGHT = Boolean.valueOf(optionsSettings.getProperty("AllowFreight", "True")).booleanValue();
  3389. ALLOW_WEAR = Boolean.valueOf(optionsSettings.getProperty("AllowWear", "False")).booleanValue();
  3390. WEAR_DELAY = Integer.parseInt(optionsSettings.getProperty("WearDelay", "5"));
  3391. WEAR_PRICE = Integer.parseInt(optionsSettings.getProperty("WearPrice", "10"));
  3392. ALLOW_LOTTERY = Boolean.valueOf(optionsSettings.getProperty("AllowLottery", "False")).booleanValue();
  3393. ALLOW_RACE = Boolean.valueOf(optionsSettings.getProperty("AllowRace", "False")).booleanValue();
  3394.  
  3395. ALLOW_WATER = Boolean.valueOf(optionsSettings.getProperty("AllowWater", "True")).booleanValue();
  3396. ALLOW_FALL = Boolean.valueOf(optionsSettings.getProperty("AllowFalling", "False")).booleanValue();
  3397. ALLOW_FALL = false;
  3398.  
  3399. ALLOW_RENTPET = Boolean.valueOf(optionsSettings.getProperty("AllowRentPet", "False")).booleanValue();
  3400. ALLOW_DISCARDITEM = Boolean.valueOf(optionsSettings.getProperty("AllowDiscardItem", "True")).booleanValue();
  3401. ALLOWFISHING = Boolean.valueOf(optionsSettings.getProperty("AllowFishing", "False")).booleanValue();
  3402. ALLOW_MANOR = Boolean.parseBoolean(optionsSettings.getProperty("AllowManor", "False"));
  3403. ALLOW_BOAT = Boolean.valueOf(optionsSettings.getProperty("AllowBoat", "False")).booleanValue();
  3404. ALLOW_NPC_WALKERS = Boolean.valueOf(optionsSettings.getProperty("AllowNpcWalkers", "true")).booleanValue();
  3405. ALLOW_CURSED_WEAPONS = Boolean.valueOf(optionsSettings.getProperty("AllowCursedWeapons", "False")).booleanValue();
  3406.  
  3407. ALLOW_L2WALKER_CLIENT = L2WalkerAllowed.valueOf(optionsSettings.getProperty("AllowL2Walker", "False"));
  3408. L2WALKER_REVISION = Integer.parseInt(optionsSettings.getProperty("L2WalkerRevision", "537"));
  3409. AUTOBAN_L2WALKER_ACC = Boolean.valueOf(optionsSettings.getProperty("AutobanL2WalkerAcc", "False")).booleanValue();
  3410. GM_EDIT = Boolean.valueOf(optionsSettings.getProperty("GMEdit", "False")).booleanValue();
  3411.  
  3412. ACTIVATE_POSITION_RECORDER = Boolean.valueOf(optionsSettings.getProperty("ActivatePositionRecorder", "False")).booleanValue();
  3413.  
  3414. DEFAULT_GLOBAL_CHAT = optionsSettings.getProperty("GlobalChat", "ON");
  3415. DEFAULT_TRADE_CHAT = optionsSettings.getProperty("TradeChat", "ON");
  3416.  
  3417. LOG_CHAT = Boolean.valueOf(optionsSettings.getProperty("LogChat", "false")).booleanValue();
  3418.  
  3419. LOG_ITEMS = Boolean.valueOf(optionsSettings.getProperty("LogItems", "false")).booleanValue();
  3420. String[] propertySplit = optionsSettings.getProperty("LogMultisell", "").split(",");
  3421. String[] arrayOfString2 = propertySplit;str1 = arrayOfString2.length; for (String id = 0; id < str1; id++) { String item = arrayOfString2[id];
  3422. try {
  3423. LOG_MULTISELL_ID.add(Integer.valueOf(item));
  3424. } catch (NumberFormatException nfe) {
  3425. if (!item.equals("")) {
  3426. System.out.println("options.cfg: LogMultisell error: " + item);
  3427. }
  3428. }
  3429. }
  3430.  
  3431. GMAUDIT = Boolean.valueOf(optionsSettings.getProperty("GMAudit", "False")).booleanValue();
  3432.  
  3433. COMMUNITY_TYPE = optionsSettings.getProperty("CommunityType", "old").toLowerCase();
  3434. BBS_DEFAULT = optionsSettings.getProperty("BBSDefault", "_bbshome");
  3435. SHOW_LEVEL_COMMUNITYBOARD = Boolean.valueOf(optionsSettings.getProperty("ShowLevelOnCommunityBoard", "False")).booleanValue();
  3436. SHOW_STATUS_COMMUNITYBOARD = Boolean.valueOf(optionsSettings.getProperty("ShowStatusOnCommunityBoard", "True")).booleanValue();
  3437. NAME_PAGE_SIZE_COMMUNITYBOARD = Integer.parseInt(optionsSettings.getProperty("NamePageSizeOnCommunityBoard", "50"));
  3438. NAME_PER_ROW_COMMUNITYBOARD = Integer.parseInt(optionsSettings.getProperty("NamePerRowOnCommunityBoard", "5"));
  3439.  
  3440. BBS_CURSED_SHOP = Boolean.valueOf(optionsSettings.getProperty("BbsCursedShop", "True")).booleanValue();
  3441. BBS_CURSED_TELEPORT = Boolean.valueOf(optionsSettings.getProperty("BbsCursedTeleport", "True")).booleanValue();
  3442. BBS_CURSED_BUFF = Boolean.valueOf(optionsSettings.getProperty("BbsCursedBuff", "True")).booleanValue();
  3443.  
  3444. ZONE_TOWN = Integer.parseInt(optionsSettings.getProperty("ZoneTown", "0"));
  3445.  
  3446. MAX_DRIFT_RANGE = Integer.parseInt(optionsSettings.getProperty("MaxDriftRange", "300"));
  3447.  
  3448. MIN_NPC_ANIMATION = Integer.parseInt(optionsSettings.getProperty("MinNPCAnimation", "10"));
  3449. MAX_NPC_ANIMATION = Integer.parseInt(optionsSettings.getProperty("MaxNPCAnimation", "20"));
  3450. MIN_MONSTER_ANIMATION = Integer.parseInt(optionsSettings.getProperty("MinMonsterAnimation", "5"));
  3451. MAX_MONSTER_ANIMATION = Integer.parseInt(optionsSettings.getProperty("MaxMonsterAnimation", "20"));
  3452.  
  3453. SERVER_NEWS = Boolean.valueOf(optionsSettings.getProperty("ShowServerNews", "False")).booleanValue();
  3454. SHOW_NPC_LVL = Boolean.valueOf(optionsSettings.getProperty("ShowNpcLevel", "False")).booleanValue();
  3455.  
  3456. FORCE_INVENTORY_UPDATE = Boolean.valueOf(optionsSettings.getProperty("ForceInventoryUpdate", "False")).booleanValue();
  3457.  
  3458. AUTODELETE_INVALID_QUEST_DATA = Boolean.valueOf(optionsSettings.getProperty("AutoDeleteInvalidQuestData", "False")).booleanValue();
  3459.  
  3460.  
  3461. THREADING_MODEL = Integer.parseInt(optionsSettings.getProperty("ThreadingModel", "1"));
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469. SCHEDULED_THREAD_POOL_SIZE = Integer.parseInt(optionsSettings.getProperty("ScheduledThreadPoolSize", String.valueOf(NCPUS * 4)));
  3470. EXECUTOR_THREAD_POOL_SIZE = Integer.parseInt(optionsSettings.getProperty("ExecutorThreadPoolSize", String.valueOf(NCPUS * 2)));
  3471.  
  3472. IO_PACKET_THREAD_CORE_SIZE = Integer.parseInt(optionsSettings.getProperty("UrgentPacketThreadCoreSize", "5"));
  3473.  
  3474. GENERAL_PACKET_THREAD_CORE_SIZE = Integer.parseInt(optionsSettings.getProperty("GeneralPacketThreadCoreSize", "5"));
  3475. GENERAL_THREAD_CORE_SIZE = Integer.parseInt(optionsSettings.getProperty("GeneralThreadCoreSize", "8"));
  3476.  
  3477. NPC_AI_MAX_THREAD = Integer.parseInt(optionsSettings.getProperty("NpcAiMaxThread", "10"));
  3478. PLAYER_AI_MAX_THREAD = Integer.parseInt(optionsSettings.getProperty("PlayerAiMaxThread", "20"));
  3479.  
  3480.  
  3481. DELETE_DAYS = Integer.parseInt(optionsSettings.getProperty("DeleteCharAfterDays", "7"));
  3482.  
  3483. DEFAULT_PUNISH = Integer.parseInt(optionsSettings.getProperty("DefaultPunish", "2"));
  3484. DEFAULT_PUNISH_PARAM = Integer.parseInt(optionsSettings.getProperty("DefaultPunishParam", "0"));
  3485.  
  3486. LAZY_CACHE = Boolean.valueOf(optionsSettings.getProperty("LazyCache", "False")).booleanValue();
  3487.  
  3488. PACKET_LIFETIME = Integer.parseInt(optionsSettings.getProperty("PacketLifeTime", "0"));
  3489.  
  3490. BYPASS_VALIDATION = Boolean.valueOf(optionsSettings.getProperty("BypassValidation", "True")).booleanValue();
  3491.  
  3492. GAMEGUARD_ENFORCE = Boolean.valueOf(optionsSettings.getProperty("GameGuardEnforce", "False")).booleanValue();
  3493. GAMEGUARD_PROHIBITACTION = Boolean.valueOf(optionsSettings.getProperty("GameGuardProhibitAction", "False")).booleanValue();
  3494.  
  3495. GRIDS_ALWAYS_ON = Boolean.parseBoolean(optionsSettings.getProperty("GridsAlwaysOn", "False"));
  3496. GRID_NEIGHBOR_TURNON_TIME = Integer.parseInt(optionsSettings.getProperty("GridNeighborTurnOnTime", "30"));
  3497. GRID_NEIGHBOR_TURNOFF_TIME = Integer.parseInt(optionsSettings.getProperty("GridNeighborTurnOffTime", "300"));
  3498.  
  3499.  
  3500.  
  3501.  
  3502. USE_3D_MAP = Boolean.valueOf(optionsSettings.getProperty("Use3DMap", "False")).booleanValue();
  3503.  
  3504. PATH_NODE_RADIUS = Integer.parseInt(optionsSettings.getProperty("PathNodeRadius", "50"));
  3505. NEW_NODE_ID = Integer.parseInt(optionsSettings.getProperty("NewNodeId", "7952"));
  3506. SELECTED_NODE_ID = Integer.parseInt(optionsSettings.getProperty("NewNodeId", "7952"));
  3507. LINKED_NODE_ID = Integer.parseInt(optionsSettings.getProperty("NewNodeId", "7952"));
  3508. NEW_NODE_TYPE = optionsSettings.getProperty("NewNodeType", "npc");
  3509.  
  3510. COUNT_PACKETS = Boolean.valueOf(optionsSettings.getProperty("CountPacket", "false")).booleanValue();
  3511. DUMP_PACKET_COUNTS = Boolean.valueOf(optionsSettings.getProperty("DumpPacketCounts", "false")).booleanValue();
  3512. DUMP_INTERVAL_SECONDS = Integer.parseInt(optionsSettings.getProperty("PacketDumpInterval", "60"));
  3513.  
  3514. MINIMUM_UPDATE_DISTANCE = Integer.parseInt(optionsSettings.getProperty("MaximumUpdateDistance", "50"));
  3515. MINIMUN_UPDATE_TIME = Integer.parseInt(optionsSettings.getProperty("MinimumUpdateTime", "500"));
  3516. CHECK_KNOWN = Boolean.valueOf(optionsSettings.getProperty("CheckKnownList", "false")).booleanValue();
  3517. KNOWNLIST_FORGET_DELAY = Integer.parseInt(optionsSettings.getProperty("KnownListForgetDelay", "10000"));
  3518.  
  3519. CHAT_GM_BROADCAST = Boolean.parseBoolean(optionsSettings.getProperty("ChatGmBroadcast", "False"));
  3520. CHAT_NEW_FILTER_TEST = Boolean.parseBoolean(optionsSettings.getProperty("ChatFilterAll", "False"));
  3521. SAY_PM_COUNT = Integer.parseInt(optionsSettings.getProperty("SayPmCount", "5"));
  3522. SAY_PM_INTERVAL = TimeUnit.SECONDS.toMillis(Integer.parseInt(optionsSettings.getProperty("SayPmInterval", "35")));
  3523. SAY_PM_BAN_TYPE = Integer.parseInt(optionsSettings.getProperty("SayPmBanType", "3"));
  3524. SAY_PM_BAN_TIME = TimeUnit.MINUTES.toMillis(Integer.parseInt(optionsSettings.getProperty("SayPmBanChat", "180")));
  3525. ADVANCED_CHAT_FILTER = Boolean.parseBoolean(optionsSettings.getProperty("ChatFilterSpam", "False"));
  3526. } catch (Exception e) {
  3527. e.printStackTrace();
  3528. throw new Error("Failed to Load ./config/options.cfg File.");
  3529. }
  3530. }
  3531.  
  3532. public static void loadFiltersConfig() {
  3533. loadChatFilter();
  3534. loadFilterNew();
  3535. loadSpamFilter();
  3536. }
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559. public static void loadFilterNew() {}
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582. public static void loadSpamFilter() {}
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605. public static void loadTelnetCfg()
  3606. {
  3607. try
  3608. {
  3609. Properties telnetSettings = new Properties();
  3610. InputStream is = new FileInputStream(new File("./config/telnet.cfg"));
  3611. telnetSettings.load(is);
  3612. is.close();
  3613.  
  3614. IS_TELNET_ENABLED = Boolean.valueOf(telnetSettings.getProperty("EnableTelnet", "false")).booleanValue();
  3615. } catch (Exception e) {
  3616. e.printStackTrace();
  3617. throw new Error("Failed to Load ./config/telnet.cfg File.");
  3618. }
  3619. }
  3620.  
  3621. public static void loadIdFactoryCfg() {
  3622. try {
  3623. Properties idSettings = new Properties();
  3624. InputStream is = new FileInputStream(new File("./config/idfactory.cfg"));
  3625. idSettings.load(is);
  3626. is.close();
  3627.  
  3628. MAP_TYPE = ObjectMapType.valueOf(idSettings.getProperty("L2Map", "WorldObjectMap"));
  3629. SET_TYPE = ObjectSetType.valueOf(idSettings.getProperty("L2Set", "WorldObjectSet"));
  3630. IDFACTORY_TYPE = IdFactoryType.valueOf(idSettings.getProperty("IDFactory", "Compaction"));
  3631. BAD_ID_CHECKING = Boolean.valueOf(idSettings.getProperty("BadIdChecking", "True")).booleanValue();
  3632. } catch (Exception e) {
  3633. e.printStackTrace();
  3634. throw new Error("Failed to Load ./config/idfactory.cfg File.");
  3635. }
  3636. }
  3637.  
  3638. public static void loadOtherCfg() {
  3639. LIST_PET_RENT_NPC.clear();
  3640. LIST_NONDROPPABLE_ITEMS.clear();
  3641. try
  3642. {
  3643. Properties otherSettings = new Properties();
  3644. InputStream is = new FileInputStream(new File("./config/other.cfg"));
  3645. otherSettings.load(is);
  3646. is.close();
  3647.  
  3648. DEEPBLUE_DROP_RULES = Boolean.parseBoolean(otherSettings.getProperty("UseDeepBlueDropRules", "True"));
  3649. ALLOW_GUARDS = Boolean.valueOf(otherSettings.getProperty("AllowGuards", "False")).booleanValue();
  3650. EFFECT_CANCELING = Boolean.valueOf(otherSettings.getProperty("CancelLesserEffect", "True")).booleanValue();
  3651. ALLOW_WYVERN_UPGRADER = Boolean.valueOf(otherSettings.getProperty("AllowWyvernUpgrader", "False")).booleanValue();
  3652.  
  3653.  
  3654.  
  3655.  
  3656. INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(otherSettings.getProperty("MaximumSlotsForNoDwarf", "80"));
  3657. INVENTORY_MAXIMUM_DWARF = Integer.parseInt(otherSettings.getProperty("MaximumSlotsForDwarf", "100"));
  3658. INVENTORY_MAXIMUM_GM = Integer.parseInt(otherSettings.getProperty("MaximumSlotsForGMPlayer", "250"));
  3659. MAX_ITEM_IN_PACKET = Math.max(INVENTORY_MAXIMUM_NO_DWARF, Math.max(INVENTORY_MAXIMUM_DWARF, INVENTORY_MAXIMUM_GM));
  3660.  
  3661.  
  3662.  
  3663.  
  3664. WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(otherSettings.getProperty("MaximumWarehouseSlotsForNoDwarf", "100"));
  3665. WAREHOUSE_SLOTS_DWARF = Integer.parseInt(otherSettings.getProperty("MaximumWarehouseSlotsForDwarf", "120"));
  3666. WAREHOUSE_SLOTS_CLAN = Integer.parseInt(otherSettings.getProperty("MaximumWarehouseSlotsForClan", "150"));
  3667. FREIGHT_SLOTS = Integer.parseInt(otherSettings.getProperty("MaximumFreightSlots", "20"));
  3668.  
  3669.  
  3670.  
  3671.  
  3672. AUGMENT_EXCLUDE_NOTDONE = Boolean.parseBoolean(otherSettings.getProperty("AugmentExcludeNotdone", "false"));
  3673.  
  3674.  
  3675.  
  3676.  
  3677. HP_REGEN_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("HpRegenMultiplier", "100")) / 100.0D;
  3678. MP_REGEN_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("MpRegenMultiplier", "100")) / 100.0D;
  3679. CP_REGEN_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("CpRegenMultiplier", "100")) / 100.0D;
  3680.  
  3681. RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("RaidHpRegenMultiplier", "100")) / 100.0D;
  3682. RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("RaidMpRegenMultiplier", "100")) / 100.0D;
  3683. RAID_DEFENCE_MULTIPLIER = Double.parseDouble(otherSettings.getProperty("RaidDefenceMultiplier", "100")) / 100.0D;
  3684. RAID_MINION_RESPAWN_TIMER = Integer.parseInt(otherSettings.getProperty("RaidMinionRespawnTime", "300000"));
  3685. RAID_MIN_RESPAWN_MULTIPLIER = Float.parseFloat(otherSettings.getProperty("RaidMinRespawnMultiplier", "1.0"));
  3686. RAID_MAX_RESPAWN_MULTIPLIER = Float.parseFloat(otherSettings.getProperty("RaidMaxRespawnMultiplier", "1.0"));
  3687.  
  3688. UNSTUCK_INTERVAL = Integer.parseInt(otherSettings.getProperty("UnstuckInterval", "300"));
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694. PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(otherSettings.getProperty("PlayerFakeDeathUpProtection", "0"));
  3695.  
  3696.  
  3697.  
  3698.  
  3699. PARTY_XP_CUTOFF_METHOD = otherSettings.getProperty("PartyXpCutoffMethod", "percentage");
  3700. PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(otherSettings.getProperty("PartyXpCutoffPercent", "3."));
  3701. PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(otherSettings.getProperty("PartyXpCutoffLevel", "30"));
  3702.  
  3703.  
  3704.  
  3705.  
  3706. RESPAWN_RESTORE_CP = Double.parseDouble(otherSettings.getProperty("RespawnRestoreCP", "0")) / 100.0D;
  3707. RESPAWN_RESTORE_HP = Double.parseDouble(otherSettings.getProperty("RespawnRestoreHP", "70")) / 100.0D;
  3708. RESPAWN_RESTORE_MP = Double.parseDouble(otherSettings.getProperty("RespawnRestoreMP", "70")) / 100.0D;
  3709.  
  3710. RESPAWN_RANDOM_ENABLED = Boolean.parseBoolean(otherSettings.getProperty("RespawnRandomInTown", "False"));
  3711. RESPAWN_RANDOM_MAX_OFFSET = Integer.parseInt(otherSettings.getProperty("RespawnRandomMaxOffset", "50"));
  3712.  
  3713.  
  3714.  
  3715.  
  3716. MAX_PVTSTORE_SLOTS_DWARF = Integer.parseInt(otherSettings.getProperty("MaxPvtStoreSlotsDwarf", "5"));
  3717. MAX_PVTSTORE_SLOTS_OTHER = Integer.parseInt(otherSettings.getProperty("MaxPvtStoreSlotsOther", "4"));
  3718.  
  3719. STORE_SKILL_COOLTIME = Boolean.parseBoolean(otherSettings.getProperty("StoreSkillCooltime", "true"));
  3720.  
  3721. PET_RENT_NPC = otherSettings.getProperty("ListPetRentNpc", "30827");
  3722. LIST_PET_RENT_NPC = new FastList();
  3723. for (String id : PET_RENT_NPC.split(",")) {
  3724. LIST_PET_RENT_NPC.add(Integer.valueOf(Integer.parseInt(id)));
  3725. }
  3726. NONDROPPABLE_ITEMS = otherSettings.getProperty("ListOfNonDroppableItems", "1147,425,1146,461,10,2368,7,6,2370,2369,5598");
  3727.  
  3728. LIST_NONDROPPABLE_ITEMS = new FastList();
  3729. for (String id : NONDROPPABLE_ITEMS.split(",")) {
  3730. LIST_NONDROPPABLE_ITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  3731. }
  3732.  
  3733. ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(otherSettings.getProperty("AnnounceMammonSpawn", "True"));
  3734.  
  3735. ALT_PRIVILEGES_ADMIN = Boolean.parseBoolean(otherSettings.getProperty("AltPrivilegesAdmin", "False"));
  3736. ALT_PRIVILEGES_SECURE_CHECK = Boolean.parseBoolean(otherSettings.getProperty("AltPrivilegesSecureCheck", "True"));
  3737. ALT_PRIVILEGES_DEFAULT_LEVEL = Integer.parseInt(otherSettings.getProperty("AltPrivilegesDefaultLevel", "100"));
  3738.  
  3739. MASTERACCESS_LEVEL = Integer.parseInt(otherSettings.getProperty("MasterAccessLevel", "127"));
  3740. GM_HERO_AURA = Boolean.parseBoolean(otherSettings.getProperty("GMHeroAura", "True"));
  3741. GM_STARTUP_INVULNERABLE = Boolean.parseBoolean(otherSettings.getProperty("GMStartupInvulnerable", "True"));
  3742. GM_STARTUP_INVISIBLE = Boolean.parseBoolean(otherSettings.getProperty("GMStartupInvisible", "True"));
  3743. GM_STARTUP_SILENCE = Boolean.parseBoolean(otherSettings.getProperty("GMStartupSilence", "True"));
  3744. GM_STARTUP_AUTO_LIST = Boolean.parseBoolean(otherSettings.getProperty("GMStartupAutoList", "True"));
  3745. GM_ADMIN_MENU_STYLE = otherSettings.getProperty("GMAdminMenuStyle", "modern");
  3746.  
  3747. PETITIONING_ALLOWED = Boolean.parseBoolean(otherSettings.getProperty("PetitioningAllowed", "True"));
  3748. MAX_PETITIONS_PER_PLAYER = Integer.parseInt(otherSettings.getProperty("MaxPetitionsPerPlayer", "5"));
  3749. MAX_PETITIONS_PENDING = Integer.parseInt(otherSettings.getProperty("MaxPetitionsPending", "25"));
  3750.  
  3751. JAIL_IS_PVP = Boolean.valueOf(otherSettings.getProperty("JailIsPvp", "True")).booleanValue();
  3752. JAIL_DISABLE_CHAT = Boolean.valueOf(otherSettings.getProperty("JailDisableChat", "True")).booleanValue();
  3753.  
  3754. DEATH_PENALTY_CHANCE = Integer.parseInt(otherSettings.getProperty("DeathPenaltyChance", "20"));
  3755.  
  3756. HTMPARA_WELCOME = Boolean.parseBoolean(otherSettings.getProperty("HtmParaWelcome", "False"));
  3757. } catch (Exception e) {
  3758. e.printStackTrace();
  3759. throw new Error("Failed to Load ./config/other.cfg File.");
  3760. }
  3761. }
  3762.  
  3763. public static void loadEnchantCfg() {
  3764. ARMOR_ENCHANT_TABLE.clear();
  3765. FULL_ARMOR_ENCHANT_TABLE.clear();
  3766. MULT_ENCHS.clear();
  3767. ENCHANT_ALT_MAGICSTEPS.clear();
  3768. ENCHANT_ALT_WEAPONSTEPS.clear();
  3769. ENCHANT_ALT_ARMORSTEPS.clear();
  3770. ENCHANT_ALT_JEWERLYSTEPS.clear();
  3771. ENCHANT_LIMITS.clear();
  3772. BLESS_BONUSES.clear();
  3773. BLESS_BONUSES2.clear();
  3774. try
  3775. {
  3776. Properties enchSettings = new Properties();
  3777. InputStream is = new FileInputStream(new File("./config/enchants.cfg"));
  3778. enchSettings.load(is);
  3779. is.close();
  3780.  
  3781.  
  3782.  
  3783.  
  3784. ENCHANT_MAX_WEAPON = Integer.parseInt(enchSettings.getProperty("EnchantMaxWeapon", "16"));
  3785. ENCHANT_MAX_ARMOR = Integer.parseInt(enchSettings.getProperty("EnchantMaxArmor", "16"));
  3786. ENCHANT_MAX_JEWELRY = Integer.parseInt(enchSettings.getProperty("EnchantMaxJewelry", "16"));
  3787.  
  3788.  
  3789.  
  3790. ENCHANT_SAFE_MAX = Integer.parseInt(enchSettings.getProperty("EnchantSafeMax", "3"));
  3791.  
  3792.  
  3793.  
  3794. ENCHANT_SAFE_MAX_FULL = Integer.parseInt(enchSettings.getProperty("EnchantSafeMaxFull", "4"));
  3795.  
  3796. ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(enchSettings.getProperty("EnchantChanceWeaponCrystal", "100"));
  3797. ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(enchSettings.getProperty("EnchantChanceArmorCrystal", "100"));
  3798. ENCHANT_CHANCE_JEWELRY_CRYSTAL = Integer.parseInt(enchSettings.getProperty("EnchantChanceJewelryCrystal", "100"));
  3799.  
  3800.  
  3801.  
  3802. ENCHANT_CHANCE_NEXT = Integer.parseInt(enchSettings.getProperty("EnchantXX", "15"));
  3803. ENCHANT_FAILED_NUM = Integer.parseInt(enchSettings.getProperty("EnchantFailed", "0"));
  3804. MAGIC_CHANCE_BEFORE_NEXT = Float.parseFloat(enchSettings.getProperty("MagicEnchantSuccesRateBeforeXX", "25.0"));
  3805. MAGIC_CHANCE_AFTER_NEXT = Float.parseFloat(enchSettings.getProperty("MagicEnchantSuccesRateAfterXX", "35.0"));
  3806. WEAPON_CHANCE_BEFORE_NEXT = Float.parseFloat(enchSettings.getProperty("WeaponEnchantSuccesRateBeforeXX", "30.0"));
  3807. WEAPON_CHANCE_AFTER_NEXT = Float.parseFloat(enchSettings.getProperty("WeaponEnchantSuccesRateAfterXX", "30.0"));
  3808.  
  3809. String[] ArmEncTable = enchSettings.getProperty("ArmorEnchantTable", "").split(";");
  3810. String[] arrayOfString1 = ArmEncTable;int i = arrayOfString1.length; for (Object localObject = 0; localObject < i; localObject++) { aet = arrayOfString1[localObject];
  3811. try {
  3812. ARMOR_ENCHANT_TABLE.add(Float.valueOf(aet));
  3813. } catch (NumberFormatException nfe) {
  3814. if (!aet.equals("")) {
  3815. System.out.println("invalid config property -> ArmorEnchantTable \"" + aet + "\"");
  3816. }
  3817. }
  3818. }
  3819.  
  3820. String[] FullArmEncTable = enchSettings.getProperty("FullArmorEnchantTable", "").split(";");
  3821. String[] arrayOfString2 = FullArmEncTable;localObject = arrayOfString2.length; for (String aet = 0; aet < localObject; aet++) { faet = arrayOfString2[aet];
  3822. try {
  3823. FULL_ARMOR_ENCHANT_TABLE.add(Float.valueOf(faet));
  3824. } catch (NumberFormatException nfe) {
  3825. if (!faet.equals("")) {
  3826. System.out.println("invalid config property -> ArmorEnchantTable \"" + faet + "\"");
  3827. }
  3828. }
  3829. }
  3830.  
  3831. MULT_ENCH = Integer.parseInt(enchSettings.getProperty("EnchMultisell", "0"));
  3832. String[] propertySplit = enchSettings.getProperty("EnchMultisellLists", "0,0").split(";");
  3833. localObject = propertySplit;aet = localObject.length; for (String faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3834. String[] aug = augs.split(",");
  3835. try {
  3836. MULT_ENCHS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3837. } catch (NumberFormatException nfe) {
  3838. if (aug.length > 0) {
  3839. System.out.println("enchant.cfg: EnchMultisellLists error: " + aug[0]);
  3840. }
  3841. }
  3842. }
  3843. ENCHANT_PENALTY = Boolean.valueOf(enchSettings.getProperty("EnchantPenalty", "True")).booleanValue();
  3844. ENCHANT_HERO_WEAPONS = Boolean.valueOf(enchSettings.getProperty("EnchHeroWeapons", "False")).booleanValue();
  3845. EAT_ENCH_SCROLLS = Boolean.valueOf(enchSettings.getProperty("EatEnchScrolls", "True")).booleanValue();
  3846.  
  3847.  
  3848. ENCHANT_ALT_PACKET = true;
  3849. if (ENCHANT_ALT_PACKET) {
  3850. ENCHANT_ALT_MAGICCAHNCE = Integer.parseInt(enchSettings.getProperty("EnchantAltMagicChance", "65"));
  3851. ENCHANT_ALT_MAGICCAHNCE_BLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltMagicChanceBless", "65"));
  3852. propertySplit = enchSettings.getProperty("EnchantAltMagicSteps", "1,100;2,100").split(";");
  3853. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3854. String[] aug = augs.split(",");
  3855. try {
  3856. ENCHANT_ALT_MAGICSTEPS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3857. } catch (NumberFormatException nfe) {
  3858. if (aug.length > 0) {
  3859. System.out.println("enchant.cfg: EnchantAltMagicSteps error: " + aug[0]);
  3860. }
  3861. }
  3862. }
  3863.  
  3864. ENCHANT_ALT_WEAPONCAHNCE = Integer.parseInt(enchSettings.getProperty("EnchantAltWeaponChance", "75"));
  3865. ENCHANT_ALT_WEAPONCAHNCE_BLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltWeaponChanceBless", "75"));
  3866.  
  3867. ENCHANT_ALT_WEAPONFAILBLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltWeaponBlessFail", "0"));
  3868. ENCHANT_ALT_WEAPONFAILCRYST = Integer.parseInt(enchSettings.getProperty("EnchantAltWeaponCrystallFail", "0"));
  3869. propertySplit = enchSettings.getProperty("EnchantAltWeaponSteps", "1,100;2,100").split(";");
  3870. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3871. String[] aug = augs.split(",");
  3872. try {
  3873. ENCHANT_ALT_WEAPONSTEPS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3874. } catch (NumberFormatException nfe) {
  3875. if (aug.length > 0) {
  3876. System.out.println("enchant.cfg: EnchantAltWeaponSteps error: " + aug[0]);
  3877. }
  3878. }
  3879. }
  3880.  
  3881. ENCHANT_ALT_ARMORCAHNCE = Integer.parseInt(enchSettings.getProperty("EnchantAltArmorChance", "75"));
  3882. ENCHANT_ALT_ARMORCAHNCE_BLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltArmorChanceBless", "75"));
  3883.  
  3884. ENCHANT_ALT_ARMORFAILBLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltArmorBlessFail", "0"));
  3885. ENCHANT_ALT_ARMORFAILCRYST = Integer.parseInt(enchSettings.getProperty("EnchantAltArmorCrystallFail", "0"));
  3886. propertySplit = enchSettings.getProperty("EnchantAltArmorSteps", "1,100;2,100").split(";");
  3887. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3888. String[] aug = augs.split(",");
  3889. try {
  3890. ENCHANT_ALT_ARMORSTEPS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3891. } catch (NumberFormatException nfe) {
  3892. if (aug.length > 0) {
  3893. System.out.println("enchant.cfg: EnchantAltArmorSteps error: " + aug[0]);
  3894. }
  3895. }
  3896. }
  3897.  
  3898. ENCHANT_ALT_JEWERLYCAHNCE = Integer.parseInt(enchSettings.getProperty("EnchantAltJewerlyChance", "75"));
  3899. ENCHANT_ALT_JEWERLYCAHNCE_BLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltJewerlyChanceBless", "75"));
  3900.  
  3901. ENCHANT_ALT_JEWERLYFAILBLESS = Integer.parseInt(enchSettings.getProperty("EnchantAltJewerlyBlessFail", "0"));
  3902. ENCHANT_ALT_JEWERLYFAILCRYST = Integer.parseInt(enchSettings.getProperty("EnchantAltJewerlyCrystallFail", "0"));
  3903. propertySplit = enchSettings.getProperty("EnchantAltJewerlySteps", "1,100;2,100").split(";");
  3904. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3905. String[] aug = augs.split(",");
  3906. try {
  3907. ENCHANT_ALT_JEWERLYSTEPS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3908. } catch (NumberFormatException nfe) {
  3909. if (aug.length > 0) {
  3910. System.out.println("enchant.cfg: EnchantAltJewerlySteps error: " + aug[0]);
  3911. }
  3912. }
  3913. }
  3914. }
  3915. ENCHANT_ALT_FORMULA = Boolean.valueOf(enchSettings.getProperty("AltEnchantFormula", "False")).booleanValue();
  3916.  
  3917. ENCH_ANTI_CLICK = Boolean.parseBoolean(enchSettings.getProperty("AntiClick", "False"));
  3918. ENCH_ANTI_CLICK_STEP = Integer.parseInt(enchSettings.getProperty("AntiClickStep", "10"));
  3919. ENCH_ANTI_CLICK_TYPE = Integer.parseInt(enchSettings.getProperty("AntiClickType", "0"));
  3920. ENCH_ANTI_CLICK_STEP *= 2;
  3921.  
  3922. propertySplit = enchSettings.getProperty("EnchantLimits", "0,0").split(";");
  3923. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String augs = localObject[faet];
  3924. String[] aug = augs.split(",");
  3925. try {
  3926. ENCHANT_LIMITS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  3927. } catch (NumberFormatException nfe) {
  3928. if (aug.length > 0) {
  3929. System.out.println("enchant.cfg: EnchantLimits error: " + aug[0]);
  3930. }
  3931. }
  3932. }
  3933.  
  3934.  
  3935. ENCH_NPC_CAHNCE = Integer.parseInt(enchSettings.getProperty("NpcEnchantChance", "0"));
  3936. propertySplit = enchSettings.getProperty("NpcEnchantMinMax", "0,14").split(",");
  3937. ENCH_NPC_MINMAX = new PvpColor(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]));
  3938.  
  3939. ENCH_MONSTER_CAHNCE = Integer.parseInt(enchSettings.getProperty("MonsterEnchantChance", "0"));
  3940. propertySplit = enchSettings.getProperty("MonsterEnchantMinMax", "0,14").split(",");
  3941. ENCH_MONSTER_MINMAX = new PvpColor(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]));
  3942.  
  3943. ENCH_GUARD_CAHNCE = Integer.parseInt(enchSettings.getProperty("GuardEnchantChance", "0"));
  3944. propertySplit = enchSettings.getProperty("GuardEnchantMinMax", "0,14").split(",");
  3945. ENCH_GUARD_MINMAX = new PvpColor(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]));
  3946.  
  3947.  
  3948. ENCH_STACK_SCROLLS = Boolean.parseBoolean(enchSettings.getProperty("StackableScrolls", "False"));
  3949.  
  3950.  
  3951. ENCHANT_ALT_STEP = Integer.parseInt(enchSettings.getProperty("AltEnchantStep", "1"));
  3952.  
  3953. propertySplit = enchSettings.getProperty("BlessBonusScrolls1", "15000,15001,15002,15003,15004,15005,15006,15007,15008,15009").split(",");
  3954. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String buff = localObject[faet];
  3955. try {
  3956. BLESS_BONUSES.add(Integer.valueOf(buff));
  3957. } catch (NumberFormatException nfe) {
  3958. if (!buff.equals("")) {
  3959. System.out.println("enchant.cfg: BlessBonusScrolls1 error: " + buff);
  3960. }
  3961. }
  3962. }
  3963. propertySplit = enchSettings.getProperty("BlessBonusScrolls2", "15010,15011,15012,15013,15014,15015,15016,15017,15018,15019").split(",");
  3964. localObject = propertySplit;aet = localObject.length; for (faet = 0; faet < aet; faet++) { String buff = localObject[faet];
  3965. try {
  3966. BLESS_BONUSES2.add(Integer.valueOf(buff));
  3967. } catch (NumberFormatException nfe) {
  3968. if (!buff.equals("")) {
  3969. System.out.println("enchant.cfg: BlessBonusScrolls2 error: " + buff);
  3970. }
  3971. }
  3972. }
  3973.  
  3974. BLESS_BONUS_ENCH1 = Integer.parseInt(enchSettings.getProperty("Bonus1ScrollsPlus", "10"));
  3975. BLESS_BONUS_ENCH2 = Integer.parseInt(enchSettings.getProperty("Bonus2ScrollsPlus", "33"));
  3976. ENCH_SHOW_CHANCE = Boolean.parseBoolean(enchSettings.getProperty("ShowEnchantChance", "false"));
  3977. ALLOW_CRYSTAL_SCROLLS = Boolean.parseBoolean(enchSettings.getProperty("AllowCrystalScrolls", "True"));
  3978.  
  3979. propertySplit = null;
  3980. } catch (Exception e) {
  3981. e.printStackTrace();
  3982. throw new Error("Failed to Load ./config/enchants.cfg File.");
  3983. }
  3984. }
  3985.  
  3986. public static void loadServicesCfg() {
  3987. AUGSALE_TABLE.clear();
  3988. M_BUFF.clear();
  3989. F_BUFF.clear();
  3990. F_PROFILE_BUFFS.clear();
  3991. C_ALLOWED_BUFFS.clear();
  3992. CLASS_MASTERS_PRICES.clear();
  3993. BBS_AUC_MONEYS.clear();
  3994. PWCSKILLS.clear();
  3995. PWCOLOURS.clear();
  3996. PREMIUM_DAY_PRICES.clear();
  3997. PREMIUM_PROTECTED_ITEMS.clear();
  3998. L2TOP_ONLINE_REWARDS.clear();
  3999. MMOTOP_ONLINE_REWARDS.clear();
  4000. UNIQ_SKILLS.clear();
  4001. try {
  4002. Properties serviseSet = new Properties();
  4003. InputStream is = new FileInputStream(new File("./config/services.cfg"));
  4004. serviseSet.load(is);
  4005. is.close();
  4006.  
  4007. STOCK_SERTIFY = Integer.parseInt(serviseSet.getProperty("Sertify", "3435"));
  4008. SERTIFY_PRICE = Integer.parseInt(serviseSet.getProperty("SertifyPrice", "10"));
  4009. FIRST_BALANCE = Integer.parseInt(serviseSet.getProperty("StartBalance", "0"));
  4010. DONATE_COIN = Integer.parseInt(serviseSet.getProperty("StockCoin", "5962"));
  4011. DONATE_COIN_NEMA = serviseSet.getProperty("StockCoinName", "Gold Golem");
  4012. DONATE_RATE = Integer.parseInt(serviseSet.getProperty("CoinConvert", "10"));
  4013. NALOG_NPS = Integer.parseInt(serviseSet.getProperty("StockTax", "10"));
  4014. VAL_NAME = serviseSet.getProperty("CoinConvertName", "P.");
  4015. PAGE_LIMIT = Integer.parseInt(serviseSet.getProperty("PageLimit", "10"));
  4016. AUGMENT_COIN = Integer.parseInt(serviseSet.getProperty("AugmentCoin", "4355"));
  4017. ENCHANT_COIN = Integer.parseInt(serviseSet.getProperty("EnchantCoin", "4356"));
  4018. AUGMENT_COIN_NAME = serviseSet.getProperty("AugmentCoinName", "Blue Eva");
  4019. ENCHANT_COIN_NAME = serviseSet.getProperty("EnchantCoinName", "Gold Einhasad");
  4020. AUGMENT_PRICE = Integer.parseInt(serviseSet.getProperty("AugmentPrice", "5"));
  4021. ENCHANT_PRICE = Integer.parseInt(serviseSet.getProperty("EnchantPrice", "3"));
  4022. AUGSALE_COIN = Integer.parseInt(serviseSet.getProperty("AugsaleCoin", "5962"));
  4023. AUGSALE_PRICE = Integer.parseInt(serviseSet.getProperty("AugsalePrice", "20"));
  4024. AUGSALE_COIN_NAME = serviseSet.getProperty("AugsaleCoinName", "Gold Golem");
  4025.  
  4026. String[] propertySplit = serviseSet.getProperty("Augsales", "3250,10").split(";");
  4027. String[] arrayOfString1 = propertySplit;int i = arrayOfString1.length; for (String str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4028. String[] aug = augs.split(",");
  4029. try {
  4030. AUGSALE_TABLE.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  4031. }
  4032. catch (NumberFormatException nfe) {
  4033. if (aug.length > 0) {
  4034. System.out.println("services.cfg: magicbuff error: " + aug[0]);
  4035. }
  4036. }
  4037. }
  4038. propertySplit = null;
  4039.  
  4040. SOB_ID = Integer.parseInt(serviseSet.getProperty("SobSkill", "0"));
  4041. SOB_NPC = Integer.parseInt(serviseSet.getProperty("SobNpc", "0"));
  4042. SOB_COIN = Integer.parseInt(serviseSet.getProperty("SobCoin", "5962"));
  4043. SOB_PRICE_ONE = Integer.parseInt(serviseSet.getProperty("SobPriceOne", "5"));
  4044. SOB_PRICE_TWO = Integer.parseInt(serviseSet.getProperty("SobPriceTwo", "10"));
  4045. SOB_COIN_NAME = serviseSet.getProperty("SobCoinName", "Gold Golem");
  4046. PROTECT_OLY_SOB = Boolean.parseBoolean(serviseSet.getProperty("ProtectOlySoB", "False"));
  4047.  
  4048. BUFFER_ALLOW_PEACE = Boolean.valueOf(serviseSet.getProperty("BufferAllowPeace", "False")).booleanValue();
  4049. BUFFER_ID = Integer.parseInt(serviseSet.getProperty("Buffer", "40001"));
  4050. BUFF_CANCEL = Boolean.valueOf(serviseSet.getProperty("BufferCancel", "True")).booleanValue();
  4051. propertySplit = serviseSet.getProperty("Magical", "1204,2").split(";");
  4052. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String buffs = arrayOfString1[str1];
  4053. String[] pbuff = buffs.split(",");
  4054. try {
  4055. M_BUFF.put(Integer.valueOf(pbuff[0]), Integer.valueOf(pbuff[1]));
  4056. } catch (NumberFormatException nfe) {
  4057. if (!pbuff[0].equals("")) {
  4058. System.out.println("services.cfg: magicbuff error: " + pbuff[0]);
  4059. }
  4060. }
  4061. }
  4062.  
  4063. propertySplit = serviseSet.getProperty("Fighter", "1204,2").split(";");
  4064. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String buffs = arrayOfString1[str1];
  4065. String[] pbuff = buffs.split(",");
  4066. try {
  4067. F_BUFF.put(Integer.valueOf(pbuff[0]), Integer.valueOf(pbuff[1]));
  4068. } catch (NumberFormatException nfe) {
  4069. if (!pbuff[0].equals("")) {
  4070. System.out.println("services.cfg: fightbuff error: " + pbuff[0]);
  4071. }
  4072. }
  4073. }
  4074.  
  4075. propertySplit = serviseSet.getProperty("ForbiddenProfileBuffs", "4,72,76,77,78,82,83,86,91,94,99,109,110,111,112,121,123,130,131,139,176,222,282,287,292,297,298,313,317,334,350,351,355,356,357,359,360,396,406,410,411,413,414,415,416,417,420,421,423,424,425,438,439,442,443,445,446,447,1001,1374,1410,1418,1427,3158,3142,3132,3133,3134,3135,3136,3199,3200,3201,3202,3203,3633,5104,5105").split(",");
  4076. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String buff = arrayOfString1[str1];
  4077. try {
  4078. F_PROFILE_BUFFS.add(Integer.valueOf(buff));
  4079. } catch (NumberFormatException nfe) {
  4080. if (!buff.equals("")) {
  4081. System.out.println("services.cfg: ForbiddenProfileBuffs error: " + buff);
  4082. }
  4083. }
  4084. }
  4085.  
  4086. propertySplit = serviseSet.getProperty("AdditionBuffs", "8888,7777").split(",");
  4087. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String buff = arrayOfString1[str1];
  4088. try {
  4089. C_ALLOWED_BUFFS.add(Integer.valueOf(buff));
  4090. } catch (NumberFormatException nfe) {
  4091. if (!buff.equals("")) {
  4092. System.out.println("services.cfg: AdditionBuffs error: " + buff);
  4093. }
  4094. }
  4095. }
  4096.  
  4097. POST_CHARBRIEF = Boolean.valueOf(serviseSet.getProperty("NewbeiBrief", "False")).booleanValue();
  4098. POST_BRIEFAUTHOR = serviseSet.getProperty("BriefAuthor", ":0");
  4099. POST_BRIEFTHEME = serviseSet.getProperty("BriefTheme", ":)");
  4100. POST_BRIEFTEXT = serviseSet.getProperty("BriefText", ":)");
  4101. POST_NPCNAME = serviseSet.getProperty("BriefNpc", "Ahosey");
  4102. propertySplit = serviseSet.getProperty("BriefItem", "0,0").split(",");
  4103. POST_BRIEF_ITEM = new EventReward(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), 0);
  4104.  
  4105. ALLOW_CLASS_MASTERS = Boolean.valueOf(serviseSet.getProperty("AllowClassMasters", "False")).booleanValue();
  4106. propertySplit = serviseSet.getProperty("ClassMasterPrices", "1,57,50000;2,57,500000;3,57,5000000").split(";");
  4107. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4108. String[] aug = augs.split(",");
  4109. try {
  4110. CLASS_MASTERS_PRICES.put(Integer.valueOf(Integer.parseInt(aug[0])), new EventReward(Integer.parseInt(aug[1]), Integer.parseInt(aug[2]), 0));
  4111. } catch (NumberFormatException nfe) {
  4112. if (!aug[0].equals("")) {
  4113. System.out.println("services.cfg: ClassMasterPrices error: " + aug[0]);
  4114. }
  4115. }
  4116. }
  4117. REWARD_SHADOW = Boolean.valueOf(serviseSet.getProperty("AllowShadowReward", "False")).booleanValue();
  4118. MASTER_NPCNAME = serviseSet.getProperty("MasterNpc", "PvP Server");
  4119. ALLOW_CLAN_LEVEL = Boolean.valueOf(serviseSet.getProperty("AllowClanLevel", "False")).booleanValue();
  4120. MCLAN_COIN = Integer.parseInt(serviseSet.getProperty("MClanCoin", "5962"));
  4121. MCLAN_COIN_NAME = serviseSet.getProperty("MClanCoinName", "Gold Golem");
  4122. CLAN_LVL6 = Integer.parseInt(serviseSet.getProperty("Level6", "10"));
  4123. CLAN_LVL7 = Integer.parseInt(serviseSet.getProperty("Level7", "20"));
  4124. CLAN_LVL8 = Integer.parseInt(serviseSet.getProperty("Level8", "30"));
  4125.  
  4126. CLAN_COIN = Integer.parseInt(serviseSet.getProperty("ClanCoin", "5962"));
  4127. CLAN_COIN_NAME = serviseSet.getProperty("ClanCoinName", "Gold Golem");
  4128. CLAN_POINTS = Integer.parseInt(serviseSet.getProperty("ClanPoints", "1000"));
  4129. CLAN_POINTS_PRICE = Integer.parseInt(serviseSet.getProperty("ClanPointsPrice", "5"));
  4130. CLAN_SKILLS_PRICE = Integer.parseInt(serviseSet.getProperty("ClanSkillsPrice", "5"));
  4131.  
  4132. ALLOW_DSHOP = Boolean.valueOf(serviseSet.getProperty("AllowDonateShop", "False")).booleanValue();
  4133. ALLOW_DSKILLS = Boolean.valueOf(serviseSet.getProperty("AllowDonateSkillsShop", "False")).booleanValue();
  4134. DS_ALL_SUBS = Boolean.valueOf(serviseSet.getProperty("DonateSkillsAllSubs", "False")).booleanValue();
  4135.  
  4136. ALLOW_CSHOP = Boolean.valueOf(serviseSet.getProperty("AllowChinaShop", "False")).booleanValue();
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150. PWHERO_COIN = Integer.parseInt(serviseSet.getProperty("BBSHeroCoin", "5962"));
  4151. PWHERO_PRICE = Integer.parseInt(serviseSet.getProperty("BBSHeroCoinDayPrice", "999"));
  4152. PWHERO_FPRICE = Integer.parseInt(serviseSet.getProperty("BBSHeroCoinForeverPrice", "999"));
  4153. PWHERO_MINDAYS = Integer.parseInt(serviseSet.getProperty("BBSHeroMinDays", "1"));
  4154. PWHERO_TRANPRICE = Integer.parseInt(serviseSet.getProperty("BBSHeroCoinTransferPrice", "999"));
  4155. PWCSKILLS_COIN = Integer.parseInt(serviseSet.getProperty("BBSCustomSkillCoin", "5962"));
  4156. PWCSKILLS_PRICE = Integer.parseInt(serviseSet.getProperty("BBSCustomSkillPrice", "999"));
  4157. PWENCHSKILL_COIN = Integer.parseInt(serviseSet.getProperty("BBSEnchantSkillCoin", "5962"));
  4158. PWENCHSKILL_PRICE = Integer.parseInt(serviseSet.getProperty("BBSEnchantSkillPrice", "999"));
  4159. PWCNGSKILLS_COIN = Integer.parseInt(serviseSet.getProperty("BBSTransferSkillCoin", "0"));
  4160. PWCNGSKILLS_PRICE = Integer.parseInt(serviseSet.getProperty("BBSTransferSkillPrice", "999"));
  4161.  
  4162. BBS_AUC_ITEM_COIN = Integer.parseInt(serviseSet.getProperty("AucItemCoin", "4037"));
  4163. BBS_AUC_ITEM_PRICE = Integer.parseInt(serviseSet.getProperty("AucItemPrice", "1"));
  4164. BBS_AUC_ITEM_NAME = serviseSet.getProperty("AucItemName", "Coin Of Luck");
  4165. BBS_AUC_AUG_COIN = Integer.parseInt(serviseSet.getProperty("AucAugCoin", "4037"));
  4166. BBS_AUC_AUG_PRICE = Integer.parseInt(serviseSet.getProperty("AucAugPrice", "1"));
  4167. BBS_AUC_AUG_NAME = serviseSet.getProperty("AucAugName", "Coin Of Luck");
  4168. BBS_AUC_SKILL_COIN = Integer.parseInt(serviseSet.getProperty("AucSkillCoin", "4037"));
  4169. BBS_AUC_SKILL_PRICE = Integer.parseInt(serviseSet.getProperty("AucSkillPrice", "1"));
  4170. BBS_AUC_SKILL_NAME = serviseSet.getProperty("AucSkillName", "Coin Of Luck");
  4171. BBS_AUC_HERO_COIN = Integer.parseInt(serviseSet.getProperty("AucHeroCoin", "4037"));
  4172. BBS_AUC_HERO_PRICE = Integer.parseInt(serviseSet.getProperty("AucHeroPrice", "1"));
  4173. BBS_AUC_HERO_NAME = serviseSet.getProperty("AucHeroName", "Coin Of Luck");
  4174. BBS_AUC_EXPIRE_DAYS = Integer.parseInt(serviseSet.getProperty("AucItemsExpireDays", "7"));
  4175.  
  4176. propertySplit = serviseSet.getProperty("AucMoney", "57,Adena;4037,Coin Of Luck").split(";");
  4177. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4178. String[] aug = augs.split(",");
  4179. try {
  4180. BBS_AUC_MONEYS.put(Integer.valueOf(Integer.parseInt(aug[0])), aug[1]);
  4181. } catch (NumberFormatException nfe) {
  4182. if (!aug[0].equals("")) {
  4183. System.out.println("services.cfg: AucMoney error: " + aug[0]);
  4184. }
  4185. }
  4186. }
  4187.  
  4188. propertySplit = serviseSet.getProperty("BBSCustomSkills", "9999,9").split(";");
  4189. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { augs = arrayOfString1[str1];
  4190. String[] aug = augs.split(",");
  4191. try {
  4192. PWCSKILLS.put(Integer.valueOf(aug[0]), Integer.valueOf(aug[1]));
  4193. } catch (NumberFormatException nfe) {
  4194. if (!aug[0].equals("")) {
  4195. System.out.println("services.cfg: BBSCustomSkills error: " + aug[0]);
  4196. }
  4197. }
  4198. }
  4199.  
  4200. PWNCOLOR_COIN = Integer.parseInt(serviseSet.getProperty("BBSColorNameCoin", "5962"));
  4201. PWNCOLOR_PRICE = Integer.parseInt(serviseSet.getProperty("BBSColorNamePrice", "999"));
  4202. PWNCOLOR_COINNAME = serviseSet.getProperty("BBSColorNameCoinName", "Gold Golem");
  4203. PWTCOLOR_COIN = Integer.parseInt(serviseSet.getProperty("BBSColorTitleCoin", "5962"));
  4204. PWTCOLOR_PRICE = Integer.parseInt(serviseSet.getProperty("BBSColorTitlePrice", "999"));
  4205. PWTCOLOR_COINNAME = serviseSet.getProperty("BBSColorTitleCoinName", "Gold Golem");
  4206. PWTCOLOR_PAYMENT = Boolean.valueOf(serviseSet.getProperty("BBSColorNextChangeFree", "True")).booleanValue();
  4207.  
  4208. BBS_CNAME_COIN = Integer.parseInt(serviseSet.getProperty("BBSChangeNameCoin", "5962"));
  4209. BBS_CNAME_PRICE = Integer.parseInt(serviseSet.getProperty("BBSChangeNamePrice", "999"));
  4210. BBS_CNAME_VAL = serviseSet.getProperty("BBSChangeNameCoinName", "Gold Golem");
  4211.  
  4212. PWCNGCLASS_COIN = Integer.parseInt(serviseSet.getProperty("BBSChangeClassCoin", "5962"));
  4213. PWCNGCLASS_PRICE = Integer.parseInt(serviseSet.getProperty("BBSChangeClassPrice", "999"));
  4214.  
  4215. int count = 0;
  4216. propertySplit = serviseSet.getProperty("BBSPaintColors", "00FF00,00FF00").split(";");
  4217. String[] arrayOfString2 = propertySplit;str1 = arrayOfString2.length; for (String augs = 0; augs < str1; augs++) { String augs = arrayOfString2[augs];
  4218. String[] aug = augs.split(",");
  4219. try {
  4220. PWCOLOURS.put(Integer.valueOf(count), new AltBColor(Integer.decode("0x" + aug[0]).intValue(), aug[1]));
  4221. } catch (NumberFormatException nfe) {
  4222. if (!aug[0].equals("")) {
  4223. System.out.println("services.cfg: BBSPaintColors error: " + aug[0]);
  4224. }
  4225. }
  4226. count++;
  4227. }
  4228. PWHERO_COINNAME = serviseSet.getProperty("BBSHeroCoinName", "Gold Golem");
  4229. PWCSKILLS_COINNAME = serviseSet.getProperty("BBSCustomSkillCoinName", "Gold Golem");
  4230. PWENCHSKILL_COINNAME = serviseSet.getProperty("BBSEnchantSkillCoinName", "Gold Golem");
  4231.  
  4232. PREMIUM_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("PremiumEnable", "False"));
  4233. PREMIUM_COIN = Integer.parseInt(serviseSet.getProperty("PremiumCoin", "5962"));
  4234. PREMIUM_PRICE = Integer.parseInt(serviseSet.getProperty("PremiumPrice", "5962"));
  4235. PREMIUM_COINNAME = serviseSet.getProperty("PremiumCoinName", "Gold Golem");
  4236. propertySplit = serviseSet.getProperty("PremiumDayPrice", "99,2220").split(";");
  4237. arrayOfString2 = propertySplit;String str2 = arrayOfString2.length; for (augs = 0; augs < str2; augs++) { String augs = arrayOfString2[augs];
  4238. String[] aug = augs.split(",");
  4239. try {
  4240. PREMIUM_DAY_PRICES.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  4241. } catch (NumberFormatException nfe) {
  4242. if (!aug[0].equals("")) {
  4243. System.out.println("services.cfg: PremiumDayPrice error: " + aug[0]);
  4244. }
  4245. }
  4246. }
  4247.  
  4248. NOBLES_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("NobleEnable", "False"));
  4249. SNOBLE_COIN = Integer.parseInt(serviseSet.getProperty("NobleCoin", "5962"));
  4250. SNOBLE_PRICE = Integer.parseInt(serviseSet.getProperty("NoblePrice", "5962"));
  4251. SNOBLE_COIN_NAME = serviseSet.getProperty("NobleCoinName", "Gold Golem");
  4252.  
  4253. PREMIUM_EXP = Double.parseDouble(serviseSet.getProperty("PremiumExp", "1.3"));
  4254. PREMIUM_SP = Double.parseDouble(serviseSet.getProperty("PremiumSp", "1.3"));
  4255. PREMIUM_ITEMDROP = Double.parseDouble(serviseSet.getProperty("PremiumDropItem", "1.3"));
  4256. PREMIUM_ITEMDROPMUL = Double.parseDouble(serviseSet.getProperty("PremiumDropMul", "1.3"));
  4257. PREMIUM_SPOILRATE = Double.parseDouble(serviseSet.getProperty("PremiumDropSpoil", "1.3"));
  4258.  
  4259. PREMIUM_ADENAMUL = Double.parseDouble(serviseSet.getProperty("PremiumAdenaMul", "1.3"));
  4260. PREMIUM_PCCAFE_MUL = Double.parseDouble(serviseSet.getProperty("PremiumPcCafeMul", "1.3"));
  4261. PREMIUM_AQURE_SKILL_MUL = Double.parseDouble(serviseSet.getProperty("PremiumClanSkillsMul", "0.7"));
  4262. PREMIUM_AUGMENT_RATE = Integer.parseInt(serviseSet.getProperty("PremiumAugmentRate", "0"));
  4263. PREMIUM_ENCH_ITEM = Integer.parseInt(serviseSet.getProperty("PremiumEnchRate", "0"));
  4264. PREMIUM_ENCH_SKILL = Integer.parseInt(serviseSet.getProperty("PremiumEnchSkillRate", "0"));
  4265. PREMIUM_CURSED_RATE = Integer.parseInt(serviseSet.getProperty("PremiumCursedRate", "0")) * 1000;
  4266.  
  4267. PREMIUM_ANY_SUBCLASS = Boolean.parseBoolean(serviseSet.getProperty("PremiumAnySubclass", "False"));
  4268. PREMIUM_CHKSKILLS = Boolean.parseBoolean(serviseSet.getProperty("PremiumCheckSkills", "True"));
  4269. PREMIUM_PKDROP_OFF = Boolean.parseBoolean(serviseSet.getProperty("PremiumDisablePkDrop", "False"));
  4270.  
  4271. PREMIUM_ANOOUNCE = Boolean.parseBoolean(serviseSet.getProperty("PremiumAnnounceEnter", "False"));
  4272. PREMIUM_ANNOUNCE_PHRASE = serviseSet.getProperty("PremiumAnnouncePhrase", "Игрок %player% вошел в игру.");
  4273.  
  4274. PREMIUM_ENCHANT_FAIL = Boolean.parseBoolean(serviseSet.getProperty("PremiumAltEnchantFail", "False"));
  4275.  
  4276. PREMIUM_NAME_PREFIX = serviseSet.getProperty("PremiumNamePrefix", "");
  4277.  
  4278. PREMIUM_START_DAYS = Integer.parseInt(serviseSet.getProperty("PremiumNewCharDays", "0"));
  4279.  
  4280. PREMIUM_ITEMS = Boolean.parseBoolean(serviseSet.getProperty("PremiumItems", "False"));
  4281. propertySplit = serviseSet.getProperty("PremiumItemsList", "").split(",");
  4282. arrayOfString2 = propertySplit;String str3 = arrayOfString2.length; for (augs = 0; augs < str3; augs++) { String item = arrayOfString2[augs];
  4283. try {
  4284. PREMIUM_ITEMS_LIST.add(Integer.valueOf(item));
  4285. } catch (NumberFormatException nfe) {
  4286. if (!item.equals("")) {
  4287. System.out.println("services.cfg: PremiumItemsList error: " + item);
  4288. }
  4289. }
  4290. }
  4291.  
  4292. propertySplit = serviseSet.getProperty("ProtectedPremiumItems", "").split(",");
  4293. arrayOfString2 = propertySplit;String str4 = arrayOfString2.length; for (augs = 0; augs < str4; augs++) { String item = arrayOfString2[augs];
  4294. try {
  4295. PREMIUM_PROTECTED_ITEMS.add(Integer.valueOf(item));
  4296. } catch (NumberFormatException nfe) {
  4297. if (!item.equals("")) {
  4298. System.out.println("services.cfg: PremiumDayPrice error: " + item);
  4299. }
  4300. }
  4301. }
  4302.  
  4303. BBS_ONLY_PEACE = Boolean.parseBoolean(serviseSet.getProperty("BbsPeace", "True"));
  4304.  
  4305.  
  4306.  
  4307.  
  4308. L2JMOD_ALLOW_WEDDING = Boolean.valueOf(serviseSet.getProperty("AllowWedding", "False")).booleanValue();
  4309. L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(serviseSet.getProperty("WeddingPunishInfidelity", "True"));
  4310. L2JMOD_WEDDING_TELEPORT = Boolean.parseBoolean(serviseSet.getProperty("WeddingTeleport", "True"));
  4311. L2JMOD_WEDDING_TELEPORT_PRICE = Integer.parseInt(serviseSet.getProperty("WeddingTeleportPrice", "50000"));
  4312. L2JMOD_WEDDING_TELEPORT_DURATION = Integer.parseInt(serviseSet.getProperty("WeddingTeleportDuration", "60"));
  4313. L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(serviseSet.getProperty("WeddingAllowSameSex", "False"));
  4314. L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(serviseSet.getProperty("WeddingFormalWear", "True"));
  4315.  
  4316. L2JMOD_WEDDING_COIN = Integer.parseInt(serviseSet.getProperty("WeddingCoin", "4037"));
  4317. L2JMOD_WEDDING_PRICE = Integer.parseInt(serviseSet.getProperty("WeddingPrice", "5"));
  4318. L2JMOD_WEDDING_COINNAME = serviseSet.getProperty("WeddingCoinName", "Coin Of Luck");
  4319.  
  4320. L2JMOD_WEDDING_DIVORCE_COIN = Integer.parseInt(serviseSet.getProperty("WeddingDivorceCoin", "4037"));
  4321. L2JMOD_WEDDING_DIVORCE_PRICE = Integer.parseInt(serviseSet.getProperty("WeddingDivorcePrice", "5"));
  4322. L2JMOD_WEDDING_DIVORCE_COINNAME = serviseSet.getProperty("WeddingDivorceCoinName", "Coin Of Luck");
  4323.  
  4324. L2JMOD_WEDDING_INTERVAL = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(serviseSet.getProperty("WeddingInterval", "90")));
  4325.  
  4326. propertySplit = serviseSet.getProperty("WeddingColors", "FFFFFF,FFFFFF").split(",");
  4327. WEDDING_COLORS = new PvpColor(Integer.decode("0x" + new TextBuilder(propertySplit[0]).reverse().toString()).intValue(), Integer.decode("0x" + new TextBuilder(propertySplit[1]).reverse().toString()).intValue());
  4328.  
  4329. L2JMOD_WEDDING_BOW = Boolean.valueOf(serviseSet.getProperty("WeddingCupidBow", "False")).booleanValue();
  4330.  
  4331. L2TOP_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("L2TopEnable", "False"));
  4332. L2TOP_SERV_URL = serviseSet.getProperty("L2TopServerUrl", "empty");
  4333. L2TOP_UPDATE_DELAY = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serviseSet.getProperty("L2TopUpdateDelay", "5")));
  4334.  
  4335. L2TOP_OFFLINE_ITEM = Integer.parseInt(serviseSet.getProperty("L2TopOfflineId", "0"));
  4336. L2TOP_OFFLINE_COUNT = Integer.parseInt(serviseSet.getProperty("L2TopOfflineCount", "0"));
  4337. L2TOP_OFFLINE_LOC = serviseSet.getProperty("L2TopOfflineLoc", "INVENTORY");
  4338. propertySplit = serviseSet.getProperty("L2TopOnlineRewards", "57,13,100;57,13,100").split(";");
  4339. arrayOfString2 = propertySplit;String str5 = arrayOfString2.length; for (augs = 0; augs < str5; augs++) { String augs = arrayOfString2[augs];
  4340. String[] aug = augs.split(",");
  4341. try {
  4342. L2TOP_ONLINE_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4343. } catch (NumberFormatException nfe) {
  4344. if (!aug[0].equals("")) {
  4345. System.out.println("services.cfg: L2TopOnlineRewards error: " + aug[0]);
  4346. }
  4347. }
  4348. }
  4349. L2TOP_LOGTYPE = Integer.parseInt(serviseSet.getProperty("L2TopLog", "1"));
  4350.  
  4351. MMOTOP_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("MmotopEnable", "False"));
  4352. MMOTOP_STAT_LINK = serviseSet.getProperty("MmotopStatLink", "0");
  4353. MMOTOP_UPDATE_DELAY = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serviseSet.getProperty("MmotopUpdateDelay", "5")));
  4354.  
  4355. MMOTOP_OFFLINE_ITEM = Integer.parseInt(serviseSet.getProperty("MmotopOfflineId", "0"));
  4356. MMOTOP_OFFLINE_COUNT = Integer.parseInt(serviseSet.getProperty("MmotopOfflineCount", "0"));
  4357. MMOTOP_OFFLINE_LOC = serviseSet.getProperty("MmotopOfflineLoc", "INVENTORY");
  4358. propertySplit = serviseSet.getProperty("MmotopOnlineRewards", "57,13,100;57,13,100").split(";");
  4359. arrayOfString2 = propertySplit;String str6 = arrayOfString2.length; for (augs = 0; augs < str6; augs++) { String augs = arrayOfString2[augs];
  4360. String[] aug = augs.split(",");
  4361. try {
  4362. MMOTOP_ONLINE_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4363. } catch (NumberFormatException nfe) {
  4364. if (!aug[0].equals("")) {
  4365. System.out.println("services.cfg: MmotopOnlineRewards error: " + aug[0]);
  4366. }
  4367. }
  4368. }
  4369. MMOTOP_LOGTYPE = Integer.parseInt(serviseSet.getProperty("MmotopLog", "1"));
  4370.  
  4371. EXPOSTB_COIN = Integer.parseInt(serviseSet.getProperty("EpBriefCoin", "4037"));
  4372. EXPOSTB_PRICE = Integer.parseInt(serviseSet.getProperty("EpBriefPrice", "1"));
  4373. EXPOSTB_NAME = serviseSet.getProperty("EpBriefCoinName", "Coin Of Luck");
  4374. EXPOSTA_COIN = Integer.parseInt(serviseSet.getProperty("EpItemCoin", "4037"));
  4375. EXPOSTA_PRICE = Integer.parseInt(serviseSet.getProperty("EpItemPrice", "5"));
  4376. EXPOSTA_NAME = serviseSet.getProperty("EpItemCoinName", "Coin Of Luck");
  4377.  
  4378. PC_CAFE_ENABLED = Boolean.parseBoolean(serviseSet.getProperty("PcCafeEnable", "False"));
  4379. PC_CAFE_INTERVAL = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serviseSet.getProperty("PcCafeUpdateDelay", "60")));
  4380.  
  4381. PC_CAFE_DOUBLE_CHANCE = Integer.parseInt(serviseSet.getProperty("PcCafeUpdateDoubleChance", "60"));
  4382.  
  4383. propertySplit = serviseSet.getProperty("PcCafeUpdateBonus", "30,60").split(",");
  4384. PC_CAFE_BONUS = new PvpColor(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]));
  4385.  
  4386. CACHED_SERVER_STAT = Boolean.parseBoolean(serviseSet.getProperty("ServerStat", "False"));
  4387.  
  4388. QUED_ITEMS_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("QuedItems", "False"));
  4389. QUED_ITEMS_INTERVAL = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(serviseSet.getProperty("QuedItemsInterval", "5")));
  4390. QUED_ITEMS_LOGTYPE = Integer.parseInt(serviseSet.getProperty("QuedItemsLog", "0"));
  4391.  
  4392. ALLOW_UNIQ_SKILLS = Boolean.parseBoolean(serviseSet.getProperty("AllowUniqSkills", "False"));
  4393. propertySplit = serviseSet.getProperty("UniqSkills", "1,2").split(";");
  4394. arrayOfString2 = propertySplit;String str7 = arrayOfString2.length; for (augs = 0; augs < str7; augs++) { String buffs = arrayOfString2[augs];
  4395. String[] pbuff = buffs.split(",");
  4396. try {
  4397. UNIQ_SKILLS.put(Integer.valueOf(pbuff[0]), Integer.valueOf(pbuff[1]));
  4398. } catch (NumberFormatException nfe) {
  4399. if (!pbuff[0].equals("")) {
  4400. System.out.println("services.cfg: UniqSkills error: " + pbuff[0]);
  4401. }
  4402. }
  4403. }
  4404.  
  4405. VS_VREF_NAME = Boolean.parseBoolean(serviseSet.getProperty("VoteRefName", "False"));
  4406.  
  4407. VOTE_SERVER_PREFIX = serviseSet.getProperty("VoteServerPrefix", "");
  4408.  
  4409. VOTE_NCS_SPAWN = Boolean.parseBoolean(serviseSet.getProperty("VoteRefNcsSpawn", "False"));
  4410.  
  4411. CHGSEX_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("ChangeSexEnable", "False"));
  4412. CHGSEX_COIN = Integer.parseInt(serviseSet.getProperty("ChangeSexCoin", "5962"));
  4413. CHGSEX_PRICE = Integer.parseInt(serviseSet.getProperty("ChangeSexPrice", "5962"));
  4414. CHGSEX_COIN_NAME = serviseSet.getProperty("ChangeSexCoinName", "Gold Golem");
  4415.  
  4416. CHGCLASS_ENABLE = Boolean.parseBoolean(serviseSet.getProperty("ChangeClassEnable", "False"));
  4417. CHGCLASS_COIN = Integer.parseInt(serviseSet.getProperty("ChangeClass", "5962"));
  4418. CHGCLASS_PRICE = Integer.parseInt(serviseSet.getProperty("ChangeClassPrice", "5962"));
  4419. CHGCLASS_COIN_NAME = serviseSet.getProperty("ChangeClassCoinName", "Gold Golem");
  4420.  
  4421. GLD_80LVL_COIN = Integer.parseInt(serviseSet.getProperty("Gld80LevelCoin", "5962"));
  4422. GLD_80LVL_PRICE = Integer.parseInt(serviseSet.getProperty("Gld80LevelPrice", "990"));
  4423. GLD_HEROCHAT_COIN = Integer.parseInt(serviseSet.getProperty("GldHeroChatCoin", "5962"));
  4424. GLD_HEROCHAT_PRICE = Integer.parseInt(serviseSet.getProperty("Gld8HeroChatPrice", "990"));
  4425.  
  4426. propertySplit = null;
  4427. } catch (Exception e) {
  4428. e.printStackTrace();
  4429. throw new Error("Failed to Load ./config/services.cfg File.");
  4430. }
  4431. }
  4432.  
  4433. public static void loadEventsCfg() {
  4434. TVT_EVENT_REWARDS.clear();
  4435. TVT_EVENT_REWARDS_TOP.clear();
  4436. TVT_EVENT_DOOR_IDS.clear();
  4437. TVT_WHITE_POTINS.clear();
  4438. OS_REWARDS.clear();
  4439. ELH_REWARDS.clear();
  4440. FC_ALLOWITEMS.clear();
  4441. XM_DROP.clear();
  4442. MEDAL_EVENT_DROP.clear();
  4443. EBC_REWARDS.clear();
  4444. EENC_REWARDS.clear();
  4445. EENC_POINTS.clear();
  4446. ANARCHY_TOWNS.clear();
  4447. ELH_FORB_POTIONS.clear();
  4448. BE_REWARDS.clear();
  4449. BE_GUARDS.clear();
  4450. GUILD_MOD_NAMES.clear();
  4451. GUILD_MOD_MASKS.clear();
  4452. GUILD_MOD_REWARDS.clear();
  4453. EVENT_KILLSITEMS.clear();
  4454. TVT_KILLSITEMS.clear();
  4455. MASSPVP_KILLSITEMS.clear();
  4456. CAPBASE_KILLSITEMS.clear();
  4457. LASTHERO_KILLSITEMS.clear();
  4458. try
  4459. {
  4460. Properties eventsSettings = new Properties();
  4461. InputStream is = new FileInputStream(new File("./config/events.cfg"));
  4462. eventsSettings.load(is);
  4463. is.close();
  4464.  
  4465. MASS_PVP = Boolean.valueOf(eventsSettings.getProperty("AllowMassPvP", "False")).booleanValue();
  4466. MPVP_RTIME = Long.parseLong(eventsSettings.getProperty("AfterServetStart", "60"));
  4467. MPVP_REG = Long.parseLong(eventsSettings.getProperty("Registration", "15"));
  4468. MPVP_ANC = Long.parseLong(eventsSettings.getProperty("AnnouncePeriod", "2"));
  4469. MPVP_TP = Long.parseLong(eventsSettings.getProperty("Teleport", "5"));
  4470. MPVP_PR = Long.parseLong(eventsSettings.getProperty("Buff", "60"));
  4471.  
  4472. MPVP_MAX = Long.parseLong(eventsSettings.getProperty("Battle", "60"));
  4473. MPVP_NEXT = Long.parseLong(eventsSettings.getProperty("Next", "24"));
  4474. MPVP_MAXC = Integer.parseInt(eventsSettings.getProperty("Rounds", "5"));
  4475. MPVP_NPC = Integer.parseInt(eventsSettings.getProperty("RegNpc", "5"));
  4476. MPVP_CREW = Integer.parseInt(eventsSettings.getProperty("RoundReward", "4355"));
  4477. MPVP_CREWC = Integer.parseInt(eventsSettings.getProperty("RoundCount", "3"));
  4478. MPVP_EREW = Integer.parseInt(eventsSettings.getProperty("FinalReward", "4355"));
  4479. MPVP_EREWC = Integer.parseInt(eventsSettings.getProperty("FinalCount", "30"));
  4480. MPVP_LVL = Integer.parseInt(eventsSettings.getProperty("MinLelev", "76"));
  4481. MPVP_MAXP = Integer.parseInt(eventsSettings.getProperty("MaxPlayers", "60"));
  4482. MPVP_NOBL = Boolean.valueOf(eventsSettings.getProperty("OnlyNobless", "True")).booleanValue();
  4483. TVT_NOBL = Boolean.valueOf(eventsSettings.getProperty("TvTOnlyNobless", "True")).booleanValue();
  4484.  
  4485. String[] propertySplit = eventsSettings.getProperty("Npc", "116530,76141,-2730").split(",");
  4486. MPVP_NPCLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4487.  
  4488.  
  4489.  
  4490. propertySplit = eventsSettings.getProperty("Back", "116530,76141,-2730").split(";");
  4491. String[] arrayOfString1 = propertySplit;int i = arrayOfString1.length; for (String str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4492. String[] aug = augs.split(",");
  4493. try {
  4494. MPVP_TPLOC.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4495. } catch (NumberFormatException nfe) {
  4496. if (!aug[0].equals("")) {
  4497. System.out.println("events.cfg: Back error: " + aug[0]);
  4498. }
  4499. }
  4500. }
  4501.  
  4502.  
  4503.  
  4504. propertySplit = eventsSettings.getProperty("Cycle", "-92939,-251113,-3331").split(";");
  4505. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4506. String[] aug = augs.split(",");
  4507. try {
  4508. MPVP_CLOC.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4509. } catch (NumberFormatException nfe) {
  4510. if (!aug[0].equals("")) {
  4511. System.out.println("events.cfg: Cycle error: " + aug[0]);
  4512. }
  4513. }
  4514. }
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529. TVT_EVENT_ENABLED = Boolean.parseBoolean(eventsSettings.getProperty("TvTEventEnabled", "false"));
  4530. TVT_EVENT_INTERVAL = Integer.parseInt(eventsSettings.getProperty("TvTEventInterval", "18000"));
  4531. TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(eventsSettings.getProperty("TvTEventParticipationTime", "3600"));
  4532. TVT_EVENT_RUNNING_TIME = Integer.parseInt(eventsSettings.getProperty("TvTEventRunningTime", "1800"));
  4533. TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(eventsSettings.getProperty("TvTEventParticipationNpcId", "0"));
  4534.  
  4535. if (TVT_EVENT_PARTICIPATION_NPC_ID == 0) {
  4536. TVT_EVENT_ENABLED = false;
  4537. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcId");
  4538. } else {
  4539. propertySplit = eventsSettings.getProperty("TvTEventParticipationNpcCoordinates", "83425,148585,-3406;83465,148485,-3406").split(";");
  4540. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4541. String[] aug = augs.split(",");
  4542. try {
  4543. TVT_EVENT_PARTICIPATION_NPC_COORDINATES.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4544. } catch (NumberFormatException nfe) {
  4545. if (!aug[0].equals("")) {
  4546. System.out.println("events.cfg: TvTEventParticipationNpcCoordinates error: " + aug[0]);
  4547. }
  4548. }
  4549. }
  4550.  
  4551. TVT_EVENT_MIN_PLAYERS_IN_TEAMS = Integer.parseInt(eventsSettings.getProperty("TvTEventMinPlayersInTeams", "1"));
  4552. TVT_EVENT_MAX_PLAYERS_IN_TEAMS = Integer.parseInt(eventsSettings.getProperty("TvTEventMaxPlayersInTeams", "20"));
  4553. TVT_EVENT_MIN_LVL = (byte)Integer.parseInt(eventsSettings.getProperty("TvTEventMinPlayerLevel", "1"));
  4554. TVT_EVENT_MAX_LVL = (byte)Integer.parseInt(eventsSettings.getProperty("TvTEventMaxPlayerLevel", "80"));
  4555. TVT_EVENT_RESPAWN_TELEPORT_DELAY = Integer.parseInt(eventsSettings.getProperty("TvTEventRespawnTeleportDelay", "20"));
  4556. TVT_EVENT_START_LEAVE_TELEPORT_DELAY = Integer.parseInt(eventsSettings.getProperty("TvTEventStartLeaveTeleportDelay", "20"));
  4557.  
  4558. TVT_HIDE_NAMES = Boolean.parseBoolean(eventsSettings.getProperty("TvtHideNames", "False"));
  4559. TVT_ALT_NAME = eventsSettings.getProperty("TvtForbidMagic", "False");
  4560.  
  4561. TVT_EVENT_TEAM_1_NAME = eventsSettings.getProperty("TvTEventTeam1Name", "Team1");
  4562. propertySplit = eventsSettings.getProperty("TvTEventTeam1Coordinates", "0,0,0").split(";");
  4563. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4564. String[] aug = augs.split(",");
  4565. try {
  4566. TVT_EVENT_TEAM_1_COORDINATES.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4567. } catch (NumberFormatException nfe) {
  4568. if (!aug[0].equals("")) {
  4569. System.out.println("events.cfg: TvTEventTeam1Coordinates error: " + aug[0]);
  4570. }
  4571. }
  4572. }
  4573.  
  4574. TVT_EVENT_TEAM_2_NAME = eventsSettings.getProperty("TvTEventTeam2Name", "Team2");
  4575. propertySplit = eventsSettings.getProperty("TvTEventTeam2Coordinates", "0,0,0").split(";");
  4576. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4577. String[] aug = augs.split(",");
  4578. try {
  4579. TVT_EVENT_TEAM_2_COORDINATES.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4580. } catch (NumberFormatException nfe) {
  4581. if (!aug[0].equals("")) {
  4582. System.out.println("events.cfg: TvTEventTeam1Coordinates error: " + aug[0]);
  4583. }
  4584. }
  4585. }
  4586.  
  4587. propertySplit = eventsSettings.getProperty("TvTReturnCoordinates", "0,0,0").split(";");
  4588. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4589. String[] aug = augs.split(",");
  4590. try {
  4591. TVT_RETURN_COORDINATES.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4592. } catch (NumberFormatException nfe) {
  4593. if (!aug[0].equals("")) {
  4594. System.out.println("events.cfg: TvTReturnCoordinates error: " + aug[0]);
  4595. }
  4596. }
  4597. }
  4598.  
  4599. propertySplit = eventsSettings.getProperty("TvTEventReward", "57,100000").split(";");
  4600. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String reward = arrayOfString1[str1];
  4601. String[] rewardSplit = reward.split(",");
  4602.  
  4603. if (rewardSplit.length != 2) {
  4604. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + reward + "\"");
  4605. } else {
  4606. try {
  4607. TVT_EVENT_REWARDS.add(new int[] { Integer.valueOf(rewardSplit[0]).intValue(), Integer.valueOf(rewardSplit[1]).intValue() });
  4608. } catch (NumberFormatException nfe) {
  4609. if (!reward.equals("")) {
  4610. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + reward + "\"");
  4611. }
  4612. }
  4613. }
  4614. }
  4615.  
  4616. TVT_EVENT_REWARDS_TOP_KILLS = Integer.parseInt(eventsSettings.getProperty("TvTEventRewardTopKills", "0"));
  4617. propertySplit = eventsSettings.getProperty("TvTEventRewardTop", "57,100000").split(";");
  4618. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String reward = arrayOfString1[str1];
  4619. String[] rewardSplit = reward.split(",");
  4620.  
  4621. if (rewardSplit.length != 2) {
  4622. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventRewardTop \"" + reward + "\"");
  4623. } else {
  4624. try {
  4625. TVT_EVENT_REWARDS_TOP.add(new int[] { Integer.valueOf(rewardSplit[0]).intValue(), Integer.valueOf(rewardSplit[1]).intValue() });
  4626. } catch (NumberFormatException nfe) {
  4627. if (!reward.equals("")) {
  4628. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventRewardTop \"" + reward + "\"");
  4629. }
  4630. }
  4631. }
  4632. }
  4633.  
  4634. TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED = Boolean.parseBoolean(eventsSettings.getProperty("TvTEventTargetTeamMembersAllowed", "true"));
  4635. TVT_EVENT_POTIONS_ALLOWED = Boolean.parseBoolean(eventsSettings.getProperty("TvTEventPotionsAllowed", "false"));
  4636. TVT_EVENT_SUMMON_BY_ITEM_ALLOWED = Boolean.parseBoolean(eventsSettings.getProperty("TvTEventSummonByItemAllowed", "false"));
  4637. propertySplit = eventsSettings.getProperty("TvTEventDoorsCloseOpenOnStartEnd", "").split(";");
  4638. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String door = arrayOfString1[str1];
  4639. try {
  4640. TVT_EVENT_DOOR_IDS.add(Integer.valueOf(door));
  4641. } catch (NumberFormatException nfe) {
  4642. if (!door.equals("")) {
  4643. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventDoorsCloseOpenOnStartEnd \"" + door + "\"");
  4644. }
  4645. }
  4646. }
  4647.  
  4648. propertySplit = eventsSettings.getProperty("TvTEventAllowedPotionsList", "").split(",");
  4649. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String potion = arrayOfString1[str1];
  4650. try {
  4651. TVT_WHITE_POTINS.add(Integer.valueOf(potion));
  4652. } catch (NumberFormatException nfe) {
  4653. if (!potion.equals("")) {
  4654. System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventAllowedPotionsList \"" + potion + "\"");
  4655. }
  4656. }
  4657. }
  4658. }
  4659.  
  4660. TVT_NO_PASSIVE = Boolean.parseBoolean(eventsSettings.getProperty("TvTNoPassive", "False"));
  4661. TVT_REWARD_CHECK = Boolean.parseBoolean(eventsSettings.getProperty("TvTRewardCheck", "False"));
  4662. TVT_REWARD_TOP = Boolean.parseBoolean(eventsSettings.getProperty("TvTRewardTop", "False"));
  4663. TVT_TEAM_PROTECT = Boolean.parseBoolean(eventsSettings.getProperty("TvTTeamProtect", "False"));
  4664. TVT_NO_DEADS = Boolean.parseBoolean(eventsSettings.getProperty("TvTNoDeads", "False"));
  4665. TVT_TELE_PROTECT = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(eventsSettings.getProperty("TvTTeleProtect", "0")));
  4666.  
  4667.  
  4668. ALLOW_SCH = Boolean.valueOf(eventsSettings.getProperty("AllowSchuttgart", "False")).booleanValue();
  4669. SCH_NEXT = Integer.parseInt(eventsSettings.getProperty("SchNext", "24"));
  4670. SCH_RESTART = Integer.parseInt(eventsSettings.getProperty("SchRestart", "60"));
  4671.  
  4672. SCH_TIME1 = Integer.parseInt(eventsSettings.getProperty("SchWave1", "120000"));
  4673. SCH_TIME2 = Integer.parseInt(eventsSettings.getProperty("SchWave2", "30000"));
  4674. SCH_TIME3 = Integer.parseInt(eventsSettings.getProperty("SchWave3", "15000"));
  4675. SCH_TIME4 = Integer.parseInt(eventsSettings.getProperty("SchWave4", "15000"));
  4676. SCH_TIME5 = Integer.parseInt(eventsSettings.getProperty("SchWave5", "15000"));
  4677. SCH_TIME6 = Integer.parseInt(eventsSettings.getProperty("SchWave6", "15000"));
  4678. SCH_TIMEBOSS = Integer.parseInt(eventsSettings.getProperty("SchWaveBoss", "400000"));
  4679.  
  4680. SCH_MOB1 = Integer.parseInt(eventsSettings.getProperty("SchMob1", "80100"));
  4681. SCH_MOB2 = Integer.parseInt(eventsSettings.getProperty("SchMob2", "80101"));
  4682. SCH_MOB3 = Integer.parseInt(eventsSettings.getProperty("SchMob3", "80101"));
  4683. SCH_MOB4 = Integer.parseInt(eventsSettings.getProperty("SchMob4", "80100"));
  4684. SCH_MOB5 = Integer.parseInt(eventsSettings.getProperty("SchMob5", "80102"));
  4685. SCH_MOB6 = Integer.parseInt(eventsSettings.getProperty("SchMob6", "80103"));
  4686. SCH_BOSS = Integer.parseInt(eventsSettings.getProperty("SchBoss", "80104"));
  4687.  
  4688. SCH_ALLOW_SHOP = Boolean.valueOf(eventsSettings.getProperty("SchAllowShop", "False")).booleanValue();
  4689. SCH_SHOP = Integer.parseInt(eventsSettings.getProperty("SchShopId", "80105"));
  4690. SCH_SHOPTIME = Integer.parseInt(eventsSettings.getProperty("SchShopTimeout", "20"));
  4691.  
  4692. OPEN_SEASON = Boolean.valueOf(eventsSettings.getProperty("AllowOpenSeason", "False")).booleanValue();
  4693. OS_NEXT = Integer.parseInt(eventsSettings.getProperty("OsNext", "600"));
  4694. OS_RESTART = Integer.parseInt(eventsSettings.getProperty("OsAfterRestart", "60"));
  4695. OS_BATTLE = Integer.parseInt(eventsSettings.getProperty("OsBattlePeriod", "2"));
  4696. OS_FAIL_NEXT = Integer.parseInt(eventsSettings.getProperty("OsFailNext", "120"));
  4697. OS_REGTIME = Integer.parseInt(eventsSettings.getProperty("OsRegTime", "300"));
  4698. OS_ANNDELAY = Integer.parseInt(eventsSettings.getProperty("OsAnnounceDelay", "15"));
  4699. OS_MINLVL = Integer.parseInt(eventsSettings.getProperty("OsMinLevel", "76"));
  4700. OS_MINPLAYERS = Integer.parseInt(eventsSettings.getProperty("OsMinPlayers", "10"));
  4701.  
  4702. propertySplit = eventsSettings.getProperty("OsRewards", "4037,500,100;4355,15,100").split(";");
  4703. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4704. String[] aug = augs.split(",");
  4705. try {
  4706. OS_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4707. } catch (NumberFormatException nfe) {
  4708. if (aug.length > 0) {
  4709. System.out.println("events.cfg: OsRewards error: " + aug[0]);
  4710. }
  4711. }
  4712. }
  4713.  
  4714. ELH_ENABLE = Boolean.parseBoolean(eventsSettings.getProperty("LastHeroEnable", "False"));
  4715. ELH_ARTIME = Long.parseLong(eventsSettings.getProperty("LhAfterRestart", "30"));
  4716. ELH_REGTIME = Long.parseLong(eventsSettings.getProperty("LhRegPeriod", "30"));
  4717. ELH_ANNDELAY = Long.parseLong(eventsSettings.getProperty("LhAnounceDelay", "30"));
  4718. ELH_TPDELAY = Long.parseLong(eventsSettings.getProperty("LhTeleportDelay", "30"));
  4719. ELH_NEXT = Long.parseLong(eventsSettings.getProperty("LhNextStart", "30"));
  4720.  
  4721. ELH_MINLVL = Integer.parseInt(eventsSettings.getProperty("LhPlayerMinLvl", "76"));
  4722. ELH_MINP = Integer.parseInt(eventsSettings.getProperty("LhMinPlayers", "76"));
  4723. ELH_MAXP = Integer.parseInt(eventsSettings.getProperty("LhMaxPlayers", "76"));
  4724.  
  4725. ELH_NPCID = Integer.parseInt(eventsSettings.getProperty("LhRegNpcId", "55558"));
  4726.  
  4727. propertySplit = eventsSettings.getProperty("LhRegNpcLoc", "83101,148396,-3407").split(",");
  4728. ELH_NPCLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4729. ELH_NPCTOWN = eventsSettings.getProperty("LhRegNpcTown", "Гиране");
  4730.  
  4731. propertySplit = eventsSettings.getProperty("LhBattleLoc", "83101,148396,-3407").split(",");
  4732. ELH_TPLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4733.  
  4734. ELH_TICKETID = Integer.parseInt(eventsSettings.getProperty("LhTicketId", "0"));
  4735. ELH_TICKETCOUNT = Integer.parseInt(eventsSettings.getProperty("LhTicketCount", "0"));
  4736.  
  4737. propertySplit = eventsSettings.getProperty("LhRewards", "9901,500,100;57,1,100").split(";");
  4738. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4739. String[] aug = augs.split(",");
  4740. try {
  4741. ELH_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4742. } catch (NumberFormatException nfe) {
  4743. if (aug.length > 0) {
  4744. System.out.println("events.cfg: LhRewards error: " + aug[0]);
  4745. }
  4746. }
  4747. }
  4748. ELH_HERO_DAYS = Integer.parseInt(eventsSettings.getProperty("LhRewardDays", "1"));
  4749.  
  4750. ELH_HIDE_NAMES = Boolean.parseBoolean(eventsSettings.getProperty("LhHideNames", "False"));
  4751. ELH_FORBID_MAGIC = Boolean.parseBoolean(eventsSettings.getProperty("LhForbidMagic", "False"));
  4752. ELH_ALT_NAME = eventsSettings.getProperty("LhAltName", "");
  4753. propertySplit = eventsSettings.getProperty("LhForbiddenPotions", "").split(",");
  4754. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String potion = arrayOfString1[str1];
  4755. try {
  4756. ELH_FORB_POTIONS.add(Integer.valueOf(potion));
  4757. } catch (NumberFormatException nfe) {
  4758. if (!potion.equals("")) {
  4759. System.out.println("events.cfg: LhForbiddenPotions error: " + potion);
  4760. }
  4761. }
  4762. }
  4763.  
  4764.  
  4765. FC_INSERT_INVENTORY = Boolean.parseBoolean(eventsSettings.getProperty("FightClubInsertInventory", "False"));
  4766. propertySplit = eventsSettings.getProperty("FightClubItems", "1234").split(",");
  4767. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String id = arrayOfString1[str1];
  4768. FC_ALLOWITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  4769. }
  4770.  
  4771.  
  4772. ALLOW_XM_SPAWN = Boolean.parseBoolean(eventsSettings.getProperty("AllowChristmassEvent", "False"));
  4773. propertySplit = eventsSettings.getProperty("ChristmassDrop", "5556,3,10;5557,3,10;5558,3,10;5559,3,10").split(";");
  4774. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4775. String[] aug = augs.split(",");
  4776. try {
  4777. XM_DROP.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4778. } catch (NumberFormatException nfe) {
  4779. if (aug.length > 0) {
  4780. System.out.println("events.cfg: ChristmassDrop error: " + aug[0]);
  4781. }
  4782. }
  4783. }
  4784. XM_TREE_LIFE = TimeUnit.MINUTES.toMillis(Integer.parseInt(eventsSettings.getProperty("ChristmassTreeLife", "0")));
  4785.  
  4786.  
  4787. ALLOW_MEDAL_EVENT = Boolean.parseBoolean(eventsSettings.getProperty("AllowMedalsEvent", "False"));
  4788. propertySplit = eventsSettings.getProperty("MedalsDrop", "6392,1,7;6393,1,2").split(";");
  4789. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4790. String[] aug = augs.split(",");
  4791. try {
  4792. MEDAL_EVENT_DROP.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4793. } catch (NumberFormatException nfe) {
  4794. if (!aug[0].equals("")) {
  4795. System.out.println("events.cfg: MedalsDrop error: " + aug[0]);
  4796. }
  4797. }
  4798. }
  4799.  
  4800.  
  4801. EBC_ENABLE = Boolean.parseBoolean(eventsSettings.getProperty("CaptureBaseEnable", "False"));
  4802. EBC_ARTIME = Long.parseLong(eventsSettings.getProperty("CbAfterRestart", "30"));
  4803. EBC_REGTIME = Long.parseLong(eventsSettings.getProperty("CbRegPeriod", "5"));
  4804. EBC_ANNDELAY = Long.parseLong(eventsSettings.getProperty("CbAnounceDelay", "1"));
  4805. EBC_TPDELAY = Long.parseLong(eventsSettings.getProperty("CbTeleportDelay", "1"));
  4806. EBC_DEATHLAY = Long.parseLong(eventsSettings.getProperty("CbRespawnDelay", "5000"));
  4807. EBC_NEXT = Long.parseLong(eventsSettings.getProperty("CbNextStart", "30"));
  4808.  
  4809. EBC_MINLVL = Integer.parseInt(eventsSettings.getProperty("CbPlayerMinLvl", "76"));
  4810. EBC_MINP = Integer.parseInt(eventsSettings.getProperty("CbMinPlayers", "5"));
  4811. EBC_MAXP = Integer.parseInt(eventsSettings.getProperty("CbMaxPlayers", "100"));
  4812. EBC_NPCID = Integer.parseInt(eventsSettings.getProperty("CbRegNpcId", "55558"));
  4813.  
  4814. propertySplit = eventsSettings.getProperty("CbRegNpcLoc", "83101,148396,-3407").split(",");
  4815. EBC_NPCLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4816.  
  4817. propertySplit = eventsSettings.getProperty("CbBase1Loc", "175732,-87983,-5107").split(",");
  4818. EBC_BASE1_LOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4819. propertySplit = eventsSettings.getProperty("CbBase2Loc", "175732,-87983,-5107").split(",");
  4820. EBC_BASE2_LOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4821.  
  4822. EBC_NPCTOWN = eventsSettings.getProperty("CbRegNpcTown", "Гиране");
  4823.  
  4824. EBC_BASE1ID = Integer.parseInt(eventsSettings.getProperty("CbBase1Id", "80050"));
  4825. EBC_BASE2ID = Integer.parseInt(eventsSettings.getProperty("CbBase2Id", "80051"));
  4826.  
  4827. EBC_BASE1NAME = eventsSettings.getProperty("CbTeam1Name", "White");
  4828. EBC_BASE2NAME = eventsSettings.getProperty("CbTeam2Name", "Black");
  4829.  
  4830. EBC_BASE1TITLE = eventsSettings.getProperty("CbTeam1Title", "White");
  4831. EBC_BASE2TITLE = eventsSettings.getProperty("CbTeam2Title", "Black");
  4832.  
  4833. propertySplit = eventsSettings.getProperty("CbPlayersLoc1", "0,0,0").split(";");
  4834. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4835. String[] aug = augs.split(",");
  4836. try {
  4837. EBC_TPLOC1.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4838. } catch (NumberFormatException nfe) {
  4839. if (!aug[0].equals("")) {
  4840. System.out.println("events.cfg: CbPlayersLoc1 error: " + aug[0]);
  4841. }
  4842. }
  4843. }
  4844. propertySplit = eventsSettings.getProperty("CbPlayersLoc2", "0,0,0").split(";");
  4845. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4846. String[] aug = augs.split(",");
  4847. try {
  4848. EBC_TPLOC2.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4849. } catch (NumberFormatException nfe) {
  4850. if (!aug[0].equals("")) {
  4851. System.out.println("events.cfg: CbPlayersLoc2 error: " + aug[0]);
  4852. }
  4853. }
  4854. }
  4855. propertySplit = eventsSettings.getProperty("CbReturnCoordinates", "0,0,0").split(";");
  4856. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4857. String[] aug = augs.split(",");
  4858. try {
  4859. EBC_RETURN_COORDINATES.add(new Location(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4860. } catch (NumberFormatException nfe) {
  4861. if (!aug[0].equals("")) {
  4862. System.out.println("events.cfg: CbReturnCoordinates error: " + aug[0]);
  4863. }
  4864. }
  4865. }
  4866.  
  4867. EBC_TICKETID = Integer.parseInt(eventsSettings.getProperty("CbTicketId", "0"));
  4868. EBC_TICKETCOUNT = Integer.parseInt(eventsSettings.getProperty("CbTicketCount", "0"));
  4869.  
  4870. propertySplit = eventsSettings.getProperty("CbRewards", "9901,500,100;57,1,100").split(";");
  4871. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4872. String[] aug = augs.split(",");
  4873. try {
  4874. EBC_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4875. } catch (NumberFormatException nfe) {
  4876. if (!aug[0].equals("")) {
  4877. System.out.println("additions.cfg: CbRewards error: " + aug[0]);
  4878. }
  4879. }
  4880. }
  4881.  
  4882. EENC_ENABLE = Boolean.parseBoolean(eventsSettings.getProperty("EncounterEnable", "False"));
  4883. EENC_ARTIME = Long.parseLong(eventsSettings.getProperty("EncAfterRestart", "30"));
  4884. EENC_REGTIME = Long.parseLong(eventsSettings.getProperty("EncRegPeriod", "30"));
  4885. EENC_ANNDELAY = Long.parseLong(eventsSettings.getProperty("EncAnounceDelay", "30"));
  4886. EENC_TPDELAY = Long.parseLong(eventsSettings.getProperty("EncTeleportDelay", "30"));
  4887. EENC_FINISH = Long.parseLong(eventsSettings.getProperty("EncFinishTask", "1"));
  4888. EENC_NEXT = Long.parseLong(eventsSettings.getProperty("EncNextStart", "30"));
  4889.  
  4890. EENC_MINLVL = Integer.parseInt(eventsSettings.getProperty("EncPlayerMinLvl", "76"));
  4891. EENC_MINP = Integer.parseInt(eventsSettings.getProperty("EncMinPlayers", "76"));
  4892. EENC_MAXP = Integer.parseInt(eventsSettings.getProperty("EncMaxPlayers", "76"));
  4893.  
  4894. EENC_NPCID = Integer.parseInt(eventsSettings.getProperty("EncRegNpcId", "55558"));
  4895.  
  4896. propertySplit = eventsSettings.getProperty("EncRegNpcLoc", "83101,148396,-3407").split(",");
  4897. EENC_NPCLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4898. EENC_NPCTOWN = eventsSettings.getProperty("EncRegNpcTown", "Гиране");
  4899.  
  4900. propertySplit = eventsSettings.getProperty("EncBattleLoc", "83101,148396,-3407").split(",");
  4901. EENC_TPLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4902.  
  4903. EENC_TICKETID = Integer.parseInt(eventsSettings.getProperty("EncTicketId", "0"));
  4904. EENC_TICKETCOUNT = Integer.parseInt(eventsSettings.getProperty("EncTicketCount", "0"));
  4905.  
  4906. propertySplit = eventsSettings.getProperty("EncRewards", "9901,500,100;57,1,100").split(";");
  4907. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { String augs = arrayOfString1[str1];
  4908. String[] aug = augs.split(",");
  4909. try {
  4910. EENC_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  4911. } catch (NumberFormatException nfe) {
  4912. if (aug.length > 0) {
  4913. System.out.println("events.cfg: EncRewards error: " + aug[0]);
  4914. }
  4915. }
  4916. }
  4917.  
  4918. propertySplit = eventsSettings.getProperty("EncItemPoints", "3433#83101,148396,-3407:83201,148296,-3407:83301,148196,-3407;4355#83101,148396,-3407:83201,148296,-3407:83301,148196,-3407").split(";");
  4919. arrayOfString1 = propertySplit;i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { augs = arrayOfString1[str1];
  4920. String[] aug = augs.split("#");
  4921. int itemId = Integer.parseInt(aug[0]);
  4922. String[] locs = aug[1].split(":");
  4923. FastList<Location> locfl = new FastList();
  4924. for (String points : locs) {
  4925. String[] loc = points.split(",");
  4926. try {
  4927. locfl.add(new Location(Integer.parseInt(loc[0]), Integer.parseInt(loc[1]), Integer.parseInt(loc[2])));
  4928. } catch (NumberFormatException nfe) {
  4929. if (!loc.equals("")) {
  4930. System.out.println("events.cfg: EncItemPoints error: " + aug[0]);
  4931. }
  4932. }
  4933. }
  4934. EENC_POINTS.put(Integer.valueOf(itemId), locfl);
  4935. }
  4936.  
  4937. ANARCHY_ENABLE = Boolean.parseBoolean(eventsSettings.getProperty("AnarchyEnable", "False"));
  4938. ANARCHY_DAY = Integer.parseInt(eventsSettings.getProperty("AnarchyDay", "3")) + 1;
  4939. ANARCHY_HOUR = Integer.parseInt(eventsSettings.getProperty("AnarchyHour", "12"));
  4940. ANARCHY_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(eventsSettings.getProperty("AnarchyDuration", "60")));
  4941. String anarchy_towns = eventsSettings.getProperty("AnarchyProtectedTowns", "-1,-2");
  4942. anarchy_towns = anarchy_towns + ",0";
  4943. propertySplit = anarchy_towns.split(",");
  4944. String[] arrayOfString2 = propertySplit;str1 = arrayOfString2.length; for (String augs = 0; augs < str1; augs++) { String id = arrayOfString2[augs];
  4945. ANARCHY_TOWNS.add(Integer.valueOf(Integer.parseInt(id)));
  4946. }
  4947.  
  4948. FIGHTING_ENABLE = Boolean.parseBoolean(eventsSettings.getProperty("FightingEnable", "False"));
  4949. FIGHTING_DAY = Integer.parseInt(eventsSettings.getProperty("FightingDay", "3")) + 1;
  4950. FIGHTING_HOUR = Integer.parseInt(eventsSettings.getProperty("FightingHour", "3"));
  4951. FIGHTING_REGTIME = Integer.parseInt(eventsSettings.getProperty("FightingRegTime", "3"));
  4952. FIGHTING_ANNDELAY = Integer.parseInt(eventsSettings.getProperty("AnarchyAnounceDelay", "3"));
  4953. FIGHTING_TPDELAY = Integer.parseInt(eventsSettings.getProperty("AnarchyBattleDelay", "3"));
  4954.  
  4955.  
  4956. FIGHTING_MINLVL = Integer.parseInt(eventsSettings.getProperty("FightingMinLevel", "70"));
  4957. FIGHTING_MINP = Integer.parseInt(eventsSettings.getProperty("FightingMinPlayers", "10"));
  4958. FIGHTING_MAXP = Integer.parseInt(eventsSettings.getProperty("FightingMaxPlayers", "100"));
  4959.  
  4960. FIGHTING_TICKETID = Integer.parseInt(eventsSettings.getProperty("FightingTicket", "4037"));
  4961. FIGHTING_TICKETCOUNT = Integer.parseInt(eventsSettings.getProperty("FightingTicketCount", "10"));
  4962.  
  4963. FIGHTING_NPCID = Integer.parseInt(eventsSettings.getProperty("FightingNpcId", "4037"));
  4964.  
  4965. propertySplit = eventsSettings.getProperty("FightingNpcLoc", "83101,148396,-3407").split(",");
  4966. FIGHTING_NPCLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4967.  
  4968. propertySplit = eventsSettings.getProperty("FightingBattleLoc", "83101,148396,-3407").split(",");
  4969. FIGHTING_TPLOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  4970.  
  4971.  
  4972. EVENTS_SAME_IP = Boolean.valueOf(eventsSettings.getProperty("AllowEventsSameIp", "True")).booleanValue();
  4973. TVT_SAME_HWID = Boolean.valueOf(eventsSettings.getProperty("TvTSameHWID", "True")).booleanValue();
  4974. FORB_EVENT_REG_TELE = Boolean.valueOf(eventsSettings.getProperty("ForbRegTele", "True")).booleanValue();
  4975. int z1;
  4976. int z2;
  4977. if (TVT_EVENT_ENABLED) {
  4978. TVT_POLY = new EventTerritory(1);
  4979. propertySplit = eventsSettings.getProperty("TvtBorder", "9901,500;57,1").split(";");
  4980. arrayOfString2 = propertySplit;String str2 = arrayOfString2.length; for (augs = 0; augs < str2; augs++) { String augs = arrayOfString2[augs];
  4981. String[] aug = augs.split(",");
  4982. try {
  4983. TVT_POLY.addPoint(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]));
  4984. } catch (NumberFormatException nfe) {
  4985. if (!aug[0].equals("")) {
  4986. System.out.println("events.cfg: TvtBorder error: " + aug[0]);
  4987. }
  4988. }
  4989. }
  4990. propertySplit = eventsSettings.getProperty("TvtBorderZ", "-1292,-3407").split(",");
  4991. z1 = Integer.parseInt(propertySplit[0]);
  4992. z2 = Integer.parseInt(propertySplit[1]);
  4993. if (z1 == z2) {
  4994. z1 -= 400;
  4995. z2 += 400;
  4996. }
  4997. TVT_POLY.setZ(z1, z2); }
  4998. int z1;
  4999. int z2; if (ELH_ENABLE) {
  5000. LASTHERO_POLY = new EventTerritory(2);
  5001. propertySplit = eventsSettings.getProperty("LastHeroBorder", "9901,500;57,1").split(";");
  5002. String[] arrayOfString3 = propertySplit;z2 = arrayOfString3.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString3[augs];
  5003. String[] aug = augs.split(",");
  5004. try {
  5005. LASTHERO_POLY.addPoint(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]));
  5006. } catch (NumberFormatException nfe) {
  5007. if (!aug[0].equals("")) {
  5008. System.out.println("events.cfg: LastHeroBorder error: " + aug[0]);
  5009. }
  5010. }
  5011. }
  5012. propertySplit = eventsSettings.getProperty("LastHeroBorderZ", "-1292,-3407").split(",");
  5013. z1 = Integer.parseInt(propertySplit[0]);
  5014. z2 = Integer.parseInt(propertySplit[1]);
  5015. if (z1 == z2) {
  5016. z1 -= 400;
  5017. z2 += 400;
  5018. }
  5019. LASTHERO_POLY.setZ(z1, z2); }
  5020. int z1;
  5021. int z2; if (MASS_PVP) {
  5022. MASSPVP_POLY = new EventTerritory(3);
  5023. propertySplit = eventsSettings.getProperty("MassPvpBorder", "9901,500;57,1").split(";");
  5024. String[] arrayOfString4 = propertySplit;z2 = arrayOfString4.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString4[augs];
  5025. String[] aug = augs.split(",");
  5026. try {
  5027. MASSPVP_POLY.addPoint(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]));
  5028. } catch (NumberFormatException nfe) {
  5029. if (!aug[0].equals("")) {
  5030. System.out.println("events.cfg: MassPvpBorder error: " + aug[0]);
  5031. }
  5032. }
  5033. }
  5034. propertySplit = eventsSettings.getProperty("MassPvpBorderZ", "-1292,-3407").split(",");
  5035. z1 = Integer.parseInt(propertySplit[0]);
  5036. z2 = Integer.parseInt(propertySplit[1]);
  5037. if (z1 == z2) {
  5038. z1 -= 400;
  5039. z2 += 400;
  5040. }
  5041. MASSPVP_POLY.setZ(z1, z2); }
  5042. int z1;
  5043. if (EBC_ENABLE) {
  5044. BASECAPTURE_POLY = new EventTerritory(4);
  5045. propertySplit = eventsSettings.getProperty("BaseCaptureBorder", "9901,500;57,1").split(";");
  5046. String[] arrayOfString5 = propertySplit;z2 = arrayOfString5.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString5[augs];
  5047. String[] aug = augs.split(",");
  5048. try {
  5049. BASECAPTURE_POLY.addPoint(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]));
  5050. } catch (NumberFormatException nfe) {
  5051. if (!aug[0].equals("")) {
  5052. System.out.println("events.cfg: BaseCaptureBorder error: " + aug[0]);
  5053. }
  5054. }
  5055. }
  5056. propertySplit = eventsSettings.getProperty("BaseCaptureBorderZ", "-1292,-3407").split(",");
  5057. z1 = Integer.parseInt(propertySplit[0]);
  5058. z2 = Integer.parseInt(propertySplit[1]);
  5059. if (z1 == z2) {
  5060. z1 -= 400;
  5061. z2 += 400;
  5062. }
  5063. BASECAPTURE_POLY.setZ(z1, z2);
  5064. }
  5065.  
  5066. EVENT_SPECIAL_DROP = Boolean.parseBoolean(eventsSettings.getProperty("SpecialEventDrop", "False"));
  5067.  
  5068. ALLOW_BE = Boolean.parseBoolean(eventsSettings.getProperty("BeggEnable", "False"));
  5069. BE_EGG_ID = Integer.parseInt(eventsSettings.getProperty("BeggId", "0"));
  5070. BE_LIMIT = TimeUnit.MINUTES.toMillis(Integer.parseInt(eventsSettings.getProperty("BeggLimit", "60")));
  5071. BE_RESTART = TimeUnit.MINUTES.toMillis(Integer.parseInt(eventsSettings.getProperty("BeggRestart", "60")));
  5072. BE_NEXTTIME = TimeUnit.MINUTES.toMillis(Integer.parseInt(eventsSettings.getProperty("BeggNext", "60")));
  5073. propertySplit = eventsSettings.getProperty("BeggLoc", "83101,148396,-3407").split(",");
  5074. BE_EGG_LOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  5075. propertySplit = eventsSettings.getProperty("BeggRewards", "57,1,1;57,1,1").split(";");
  5076. String[] arrayOfString6 = propertySplit;int z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5077. String[] aug = augs.split(",");
  5078. try {
  5079. BE_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5080. } catch (NumberFormatException nfe) {
  5081. if (aug.length > 0) {
  5082. System.out.println("events.cfg: BeggRewards error: " + aug[0]);
  5083. }
  5084. }
  5085. }
  5086. propertySplit = eventsSettings.getProperty("BeggGuards", "1,2").split(";");
  5087. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String buffs = arrayOfString6[augs];
  5088. String[] pbuff = buffs.split(",");
  5089. try {
  5090. BE_GUARDS.put(Integer.valueOf(pbuff[0]), Integer.valueOf(pbuff[1]));
  5091. } catch (NumberFormatException nfe) {
  5092. if (!pbuff[0].equals("")) {
  5093. System.out.println("events.cfg: BeggGuards error: " + pbuff[0]);
  5094. }
  5095. }
  5096. }
  5097.  
  5098. ALLOW_GUILD_MOD = Boolean.parseBoolean(eventsSettings.getProperty("GuildModEnable", "False"));
  5099. ALLOW_GUILD_AURA = Boolean.parseBoolean(eventsSettings.getProperty("GuildModAura", "False"));
  5100. GUILD_MOD_COIN = Integer.parseInt(eventsSettings.getProperty("GuildModCoin", "0"));
  5101. GUILD_MOD_PRICE = Integer.parseInt(eventsSettings.getProperty("GuildModPrice", "0"));
  5102. GUILD_MOD_COIN_NAME = eventsSettings.getProperty("GuildModCoinName", "GuildModCoinName");
  5103. GUILD_MOD_PENALTYS_MAX = Integer.parseInt(eventsSettings.getProperty("GuildModPenaltyes", "50"));
  5104. GUILD_BALANCE_TEAM = Boolean.parseBoolean(eventsSettings.getProperty("GuildTeamBalance", "False"));
  5105.  
  5106. propertySplit = eventsSettings.getProperty("GuildModNames", "1,[HH];2,[SH]").split(";");
  5107. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5108. String[] aug = augs.split(",");
  5109. try {
  5110. GUILD_MOD_NAMES.put(Integer.valueOf(Integer.parseInt(aug[0])), aug[1]);
  5111. } catch (NumberFormatException nfe) {
  5112. if (!aug[0].equals("")) {
  5113. System.out.println("events.cfg: GuildModNames error: " + aug[0]);
  5114. }
  5115. }
  5116. }
  5117. propertySplit = eventsSettings.getProperty("GuildModMasks", "1,57;2,57").split(";");
  5118. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5119. String[] aug = augs.split(",");
  5120. try {
  5121. GUILD_MOD_MASKS.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  5122. } catch (NumberFormatException nfe) {
  5123. if (!aug[0].equals("")) {
  5124. System.out.println("events.cfg: GuildModMasks error: " + aug[0]);
  5125. }
  5126. }
  5127. }
  5128. propertySplit = eventsSettings.getProperty("GuildModRewards", "n,n,n;n,n,n").split(";");
  5129. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5130. if (augs.equals("n,n,n")) {
  5131. break;
  5132. }
  5133.  
  5134. String[] aug = augs.split(",");
  5135. try {
  5136. GUILD_MOD_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5137. } catch (NumberFormatException nfe) {
  5138. if (!aug[0].equals("")) {
  5139. System.out.println("events.cfg: GuildModRewards error: " + aug[0]);
  5140. }
  5141. }
  5142. }
  5143.  
  5144. PVP_ZONE_REWARDS = Boolean.parseBoolean(eventsSettings.getProperty("EnablePvpZones", "False"));
  5145.  
  5146. CUSTOM_CHEST_DROP = Boolean.parseBoolean(eventsSettings.getProperty("ChestDropMpd", "False"));
  5147.  
  5148. CASTLE_BONUS_SKILLS = Boolean.parseBoolean(eventsSettings.getProperty("CastleBonusSkills", "False"));
  5149.  
  5150. EVENT_REG_POPUP = Boolean.parseBoolean(eventsSettings.getProperty("EventRegPopUp", "False"));
  5151. EVENT_REG_POPUPLVL = Integer.parseInt(eventsSettings.getProperty("EventRegPopUpLvl", "76"));
  5152.  
  5153. EVENT_KILL_REWARD = Boolean.parseBoolean(eventsSettings.getProperty("OnKillReward", "False"));
  5154. propertySplit = eventsSettings.getProperty("OnKillRewardItems", "n,n,n;n,n,n").split(";");
  5155. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5156. if (augs.equals("n,n,n")) {
  5157. break;
  5158. }
  5159.  
  5160. String[] aug = augs.split(",");
  5161. try {
  5162. EVENT_KILLSITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5163. } catch (NumberFormatException nfe) {
  5164. if (!aug[0].equals("")) {
  5165. System.out.println("events.cfg: OnKillRewards error: " + aug[0]);
  5166. }
  5167. }
  5168. }
  5169. if (EVENT_KILLSITEMS.isEmpty()) {
  5170. EVENT_KILL_REWARD = false;
  5171. }
  5172. TVT_KILL_REWARD = Boolean.parseBoolean(eventsSettings.getProperty("OnKillTvtReward", "False"));
  5173. propertySplit = eventsSettings.getProperty("OnKillTvtItems", "n,n,n;n,n,n").split(";");
  5174. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5175. if (augs.equals("n,n,n")) {
  5176. break;
  5177. }
  5178.  
  5179. String[] aug = augs.split(",");
  5180. try {
  5181. TVT_KILLSITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5182. } catch (NumberFormatException nfe) {
  5183. if (!aug[0].equals("")) {
  5184. System.out.println("events.cfg: OnKillTvtItems error: " + aug[0]);
  5185. }
  5186. }
  5187. }
  5188. if (TVT_KILLSITEMS.isEmpty()) {
  5189. TVT_KILL_REWARD = false;
  5190. }
  5191. MASSPVP_KILL_REWARD = Boolean.parseBoolean(eventsSettings.getProperty("OnKillMassPvpReward", "False"));
  5192. propertySplit = eventsSettings.getProperty("OnKillMassPvpItems", "n,n,n;n,n,n").split(";");
  5193. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5194. if (augs.equals("n,n,n")) {
  5195. break;
  5196. }
  5197.  
  5198. String[] aug = augs.split(",");
  5199. try {
  5200. MASSPVP_KILLSITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5201. } catch (NumberFormatException nfe) {
  5202. if (!aug[0].equals("")) {
  5203. System.out.println("events.cfg: OnKillMassPvpItems error: " + aug[0]);
  5204. }
  5205. }
  5206. }
  5207. if (MASSPVP_KILLSITEMS.isEmpty()) {
  5208. MASSPVP_KILL_REWARD = false;
  5209. }
  5210. LASTHERO_KILL_REWARD = Boolean.parseBoolean(eventsSettings.getProperty("OnKillLastHeroReward", "False"));
  5211. propertySplit = eventsSettings.getProperty("OnKillLastHeroItems", "n,n,n;n,n,n").split(";");
  5212. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5213. if (augs.equals("n,n,n")) {
  5214. break;
  5215. }
  5216.  
  5217. String[] aug = augs.split(",");
  5218. try {
  5219. LASTHERO_KILLSITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5220. } catch (NumberFormatException nfe) {
  5221. if (!aug[0].equals("")) {
  5222. System.out.println("events.cfg: OnKillLastHeroItems error: " + aug[0]);
  5223. }
  5224. }
  5225. }
  5226. if (LASTHERO_KILLSITEMS.isEmpty()) {
  5227. MASSPVP_KILL_REWARD = false;
  5228. }
  5229. CAPBASE_KILL_REWARD = Boolean.parseBoolean(eventsSettings.getProperty("OnKillBaseReward", "False"));
  5230. propertySplit = eventsSettings.getProperty("OnKillBaseItems", "n,n,n;n,n,n").split(";");
  5231. arrayOfString6 = propertySplit;z2 = arrayOfString6.length; for (augs = 0; augs < z2; augs++) { String augs = arrayOfString6[augs];
  5232. if (augs.equals("n,n,n")) {
  5233. break;
  5234. }
  5235.  
  5236. String[] aug = augs.split(",");
  5237. try {
  5238. CAPBASE_KILLSITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5239. } catch (NumberFormatException nfe) {
  5240. if (!aug[0].equals("")) {
  5241. System.out.println("events.cfg: OnKillBaseItems error: " + aug[0]);
  5242. }
  5243. }
  5244. }
  5245. if (CAPBASE_KILLSITEMS.isEmpty()) {
  5246. CAPBASE_KILL_REWARD = false;
  5247. }
  5248.  
  5249.  
  5250. TVT_SHOW_KILLS = Boolean.parseBoolean(eventsSettings.getProperty("TvtShowKills", "False"));
  5251.  
  5252. RESET_EVOLY_ENCH = Boolean.parseBoolean(eventsSettings.getProperty("ResetEnchLikeOly", "False"));
  5253.  
  5254. propertySplit = null;
  5255. } catch (Exception e) {
  5256. e.printStackTrace();
  5257. throw new Error("Failed to Load ./config/events.cfg File.");
  5258. }
  5259. }
  5260.  
  5261. public static void loadRatesCfg() {
  5262. try {
  5263. Properties ratesSettings = new Properties();
  5264. InputStream is = new FileInputStream(new File("./config/rates.cfg"));
  5265. ratesSettings.load(is);
  5266. is.close();
  5267.  
  5268. RATE_XP = Float.parseFloat(ratesSettings.getProperty("RateXp", "1."));
  5269. RATE_SP = Float.parseFloat(ratesSettings.getProperty("RateSp", "1."));
  5270. RATE_PARTY_XP = Float.parseFloat(ratesSettings.getProperty("RatePartyXp", "1."));
  5271. RATE_PARTY_SP = Float.parseFloat(ratesSettings.getProperty("RatePartySp", "1."));
  5272. RATE_QUESTS_REWARD = Float.parseFloat(ratesSettings.getProperty("RateQuestsReward", "1."));
  5273. RATE_CONSUMABLE_COST = Float.parseFloat(ratesSettings.getProperty("RateConsumableCost", "1."));
  5274. RATE_DROP_ITEMS = Float.parseFloat(ratesSettings.getProperty("RateDropItems", "1."));
  5275. RATE_DROP_ITEMS_BY_RAID = Float.parseFloat(ratesSettings.getProperty("RateRaidDropItems", "1."));
  5276. RATE_DROP_ITEMS_BY_GRANDRAID = Float.parseFloat(ratesSettings.getProperty("RateGrandRaidDropItems", "1."));
  5277. RATE_DROP_SPOIL = Float.parseFloat(ratesSettings.getProperty("RateDropSpoil", "1."));
  5278. RATE_DROP_MANOR = Integer.parseInt(ratesSettings.getProperty("RateDropManor", "1"));
  5279. RATE_DROP_QUEST = Float.parseFloat(ratesSettings.getProperty("RateDropQuest", "1."));
  5280. RATE_KARMA_EXP_LOST = Float.parseFloat(ratesSettings.getProperty("RateKarmaExpLost", "1."));
  5281. RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(ratesSettings.getProperty("RateSiegeGuardsPrice", "1."));
  5282. RATE_DROP_COMMON_HERBS = Float.parseFloat(ratesSettings.getProperty("RateCommonHerbs", "15."));
  5283. RATE_DROP_MP_HP_HERBS = Float.parseFloat(ratesSettings.getProperty("RateHpMpHerbs", "10."));
  5284. RATE_DROP_GREATER_HERBS = Float.parseFloat(ratesSettings.getProperty("RateGreaterHerbs", "4."));
  5285. RATE_DROP_SUPERIOR_HERBS = Float.parseFloat(ratesSettings.getProperty("RateSuperiorHerbs", "0.8")) * 10.0F;
  5286. RATE_DROP_SPECIAL_HERBS = Float.parseFloat(ratesSettings.getProperty("RateSpecialHerbs", "0.2")) * 10.0F;
  5287.  
  5288. RATE_DROP_ADENA = Float.parseFloat(ratesSettings.getProperty("RateDropAdena", "1."));
  5289. RATE_DROP_ADENAMUL = Float.parseFloat(ratesSettings.getProperty("RateDropAdenaMul", "1."));
  5290. RATE_DROP_SEAL_STONE = Float.parseFloat(ratesSettings.getProperty("RateDropSealStone", "1."));
  5291. RATE_MUL_SEAL_STONE = Double.parseDouble(ratesSettings.getProperty("RateDropSealStoneMul", "1."));
  5292. RATE_DROP_ITEMSRAIDMUL = Double.parseDouble(ratesSettings.getProperty("RateDropRaidMul", "1."));
  5293. RATE_DROP_ITEMSGRANDMUL = Double.parseDouble(ratesSettings.getProperty("RateDropGrandMul", "1."));
  5294.  
  5295. PLAYER_DROP_LIMIT = Integer.parseInt(ratesSettings.getProperty("PlayerDropLimit", "3"));
  5296. PLAYER_RATE_DROP = Integer.parseInt(ratesSettings.getProperty("PlayerRateDrop", "5"));
  5297. PLAYER_RATE_DROP_ITEM = Integer.parseInt(ratesSettings.getProperty("PlayerRateDropItem", "70"));
  5298. PLAYER_RATE_DROP_EQUIP = Integer.parseInt(ratesSettings.getProperty("PlayerRateDropEquip", "25"));
  5299. PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(ratesSettings.getProperty("PlayerRateDropEquipWeapon", "5"));
  5300.  
  5301. PET_XP_RATE = Float.parseFloat(ratesSettings.getProperty("PetXpRate", "1."));
  5302. PET_FOOD_RATE = Integer.parseInt(ratesSettings.getProperty("PetFoodRate", "1"));
  5303. SINEATER_XP_RATE = Float.parseFloat(ratesSettings.getProperty("SinEaterXpRate", "1."));
  5304.  
  5305. KARMA_DROP_LIMIT = Integer.parseInt(ratesSettings.getProperty("KarmaDropLimit", "10"));
  5306. KARMA_RATE_DROP = Integer.parseInt(ratesSettings.getProperty("KarmaRateDrop", "70"));
  5307. KARMA_RATE_DROP_ITEM = Integer.parseInt(ratesSettings.getProperty("KarmaRateDropItem", "50"));
  5308. KARMA_RATE_DROP_EQUIP = Integer.parseInt(ratesSettings.getProperty("KarmaRateDropEquip", "40"));
  5309. KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(ratesSettings.getProperty("KarmaRateDropEquipWeapon", "10"));
  5310. }
  5311. catch (Exception e) {
  5312. e.printStackTrace();
  5313. throw new Error("Failed to Load ./config/rates.cfg File.");
  5314. }
  5315. }
  5316.  
  5317. public static void loadAltSettingCfg() {
  5318. ALT_HERO_REWARDS.clear();
  5319. OLY_FIGHTER_BUFFS.clear();
  5320. OLY_MAGE_BUFFS.clear();
  5321. FORBIDDEN_WH_ITEMS.clear();
  5322. PETS_ACTION_SKILLS.clear();
  5323. ANNOUNCE_RAID_SPAWNS.clear();
  5324. try {
  5325. Properties altSettings = new Properties();
  5326. InputStream is = new FileInputStream(new File("./config/altsettings.cfg"));
  5327. altSettings.load(is);
  5328. is.close();
  5329.  
  5330. ALT_GAME_TIREDNESS = Boolean.parseBoolean(altSettings.getProperty("AltGameTiredness", "false"));
  5331. ALT_GAME_CREATION = Boolean.parseBoolean(altSettings.getProperty("AltGameCreation", "false"));
  5332. ALT_GAME_CREATION_SPEED = Double.parseDouble(altSettings.getProperty("AltGameCreationSpeed", "1"));
  5333. ALT_GAME_CREATION_XP_RATE = Double.parseDouble(altSettings.getProperty("AltGameCreationRateXp", "1"));
  5334. ALT_GAME_CREATION_SP_RATE = Double.parseDouble(altSettings.getProperty("AltGameCreationRateSp", "1"));
  5335. ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(altSettings.getProperty("AltBlacksmithUseRecipes", "true"));
  5336. ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(altSettings.getProperty("AltGameSkillLearn", "false"));
  5337. ALT_GAME_CANCEL_BOW = (altSettings.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow")) || (altSettings.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"));
  5338. ALT_GAME_CANCEL_CAST = (altSettings.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast")) || (altSettings.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"));
  5339. ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(altSettings.getProperty("AltShieldBlocks", "false"));
  5340. ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(altSettings.getProperty("AltPerfectShieldBlockRate", "10"));
  5341. ALT_GAME_DELEVEL = Boolean.parseBoolean(altSettings.getProperty("Delevel", "true"));
  5342. ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(altSettings.getProperty("MagicFailures", "false"));
  5343. ALT_GAME_MOB_ATTACK_AI = Boolean.parseBoolean(altSettings.getProperty("AltGameMobAttackAI", "false"));
  5344. ALT_MOB_AGRO_IN_PEACEZONE = Boolean.parseBoolean(altSettings.getProperty("AltMobAgroInPeaceZone", "true"));
  5345. ALT_GAME_EXPONENT_XP = Float.parseFloat(altSettings.getProperty("AltGameExponentXp", "0."));
  5346. ALT_GAME_EXPONENT_SP = Float.parseFloat(altSettings.getProperty("AltGameExponentSp", "0."));
  5347. ALT_GAME_FREIGHTS = Boolean.parseBoolean(altSettings.getProperty("AltGameFreights", "false"));
  5348. ALT_GAME_FREIGHT_PRICE = Integer.parseInt(altSettings.getProperty("AltGameFreightPrice", "1000"));
  5349. ALT_PARTY_RANGE = Integer.parseInt(altSettings.getProperty("AltPartyRange", "1600"));
  5350. ALT_PARTY_RANGE2 = Integer.parseInt(altSettings.getProperty("AltPartyRange2", "1400"));
  5351. REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(altSettings.getProperty("RemoveCastleCirclets", "true"));
  5352. IS_CRAFTING_ENABLED = Boolean.parseBoolean(altSettings.getProperty("CraftingEnabled", "true"));
  5353. LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(altSettings.getProperty("LifeCrystalNeeded", "true"));
  5354. SP_BOOK_NEEDED = Boolean.parseBoolean(altSettings.getProperty("SpBookNeeded", "true"));
  5355. ES_SP_BOOK_NEEDED = Boolean.parseBoolean(altSettings.getProperty("EnchantSkillSpBookNeeded", "true"));
  5356. AUTO_LOOT_HERBS = altSettings.getProperty("AutoLootHerbs").equalsIgnoreCase("True");
  5357. ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanBeKilledInPeaceZone", "false")).booleanValue();
  5358. ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanShop", "true")).booleanValue();
  5359. ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanUseGK", "false")).booleanValue();
  5360. ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanTeleport", "true")).booleanValue();
  5361. ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanTrade", "true")).booleanValue();
  5362. ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.valueOf(altSettings.getProperty("AltKarmaPlayerCanUseWareHouse", "true")).booleanValue();
  5363. ALT_GAME_FREE_TELEPORT = Integer.parseInt(altSettings.getProperty("AltFreeTeleporting", "0"));
  5364. ALT_RECOMMEND = Boolean.parseBoolean(altSettings.getProperty("AltRecommend", "False"));
  5365. ALT_PLAYER_PROTECTION_LEVEL = Integer.parseInt(altSettings.getProperty("AltPlayerProtectionLevel", "0"));
  5366. ALT_GAME_VIEWNPC = Boolean.parseBoolean(altSettings.getProperty("AltGameViewNpc", "False"));
  5367. ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE = Boolean.parseBoolean(altSettings.getProperty("AltNewCharAlwaysIsNewbie", "False"));
  5368. ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(altSettings.getProperty("AltMembersCanWithdrawFromClanWH", "False"));
  5369. ALT_MAX_NUM_OF_CLANS_IN_ALLY = Integer.parseInt(altSettings.getProperty("AltMaxNumOfClansInAlly", "3"));
  5370. DWARF_RECIPE_LIMIT = Integer.parseInt(altSettings.getProperty("DwarfRecipeLimit", "50"));
  5371. COMMON_RECIPE_LIMIT = Integer.parseInt(altSettings.getProperty("CommonRecipeLimit", "50"));
  5372.  
  5373. ALT_CLAN_MEMBERS_FOR_WAR = Integer.parseInt(altSettings.getProperty("AltClanMembersForWar", "15"));
  5374. ALT_CLAN_JOIN_DAYS = Integer.parseInt(altSettings.getProperty("DaysBeforeJoinAClan", "5"));
  5375. ALT_CLAN_CREATE_DAYS = Integer.parseInt(altSettings.getProperty("DaysBeforeCreateAClan", "10"));
  5376. ALT_CLAN_DISSOLVE_DAYS = Integer.parseInt(altSettings.getProperty("DaysToPassToDissolveAClan", "7"));
  5377. ALT_ALLY_JOIN_DAYS_WHEN_LEAVED = Integer.parseInt(altSettings.getProperty("DaysBeforeJoinAllyWhenLeaved", "1"));
  5378. ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED = Integer.parseInt(altSettings.getProperty("DaysBeforeJoinAllyWhenDismissed", "1"));
  5379. ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED = Integer.parseInt(altSettings.getProperty("DaysBeforeAcceptNewClanWhenDismissed", "1"));
  5380. ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED = Integer.parseInt(altSettings.getProperty("DaysBeforeCreateNewAllyWhenDissolved", "10"));
  5381. ALT_CLAN_REP_MUL = Float.parseFloat(altSettings.getProperty("AltClanReputationRate", "1.0"));
  5382. ALT_CLAN_CREATE_LEVEL = Integer.parseInt(altSettings.getProperty("AltClanCreateLevel", "1"));
  5383. ALT_CLAN_REP_WAR = Integer.parseInt(altSettings.getProperty("AltClanReputationKillBonus", "2"));
  5384.  
  5385. CASTLE_SHIELD = Boolean.parseBoolean(altSettings.getProperty("CastleShieldRestriction", "True"));
  5386. CLANHALL_SHIELD = Boolean.parseBoolean(altSettings.getProperty("ClanHallShieldRestriction", "True"));
  5387. APELLA_ARMORS = Boolean.parseBoolean(altSettings.getProperty("ApellaArmorsRestriction", "True"));
  5388. OATH_ARMORS = Boolean.parseBoolean(altSettings.getProperty("OathArmorsRestriction", "True"));
  5389. CASTLE_CROWN = Boolean.parseBoolean(altSettings.getProperty("CastleLordsCrownRestriction", "True"));
  5390. CASTLE_CIRCLETS = Boolean.parseBoolean(altSettings.getProperty("CastleCircletsRestriction", "True"));
  5391.  
  5392. ALT_OLY_START_TIME = Integer.parseInt(altSettings.getProperty("AltOlyStartTime", "18"));
  5393. ALT_OLY_MIN = Integer.parseInt(altSettings.getProperty("AltOlyMin", "00"));
  5394. ALT_OLY_BATTLE = Long.parseLong(altSettings.getProperty("AltOlyBattle", "360000"));
  5395. ALT_OLY_BWAIT = Long.parseLong(altSettings.getProperty("AltOlyBWait", "600000"));
  5396. ALT_OLY_IWAIT = Long.parseLong(altSettings.getProperty("AltOlyIWait", "300000"));
  5397. ALT_OLY_CPERIOD = Long.parseLong(altSettings.getProperty("AltOlyCPeriod", "21600000"));
  5398. ALT_OLY_WPERIOD = Long.parseLong(altSettings.getProperty("AltOlyWPeriod", "604800000"));
  5399. ALT_OLY_VPERIOD = Long.parseLong(altSettings.getProperty("AltOlyVPeriod", "43200000"));
  5400. ALT_OLY_SAME_IP = Boolean.parseBoolean(altSettings.getProperty("AltOlySameIp", "True"));
  5401. ALT_OLY_SAME_HWID = Boolean.parseBoolean(altSettings.getProperty("AltOlySameHWID", "True"));
  5402. ALT_OLY_ENCHANT_LIMIT = Integer.parseInt(altSettings.getProperty("AltOlyMaxEnchant", "65535"));
  5403. ALT_OLY_MP_REG = Boolean.parseBoolean(altSettings.getProperty("AltOlyRestoreMP", "False"));
  5404. ALT_OLY_MINCLASS = Integer.parseInt(altSettings.getProperty("AltOlyMinClass", "6"));
  5405. ALT_OLY_MINNONCLASS = Integer.parseInt(altSettings.getProperty("AltOlyMinNonClass", "4"));
  5406. ALT_OLYMPIAD_PERIOD = Integer.parseInt(altSettings.getProperty("AltOlyPeriod", "0"));
  5407. ALT_OLY_RELOAD_SKILLS = Boolean.parseBoolean(altSettings.getProperty("AltOlyReloadSkills", "True"));
  5408. OLY_MAX_WEAPON_ENCH = Integer.parseInt(altSettings.getProperty("AltOlyMaxWeaponEnchant", "65535"));
  5409. OLY_MAX_ARMOT_ENCH = Integer.parseInt(altSettings.getProperty("AltOlyMaxArmorEnchant", "65535"));
  5410. if (OLY_MAX_WEAPON_ENCH == -1) {
  5411. OLY_MAX_WEAPON_ENCH = 65535;
  5412. }
  5413. if (OLY_MAX_ARMOT_ENCH == -1) {
  5414. OLY_MAX_ARMOT_ENCH = 65535;
  5415. }
  5416. RESET_OLY_ENCH = Boolean.parseBoolean(altSettings.getProperty("AltOlyResetEnchant", "False"));
  5417. OLY_ANTI_BUFF = Boolean.parseBoolean(altSettings.getProperty("AltOlyAntiBuff", "True"));
  5418.  
  5419. String[] propertySplit = altSettings.getProperty("AltOlyFighterBuff", "1204,2;1086,1").split(";");
  5420. for (String augs : propertySplit) {
  5421. String[] aug = augs.split(",");
  5422. try {
  5423. OLY_FIGHTER_BUFFS.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  5424. } catch (NumberFormatException nfe) {
  5425. if (!aug[0].equals("")) {
  5426. System.out.println("altsettings.cfg: AltOlyFighterBuff error: " + aug[0]);
  5427. }
  5428. }
  5429. }
  5430. propertySplit = altSettings.getProperty("AltOlyMageBuff", "1204,2;1085,1").split(";");
  5431. for (String augs : propertySplit) {
  5432. String[] aug = augs.split(",");
  5433. try {
  5434. OLY_MAGE_BUFFS.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  5435. } catch (NumberFormatException nfe) {
  5436. if (!aug[0].equals("")) {
  5437. System.out.println("altsettings.cfg: AltOlyMageBuff error: " + aug[0]);
  5438. }
  5439. }
  5440. }
  5441. propertySplit = altSettings.getProperty("AltHeroRewards", "").split(";");
  5442. for (String augs : propertySplit) {
  5443. String[] aug = augs.split(",");
  5444. try {
  5445. ALT_HERO_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5446. } catch (NumberFormatException nfe) {
  5447. if (!aug[0].equals("")) {
  5448. System.out.println("altsettings.cfg: AltHeroRewards error: " + aug[0]);
  5449. }
  5450. }
  5451. }
  5452. OLY_ALT_REWARD = Boolean.parseBoolean(altSettings.getProperty("AltOlyRewardSystem", "false"));
  5453. OLY_ALT_REWARD_TYPE = Integer.parseInt(altSettings.getProperty("AltOlyRewardType", "0"));
  5454. propertySplit = altSettings.getProperty("AltOlyRewardItems", "1,2").split(",");
  5455. OLY_ALT_REWARD_ITEM = new EventReward(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), 0);
  5456. OLY_ALT_REWARD_ITEM_NAME = altSettings.getProperty("AltOlyRewardName", "Coin Of Luck");
  5457.  
  5458.  
  5459. ALT_MANOR_REFRESH_TIME = Integer.parseInt(altSettings.getProperty("AltManorRefreshTime", "20"));
  5460. ALT_MANOR_REFRESH_MIN = Integer.parseInt(altSettings.getProperty("AltManorRefreshMin", "00"));
  5461. ALT_MANOR_APPROVE_TIME = Integer.parseInt(altSettings.getProperty("AltManorApproveTime", "6"));
  5462. ALT_MANOR_APPROVE_MIN = Integer.parseInt(altSettings.getProperty("AltManorApproveMin", "00"));
  5463. ALT_MANOR_MAINTENANCE_PERIOD = Integer.parseInt(altSettings.getProperty("AltManorMaintenancePeriod", "360000"));
  5464. ALT_MANOR_SAVE_ALL_ACTIONS = Boolean.parseBoolean(altSettings.getProperty("AltManorSaveAllActions", "false"));
  5465. ALT_MANOR_SAVE_PERIOD_RATE = Integer.parseInt(altSettings.getProperty("AltManorSavePeriodRate", "2"));
  5466.  
  5467. ALT_LOTTERY_PRIZE = Integer.parseInt(altSettings.getProperty("AltLotteryPrize", "50000"));
  5468. ALT_LOTTERY_TICKET_PRICE = Integer.parseInt(altSettings.getProperty("AltLotteryTicketPrice", "2000"));
  5469. ALT_LOTTERY_5_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery5NumberRate", "0.6"));
  5470. ALT_LOTTERY_4_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery4NumberRate", "0.2"));
  5471. ALT_LOTTERY_3_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery3NumberRate", "0.2"));
  5472. ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = Integer.parseInt(altSettings.getProperty("AltLottery2and1NumberPrize", "200"));
  5473.  
  5474. DISABLE_GRADE_PENALTY = Boolean.parseBoolean(altSettings.getProperty("DisableGradePenalty", "false"));
  5475. DISABLE_WEIGHT_PENALTY = Boolean.parseBoolean(altSettings.getProperty("DisableWeightPenalty", "false"));
  5476. ALT_DEV_NO_QUESTS = Boolean.parseBoolean(altSettings.getProperty("AltDevNoQuests", "False"));
  5477. ALT_DEV_NO_SPAWNS = Boolean.parseBoolean(altSettings.getProperty("AltDevNoSpawns", "False"));
  5478.  
  5479.  
  5480. FS_TIME_ATTACK = Integer.parseInt(altSettings.getProperty("TimeOfAttack", "50"));
  5481. FS_TIME_COOLDOWN = Integer.parseInt(altSettings.getProperty("TimeOfCoolDown", "5"));
  5482. FS_TIME_ENTRY = Integer.parseInt(altSettings.getProperty("TimeOfEntry", "3"));
  5483. FS_TIME_WARMUP = Integer.parseInt(altSettings.getProperty("TimeOfWarmUp", "2"));
  5484. FS_PARTY_MEMBER_COUNT = Integer.parseInt(altSettings.getProperty("NumberOfNecessaryPartyMembers", "4"));
  5485. if (FS_TIME_ATTACK <= 0) {
  5486. FS_TIME_ATTACK = 50;
  5487. }
  5488. if (FS_TIME_COOLDOWN <= 0) {
  5489. FS_TIME_COOLDOWN = 5;
  5490. }
  5491. if (FS_TIME_ENTRY <= 0) {
  5492. FS_TIME_ENTRY = 3;
  5493. }
  5494. if (FS_TIME_ENTRY <= 0) {
  5495. FS_TIME_ENTRY = 3;
  5496. }
  5497. if (FS_TIME_ENTRY <= 0) {
  5498. FS_TIME_ENTRY = 3;
  5499. }
  5500. FS_PARTY_RANGE = Integer.parseInt(altSettings.getProperty("SepulchersPartyRange", "900"));
  5501. FS_CYCLE_MIN = Integer.parseInt(altSettings.getProperty("SepulchersCycleMin", "55"));
  5502. FS_WALL_DOORS = Boolean.parseBoolean(altSettings.getProperty("SepulchersWallDoors", "True"));
  5503. FS_WALL_DOORS = false;
  5504.  
  5505.  
  5506. RIFT_MIN_PARTY_SIZE = Integer.parseInt(altSettings.getProperty("RiftMinPartySize", "5"));
  5507. RIFT_MAX_JUMPS = Integer.parseInt(altSettings.getProperty("MaxRiftJumps", "4"));
  5508. RIFT_SPAWN_DELAY = Integer.parseInt(altSettings.getProperty("RiftSpawnDelay", "10000"));
  5509. RIFT_AUTO_JUMPS_TIME_MIN = Integer.parseInt(altSettings.getProperty("AutoJumpsDelayMin", "480"));
  5510. RIFT_AUTO_JUMPS_TIME_MAX = Integer.parseInt(altSettings.getProperty("AutoJumpsDelayMax", "600"));
  5511. RIFT_ENTER_COST_RECRUIT = Integer.parseInt(altSettings.getProperty("RecruitCost", "18"));
  5512. RIFT_ENTER_COST_SOLDIER = Integer.parseInt(altSettings.getProperty("SoldierCost", "21"));
  5513. RIFT_ENTER_COST_OFFICER = Integer.parseInt(altSettings.getProperty("OfficerCost", "24"));
  5514. RIFT_ENTER_COST_CAPTAIN = Integer.parseInt(altSettings.getProperty("CaptainCost", "27"));
  5515. RIFT_ENTER_COST_COMMANDER = Integer.parseInt(altSettings.getProperty("CommanderCost", "30"));
  5516. RIFT_ENTER_COST_HERO = Integer.parseInt(altSettings.getProperty("HeroCost", "33"));
  5517.  
  5518.  
  5519. MAX_CHAT_LENGTH = Integer.parseInt(altSettings.getProperty("MaxChatLength", "100"));
  5520. CRUMA_TOWER_LEVEL_RESTRICT = Integer.parseInt(altSettings.getProperty("CrumaTowerLevelRestrict", "56"));
  5521. RIFT_BOSS_ROOM_TIME_MUTIPLY = Float.parseFloat(altSettings.getProperty("BossRoomTimeMultiply", "1.5"));
  5522. NOEPIC_QUESTS = Boolean.parseBoolean(altSettings.getProperty("EpicQuests", "True"));
  5523. ONE_AUGMENT = Boolean.parseBoolean(altSettings.getProperty("OneAugmentEffect", "True"));
  5524. JOB_WINDOW = Boolean.parseBoolean(altSettings.getProperty("JobWindow", "False"));
  5525. USE_SOULSHOTS = Boolean.parseBoolean(altSettings.getProperty("UseSoulShots", "True"));
  5526. USE_ARROWS = Boolean.parseBoolean(altSettings.getProperty("ConsumeArrows", "True"));
  5527. CLEAR_BUFF_ONDEATH = Boolean.parseBoolean(altSettings.getProperty("ClearBuffOnDeath", "True"));
  5528. PROTECT_GATE_PVP = Boolean.parseBoolean(altSettings.getProperty("ProtectGatePvp", "False"));
  5529. MAX_HENNA_BONUS = Integer.parseInt(altSettings.getProperty("MaxHennaBonus", "5"));
  5530. ALT_ANY_SUBCLASS = Boolean.parseBoolean(altSettings.getProperty("AltAnySubClass", "False"));
  5531. ALT_ANY_SUBCLASS_OVERCRAF = Boolean.parseBoolean(altSettings.getProperty("AltAnySubClassOverCraft", "False"));
  5532. ALT_SUBCLASS_PHOENIX = Boolean.parseBoolean(altSettings.getProperty("AltSubClassPhoenix", "False"));
  5533. ALT_AUGMENT_HERO = Boolean.parseBoolean(altSettings.getProperty("AltAugmentHeroWeapons", "False"));
  5534.  
  5535. WEDDING_ANSWER_TIME = Integer.parseInt(altSettings.getProperty("WeddingAnswerTime", "0"));
  5536. RESURECT_ANSWER_TIME = Integer.parseInt(altSettings.getProperty("ResurrectAnswerTime", "0"));
  5537. SUMMON_ANSWER_TIME = Integer.parseInt(altSettings.getProperty("SummonAnswerTime", "30000"));
  5538.  
  5539. MAX_EXP_LEVEL = Integer.parseInt(altSettings.getProperty("MexLevelExp", "100"));
  5540. FREE_PVP = Boolean.parseBoolean(altSettings.getProperty("FreePvp", "False"));
  5541. PROTECT_GRADE_PVP = Boolean.parseBoolean(altSettings.getProperty("ProtectGradePvp", "False"));
  5542.  
  5543. CLEAR_OLY_BAN = Boolean.parseBoolean(altSettings.getProperty("ClearOlympiadPointsBan", "False"));
  5544.  
  5545. GIVE_ITEM_PET = Boolean.parseBoolean(altSettings.getProperty("GiveItemToPet", "True"));
  5546.  
  5547. DISABLE_PET_FEED = Boolean.parseBoolean(altSettings.getProperty("DisablePetFeed", "False"));
  5548.  
  5549. SIEGE_GUARDS_SPAWN = Boolean.parseBoolean(altSettings.getProperty("SpawnSiegeGuards", "True"));
  5550.  
  5551. TELEPORT_PROTECTION = TimeUnit.SECONDS.toMillis(Integer.parseInt(altSettings.getProperty("TeleportProtection", "0")));
  5552.  
  5553. MAX_MATKSPD_DELAY = Integer.parseInt(altSettings.getProperty("MaxMAtkDelay", "655350"));
  5554. MAX_PATKSPD_DELAY = Integer.parseInt(altSettings.getProperty("MaxPAtkDelay", "655350"));
  5555.  
  5556. MAX_MATK_CALC = Integer.parseInt(altSettings.getProperty("MaxMAtkCalc", "655350"));
  5557. MAX_MDEF_CALC = Integer.parseInt(altSettings.getProperty("MaxMDefCalc", "655350"));
  5558.  
  5559. MIN_ATKSPD_DELAY = Integer.parseInt(altSettings.getProperty("MaxAtkSpdDelay", "333"));
  5560.  
  5561. KICK_USED_ACCOUNT_TRYES = Integer.parseInt(altSettings.getProperty("KickUsedAccountTryes", "2"));
  5562.  
  5563. DISABLE_CLAN_REQUREMENTS = Boolean.parseBoolean(altSettings.getProperty("FreeClanLevelUp5", "False"));
  5564.  
  5565. MOUNT_EXPIRE = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(altSettings.getProperty("MountTime", "10")));
  5566.  
  5567. OLY_RELOAD_SKILLS_BEGIN = Boolean.parseBoolean(altSettings.getProperty("OlyReloadSkillsArena", "True"));
  5568. OLY_RELOAD_SKILLS_END = Boolean.parseBoolean(altSettings.getProperty("OlyReloadSkillsBack", "True"));
  5569.  
  5570. RESET_MIRACLE_VALOR = Boolean.parseBoolean(altSettings.getProperty("ResetValorMiracle", "False"));
  5571.  
  5572. STACK_LIFE_STONE = Boolean.parseBoolean(altSettings.getProperty("StackedLifeStones", "False"));
  5573.  
  5574. TRADE_ZONE_ENABLE = Boolean.parseBoolean(altSettings.getProperty("TradeZoneEnabled", "False"));
  5575.  
  5576. SHOW_BOSS_RESPAWNS = Boolean.parseBoolean(altSettings.getProperty("ShowBossRespawns", "False"));
  5577.  
  5578. ALLOW_DEBUFFS_IN_TOWN = Boolean.parseBoolean(altSettings.getProperty("MassDebuffsAtTown", "True"));
  5579.  
  5580. SUMMON_DELAY = TimeUnit.SECONDS.toMillis(Integer.parseInt(altSettings.getProperty("SummonDelay", "10")));
  5581.  
  5582. propertySplit = altSettings.getProperty("ForbiddenWhItems", "1,2").split(",");
  5583. for (String npc_id : propertySplit) {
  5584. FORBIDDEN_WH_ITEMS.add(Integer.valueOf(Integer.parseInt(npc_id)));
  5585. }
  5586.  
  5587. propertySplit = altSettings.getProperty("PetsActionSkils", "1204,2;1085,1").split(";");
  5588. for (String augs : propertySplit) {
  5589. String[] aug = augs.split(",");
  5590. try {
  5591. PETS_ACTION_SKILLS.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  5592. } catch (NumberFormatException nfe) {
  5593. if (!aug[0].equals("")) {
  5594. System.out.println("altsettings.cfg: PetsActionSkils error: " + aug[0]);
  5595. }
  5596. }
  5597. }
  5598.  
  5599. propertySplit = altSettings.getProperty("AnnounceRaidSpawns", "1,1;2,2").split(";");
  5600. for (String augs : propertySplit) {
  5601. String[] aug = augs.split(",");
  5602. try {
  5603. ANNOUNCE_RAID_SPAWNS.put(Integer.valueOf(Integer.parseInt(aug[0])), Long.valueOf(TimeUnit.MINUTES.toMillis(Integer.parseInt(aug[1]))));
  5604. } catch (NumberFormatException nfe) {
  5605. if (!aug[0].equals("")) {
  5606. System.out.println("altsettings.cfg: PetsActionSkils error: " + aug[0]);
  5607. }
  5608. }
  5609. }
  5610.  
  5611. propertySplit = altSettings.getProperty("PetRentPrices", "1800,7200,720000,6480000").split(",");
  5612. for (String npc_id : propertySplit) {
  5613. PET_RENT_PRICES.add(Integer.valueOf(Integer.parseInt(npc_id)));
  5614. }
  5615. PET_RENT_COIN = Integer.parseInt(altSettings.getProperty("PetRentCoin", "57"));
  5616. PET_RENT_COIN_NAME = altSettings.getProperty("PetRentCoinName", "Adena");
  5617.  
  5618. ALLP_ZONE = Boolean.parseBoolean(altSettings.getProperty("AllpZone", "False"));
  5619. DISABLE_REFLECT_ON_MOBS = Boolean.parseBoolean(altSettings.getProperty("DisableReflectOnMobs", "False"));
  5620. LVLUP_RELOAD_SKILLS = Boolean.parseBoolean(altSettings.getProperty("LevelUpReloadSkills", "True"));
  5621. CHAT_LEVEL = Integer.parseInt(altSettings.getProperty("ChatLevel", "0"));
  5622. CHANGE_SUB_DELAY = Integer.parseInt(altSettings.getProperty("ChangeSubDelay", "2100"));
  5623. RELOAD_SUB_SKILL = Boolean.parseBoolean(altSettings.getProperty("ReloadSubSkills", "True"));
  5624. CHECK_PVP_ZONES = Boolean.parseBoolean(altSettings.getProperty("CheckPvpZones", "True"));
  5625. PVP_DELAY = Boolean.parseBoolean(altSettings.getProperty("CheckPvpDelay", "False"));
  5626. CHECK_PVP_DELAY = TimeUnit.SECONDS.toMillis(Integer.parseInt(altSettings.getProperty("PvpDelay", "10")));
  5627. AUTO_SKILL_ATTACK = Boolean.parseBoolean(altSettings.getProperty("AutoSkillAttack", "True"));
  5628. propertySplit = null;
  5629. } catch (Exception e) {
  5630. e.printStackTrace();
  5631. throw new Error("Failed to Load ./config/altsettings.cfg File.");
  5632. }
  5633. }
  5634.  
  5635. public static void loadSevenSignsCfg() {
  5636. try {
  5637. Properties SevenSettings = new Properties();
  5638. InputStream is = new FileInputStream(new File("./config/sevensigns.cfg"));
  5639. SevenSettings.load(is);
  5640. is.close();
  5641.  
  5642. ALT_GAME_REQUIRE_CASTLE_DAWN = Boolean.parseBoolean(SevenSettings.getProperty("AltRequireCastleForDawn", "False"));
  5643. ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(SevenSettings.getProperty("AltRequireClanCastle", "False"));
  5644. ALT_FESTIVAL_MIN_PLAYER = Integer.parseInt(SevenSettings.getProperty("AltFestivalMinPlayer", "5"));
  5645. ALT_MAXIMUM_PLAYER_CONTRIB = Integer.parseInt(SevenSettings.getProperty("AltMaxPlayerContrib", "1000000"));
  5646. ALT_FESTIVAL_MANAGER_START = Long.parseLong(SevenSettings.getProperty("AltFestivalManagerStart", "120000"));
  5647. ALT_FESTIVAL_LENGTH = Long.parseLong(SevenSettings.getProperty("AltFestivalLength", "1080000"));
  5648. ALT_FESTIVAL_CYCLE_LENGTH = Long.parseLong(SevenSettings.getProperty("AltFestivalCycleLength", "2280000"));
  5649. ALT_FESTIVAL_FIRST_SPAWN = Long.parseLong(SevenSettings.getProperty("AltFestivalFirstSpawn", "120000"));
  5650. ALT_FESTIVAL_FIRST_SWARM = Long.parseLong(SevenSettings.getProperty("AltFestivalFirstSwarm", "300000"));
  5651. ALT_FESTIVAL_SECOND_SPAWN = Long.parseLong(SevenSettings.getProperty("AltFestivalSecondSpawn", "540000"));
  5652. ALT_FESTIVAL_SECOND_SWARM = Long.parseLong(SevenSettings.getProperty("AltFestivalSecondSwarm", "720000"));
  5653. ALT_FESTIVAL_CHEST_SPAWN = Long.parseLong(SevenSettings.getProperty("AltFestivalChestSpawn", "900000"));
  5654. } catch (Exception e) {
  5655. e.printStackTrace();
  5656. throw new Error("Failed to Load ./config/sevensigns.cfg File.");
  5657. }
  5658. }
  5659.  
  5660. public static void loadClanHallCfg() {
  5661. CH_AUC_TOWNS_LIST.clear();
  5662. try {
  5663. Properties clanhallSettings = new Properties();
  5664. InputStream is = new FileInputStream(new File("./config/clanhall.cfg"));
  5665. clanhallSettings.load(is);
  5666. is.close();
  5667. CH_TELE_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallTeleportFunctionFeeRation", "86400000")).longValue();
  5668. CH_TELE1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallTeleportFunctionFeeLvl1", "86400000")).intValue();
  5669. CH_TELE2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallTeleportFunctionFeeLvl2", "86400000")).intValue();
  5670. CH_SUPPORT_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallSupportFunctionFeeRation", "86400000")).longValue();
  5671. CH_SUPPORT1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl1", "86400000")).intValue();
  5672. CH_SUPPORT2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl2", "86400000")).intValue();
  5673. CH_SUPPORT3_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl3", "86400000")).intValue();
  5674. CH_SUPPORT4_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl4", "86400000")).intValue();
  5675. CH_SUPPORT5_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl5", "86400000")).intValue();
  5676. CH_SUPPORT6_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl6", "86400000")).intValue();
  5677. CH_SUPPORT7_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl7", "86400000")).intValue();
  5678. CH_SUPPORT8_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallSupportFeeLvl8", "86400000")).intValue();
  5679. CH_MPREG_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFunctionFeeRation", "86400000")).longValue();
  5680. CH_MPREG1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFeeLvl1", "86400000")).intValue();
  5681. CH_MPREG2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFeeLvl2", "86400000")).intValue();
  5682. CH_MPREG3_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFeeLvl3", "86400000")).intValue();
  5683. CH_MPREG4_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFeeLvl4", "86400000")).intValue();
  5684. CH_MPREG5_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallMpRegenerationFeeLvl5", "86400000")).intValue();
  5685. CH_HPREG_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFunctionFeeRation", "86400000")).longValue();
  5686. CH_HPREG1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl1", "86400000")).intValue();
  5687. CH_HPREG2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl2", "86400000")).intValue();
  5688. CH_HPREG3_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl3", "86400000")).intValue();
  5689. CH_HPREG4_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl4", "86400000")).intValue();
  5690. CH_HPREG5_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl5", "86400000")).intValue();
  5691. CH_HPREG6_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl6", "86400000")).intValue();
  5692. CH_HPREG7_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl7", "86400000")).intValue();
  5693. CH_HPREG8_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl8", "86400000")).intValue();
  5694. CH_HPREG9_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl9", "86400000")).intValue();
  5695. CH_HPREG10_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl10", "86400000")).intValue();
  5696. CH_HPREG11_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl11", "86400000")).intValue();
  5697. CH_HPREG12_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl12", "86400000")).intValue();
  5698. CH_HPREG13_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallHpRegenerationFeeLvl13", "86400000")).intValue();
  5699. CH_EXPREG_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFunctionFeeRation", "86400000")).longValue();
  5700. CH_EXPREG1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl1", "86400000")).intValue();
  5701. CH_EXPREG2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl2", "86400000")).intValue();
  5702. CH_EXPREG3_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl3", "86400000")).intValue();
  5703. CH_EXPREG4_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl4", "86400000")).intValue();
  5704. CH_EXPREG5_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl5", "86400000")).intValue();
  5705. CH_EXPREG6_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl6", "86400000")).intValue();
  5706. CH_EXPREG7_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallExpRegenerationFeeLvl7", "86400000")).intValue();
  5707. CH_ITEM_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallItemCreationFunctionFeeRation", "86400000")).longValue();
  5708. CH_ITEM1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallItemCreationFunctionFeeLvl1", "86400000")).intValue();
  5709. CH_ITEM2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallItemCreationFunctionFeeLvl2", "86400000")).intValue();
  5710. CH_ITEM3_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallItemCreationFunctionFeeLvl3", "86400000")).intValue();
  5711. CH_CURTAIN_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallCurtainFunctionFeeRation", "86400000")).longValue();
  5712. CH_CURTAIN1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallCurtainFunctionFeeLvl1", "86400000")).intValue();
  5713. CH_CURTAIN2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallCurtainFunctionFeeLvl2", "86400000")).intValue();
  5714. CH_FRONT_FEE_RATIO = Long.valueOf(clanhallSettings.getProperty("ClanHallFrontPlatformFunctionFeeRation", "86400000")).longValue();
  5715. CH_FRONT1_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallFrontPlatformFunctionFeeLvl1", "86400000")).intValue();
  5716. CH_FRONT2_FEE = Integer.valueOf(clanhallSettings.getProperty("ClanHallFrontPlatformFunctionFeeLvl2", "86400000")).intValue();
  5717.  
  5718. CLANHALL_PAYMENT = Integer.valueOf(clanhallSettings.getProperty("ClanHallPaymentId", "57")).intValue();
  5719. CLANHALL_FEE_ID = Integer.valueOf(clanhallSettings.getProperty("ClanHallFeeId", "57")).intValue();
  5720.  
  5721. String aucTowns = clanhallSettings.getProperty("ClanHallAuctionTowns", "Off");
  5722. if (!aucTowns.equalsIgnoreCase("Off")) {
  5723. String[] propertySplit = aucTowns.split(",");
  5724. if (propertySplit.length > 0) {
  5725. for (String npc_id : propertySplit) {
  5726. CH_AUC_TOWNS_LIST.add(npc_id);
  5727. }
  5728. }
  5729. }
  5730. CH_AUCTION_TOWNS = !CH_AUC_TOWNS_LIST.isEmpty();
  5731. CH_FEE_CASTLE = Boolean.parseBoolean(clanhallSettings.getProperty("ChFeeCastleOwner", "False"));
  5732. }
  5733. catch (Exception e) {
  5734. e.printStackTrace();
  5735. throw new Error("Failed to Load ./config/clanhall.cfg File.");
  5736. }
  5737. }
  5738.  
  5739. public static void loadNpcCfg() {
  5740. NPC_RAID_REWARDS.clear();
  5741. NPC_EPIC_REWARDS.clear();
  5742. NPC_HIT_PROTECTET.clear();
  5743. BOSS_ITEMS.clear();
  5744. HEALING_SUMMONS.clear();
  5745. NPC_CHASE_RANGES.clear();
  5746. MOUNTABLE_PETS.clear();
  5747. FORBID_NPC_HELLO.clear();
  5748. MOB_PVP_FLAG_LIST.clear();
  5749. PREMIUM_MOBS_LIST.clear();
  5750. SUPER_MOBS.clear();
  5751. MOB_FIXED_DAMAGE_LIST.clear();
  5752. try {
  5753. Properties npc_conf = new Properties();
  5754. InputStream is = new FileInputStream(new File("./config/npc.cfg"));
  5755. npc_conf.load(is);
  5756. is.close();
  5757.  
  5758. L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(npc_conf.getProperty("ChampionEnable", "false"));
  5759. L2JMOD_CHAMPION_AURA = Boolean.parseBoolean(npc_conf.getProperty("ChampionAura", "false"));
  5760. L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(npc_conf.getProperty("ChampionFrequency", "0"));
  5761. L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(npc_conf.getProperty("ChampionMinLevel", "20"));
  5762. L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(npc_conf.getProperty("ChampionMaxLevel", "60"));
  5763. L2JMOD_CHAMPION_HP = Integer.parseInt(npc_conf.getProperty("ChampionHp", "7"));
  5764. L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(npc_conf.getProperty("ChampionHpRegen", "1."));
  5765. L2JMOD_CHAMPION_REWARDS_CHANCE = Double.parseDouble(npc_conf.getProperty("ChampionRewardsChance", "2"));
  5766. L2JMOD_CHAMPION_REWARDS_COUNT = Double.parseDouble(npc_conf.getProperty("ChampionRewardsCount", "2"));
  5767. L2JMOD_CHAMPION_REWARDS_EXP = Double.parseDouble(npc_conf.getProperty("ChampionRewardsExp", "2"));
  5768. L2JMOD_CHAMPION_REWARDS_SP = Double.parseDouble(npc_conf.getProperty("ChampionRewardsSp", "2"));
  5769. L2JMOD_CHAMPION_ADENAS_REWARDS = Double.parseDouble(npc_conf.getProperty("ChampionAdenasRewards", "1"));
  5770. L2JMOD_CHAMPION_ATK = Float.parseFloat(npc_conf.getProperty("ChampionAtk", "1."));
  5771. L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(npc_conf.getProperty("ChampionSpdAtk", "1."));
  5772. L2JMOD_CHAMPION_REWARD = Boolean.parseBoolean(npc_conf.getProperty("ChampionRewardBonus", "False"));
  5773.  
  5774. RAID_CUSTOM_DROP = Boolean.parseBoolean(npc_conf.getProperty("AllowCustomRaidDrop", "False"));
  5775. String[] propertySplit = npc_conf.getProperty("CustomRaidDrop", "57,1,100").split(";");
  5776. for (String augs : propertySplit) {
  5777. String[] aug = augs.split(",");
  5778. try {
  5779. NPC_RAID_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5780. } catch (NumberFormatException nfe) {
  5781. if (aug.length > 0) {
  5782. System.out.println("npc.cfg: CustomRaidDrop error: " + aug[0]);
  5783. }
  5784. }
  5785. }
  5786.  
  5787. MOB_FIXED_DAMAGE = Boolean.parseBoolean(npc_conf.getProperty("MobFixedDamage", "False"));
  5788. propertySplit = npc_conf.getProperty("MobFixedDamageList", "1204,2;1085,1").split(";");
  5789. for (String augs : propertySplit) {
  5790. String[] aug = augs.split(",");
  5791. try {
  5792. MOB_FIXED_DAMAGE_LIST.put(Integer.valueOf(Integer.parseInt(aug[0])), Double.valueOf(Double.parseDouble(aug[1])));
  5793. } catch (NumberFormatException nfe) {
  5794. if (!aug[0].equals("")) {
  5795. System.out.println("npc.cfg: MobFixedDamage error: " + aug[0]);
  5796. }
  5797. }
  5798. }
  5799.  
  5800. propertySplit = npc_conf.getProperty("CustomEpicShadowDrop", "57,1,100").split(";");
  5801. for (String augs : propertySplit) {
  5802. String[] aug = augs.split(",");
  5803. try {
  5804. NPC_EPIC_REWARDS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5805. } catch (NumberFormatException nfe) {
  5806. if (aug.length > 0) {
  5807. System.out.println("npc.cfg: CustomEpicShadowDrop error: " + aug[0]);
  5808. }
  5809. }
  5810. }
  5811.  
  5812. propertySplit = npc_conf.getProperty("ChampionRewardList", "57,1,100").split(";");
  5813. for (String augs : propertySplit) {
  5814. String[] aug = augs.split(",");
  5815. try {
  5816. L2JMOD_CHAMPION_REWARD_LIST.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  5817. } catch (NumberFormatException nfe) {
  5818. if (aug.length > 0) {
  5819. System.out.println("npc.cfg: ChampionRewardList error: " + aug[0]);
  5820. }
  5821. }
  5822. }
  5823.  
  5824. RAID_CLANPOINTS_REWARD = Integer.parseInt(npc_conf.getProperty("BossClanPointsReward", "0"));
  5825. EPIC_CLANPOINTS_REWARD = Integer.parseInt(npc_conf.getProperty("EpicClanPointsReward", "0"));
  5826.  
  5827. ANTARAS_CLOSE_PORT = TimeUnit.SECONDS.toMillis(Integer.parseInt(npc_conf.getProperty("AntharasClosePort", "30")));
  5828. ANTARAS_UPDATE_LAIR = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("AntharasUpdateLair", "10")));
  5829. ANTARAS_MIN_RESPAWN = convertTime(npc_conf.getProperty("AntharasMinRespawn", "160"));
  5830. ANTARAS_MAX_RESPAWN = convertTime(npc_conf.getProperty("AntharasMaxRespawn", "180"));
  5831. ANTARAS_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("AntharasRestartDelay", "5")));
  5832. ANTARAS_SPAWN_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("AntharasSpawnDelay", "10")));
  5833.  
  5834. VALAKAS_CLOSE_PORT = TimeUnit.SECONDS.toMillis(Integer.parseInt(npc_conf.getProperty("ValakasClosePort", "30")));
  5835. VALAKAS_UPDATE_LAIR = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("ValakasUpdateLair", "10")));
  5836. VALAKAS_MIN_RESPAWN = convertTime(npc_conf.getProperty("ValakasMinRespawn", "160"));
  5837. VALAKAS_MAX_RESPAWN = convertTime(npc_conf.getProperty("ValakasMaxRespawn", "180"));
  5838. VALAKAS_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("ValakasRestartDelay", "5")));
  5839. VALAKAS_SPAWN_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("ValakasSpawnDelay", "10")));
  5840.  
  5841. BAIUM_CLOSE_PORT = TimeUnit.SECONDS.toMillis(Integer.parseInt(npc_conf.getProperty("BaiumClosePort", "30")));
  5842. BAIUM_UPDATE_LAIR = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("BaiumUpdateLair", "2")));
  5843. BAIUM_MIN_RESPAWN = convertTime(npc_conf.getProperty("BaiumMinRespawn", "110"));
  5844. BAIUM_MAX_RESPAWN = convertTime(npc_conf.getProperty("BaiumMaxRespawn", "130"));
  5845. BAIUM_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("BaiumRestartDelay", "5")));
  5846.  
  5847. AQ_MIN_RESPAWN = convertTime(npc_conf.getProperty("AqMinRespawn", "22"));
  5848. AQ_MAX_RESPAWN = convertTime(npc_conf.getProperty("AqMaxRespawn", "26"));
  5849. AQ_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("AqRestartDelay", "5")));
  5850. AQ_PLAYER_MAX_LVL = Integer.parseInt(npc_conf.getProperty("AqMaxPlayerLvl", "80"));
  5851. AQ_NURSE_RESPAWN = TimeUnit.SECONDS.toMillis(Integer.parseInt(npc_conf.getProperty("AqNurseRespawn", "15")));
  5852.  
  5853. ZAKEN_MIN_RESPAWN = convertTime(npc_conf.getProperty("ZakenMinRespawn", "22"));
  5854. ZAKEN_MAX_RESPAWN = convertTime(npc_conf.getProperty("ZakenMaxRespawn", "26"));
  5855. ZAKEN_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("ZakenRestartDelay", "5")));
  5856. ZAKEN_PLAYER_MAX_LVL = Integer.parseInt(npc_conf.getProperty("ZakenMaxPlayerLvl", "80"));
  5857.  
  5858. FRINTA_MMIN_PARTIES = Integer.parseInt(npc_conf.getProperty("FrintMinPartys", "2"));
  5859. FRINTA_MMIN_PLAYERS = Integer.parseInt(npc_conf.getProperty("FrintMinPartyPlayers", "9"));
  5860. FRINTA_UPDATE_LAIR = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("FrintUpdateLair", "30")));
  5861. FRINTA_MIN_RESPAWN = convertTime(npc_conf.getProperty("FrintMinRespawn", "48"));
  5862. FRINTA_MAX_RESPAWN = convertTime(npc_conf.getProperty("FrintMinRespawn", "52"));
  5863. FRINTA_RESTART_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("FrintRestartDelay", "5")));
  5864. FRINTA_SPAWN_DELAY = TimeUnit.MINUTES.toMillis(Integer.parseInt(npc_conf.getProperty("FrintSpawnDelay", "5")));
  5865.  
  5866.  
  5867. ALLOW_HIT_NPC = Boolean.parseBoolean(npc_conf.getProperty("AllowHitNpc", "True"));
  5868. KILL_NPC_ATTACKER = Boolean.parseBoolean(npc_conf.getProperty("KillNpcAttacker", "False"));
  5869.  
  5870. NPC_SPAWN_DELAY = Long.parseLong(npc_conf.getProperty("NpcSpawnDelay", "0"));
  5871. NPC_SPAWN_TYPE = Integer.parseInt(npc_conf.getProperty("NpcSpawnType", "3"));
  5872.  
  5873. ANNOUNCE_EPIC_STATES = Boolean.parseBoolean(npc_conf.getProperty("AnnounceEpicStates", "False"));
  5874.  
  5875. propertySplit = npc_conf.getProperty("ProtectedHitNpc", "57,1").split(",");
  5876. for (String npc_id : propertySplit) {
  5877. NPC_HIT_PROTECTET.add(Integer.valueOf(Integer.parseInt(npc_id)));
  5878. }
  5879. propertySplit = npc_conf.getProperty("HitNpcLocation", "0,0,0").split(",");
  5880. NPC_HIT_LOCATION = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  5881.  
  5882. MOB_PVP_FLAG = Boolean.parseBoolean(npc_conf.getProperty("MobPvpFlag", "False"));
  5883. MOB_PVP_FLAG_CONUT = Integer.parseInt(npc_conf.getProperty("MobPvpFlagCount", "0"));
  5884. if (MOB_PVP_FLAG) {
  5885. propertySplit = npc_conf.getProperty("MobPvpFlagList", "57,1").split(",");
  5886. for (String npc_id : propertySplit) {
  5887. MOB_PVP_FLAG_LIST.add(Integer.valueOf(Integer.parseInt(npc_id)));
  5888. }
  5889. }
  5890.  
  5891. PREMIUM_MOBS = Boolean.parseBoolean(npc_conf.getProperty("PremiumMobs", "False"));
  5892. if (PREMIUM_MOBS) {
  5893. propertySplit = npc_conf.getProperty("PremiumMobsList", "57,1").split(",");
  5894. for (String npc_id : propertySplit) {
  5895. PREMIUM_MOBS_LIST.add(Integer.valueOf(Integer.parseInt(npc_id)));
  5896. }
  5897. }
  5898.  
  5899. BARAKIEL_NOBLESS = Boolean.parseBoolean(npc_conf.getProperty("BarakielDeathNobless", "False"));
  5900.  
  5901. ALLOW_RAID_BOSS_PUT = Boolean.parseBoolean(npc_conf.getProperty("AllowRaidBossPetrified", "True"));
  5902.  
  5903. ALLOW_RAID_BOSS_HEAL = Boolean.parseBoolean(npc_conf.getProperty("AllowRaidBossHeal", "True"));
  5904.  
  5905. propertySplit = npc_conf.getProperty("ZakenSpawnLoc", "55256,219114,-3224").split(",");
  5906. ZAKEN_SPAWN_LOC = new Location(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2]));
  5907.  
  5908. PROTECT_MOBS_ITEMS = Boolean.parseBoolean(npc_conf.getProperty("PlayerPenaltyItems", "False"));
  5909.  
  5910. BOSS_ZONE_MAX_ENCH = Integer.parseInt(npc_conf.getProperty("MaxEnchBossZone", "0"));
  5911.  
  5912. propertySplit = npc_conf.getProperty("ForbiddenItemsBossZone", "").trim().split(",");
  5913. for (String itemid : propertySplit) {
  5914. try {
  5915. BOSS_ITEMS.add(Integer.valueOf(itemid));
  5916. } catch (NumberFormatException nfe) {
  5917. if (!itemid.equals("")) {
  5918. System.out.println("npc.cfg: ForbiddenItemsBossZone error: " + itemid);
  5919. }
  5920. }
  5921. }
  5922.  
  5923. NPC_CHECK_RANGE = Boolean.parseBoolean(npc_conf.getProperty("CheckSpawnRange", "True"));
  5924. NPC_CHECK_MAX_RANGE = Integer.parseInt(npc_conf.getProperty("SpawnRangeMax", "2500"));
  5925.  
  5926. propertySplit = npc_conf.getProperty("MaxChaseRanges", "1,2").split(";");
  5927. for (String buffs : propertySplit) {
  5928. String[] pbuff = buffs.split(",");
  5929. try {
  5930. NPC_CHASE_RANGES.put(Integer.valueOf(pbuff[0]), Integer.valueOf(pbuff[1]));
  5931. } catch (NumberFormatException nfe) {
  5932. if (!pbuff[0].equals("")) {
  5933. System.out.println("npc.cfg: MaxChaseRanges error: " + pbuff[0]);
  5934. }
  5935. }
  5936. }
  5937.  
  5938. propertySplit = npc_conf.getProperty("MountablePets", "12526,12527,12528,12621").split(",");
  5939. for (String itemid : propertySplit) {
  5940. try {
  5941. MOUNTABLE_PETS.add(Integer.valueOf(itemid));
  5942. } catch (NumberFormatException nfe) {
  5943. if (!itemid.equals("")) {
  5944. System.out.println("npc.cfg: MountablePets error: " + itemid);
  5945. }
  5946. }
  5947. }
  5948.  
  5949. propertySplit = npc_conf.getProperty("EpicJewerlyChances", "6660,100;6657,100;6658,100;6656,100;6662,100;6661,100;6659,100;8191,100").split(";");
  5950. for (String augs : propertySplit) {
  5951. String[] aug = augs.split(",");
  5952. try {
  5953. EPIC_JEWERLY_CHANCES.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  5954. } catch (NumberFormatException nfe) {
  5955. if (aug.length > 0) {
  5956. System.out.println("npc.cfg: EpicJewerlyChances error: " + aug[0]);
  5957. }
  5958. }
  5959. }
  5960.  
  5961. BOSS_ZONE_LOGOUT = Boolean.parseBoolean(npc_conf.getProperty("BossZoneLogout", "True"));
  5962.  
  5963. propertySplit = npc_conf.getProperty("ForbidNpcHello", "30675,30761,30762,30763,31074,31665,31752").split(",");
  5964. for (String itemid : propertySplit) {
  5965. try {
  5966. FORBID_NPC_HELLO.add(Integer.valueOf(itemid));
  5967. } catch (NumberFormatException nfe) {
  5968. if (!itemid.equals("")) {
  5969. System.out.println("npc.cfg: ForbidNpcHello error: " + itemid);
  5970. }
  5971. }
  5972. }
  5973.  
  5974. RAID_VORTEX_CHANCE = Integer.parseInt(npc_conf.getProperty("RaidVortexChance", "80"));
  5975.  
  5976. FIXED_DAMAGE_TO_BOSS = Integer.parseInt(npc_conf.getProperty("FixedDamageToBoss", "0"));
  5977.  
  5978. TALK_MOVE_DELAY = Boolean.parseBoolean(npc_conf.getProperty("NpcTalkMoveDelay", "True"));
  5979.  
  5980. propertySplit = null;
  5981. } catch (Exception e) {
  5982. e.printStackTrace();
  5983. throw new Error("Failed to Load ./config/npc.cfg File.");
  5984. }
  5985. }
  5986.  
  5987. private static long convertTime(String time) {
  5988. if (time.endsWith("m")) {
  5989. return TimeUnit.MINUTES.toMillis(Integer.parseInt(time.replaceAll("m", "")));
  5990. }
  5991.  
  5992. if (time.endsWith("s")) {
  5993. return TimeUnit.SECONDS.toMillis(Integer.parseInt(time.replaceAll("s", "")));
  5994. }
  5995.  
  5996. if (time.endsWith("d")) {
  5997. return TimeUnit.DAYS.toMillis(Integer.parseInt(time.replaceAll("d", "")));
  5998. }
  5999.  
  6000. return TimeUnit.HOURS.toMillis(Integer.parseInt(time));
  6001. }
  6002.  
  6003. public static void loadCustomCfg() {
  6004. CHAT_FILTER_STRINGS.clear();
  6005. F_OLY_ITEMS.clear();
  6006. MULTVIP_CARDS.clear();
  6007. CASTLE_SIEGE_REWARDS.clear();
  6008. CASTLE_RPOTECT_REWARDS.clear();
  6009. ALT_BUFF_TIME.clear();
  6010. ALT_SKILL_CHANSE.clear();
  6011. ALT_MAGIC_WEAPONS.clear();
  6012. CUSTOM_STRT_ITEMS.clear();
  6013. ALT_FIXED_REUSES.clear();
  6014. ALT_FIXED_CASTS.clear();
  6015. PROTECTED_BUFFS.clear();
  6016. CASTLE_SIEGE_SKILLS.clear();
  6017. HIPPY_ITEMS.clear();
  6018. FORB_CURSED_SKILLS.clear();
  6019. CUSTOM_AUG_SKILLS.clear();
  6020. FORB_OLY_SKILLS.clear();
  6021. FORB_EVENT_SKILLS.clear();
  6022. WHITE_SKILLS.clear();
  6023. FORBIDDEN_BOW_CLASSES.clear();
  6024. FORBIDDEN_BOW_CLASSES_OLY.clear();
  6025. FORBIDDEN_DUAL_CLASSES.clear();
  6026. FORBIDDEN_FIST_CLASSES.clear();
  6027. try {
  6028. Properties customSettings = new Properties();
  6029. InputStream is = new FileInputStream(new File("./config/custom.cfg"));
  6030. customSettings.load(is);
  6031. is.close();
  6032.  
  6033. ALLOW_HERO_SUBSKILL = Boolean.parseBoolean(customSettings.getProperty("CustomHeroSubSkill", "False"));
  6034. SUB_START_LVL = Byte.parseByte(customSettings.getProperty("SubStartLvl", "40"));
  6035.  
  6036. RUN_SPD_BOOST = Integer.parseInt(customSettings.getProperty("RunSpeedBoost", "0"));
  6037. MAX_RUN_SPEED = Integer.parseInt(customSettings.getProperty("MaxRunSpeed", "250"));
  6038. MAX_PCRIT_RATE = Integer.parseInt(customSettings.getProperty("MaxPCritRate", "500"));
  6039. MAX_MCRIT_RATE = Integer.parseInt(customSettings.getProperty("MaxMCritRate", "100"));
  6040. MAX_PATK_SPEED = Integer.parseInt(customSettings.getProperty("MaxPAtkSpeed", "1500"));
  6041. MAX_MATK_SPEED = Integer.parseInt(customSettings.getProperty("MaxMAtkSpeed", "1900"));
  6042. MAX_MAX_HP = Integer.parseInt(customSettings.getProperty("MaxMaxHp", "30000"));
  6043.  
  6044. BUFFS_MAX_AMOUNT = Integer.parseInt(customSettings.getProperty("MaxBuffAmount", "24"));
  6045. BUFFS_PET_MAX_AMOUNT = Integer.parseInt(customSettings.getProperty("MaxPetBuffAmount", "20"));
  6046.  
  6047. MAX_SUBCLASS = Byte.parseByte(customSettings.getProperty("MaxSubClasses", "3"));
  6048.  
  6049. AUTO_LOOT = Boolean.parseBoolean(customSettings.getProperty("AutoLoot", "False"));
  6050. AUTO_LOOT_RAID = Boolean.parseBoolean(customSettings.getProperty("AutoLootRaid", "False"));
  6051. ALT_EPIC_JEWERLY = Boolean.parseBoolean(customSettings.getProperty("AutoLootEpicJewerly", "False"));
  6052.  
  6053. USE_CHAT_FILTER = Boolean.parseBoolean(customSettings.getProperty("UseChatFilter", "True"));
  6054. CHAT_FILTER_STRING = customSettings.getProperty("ChatFilterString", "-_-");
  6055. if (USE_CHAT_FILTER) {
  6056. loadChatFilter();
  6057. }
  6058.  
  6059. ALT_GAME_NEW_CHAR_ALWAYS_IS_NOBLE = Boolean.parseBoolean(customSettings.getProperty("AltNewCharAlwaysIsNoble", "False"));
  6060. ALT_START_LEVEL = Integer.parseInt(customSettings.getProperty("AltStartedLevel", "0"));
  6061. ALT_START_SP = Integer.parseInt(customSettings.getProperty("AltStartedSP", "0"));
  6062. ALT_ALLOW_AUGMENT_ON_OLYMP = Boolean.parseBoolean(customSettings.getProperty("AllowAugmnetOlympiad", "True"));
  6063. ALT_ALLOW_AUC = Boolean.parseBoolean(customSettings.getProperty("AllowAuction", "True"));
  6064.  
  6065. ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(customSettings.getProperty("AltSubClassWithoutQuests", "False"));
  6066.  
  6067. AUTO_LEARN_SKILLS = Boolean.parseBoolean(customSettings.getProperty("AutoLearnSkills", "false"));
  6068.  
  6069. ALT_WEIGHT_LIMIT = Double.parseDouble(customSettings.getProperty("AltWeightLimit", "1"));
  6070.  
  6071. STARTING_ADENA = Integer.parseInt(customSettings.getProperty("StartingAdena", "100"));
  6072.  
  6073. WYVERN_SPEED = Integer.parseInt(customSettings.getProperty("WyvernSpeed", "100"));
  6074. STRIDER_SPEED = Integer.parseInt(customSettings.getProperty("StriderSpeed", "80"));
  6075. WATER_SPEED = Integer.parseInt(customSettings.getProperty("WaterSpeed", "60"));
  6076.  
  6077. AUGMENT_BASESTAT = Integer.parseInt(customSettings.getProperty("AugmentBasestat", "1"));
  6078. AUGMENT_SKILL_NORM = Integer.parseInt(customSettings.getProperty("AugmentSkillNormal", "11"));
  6079. AUGMENT_SKILL_MID = Integer.parseInt(customSettings.getProperty("AugmentSkillMid", "11"));
  6080. AUGMENT_SKILL_HIGH = Integer.parseInt(customSettings.getProperty("AugmentSkillHigh", "11"));
  6081. AUGMENT_SKILL_TOP = Integer.parseInt(customSettings.getProperty("AugmentSkillTop", "11"));
  6082.  
  6083. ALLOW_RUPOR = Boolean.parseBoolean(customSettings.getProperty("AllowRupor", "False"));
  6084. RUPOR_ID = Integer.parseInt(customSettings.getProperty("RuporId", "50002"));
  6085.  
  6086. KICK_L2WALKER = Boolean.parseBoolean(customSettings.getProperty("L2WalkerProtection", "True"));
  6087.  
  6088. ALLOW_RAID_PVP = Boolean.parseBoolean(customSettings.getProperty("AllowRaidPvpZones", "False"));
  6089. CP_REUSE_TIME = Long.parseLong(customSettings.getProperty("CpReuseTime", "200"));
  6090. MANA_RESTORE = Long.parseLong(customSettings.getProperty("ManaRestore", "800"));
  6091. ANTIBUFF_SKILLID = Integer.parseInt(customSettings.getProperty("AntiBuffSkillId", "2276"));
  6092. MAGIC_CRIT_EXP = Double.parseDouble(customSettings.getProperty("MagicCritExp", "4"));
  6093. MAGIC_CRIT_EXP_OLY = Double.parseDouble(customSettings.getProperty("MagicCritExpOlymp", "4"));
  6094. MAGIC_DAM_EXP = Double.parseDouble(customSettings.getProperty("MagicDamExp", "1"));
  6095. MAGIC_PDEF_EXP = Double.parseDouble(customSettings.getProperty("MagicPdefExp", "1"));
  6096.  
  6097. BLOW_CHANCE_FRONT = Integer.parseInt(customSettings.getProperty("BlowChanceFront", "50"));
  6098. BLOW_CHANCE_BEHIND = Integer.parseInt(customSettings.getProperty("BlowChanceBehind", "70"));
  6099. BLOW_CHANCE_SIDE = Integer.parseInt(customSettings.getProperty("BlowChanceSide", "60"));
  6100.  
  6101. BLOW_DAMAGE_HEAVY = Double.parseDouble(customSettings.getProperty("BlowDamageHeavy", "1"));
  6102. BLOW_DAMAGE_LIGHT = Double.parseDouble(customSettings.getProperty("BlowDamageLight", "1"));
  6103. BLOW_DAMAGE_ROBE = Double.parseDouble(customSettings.getProperty("BlowDamageRobe", "1"));
  6104.  
  6105. SONLINE_ANNOUNE = Boolean.parseBoolean(customSettings.getProperty("AnnounceOnline", "False"));
  6106. SONLINE_ANNOUNCE_DELAY = (int)TimeUnit.MINUTES.toMillis(Integer.parseInt(customSettings.getProperty("AnnounceDelay", "10")));
  6107. SONLINE_SHOW_MAXONLINE = Boolean.parseBoolean(customSettings.getProperty("ShowMaxOnline", "False"));
  6108. SONLINE_SHOW_MAXONLINE_DATE = Boolean.parseBoolean(customSettings.getProperty("ShowMaxOnlineDate", "False"));
  6109. SONLINE_SHOW_OFFLINE = Boolean.parseBoolean(customSettings.getProperty("ShowOfflineTraders", "False"));
  6110. SONLINE_LOGIN_ONLINE = Boolean.parseBoolean(customSettings.getProperty("AnnounceOnLogin", "False"));
  6111. SONLINE_LOGIN_MAX = Boolean.parseBoolean(customSettings.getProperty("ShowLoginMaxOnline", "False"));
  6112. SONLINE_LOGIN_DATE = Boolean.parseBoolean(customSettings.getProperty("ShowLoginMaxOnlineDate", "False"));
  6113. SONLINE_LOGIN_OFFLINE = Boolean.parseBoolean(customSettings.getProperty("ShowLoginOfflineTraders", "False"));
  6114.  
  6115. AUTO_ANNOUNCE_ALLOW = Boolean.parseBoolean(customSettings.getProperty("AutoAnnouncementsAllow", "False"));
  6116. AUTO_ANNOUNCE_DELAY = Integer.parseInt(customSettings.getProperty("AutoAnnouncementsDelay", "600000"));
  6117.  
  6118. String[] propertySplit = customSettings.getProperty("ForbiddenOlympItems", "1234").split(",");
  6119. String[] arrayOfString1 = propertySplit;int i = arrayOfString1.length; for (String str1 = 0; str1 < i; str1++) { id = arrayOfString1[str1];
  6120. if (!id.isEmpty())
  6121. {
  6122.  
  6123. F_OLY_ITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  6124. }
  6125. }
  6126. FORBIDDEN_EVENT_ITMES = Boolean.parseBoolean(customSettings.getProperty("ForbiddenOnEvents", "False"));
  6127.  
  6128. INVIS_SHOW = Boolean.parseBoolean(customSettings.getProperty("BroadcastInvis", "True"));
  6129. CLAN_CH_CLEAN = TimeUnit.DAYS.toMillis(Integer.parseInt(customSettings.getProperty("ClanHallFreeAfter", "7")));
  6130. CHECK_SKILLS = Boolean.parseBoolean(customSettings.getProperty("CheckSkills", "True"));
  6131.  
  6132. String tickets = customSettings.getProperty("MultisellTickets", "");
  6133. if (!tickets.isEmpty()) {
  6134. propertySplit = tickets.split(";");
  6135. arrayOfString2 = propertySplit;str1 = arrayOfString2.length; for (id = 0; id < str1; id++) { String augs = arrayOfString2[id];
  6136. String[] aug = augs.split(",");
  6137. try {
  6138. MULTVIP_CARDS.put(Integer.valueOf(aug[0]), new EventReward(Integer.valueOf(aug[1]).intValue(), Integer.valueOf(aug[2]).intValue(), 0));
  6139. } catch (NumberFormatException nfe) {
  6140. if (aug.length > 0) {
  6141. System.out.println("custom.cfg: MultisellTickets error: " + aug[0]);
  6142. }
  6143. }
  6144. }
  6145. }
  6146.  
  6147. ALLOW_APELLA_BONUSES = Boolean.parseBoolean(customSettings.getProperty("AllowApellaPassives", "True"));
  6148. SHOW_ENTER_WARNINGS = Boolean.parseBoolean(customSettings.getProperty("ShowLoginWarnings", "False"));
  6149.  
  6150. CASTLE_SIEGE_REWARD_STATIC = Boolean.parseBoolean(customSettings.getProperty("CastleSiegeRewardsStatic", "False"));
  6151. propertySplit = customSettings.getProperty("CastleSiegeRewards", "").split(";");
  6152. String[] arrayOfString2 = propertySplit;String str2 = arrayOfString2.length; for (String id = 0; id < str2; id++) { String augs = arrayOfString2[id];
  6153. if (!augs.equals(""))
  6154. {
  6155.  
  6156.  
  6157. String[] aug = augs.split("#");
  6158. int castleId = Integer.parseInt(aug[0]);
  6159. String[] locs = aug[1].split(":");
  6160. FastList<EventReward> locfl = new FastList();
  6161. for (String points : locs) {
  6162. String[] loc = points.split(",");
  6163. try {
  6164. locfl.add(new EventReward(Integer.parseInt(loc[0]), Integer.parseInt(loc[1]), Integer.parseInt(loc[2])));
  6165. } catch (NumberFormatException nfe) {
  6166. if (!loc.equals("")) {
  6167. System.out.println("custom.cfg: CastleSiegeRewards error: " + aug[0]);
  6168. }
  6169. }
  6170. }
  6171. CASTLE_SIEGE_REWARDS.put(Integer.valueOf(castleId), locfl);
  6172. } }
  6173. SIEGE_REWARD_CLAN = Boolean.parseBoolean(customSettings.getProperty("SiegeRewardClan", "False"));
  6174. propertySplit = customSettings.getProperty("CastleProtectRewards", "").split(";");
  6175. arrayOfString2 = propertySplit;Object localObject1 = arrayOfString2.length; for (id = 0; id < localObject1; id++) { augs = arrayOfString2[id];
  6176. if (!augs.equals(""))
  6177. {
  6178.  
  6179.  
  6180. String[] aug = augs.split("#");
  6181. int castleId = Integer.parseInt(aug[0]);
  6182. String[] locs = aug[1].split(":");
  6183. FastList<EventReward> locfl = new FastList();
  6184. for (String points : locs) {
  6185. String[] loc = points.split(",");
  6186. try {
  6187. locfl.add(new EventReward(Integer.parseInt(loc[0]), Integer.parseInt(loc[1]), Integer.parseInt(loc[2])));
  6188. } catch (NumberFormatException nfe) {
  6189. if (!loc.equals("")) {
  6190. System.out.println("custom.cfg: CastleProtectRewards error: " + aug[0]);
  6191. }
  6192. }
  6193. }
  6194. CASTLE_RPOTECT_REWARDS.put(Integer.valueOf(castleId), locfl);
  6195. }
  6196. }
  6197. CASTLE_SIEGE_SKILLS_DELETE = Boolean.parseBoolean(customSettings.getProperty("CastleSiegeSkillDelete", "False"));
  6198. String cssr = customSettings.getProperty("CastleSiegeSkillRewards", "Off");
  6199. if (!cssr.equalsIgnoreCase("Off")) {
  6200. propertySplit = cssr.split(";");
  6201. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String augs = localObject1[augs];
  6202. if (!augs.equals(""))
  6203. {
  6204.  
  6205.  
  6206. String[] aug = augs.split("#");
  6207. int castleId = Integer.parseInt(aug[0]);
  6208. String[] locs = aug[1].split(",");
  6209. try {
  6210. CASTLE_SIEGE_SKILLS.put(Integer.valueOf(castleId), new EventReward(Integer.parseInt(locs[0]), Integer.parseInt(locs[1]), 0));
  6211. } catch (NumberFormatException nfe) {
  6212. if (!locs.equals("")) {
  6213. System.out.println("custom.cfg: CastleSiegeSkillRewards error: " + aug[0]);
  6214. }
  6215. }
  6216. }
  6217. }
  6218. }
  6219.  
  6220. ALT_BUFF_TIMEMUL = Integer.parseInt(customSettings.getProperty("BuffTimeMul", "0"));
  6221. propertySplit = customSettings.getProperty("BuffTimeTable", "").split(";");
  6222. localObject1 = propertySplit;id = localObject1.length; for (String augs = 0; augs < id; augs++) { String augs = localObject1[augs];
  6223. if (!augs.equals(""))
  6224. {
  6225.  
  6226.  
  6227. String[] aug = augs.split("#");
  6228. int time = Integer.parseInt(aug[0]);
  6229. String[] buffs = aug[1].split(",");
  6230. for (String bufftime : buffs) {
  6231. try {
  6232. ALT_BUFF_TIME.put(Integer.valueOf(Integer.parseInt(bufftime)), Integer.valueOf(time));
  6233. } catch (NumberFormatException nfe) {
  6234. if (!bufftime.equals("")) {
  6235. System.out.println("custom.cfg: BuffTimeTable error: " + bufftime);
  6236. }
  6237. }
  6238. }
  6239. }
  6240. }
  6241. propertySplit = customSettings.getProperty("CustomMagicWeapons", "").split(",");
  6242. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6243. try {
  6244. ALT_MAGIC_WEAPONS.add(Integer.valueOf(itemid));
  6245. } catch (NumberFormatException nfe) {
  6246. if (!itemid.equals("")) {
  6247. System.out.println("custom.cfg: CustomMagicWeapons error: " + itemid);
  6248. }
  6249. }
  6250. }
  6251.  
  6252. TATOO_SKILLS = Boolean.parseBoolean(customSettings.getProperty("TattooSkills", "False"));
  6253. propertySplit = customSettings.getProperty("TattooSkillsList", "").split(";");
  6254. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String augs = localObject1[augs];
  6255. if (augs.equals("")) {
  6256. break;
  6257. }
  6258.  
  6259. String[] aug = augs.split(",");
  6260. try {
  6261. TATOO_SKILLS_LIST.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  6262. } catch (NumberFormatException nfe) {
  6263. if (!aug[0].equals("")) {
  6264. System.out.println("custom.cfg: TattooSkillsList error: " + aug[0]);
  6265. }
  6266. }
  6267. }
  6268.  
  6269. propertySplit = customSettings.getProperty("StartUpItems", "").split(";");
  6270. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String augs = localObject1[augs];
  6271. if (augs.equals("")) {
  6272. break;
  6273. }
  6274.  
  6275. String[] aug = augs.split(",");
  6276. try {
  6277. CUSTOM_STRT_ITEMS.put(Integer.valueOf(Integer.parseInt(aug[0])), Integer.valueOf(Integer.parseInt(aug[1])));
  6278. } catch (NumberFormatException nfe) {
  6279. if (!aug[0].equals("")) {
  6280. System.out.println("custom.cfg: StartUpItems error: " + aug[0]);
  6281. }
  6282. }
  6283. }
  6284.  
  6285. propertySplit = customSettings.getProperty("ForbiddenBowClasses", "").trim().split(",");
  6286. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6287. try {
  6288. FORBIDDEN_BOW_CLASSES.add(Integer.valueOf(itemid));
  6289. } catch (NumberFormatException nfe) {
  6290. if (!itemid.equals("")) {
  6291. System.out.println("custom.cfg: ForbiddenBowClasses error: " + itemid);
  6292. }
  6293. }
  6294. }
  6295. propertySplit = customSettings.getProperty("ForbiddenBowClassesOly", "").trim().split(",");
  6296. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6297. try {
  6298. FORBIDDEN_BOW_CLASSES_OLY.add(Integer.valueOf(itemid));
  6299. } catch (NumberFormatException nfe) {
  6300. if (!itemid.equals("")) {
  6301. System.out.println("custom.cfg: ForbiddenBowClassesOly error: " + itemid);
  6302. }
  6303. }
  6304. }
  6305. propertySplit = customSettings.getProperty("ForbiddenDualClasses", "").trim().split(",");
  6306. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6307. try {
  6308. FORBIDDEN_DUAL_CLASSES.add(Integer.valueOf(itemid));
  6309. } catch (NumberFormatException nfe) {
  6310. if (!itemid.equals("")) {
  6311. System.out.println("custom.cfg: ForbiddenDualClasses error: " + itemid);
  6312. }
  6313. }
  6314. }
  6315. propertySplit = customSettings.getProperty("ForbiddenFistClasses", "").trim().split(",");
  6316. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6317. try {
  6318. FORBIDDEN_FIST_CLASSES.add(Integer.valueOf(itemid));
  6319. } catch (NumberFormatException nfe) {
  6320. if (!itemid.equals("")) {
  6321. System.out.println("custom.cfg: ForbiddenFistClasses error: " + itemid);
  6322. }
  6323. }
  6324. }
  6325.  
  6326. propertySplit = customSettings.getProperty("HippyItems", "").trim().split(",");
  6327. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6328. try {
  6329. HIPPY_ITEMS.add(Integer.valueOf(itemid));
  6330. } catch (NumberFormatException nfe) {
  6331. if (!itemid.equals("")) {
  6332. System.out.println("custom.cfg: HippyItems error: " + itemid);
  6333. }
  6334. }
  6335. }
  6336.  
  6337. propertySplit = customSettings.getProperty("ForbiddenCursedSkills", "").trim().split(",");
  6338. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6339. try {
  6340. FORB_CURSED_SKILLS.add(Integer.valueOf(itemid));
  6341. } catch (NumberFormatException nfe) {
  6342. if (!itemid.equals("")) {
  6343. System.out.println("custom.cfg: ForbiddenCursedSkills error: " + itemid);
  6344. }
  6345. }
  6346. }
  6347.  
  6348. propertySplit = customSettings.getProperty("CustomAugments", "").trim().split(",");
  6349. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6350. try {
  6351. CUSTOM_AUG_SKILLS.add(Integer.valueOf(itemid));
  6352. } catch (NumberFormatException nfe) {
  6353. if (!itemid.equals("")) {
  6354. System.out.println("custom.cfg: CustomAugments error: " + itemid);
  6355. }
  6356. }
  6357. }
  6358.  
  6359. propertySplit = customSettings.getProperty("ProtectedSubBuffs", "").trim().split(",");
  6360. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6361. try {
  6362. STOP_SUB_BUFFS.add(Integer.valueOf(itemid));
  6363. } catch (NumberFormatException nfe) {
  6364. if (!itemid.equals("")) {
  6365. System.out.println("custom.cfg: ProtectedSubBuffs error: " + itemid);
  6366. }
  6367. }
  6368. }
  6369.  
  6370. propertySplit = customSettings.getProperty("ForbiddenOlySkills", "").trim().split(",");
  6371. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6372. try {
  6373. FORB_OLY_SKILLS.add(Integer.valueOf(itemid));
  6374. } catch (NumberFormatException nfe) {
  6375. if (!itemid.equals("")) {
  6376. System.out.println("custom.cfg: ForbiddenOlySkills error: " + itemid);
  6377. }
  6378. }
  6379. }
  6380. propertySplit = customSettings.getProperty("ForbiddenEventSkills", "").trim().split(",");
  6381. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6382. try {
  6383. FORB_EVENT_SKILLS.add(Integer.valueOf(itemid));
  6384. } catch (NumberFormatException nfe) {
  6385. if (!itemid.equals("")) {
  6386. System.out.println("custom.cfg: ForbiddenEventSkills error: " + itemid);
  6387. }
  6388. }
  6389. }
  6390.  
  6391. propertySplit = customSettings.getProperty("WhiteSkillsList", "").trim().split(",");
  6392. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6393. try {
  6394. WHITE_SKILLS.add(Integer.valueOf(itemid));
  6395. } catch (NumberFormatException nfe) {
  6396. if (!itemid.equals("")) {
  6397. System.out.println("custom.cfg: WhiteSkillsList error: " + itemid);
  6398. }
  6399. }
  6400. }
  6401.  
  6402. propertySplit = customSettings.getProperty("FixedReuseSkills", "").trim().split(",");
  6403. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6404. try {
  6405. ALT_FIXED_REUSES.add(Integer.valueOf(itemid));
  6406. } catch (NumberFormatException nfe) {
  6407. if (!itemid.equals("")) {
  6408. System.out.println("custom.cfg: FixedReuseSkills error: " + itemid);
  6409. }
  6410. }
  6411. }
  6412. propertySplit = customSettings.getProperty("FixedCastSkills", "").trim().split(",");
  6413. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6414. try {
  6415. ALT_FIXED_CASTS.add(Integer.valueOf(itemid));
  6416. } catch (NumberFormatException nfe) {
  6417. if (!itemid.equals("")) {
  6418. System.out.println("custom.cfg: FixedCastSkills error: " + itemid);
  6419. }
  6420. }
  6421. }
  6422.  
  6423. propertySplit = customSettings.getProperty("CancelProtectedBuffs", "").trim().split(",");
  6424. localObject1 = propertySplit;id = localObject1.length; for (augs = 0; augs < id; augs++) { String itemid = localObject1[augs];
  6425. try {
  6426. PROTECTED_BUFFS.add(Integer.valueOf(itemid));
  6427. } catch (NumberFormatException nfe) {
  6428. if (!itemid.equals("")) {
  6429. System.out.println("custom.cfg: CancelProtectedBuffs error: " + itemid);
  6430. }
  6431. }
  6432. }
  6433. propertySplit = null;
  6434.  
  6435. HERO_ITEMS_PENALTY = Boolean.parseBoolean(customSettings.getProperty("HeroItemsPenalty", "True"));
  6436.  
  6437. ACADEMY_CLASSIC = Boolean.parseBoolean(customSettings.getProperty("ClanAcademyClassic", "True"));
  6438. ACADEMY_BONUS_ON = Boolean.parseBoolean(customSettings.getProperty("RewardAcademyPoints", "True"));
  6439. ACADEMY_POINTS = Integer.parseInt(customSettings.getProperty("ClanAcademyPoints", "400"));
  6440.  
  6441. DISABLE_FORCES = Boolean.parseBoolean(customSettings.getProperty("DisableForces", "False"));
  6442.  
  6443. ALLOW_CURSED_QUESTS = Boolean.parseBoolean(customSettings.getProperty("AllowCursedQuestTalk", "True"));
  6444.  
  6445. MAX_TRADE_ENCHANT = Integer.parseInt(customSettings.getProperty("TradeEnchantLimit", "0"));
  6446.  
  6447. ALT_SIEGE_INTERVAL = Integer.parseInt(customSettings.getProperty("SiegeInterval", "14"));
  6448.  
  6449. SOULSHOT_ANIM = Boolean.parseBoolean(customSettings.getProperty("SoulshotAnimation", "True"));
  6450.  
  6451. MAX_AUGMENTS_BUFFS = Integer.parseInt(customSettings.getProperty("MaxAugmentBuffs", "1"));
  6452.  
  6453. STARTUP_TITLE = customSettings.getProperty("StartUpTitle", "off");
  6454.  
  6455. PICKUP_PENALTY = TimeUnit.SECONDS.toMillis(Integer.parseInt(customSettings.getProperty("PickUpPenalty", "15")));
  6456.  
  6457. SKILLS_CHANCE_MIN = Double.parseDouble(customSettings.getProperty("SkillsChanceMin", "5.0d"));
  6458. SKILLS_CHANCE_MAX = Double.parseDouble(customSettings.getProperty("SkillsChanceMax", "95.0d"));
  6459. SKILLS_CHANCE_MIN_OLY = Double.parseDouble(customSettings.getProperty("SkillsChanceOlyMin", "5.0d"));
  6460. SKILLS_CHANCE_MAX_OLY = Double.parseDouble(customSettings.getProperty("SkillsChanceOlyMax", "95.0d"));
  6461.  
  6462. DISABLE_BOSS_INTRO = Boolean.parseBoolean(customSettings.getProperty("DisableBossIntro", "False"));
  6463.  
  6464. DEATH_REFLECT = Boolean.parseBoolean(customSettings.getProperty("DeathReflect", "False"));
  6465.  
  6466. PROTECT_SAY = Boolean.parseBoolean(customSettings.getProperty("ChatFloodFilter", "False"));
  6467. PROTECT_SAY_COUNT = Integer.parseInt(customSettings.getProperty("ChatFloodFilterCount", "5"));
  6468. PROTECT_SAY_BAN = Integer.parseInt(customSettings.getProperty("ChatFloodFilterBan", "5")) * 60;
  6469. PROTECT_SAY_INTERVAL = TimeUnit.SECONDS.toMillis(Integer.parseInt(customSettings.getProperty("ChatFloodFilterInterval", "10")));
  6470.  
  6471. MIRAGE_CHANCE = Integer.parseInt(customSettings.getProperty("MirageChanse", "50"));
  6472.  
  6473. SUMMON_CP_PROTECT = Boolean.parseBoolean(customSettings.getProperty("ProtectSummonCpFlood", "False"));
  6474.  
  6475. ALLOW_NPC_CHAT = Boolean.parseBoolean(customSettings.getProperty("AllowNpcChat", "False"));
  6476. MNPC_CHAT_CHANCE = Integer.parseInt(customSettings.getProperty("NpcChatChanse", "200"));
  6477.  
  6478. MULTISSELL_PROTECT = Boolean.parseBoolean(customSettings.getProperty("MultisellProtect", "True"));
  6479.  
  6480. MULTISSELL_ERRORS = Boolean.parseBoolean(customSettings.getProperty("MultisellErrors", "True"));
  6481.  
  6482. CHEST_CHANCE = Integer.parseInt(customSettings.getProperty("ChestOpenChance", "80"));
  6483.  
  6484. MOB_DEBUFF_CHANCE = Integer.parseInt(customSettings.getProperty("MonsterDebuffChance", "60"));
  6485.  
  6486. EVERYBODE_HERO = Boolean.parseBoolean(customSettings.getProperty("EverybodyHero", "False"));
  6487.  
  6488. ALLOW_PC_NPC = Boolean.parseBoolean(customSettings.getProperty("AllowPcNpc", "False"));
  6489.  
  6490. ANNOUNCE_CASTLE_OWNER = Boolean.parseBoolean(customSettings.getProperty("AnnounceCastleOwner", "False"));
  6491.  
  6492. CHECK_SIEGE_TELE = Boolean.parseBoolean(customSettings.getProperty("CheckSiegeTele", "True"));
  6493.  
  6494. CAN_DROP_AUGMENTS = Boolean.parseBoolean(customSettings.getProperty("CanDropAugments", "False"));
  6495.  
  6496. propertySplit = customSettings.getProperty("CpRestoreValues", "50,200").split(",");
  6497. CP_RESTORE = new EventReward(Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), 0);
  6498.  
  6499. MIN_HIT_TIME = Integer.parseInt(customSettings.getProperty("MinHitTime", "210"));
  6500.  
  6501. CHAR_CREATE_ENCHANT = Integer.parseInt(customSettings.getProperty("CharCreateEnchant", "0"));
  6502.  
  6503. ARMORSETS_XML = Boolean.parseBoolean(customSettings.getProperty("ArmorSetsXML", "False"));
  6504.  
  6505. NPC_DEWALKED_ZONE = Boolean.parseBoolean(customSettings.getProperty("TeleDewalkedZone", "False"));
  6506.  
  6507. propertySplit = null;
  6508. } catch (Exception e) {
  6509. e.printStackTrace();
  6510. throw new Error("Failed to Load ./config/custom.cfg File.");
  6511. }
  6512. }
  6513.  
  6514. public static void loadPvpCfg() {
  6515. KARMA_LIST_NONDROPPABLE_PET_ITEMS.clear();
  6516. KARMA_LIST_NONDROPPABLE_ITEMS.clear();
  6517. PVPPK_EXP_SP.clear();
  6518. PVPPK_PVPITEMS.clear();
  6519. PVPPK_PKITEMS.clear();
  6520. PVPBONUS_ITEMS.clear();
  6521. PVPBONUS_TITLE.clear();
  6522. PVPBONUS_COLORS.clear();
  6523. PVPBONUS_COLORS_NAME.clear();
  6524. PVPBONUS_COLORS_TITLE.clear();
  6525.  
  6526. PVPBONUS_COLORS_NAME.add(Integer.valueOf(16777215));
  6527. PVPBONUS_COLORS_TITLE.add(Integer.valueOf(16777079));
  6528. try
  6529. {
  6530. Properties pvpSettings = new Properties();
  6531. InputStream is = new FileInputStream(new File("./config/pvp.cfg"));
  6532. pvpSettings.load(is);
  6533. is.close();
  6534.  
  6535.  
  6536.  
  6537.  
  6538. KARMA_MIN_KARMA = Integer.parseInt(pvpSettings.getProperty("MinKarma", "240"));
  6539. KARMA_MAX_KARMA = Integer.parseInt(pvpSettings.getProperty("MaxKarma", "10000"));
  6540. KARMA_XP_DIVIDER = Integer.parseInt(pvpSettings.getProperty("XPDivider", "260"));
  6541. KARMA_LOST_BASE = Integer.parseInt(pvpSettings.getProperty("BaseKarmaLost", "0"));
  6542.  
  6543. KARMA_DROP_GM = Boolean.parseBoolean(pvpSettings.getProperty("CanGMDropEquipment", "false"));
  6544. KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AwardPKKillPVPPoint", "true"));
  6545.  
  6546. KARMA_PK_LIMIT = Integer.parseInt(pvpSettings.getProperty("MinimumPKRequiredToDrop", "5"));
  6547. KARMA_PK_NPC_DROP = Boolean.parseBoolean(pvpSettings.getProperty("DropKilledByNpc", "True"));
  6548.  
  6549. KARMA_NONDROPPABLE_PET_ITEMS = pvpSettings.getProperty("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
  6550. KARMA_NONDROPPABLE_ITEMS = pvpSettings.getProperty("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621");
  6551.  
  6552. KARMA_LIST_NONDROPPABLE_PET_ITEMS = new FastList();
  6553. String[] arrayOfString1 = KARMA_NONDROPPABLE_PET_ITEMS.split(",");int i = arrayOfString1.length; for (String str1 = 0; str1 < i; str1++) { String id = arrayOfString1[str1];
  6554. KARMA_LIST_NONDROPPABLE_PET_ITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  6555. }
  6556.  
  6557. KARMA_LIST_NONDROPPABLE_ITEMS = new FastList();
  6558. arrayOfString1 = KARMA_NONDROPPABLE_ITEMS.split(",");i = arrayOfString1.length; for (str1 = 0; str1 < i; str1++) { id = arrayOfString1[str1];
  6559. KARMA_LIST_NONDROPPABLE_ITEMS.add(Integer.valueOf(Integer.parseInt(id)));
  6560. }
  6561.  
  6562. PVP_NORMAL_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsNormalTime", "15000"));
  6563. PVP_PVP_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsPvPTime", "30000"));
  6564.  
  6565.  
  6566.  
  6567. ALLOW_PVPPK_REWARD = Boolean.parseBoolean(pvpSettings.getProperty("AllowPvpPkReward", "False"));
  6568. PVPPK_INTERVAL = Integer.parseInt(pvpSettings.getProperty("PvpPkInterval", "30000"));
  6569. PVPPK_IPPENALTY = Boolean.parseBoolean(pvpSettings.getProperty("PvpPkIpPenalty", "False"));
  6570. PVPPK_HWIDPENALTY = Boolean.parseBoolean(pvpSettings.getProperty("PvpPkHwidPenalty", "False"));
  6571.  
  6572. TOWN_PVP_REWARD = Boolean.parseBoolean(pvpSettings.getProperty("TownPvpReward", "False"));
  6573.  
  6574. SHOW_KILLER_INFO = Boolean.parseBoolean(pvpSettings.getProperty("ShowKillerInfo", "False"));
  6575. SHOW_KILLER_INFO_ITEMS = Boolean.parseBoolean(pvpSettings.getProperty("ShowKillerInfoItems", "False"));
  6576.  
  6577. REWARD_PVP_ZONE = Boolean.parseBoolean(pvpSettings.getProperty("RewardPvpZone", "False"));
  6578. REWARD_PVP_ZONE_CLAN = Boolean.parseBoolean(pvpSettings.getProperty("RewardPvpZoneClan", "False"));
  6579. REWARD_PVP_ZONE_PARTY = Boolean.parseBoolean(pvpSettings.getProperty("RewardPvpZoneParty", "False"));
  6580. REWARD_PVP_ZONE_HWID = Boolean.parseBoolean(pvpSettings.getProperty("RewardPvpZoneHwid", "False"));
  6581. REWARD_PVP_ZONE_IP = Boolean.parseBoolean(pvpSettings.getProperty("RewardPvpZoneIp", "False"));
  6582. REWARD_PVP_ZONE_ANNOUNCE = Integer.parseInt(pvpSettings.getProperty("RewardPvpZoneAnnounce", "5"));
  6583.  
  6584. String[] ppp = pvpSettings.getProperty("PvpPkLevelPenalty", "0,0").split(",");
  6585. PVPPK_PENALTY = new PvpColor(Integer.parseInt(ppp[0]), Integer.parseInt(ppp[1]));
  6586.  
  6587. ppp = pvpSettings.getProperty("PvpExpSp", "0,0;0,0").split(";");
  6588. String[] arrayOfString2 = ppp;str1 = arrayOfString2.length; for (String id = 0; id < str1; id++) { String augs = arrayOfString2[id];
  6589. String[] aug = augs.split(",");
  6590. try {
  6591. PVPPK_EXP_SP.add(new PvpColor(Integer.parseInt(aug[0]), Integer.parseInt(aug[1])));
  6592. } catch (NumberFormatException nfe) {
  6593. if (!aug[0].equals("")) {
  6594. System.out.println("pvp.cfg: PvpExpSp error: " + aug[0]);
  6595. }
  6596. }
  6597. }
  6598.  
  6599. ppp = pvpSettings.getProperty("PvPRewards", "n,n,n;n,n,n").split(";");
  6600. arrayOfString2 = ppp;String str2 = arrayOfString2.length; for (id = 0; id < str2; id++) { String augs = arrayOfString2[id];
  6601. if (augs.equals("n,n,n")) {
  6602. break;
  6603. }
  6604.  
  6605. String[] aug = augs.split(",");
  6606. try {
  6607. PVPPK_PVPITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  6608. } catch (NumberFormatException nfe) {
  6609. if (!aug[0].equals("")) {
  6610. System.out.println("pvp.cfg: PvpExpSp error: " + aug[0]);
  6611. }
  6612. }
  6613. }
  6614. ppp = pvpSettings.getProperty("PkRewards", "n,n,n;n,n,n").split(";");
  6615. arrayOfString2 = ppp;String str3 = arrayOfString2.length; String augs; String[] aug; for (id = 0; id < str3; id++) { augs = arrayOfString2[id];
  6616. if (augs.equals("n,n,n")) {
  6617. break;
  6618. }
  6619.  
  6620. aug = augs.split(",");
  6621. try {
  6622. PVPPK_PKITEMS.add(new EventReward(Integer.parseInt(aug[0]), Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  6623. } catch (NumberFormatException nfe) {
  6624. if (!aug[0].equals("")) {
  6625. System.out.println("pvp.cfg: PvpExpSp error: " + aug[0]);
  6626. }
  6627. }
  6628. }
  6629.  
  6630.  
  6631. ALLOW_PVPBONUS_STEPS = Boolean.parseBoolean(pvpSettings.getProperty("AllowPvpBonusSteps", "False"));
  6632.  
  6633. String pvpBonusStepsColors = pvpSettings.getProperty("PvpBonusStepsRewards", "None");
  6634. if (!pvpBonusStepsColors.equals("None")) {
  6635. String[] propertySplit = pvpBonusStepsColors.split(";");
  6636. id = propertySplit;augs = id.length; for (aug = 0; aug < augs; aug++) { String augs = id[aug];
  6637. String[] aug = augs.split(",");
  6638. try {
  6639. PVPBONUS_ITEMS.put(Integer.valueOf(Integer.parseInt(aug[0])), new PvpColor(Integer.parseInt(aug[1]), Integer.parseInt(aug[2])));
  6640. } catch (NumberFormatException nfe) {
  6641. if (!aug[0].equals("")) {
  6642. System.out.println("pvp.cfg: PvpBonusStepsRewards error: " + aug[0]);
  6643. }
  6644. }
  6645. }
  6646. propertySplit = null;
  6647. }
  6648. pvpBonusStepsColors = pvpSettings.getProperty("PvpBonusStepsColors", "None");
  6649. if (!pvpBonusStepsColors.equals("None")) {
  6650. String[] propertySplit = pvpBonusStepsColors.split(";");
  6651. id = propertySplit;augs = id.length; for (aug = 0; aug < augs; aug++) { String augs = id[aug];
  6652. String[] aug = augs.split(",");
  6653. try {
  6654. String nick = new TextBuilder(aug[1]).reverse().toString();
  6655. String title = new TextBuilder(aug[2]).reverse().toString();
  6656.  
  6657. int nick_hex = 0;
  6658. int title_hex = 0;
  6659.  
  6660. if (!nick.equals("llun")) {
  6661. nick_hex = Integer.decode("0x" + nick).intValue();
  6662. }
  6663.  
  6664. if (!title.equals("llun")) {
  6665. title_hex = Integer.decode("0x" + title).intValue();
  6666. }
  6667.  
  6668. PVPBONUS_COLORS_NAME.add(Integer.valueOf(nick_hex));
  6669. PVPBONUS_COLORS_TITLE.add(Integer.valueOf(title_hex));
  6670. PVPBONUS_COLORS.put(Integer.valueOf(Integer.parseInt(aug[0])), new PvpColor(nick_hex, title_hex));
  6671. } catch (NumberFormatException nfe) {
  6672. if (!aug[0].equals("")) {
  6673. System.out.println("pvp.cfg: PvpBonusStepsColors error: " + aug[0]);
  6674. }
  6675. }
  6676. }
  6677. propertySplit = null;
  6678. }
  6679.  
  6680. PVP_TITLE_SKILL = Boolean.parseBoolean(pvpSettings.getProperty("PvpTitleSkill", "False"));
  6681. pvpBonusStepsColors = pvpSettings.getProperty("PvpBonusTitleSkills", "None");
  6682. if (!pvpBonusStepsColors.equals("None")) {
  6683. String[] propertySplit = pvpBonusStepsColors.split(";");
  6684. id = propertySplit;augs = id.length; for (aug = 0; aug < augs; aug++) { String augs = id[aug];
  6685. String[] aug = augs.split(",");
  6686. try
  6687. {
  6688. String[] minmax = aug[0].split("-");
  6689. int min = Integer.parseInt(minmax[0]);
  6690. int max = Integer.parseInt(minmax[1]);
  6691.  
  6692. PVPBONUS_TITLE.add(new PvpTitleBonus(aug[1], min, max, Integer.parseInt(aug[2]), Integer.parseInt(aug[3])));
  6693. } catch (NumberFormatException nfe) {
  6694. if (!aug[0].equals("")) {
  6695. System.out.println("pvp.cfg: PvpBonusStepsRewards error: " + aug[0]);
  6696. }
  6697. }
  6698. }
  6699. propertySplit = null;
  6700. }
  6701.  
  6702. pvpBonusStepsColors = null;
  6703. PVPPK_STEP = Integer.parseInt(pvpSettings.getProperty("PvpPkStep", "0"));
  6704. PVPPK_STEPBAN = TimeUnit.MINUTES.toMillis(Integer.parseInt(pvpSettings.getProperty("PvpPkStepBan", "10")));
  6705. PVPPK_REWARD_ZONE = Boolean.parseBoolean(pvpSettings.getProperty("PvpPkRewardZone", "False"));
  6706. }
  6707. catch (Exception e) {
  6708. e.printStackTrace();
  6709. throw new Error("Failed to Load ./config/pvp.cfg File.");
  6710. }
  6711. }
  6712.  
  6713. public static void loadAccessLvlCfg() {
  6714. try {
  6715. Properties gmSettings = new Properties();
  6716. InputStream is = new FileInputStream(new File("./config/GMAccess.cfg"));
  6717. gmSettings.load(is);
  6718. is.close();
  6719.  
  6720. GM_ACCESSLEVEL = Integer.parseInt(gmSettings.getProperty("GMAccessLevel", "100"));
  6721. GM_MIN = Integer.parseInt(gmSettings.getProperty("GMMinLevel", "100"));
  6722. GM_ALTG_MIN_LEVEL = Integer.parseInt(gmSettings.getProperty("GMCanAltG", "100"));
  6723. GM_ANNOUNCE = Integer.parseInt(gmSettings.getProperty("GMCanAnnounce", "100"));
  6724. GM_BAN = Integer.parseInt(gmSettings.getProperty("GMCanBan", "100"));
  6725. GM_BAN_CHAT = Integer.parseInt(gmSettings.getProperty("GMCanBanChat", "100"));
  6726. GM_CREATE_ITEM = Integer.parseInt(gmSettings.getProperty("GMCanShop", "100"));
  6727. GM_DELETE = Integer.parseInt(gmSettings.getProperty("GMCanDelete", "100"));
  6728. GM_KICK = Integer.parseInt(gmSettings.getProperty("GMCanKick", "100"));
  6729. GM_MENU = Integer.parseInt(gmSettings.getProperty("GMMenu", "100"));
  6730. GM_GODMODE = Integer.parseInt(gmSettings.getProperty("GMGodMode", "100"));
  6731. GM_CHAR_EDIT = Integer.parseInt(gmSettings.getProperty("GMCanEditChar", "100"));
  6732. GM_CHAR_EDIT_OTHER = Integer.parseInt(gmSettings.getProperty("GMCanEditCharOther", "100"));
  6733. GM_CHAR_VIEW = Integer.parseInt(gmSettings.getProperty("GMCanViewChar", "100"));
  6734. GM_NPC_EDIT = Integer.parseInt(gmSettings.getProperty("GMCanEditNPC", "100"));
  6735. GM_NPC_VIEW = Integer.parseInt(gmSettings.getProperty("GMCanViewNPC", "100"));
  6736. GM_TELEPORT = Integer.parseInt(gmSettings.getProperty("GMCanTeleport", "100"));
  6737. GM_TELEPORT_OTHER = Integer.parseInt(gmSettings.getProperty("GMCanTeleportOther", "100"));
  6738. GM_RESTART = Integer.parseInt(gmSettings.getProperty("GMCanRestart", "100"));
  6739. GM_MONSTERRACE = Integer.parseInt(gmSettings.getProperty("GMMonsterRace", "100"));
  6740. GM_RIDER = Integer.parseInt(gmSettings.getProperty("GMRider", "100"));
  6741. GM_ESCAPE = Integer.parseInt(gmSettings.getProperty("GMFastUnstuck", "100"));
  6742. GM_FIXED = Integer.parseInt(gmSettings.getProperty("GMResurectFixed", "100"));
  6743. GM_CREATE_NODES = Integer.parseInt(gmSettings.getProperty("GMCreateNodes", "100"));
  6744. GM_ENCHANT = Integer.parseInt(gmSettings.getProperty("GMEnchant", "100"));
  6745. GM_DOOR = Integer.parseInt(gmSettings.getProperty("GMDoor", "100"));
  6746. GM_RES = Integer.parseInt(gmSettings.getProperty("GMRes", "100"));
  6747. GM_PEACEATTACK = Integer.parseInt(gmSettings.getProperty("GMPeaceAttack", "100"));
  6748. GM_HEAL = Integer.parseInt(gmSettings.getProperty("GMHeal", "100"));
  6749. GM_UNBLOCK = Integer.parseInt(gmSettings.getProperty("GMUnblock", "100"));
  6750. GM_CACHE = Integer.parseInt(gmSettings.getProperty("GMCache", "100"));
  6751. GM_TALK_BLOCK = Integer.parseInt(gmSettings.getProperty("GMTalkBlock", "100"));
  6752. GM_TEST = Integer.parseInt(gmSettings.getProperty("GMTest", "100"));
  6753.  
  6754. String gmTrans = gmSettings.getProperty("GMDisableTransaction", "False");
  6755.  
  6756. if (!gmTrans.equalsIgnoreCase("false")) {
  6757. String[] params = gmTrans.split(",");
  6758. GM_DISABLE_TRANSACTION = true;
  6759. GM_TRANSACTION_MIN = Integer.parseInt(params[0]);
  6760. GM_TRANSACTION_MAX = Integer.parseInt(params[1]);
  6761. } else {
  6762. GM_DISABLE_TRANSACTION = false;
  6763. }
  6764. GM_CAN_GIVE_DAMAGE = Integer.parseInt(gmSettings.getProperty("GMCanGiveDamage", "90"));
  6765. GM_DONT_TAKE_AGGRO = Integer.parseInt(gmSettings.getProperty("GMDontTakeAggro", "90"));
  6766. GM_DONT_TAKE_EXPSP = Integer.parseInt(gmSettings.getProperty("GMDontGiveExpSp", "90"));
  6767. }
  6768. catch (Exception e) {
  6769. e.printStackTrace();
  6770. throw new Error("Failed to Load ./config/GMAccess.cfg File.");
  6771. }
  6772. }
  6773.  
  6774. public static void loadCommandsCfg() {
  6775. try {
  6776. Properties cmd = new Properties();
  6777. InputStream is = new FileInputStream(new File("./config/commands.cfg"));
  6778. cmd.load(is);
  6779. is.close();
  6780.  
  6781.  
  6782. CMD_MENU = Boolean.parseBoolean(cmd.getProperty("AllowMenu", "False"));
  6783. VS_NOEXP = Boolean.parseBoolean(cmd.getProperty("NoExp", "False"));
  6784. VS_NOREQ = Boolean.parseBoolean(cmd.getProperty("NoRequests", "False"));
  6785. VS_VREF = Boolean.parseBoolean(cmd.getProperty("VoteRef", "False"));
  6786. VS_AUTOLOOT = Boolean.parseBoolean(cmd.getProperty("Autoloot", "False"));
  6787. VS_TRADERSIGNORE = Boolean.parseBoolean(cmd.getProperty("TradersIgnore", "False"));
  6788. VS_PATHFIND = Boolean.parseBoolean(cmd.getProperty("GeoPathFinding", "False"));
  6789. VS_CHATIGNORE = Boolean.parseBoolean(cmd.getProperty("ChatIgnore", "False"));
  6790. VS_ONLINE = Boolean.parseBoolean(cmd.getProperty("ShowOnline", "False"));
  6791. VS_AUTORESTAT = Boolean.parseBoolean(cmd.getProperty("ShowRestartTime", "False"));
  6792. VS_SKILL_CHANCES = Boolean.parseBoolean(cmd.getProperty("SkillChances", "False"));
  6793. VS_ANIM_SHOTS = Boolean.parseBoolean(cmd.getProperty("ShotsAnimation", "False"));
  6794.  
  6795. VS_AUTOLOOT_VAL = Integer.parseInt(cmd.getProperty("AutolootDefault", "0"));
  6796. VS_PATHFIND_VAL = Integer.parseInt(cmd.getProperty("GeoPathFindingDefault", "0"));
  6797. VS_SKILL_CHANCES_VAL = Integer.parseInt(cmd.getProperty("SkillChancesDefault", "0"));
  6798.  
  6799.  
  6800. VS_HWID = Boolean.parseBoolean(cmd.getProperty("HWID", "False"));
  6801. VS_PWD = Boolean.parseBoolean(cmd.getProperty("Password", "False"));
  6802. VS_EMAIL = Boolean.parseBoolean(cmd.getProperty("Email", "False"));
  6803.  
  6804. ALT_ALLOW_OFFLINE_TRADE = Boolean.parseBoolean(cmd.getProperty("AllowOfflineTrade", "False"));
  6805. ALT_RESTORE_OFFLINE_TRADE = Boolean.parseBoolean(cmd.getProperty("RestoreOfflineTraders", "False"));
  6806. ALT_OFFLINE_TRADE_LIMIT = TimeUnit.HOURS.toMillis(Integer.parseInt(cmd.getProperty("OfflineLimit", "96")));
  6807. ALT_OFFLINE_TRADE_ONLINE = Boolean.parseBoolean(cmd.getProperty("AltOfflineTraderStatus", "False"));
  6808.  
  6809. OFFTRADE_COIN = Integer.parseInt(cmd.getProperty("OfflineCoin", "0"));
  6810. OFFTRADE_PRICE = Integer.parseInt(cmd.getProperty("OfflinePrice", "0"));
  6811. OFFTRADE_COIN_NAME = cmd.getProperty("OfflineCoinName", "0");
  6812.  
  6813. CMD_ADENA_COL = Boolean.parseBoolean(cmd.getProperty("CmdAdenaCol", "False"));
  6814. String[] pSplit = cmd.getProperty("AdenaToCol", "4037,1,2000000000").split(",");
  6815. CMD_AC_ADENA = new EventReward(Integer.parseInt(pSplit[0]), Integer.parseInt(pSplit[1]), Integer.parseInt(pSplit[2]));
  6816. pSplit = cmd.getProperty("ColToAdena", "57,1700000000,1").split(",");
  6817. CMD_AC_COL = new EventReward(Integer.parseInt(pSplit[0]), Integer.parseInt(pSplit[1]), Integer.parseInt(pSplit[2]));
  6818. pSplit = null;
  6819. CMD_AC_ADENA_LIMIT = Integer.parseInt(cmd.getProperty("AdenaToColLimit", "0"));
  6820. CMD_AC_COL_LIMIT = Integer.parseInt(cmd.getProperty("ColToAdenaLimit", "0"));
  6821.  
  6822. CMD_EVENTS = Boolean.parseBoolean(cmd.getProperty("CmdEvents", "False"));
  6823.  
  6824. MAX_BAN_CHAT = Integer.parseInt(cmd.getProperty("MaxBanChat", "15"));
  6825.  
  6826. VS_CKEY = Boolean.parseBoolean(cmd.getProperty("CharKey", "False"));
  6827. VS_CKEY_CHARLEVEL = Boolean.parseBoolean(cmd.getProperty("CharKey2ndClass", "False"));
  6828.  
  6829. ENABLE_LOC_COMMAND = Boolean.parseBoolean(cmd.getProperty("EnableLoc", "True"));
  6830.  
  6831. ACP_ENGINE = Boolean.parseBoolean(cmd.getProperty("AcpEngine", "False"));
  6832. ACP_MP = Integer.parseInt(cmd.getProperty("AcpMp", "70"));
  6833. ACP_HP = Integer.parseInt(cmd.getProperty("AcpHp", "70"));
  6834. ACP_CP = Integer.parseInt(cmd.getProperty("AcpCp", "70"));
  6835. ACP_DELAY = Integer.parseInt(cmd.getProperty("AcpDelay", "100"));
  6836. } catch (Exception e) {
  6837. e.printStackTrace();
  6838. throw new Error("Failed to Load ./config/commands.cfg File.");
  6839. }
  6840. }
  6841.  
  6842. public static void loadGeoDataCfg() {
  6843. try {
  6844. Properties geo = new Properties();
  6845. InputStream is = new FileInputStream(new File("./config/geodata.cfg"));
  6846. geo.load(is);
  6847. is.close();
  6848.  
  6849. GEODATA = Integer.parseInt(geo.getProperty("GeoData", "0"));
  6850. GEO_TYPE = Integer.parseInt(geo.getProperty("GeoDataType", "1"));
  6851. GEO_L2J_PATH = geo.getProperty("PathL2J", "./data/geodata/");
  6852. GEO_OFF_PATH = geo.getProperty("PathOFF", "./data/geodataoff/");
  6853.  
  6854. GEO_SHOW_LOAD = Boolean.parseBoolean(geo.getProperty("GeoDataLog", "True"));
  6855.  
  6856. FORCE_GEODATA = Boolean.parseBoolean(geo.getProperty("ForceGeoData", "True"));
  6857. ACCEPT_GEOEDITOR_CONN = Boolean.parseBoolean(geo.getProperty("AcceptGeoeditorConn", "False"));
  6858.  
  6859.  
  6860. WORLD_X_MIN = Integer.parseInt(geo.getProperty("WorldXMin", "10"));
  6861. WORLD_X_MAX = Integer.parseInt(geo.getProperty("WorldXMax", "26"));
  6862. WORLD_Y_MIN = Integer.parseInt(geo.getProperty("WorldYMin", "10"));
  6863. WORLD_Y_MAX = Integer.parseInt(geo.getProperty("WorldYMax", "26"));
  6864. GEODATA = Integer.parseInt(geo.getProperty("GeoData", "0"));
  6865. GEODATA_CELLFINDING = Boolean.parseBoolean(geo.getProperty("CellPathFinding", "False"));
  6866. PATHFIND_BUFFERS = geo.getProperty("PathFindBuffers", "100x6;128x6;192x6;256x4;320x4;384x4;500x2");
  6867. LOW_WEIGHT = Float.parseFloat(geo.getProperty("LowWeight", "0.5"));
  6868. MEDIUM_WEIGHT = Float.parseFloat(geo.getProperty("MediumWeight", "2"));
  6869. HIGH_WEIGHT = Float.parseFloat(geo.getProperty("HighWeight", "3"));
  6870. ADVANCED_DIAGONAL_STRATEGY = Boolean.parseBoolean(geo.getProperty("AdvancedDiagonalStrategy", "True"));
  6871. DIAGONAL_WEIGHT = Float.parseFloat(geo.getProperty("DiagonalWeight", "0.707"));
  6872. MAX_POSTFILTER_PASSES = Integer.parseInt(geo.getProperty("MaxPostfilterPasses", "3"));
  6873. DEBUG_PATH = Boolean.parseBoolean(geo.getProperty("DebugPath", "False"));
  6874. FORCE_GEODATA = Boolean.parseBoolean(geo.getProperty("ForceGeodata", "True"));
  6875. COORD_SYNCHRONIZE = Integer.parseInt(geo.getProperty("CoordSynchronize", "-1"));
  6876. } catch (Exception e) {
  6877. e.printStackTrace();
  6878. throw new Error("Failed to Load ./config/geodata.cfg File.");
  6879. }
  6880. }
  6881.  
  6882. public static void loadFakeCfg() {
  6883. try {
  6884. Properties fake = new Properties();
  6885. InputStream is = new FileInputStream(new File("./config/fakeplayers.cfg"));
  6886. fake.load(is);
  6887. is.close();
  6888.  
  6889. ALLOW_FAKE_PLAYERS_PLUS = Boolean.parseBoolean(fake.getProperty("AllowFake", "False"));
  6890.  
  6891. FAKE_PLAYERS_PLUS_COUNT_FIRST = Integer.parseInt(fake.getProperty("FirstCount", "50"));
  6892. FAKE_PLAYERS_PLUS_DELAY_FIRST = TimeUnit.MINUTES.toMillis(Integer.parseInt(fake.getProperty("FirstDelay", "5")));
  6893. FAKE_PLAYERS_PLUS_DESPAWN_FIRST = TimeUnit.MINUTES.toMillis(Integer.parseInt(fake.getProperty("FirstDespawn", "60")));
  6894. FAKE_PLAYERS_PLUS_DELAY_SPAWN_FIRST = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(fake.getProperty("FirstDelaySpawn", "1")));
  6895. FAKE_PLAYERS_PLUS_DELAY_DESPAWN_FIRST = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(fake.getProperty("FirstDelayDespawn", "20")));
  6896.  
  6897. FAKE_PLAYERS_PLUS_COUNT_NEXT = Integer.parseInt(fake.getProperty("NextCount", "50"));
  6898. FAKE_PLAYERS_PLUS_DELAY_NEXT = TimeUnit.MINUTES.toMillis(Integer.parseInt(fake.getProperty("NextDelay", "15")));
  6899. FAKE_PLAYERS_PLUS_DESPAWN_NEXT = TimeUnit.MINUTES.toMillis(Integer.parseInt(fake.getProperty("NextDespawn", "90")));
  6900. FAKE_PLAYERS_PLUS_DELAY_SPAWN_NEXT = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(fake.getProperty("NextDelaySpawn", "20")));
  6901. FAKE_PLAYERS_PLUS_DELAY_DESPAWN_NEXT = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(fake.getProperty("NextDelayDespawn", "30")));
  6902.  
  6903. String[] ppp = fake.getProperty("FakeEnchant", "0,14").split(",");
  6904. FAKE_PLAYERS_ENCHANT = new PvpColor(Integer.parseInt(ppp[0]), Integer.parseInt(ppp[1]));
  6905.  
  6906. ppp = fake.getProperty("FakeNameColors", "FFFFFF,FFFFFF").split(",");
  6907. for (String ncolor : ppp) {
  6908. String nick = new TextBuilder(ncolor).reverse().toString();
  6909. FAKE_PLAYERS_NAME_CLOLORS.add(Integer.decode("0x" + nick));
  6910. }
  6911. ppp = fake.getProperty("FakeTitleColors", "FFFF77,FFFF77").split(",");
  6912. for (String tcolor : ppp) {
  6913. String title = new TextBuilder(tcolor).reverse().toString();
  6914. FAKE_PLAYERS_TITLE_CLOLORS.add(Integer.decode("0x" + title));
  6915. }
  6916.  
  6917. FAKE_MAX_PATK_BOW = Integer.parseInt(fake.getProperty("MaxPatkBow", "50"));
  6918. FAKE_MAX_MDEF_BOW = Integer.parseInt(fake.getProperty("MaxMdefBow", "50"));
  6919. FAKE_MAX_PSPD_BOW = Integer.parseInt(fake.getProperty("MaxPspdBow", "50"));
  6920. FAKE_MAX_PDEF_BOW = Integer.parseInt(fake.getProperty("MaxPdefBow", "50"));
  6921. FAKE_MAX_MATK_BOW = Integer.parseInt(fake.getProperty("MaxMatkBow", "50"));
  6922. FAKE_MAX_MSPD_BOW = Integer.parseInt(fake.getProperty("MaxMspdBow", "50"));
  6923. FAKE_MAX_HP_BOW = Integer.parseInt(fake.getProperty("MaxHpBow", "50"));
  6924.  
  6925. FAKE_MAX_PATK_MAG = Integer.parseInt(fake.getProperty("MaxPatkMage", "50"));
  6926. FAKE_MAX_MDEF_MAG = Integer.parseInt(fake.getProperty("MaxMdefMage", "50"));
  6927. FAKE_MAX_PSPD_MAG = Integer.parseInt(fake.getProperty("MaxPspdMage", "50"));
  6928. FAKE_MAX_PDEF_MAG = Integer.parseInt(fake.getProperty("MaxPdefkMage", "50"));
  6929. FAKE_MAX_MATK_MAG = Integer.parseInt(fake.getProperty("MaxMatkMage", "50"));
  6930. FAKE_MAX_MSPD_MAG = Integer.parseInt(fake.getProperty("MaxMspdMage", "50"));
  6931. FAKE_MAX_HP_MAG = Integer.parseInt(fake.getProperty("MaxHpMage", "50"));
  6932.  
  6933. FAKE_MAX_PATK_HEAL = Integer.parseInt(fake.getProperty("MaxPatkHeal", "50"));
  6934. FAKE_MAX_MDEF_HEAL = Integer.parseInt(fake.getProperty("MaxMdefHeal", "50"));
  6935. FAKE_MAX_PSPD_HEAL = Integer.parseInt(fake.getProperty("MaxPspdHeal", "50"));
  6936. FAKE_MAX_PDEF_HEAL = Integer.parseInt(fake.getProperty("MaxPdefHeal", "50"));
  6937. FAKE_MAX_MATK_HEAL = Integer.parseInt(fake.getProperty("MaxMatkHeal", "50"));
  6938. FAKE_MAX_MSPD_HEAL = Integer.parseInt(fake.getProperty("MaxMspdHeal", "50"));
  6939. FAKE_MAX_HP_HEAL = Integer.parseInt(fake.getProperty("MaxHpHeal", "50"));
  6940.  
  6941. ppp = null;
  6942. } catch (Exception e) {
  6943. e.printStackTrace();
  6944. throw new Error("Failed to Load ./config/fakeplayers.cfg File.");
  6945. }
  6946. }
  6947.  
  6948. public static void loadGameGuardCfg() {
  6949. try {
  6950. Properties guard = new Properties();
  6951. InputStream is = new FileInputStream(new File("./config/protection.cfg"));
  6952. guard.load(is);
  6953. is.close();
  6954.  
  6955. GAMEGUARD_ENABLED = Boolean.parseBoolean(guard.getProperty("GameGuardEnable", "False"));
  6956. GAMEGUARD_INTERVAL = (int)TimeUnit.SECONDS.toMillis(Integer.parseInt(guard.getProperty("GameGuardInterval", "60")));
  6957.  
  6958. GAMEGUARD_LOG = Boolean.parseBoolean(guard.getProperty("GameGuardLog", "False"));
  6959. GAMEGUARD_PUNISH = Integer.parseInt(guard.getProperty("GameGuardPunish", "1"));
  6960.  
  6961. GAMEGUARD_KEY = Integer.parseInt("FFAAFF", 16) << 8;
  6962. }
  6963. catch (Exception e) {
  6964. e.printStackTrace();
  6965. throw new Error("Failed to Load ./config/fakeplayers.cfg File.");
  6966. }
  6967. }
  6968.  
  6969. public static void loadHexidCfg() {
  6970. InputStream is = null;
  6971. try {
  6972. Properties Settings = new Properties();
  6973. is = new FileInputStream("./config/hexid.txt");
  6974. Settings.load(is);
  6975. SERVER_ID = Integer.parseInt(Settings.getProperty("ServerID"));
  6976. HEX_ID = new java.math.BigInteger(Settings.getProperty("HexID"), 16).toByteArray(); return;
  6977. } catch (Exception e) {
  6978. _log.warning("Could not load HexID file (./config/hexid.txt). Hopefully login will give us one.");
  6979. } finally {
  6980. try {
  6981. if (is != null) {
  6982. is.close();
  6983. }
  6984. }
  6985. catch (Exception ignored) {}
  6986. }
  6987. }
  6988.  
  6989. public static void load(boolean reload)
  6990. {
  6991. if (Server.serverMode == 1) {
  6992. loadServerCfg();
  6993. loadOptionsCfg();
  6994. loadTelnetCfg();
  6995. loadIdFactoryCfg();
  6996. loadOtherCfg();
  6997. loadEnchantCfg();
  6998. loadServicesCfg();
  6999. loadEventsCfg();
  7000. loadRatesCfg();
  7001. loadAltSettingCfg();
  7002. loadSevenSignsCfg();
  7003. loadClanHallCfg();
  7004. loadNpcCfg();
  7005. loadCustomCfg();
  7006. loadPvpCfg();
  7007. loadAccessLvlCfg();
  7008. loadCommandsCfg();
  7009. loadGeoDataCfg();
  7010. loadFakeCfg();
  7011. loadGameGuardCfg();
  7012.  
  7013. loadFiltersConfig();
  7014.  
  7015. if (!reload) {
  7016. loadCatsGuardCfg();
  7017. }
  7018. loadHexidCfg();
  7019. }
  7020. else {
  7021. _log.severe("Could not Load Config: server mode was not set");
  7022. }
  7023.  
  7024. if (reload) {
  7025. _log.info(net.sf.l2j.util.TimeLogger.getLogTime() + "Configs: reloaded.");
  7026. } else {
  7027. _log.info(net.sf.l2j.util.TimeLogger.getLogTime() + "Configs: loaded.");
  7028. }
  7029. }
  7030.  
  7031. private static void loadChatFilter() {
  7032. CHAT_FILTER_STRINGS.clear();
  7033. LineNumberReader lnr = null;
  7034. java.io.BufferedReader br = null;
  7035. java.io.FileReader fr = null;
  7036. try {
  7037. File Data = new File("./data/chat_filter.txt");
  7038. if (!Data.exists()) {
  7039. System.out.println("[ERROR] Config, loadChatFilter() '/data/chat_filter.txt' not founded. ");
  7040. return;
  7041. }
  7042.  
  7043. fr = new java.io.FileReader(Data);
  7044. br = new java.io.BufferedReader(fr);
  7045. lnr = new LineNumberReader(br);
  7046. String line;
  7047. while ((line = lnr.readLine()) != null)
  7048. if ((line.trim().length() != 0) && (!line.startsWith("#")))
  7049. {
  7050.  
  7051.  
  7052. CHAT_FILTER_STRINGS.add(line); }
  7053. return;
  7054. } catch (Exception e) {
  7055. System.out.println("[ERROR] Config, loadChatFilter() error: " + e);
  7056. } finally {
  7057. try {
  7058. if (fr != null) {
  7059. fr.close();
  7060. }
  7061. if (br != null) {
  7062. br.close();
  7063. }
  7064. if (lnr != null) {
  7065. lnr.close();
  7066. }
  7067. }
  7068. catch (Exception e1) {}
  7069. }
  7070. }
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079. public static boolean setParameterValue(String pName, String pValue)
  7080. {
  7081. return false;
  7082. }
  7083.  
  7084.  
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.  
  7091. public static boolean allowL2Walker(L2PcInstance player)
  7092. {
  7093. return (ALLOW_L2WALKER_CLIENT == L2WalkerAllowed.True) || ((ALLOW_L2WALKER_CLIENT == L2WalkerAllowed.GM) && (player != null) && (player.isGM()));
  7094. }
  7095.  
  7096.  
  7097.  
  7098.  
  7099.  
  7100.  
  7101. private Config() {}
  7102.  
  7103.  
  7104.  
  7105.  
  7106.  
  7107. public static void saveHexid(int serverId, String string)
  7108. {
  7109. saveHexid(serverId, string, "./config/hexid.txt");
  7110. }
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117. public static void saveHexid(int serverId, String hexId, String fileName)
  7118. {
  7119. java.io.OutputStream out = null;
  7120. try {
  7121. Properties hexSetting = new Properties();
  7122. File file = new File(fileName);
  7123. file.createNewFile();
  7124.  
  7125. out = new java.io.FileOutputStream(file);
  7126. hexSetting.setProperty("ServerID", String.valueOf(serverId));
  7127. hexSetting.setProperty("HexID", hexId);
  7128. hexSetting.store(out, "the hexID to auth into login"); return;
  7129. } catch (Exception e) {
  7130. _log.warning("Failed to save hex id to " + fileName + " File.");
  7131. e.printStackTrace();
  7132. } finally {
  7133. try {
  7134. out.close();
  7135. }
  7136. catch (Exception e) {}
  7137. }
  7138. }
  7139. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement