unit M2Share;

interface
uses
  Windows, Messages, Classes, SysUtils, StrUtils, StdCtrls, Graphics, Forms, RunSock,
  Envir, ItmUnit, Magic, NoticeM, Guild, Event, Castle, FrnEngn, UsrEngn, Mudutil,
  Grobal2, ObjBase, ObjRobot, ObjNpc, SyncObjs, IniFiles, SDK, PlugIn, WinSock,
  Common, StorageEngn, SellEngn, DataEngn, DuelEngn, GroupItems, AI3, PathFind, ObjPlayRobot, ItemEvent;

resourcestring
  g_sTitleName = '';
  g_sSellOffGoldInfo = '当前没有你的拍卖款';
  g_sSellOffItemInfo = '你没有在这拍卖物品';
//{$INCLUDE License\CopyRight.txt}
const
  sSoftVersion_HERO = 'pvGLrw?b';
  sSoftVersion_VERENT = 'iyWEwW?b';

  TESTMODE = 1; //是否是调试模式
  nVersionType = 0;
  SOCKETTYPE = 0;

  sSTATUS_FAIL = '+FAIL/';
  sSTATUS_GOOD = '+GOOD/';

  MAXLEVEL = High(Word);

  MAXCHANGELEVEL = 1000;

  LOG_GAMEGOLD = 111;
  LOG_GAMEPOINT = 112;

  ET_STONEMINE = 11;
  sENCYPTSCRIPTFLAG = ';+++++++----------';
  tM2Server = 3;
  PN_GETRGB = 'GETRGB';
  PN_GAMEDATALOG = 'GAMEDATALOG';
  sSTRING_GOLDNAME = 'Gold';

  SKILL_FIREBALL = 1;
  SKILL_HEALLING = 2;
  SKILL_FENCING = 3;
  SKILL_SPIRITSWORD = 4;
  SKILL_GREATFIREBALL = 5;
  SKILL_POISONING = 6;
  SKILL_SLAYING = 7;
  SKILL_REPULSION = 8;
  SKILL_HELLFIRE = 9;
  SKILL_LIGHTNING = 10;
  SKILL_THUNDERBOLT = 11;
  SKILL_THRUSTING = 12;
  SKILL_SOULFIREBALL = 13;
  SKILL_SOULSHIELD = 14;
  SKILL_DEJIWONHO {15} = 15;
  SKILL_HOLYSHIELD {16} = 16;
  SKILL_SKELLETON {17} = 17;
  SKILL_CLOAK {18} = 18;
  SKILL_BIGCLOAK {19} = 19;
  SKILL_TAMMING = 20;
  SKILL_SPACEMOVE {21} = 21;
  SKILL_EARTHFIRE {22} = 22;
  SKILL_FIREBOOM {23} = 23;
  SKILL_LIGHTFLOWER {24} = 24;

  SKILL_BANWOL = 25;
  SKILL_FIRESWORD = 26;
  SKILL_MOOTEBO = 27;
  SKILL_SHOWHP {28} = 28;
  SKILL_BIGHEALLING {29} = 29;
  SKILL_SINSU {30} = 30;
  SKILL_SHIELD {31} = 31;
  SKILL_KILLUNDEAD {32} = 32;
  SKILL_SNOWWIND {33} = 33;    // Ice Storm
  SKILL_CROSSHALFMOON = 34;
  SKILL_FLAMEDISRUPTOR = 35;
  SKILL_ULTIMATEENHANCER = 36;
  SKILL_ENERGYREPULSOR = 37;
  SKILL_TWINDRAKEBLADE = 38;
  SKILL_FROSTCRUNCH = 39;
  SKILL_PURIFICATION = 40;
  SKILL_SUMMONHOLYDEVA = 41;
  SKILL_LIONROAR = 43;

   SKILL_GROUPAMYOUNSUL = 42;
  SKILL_43 = 59;
  SKILL_GROUPDEDING {39 地钉} = 44;
  SKILL_WINDTEBO {35} = 45;
  SKILL_46 = 46;
  SKILL_47 = 47;
  SKILL_GROUPLIGHTENING {37 群体雷电术} = 48;
  SKILL_49 = 49;
  SKILL_MABE {36} = 50;
  SKILL_51 = 51;
  SKILL_52 = 52;
  SKILL_53 = 53;

  SKILL_54 = 54;
  SKILL_55 = 55;
  SKILL_56 = 56;
  SKILL_57 = 57;

  SKILL_58 = 58;

  SKILL_60 = 60;
  SKILL_61 = 61;

  SKILL_62 = 62;
  SKILL_63 = 63;
  SKILL_64 = 64;
  SKILL_65 = 65;


  SKILL_66 = 66;
  SKILL_67 = 67;
  SKILL_68 = 68;
  SKILL_69 = 69;

  SKILL_70 = 70;
  SKILL_71 = 71;
  SKILL_72 = 72;
  SKILL_73 = 73;
  SKILL_74 = 74;
  SKILL_75 = 75;
  SKILL_76 = 76;
  SKILL_77 = 77;
  SKILL_78 = 78;
  SKILL_79 = 79;
  SKILL_80 = 80;
  SKILL_100 = 100;
  SKILL_101 = 101;
  SKILL_102 = 102;
  SKILL_103 = 103;
  SKILL_104 = 104;
  SKILL_105 = 105;
  SKILL_106 = 106;
  SKILL_107 = 107;
  SKILL_108 = 108;
  SKILL_109 = 109;

  SKILL_110 = 110;
  SKILL_111 = 111;
  SKILL_112 = 112;
  SKILL_113 = 113;
  SKILL_114 = 114;
  SKILL_115 = 115;
  SKILL_116 = 116;
  SKILL_117 = 117;
  SKILL_118 = 118;
  SKILL_119 = 119;
  SKILL_120 = 120;
  SKILL_121 = 121;

  SKILL_198 = 198;
  SKILL_199 = 199;
  SKILL_200 = 200;


  SLAVEMAXLEVEL = 9;
  DEBUG = 0; //调试模式
  CHECKNEWMSG = 0; //是否显示未处理的客户端消息

  NOEXCEPTION = 0;
  TRYEXCEPTION = 1;
  CATEXCEPTION = TRYEXCEPTION;

  DEMOCLIENT = 0; //是否演示客户端

  VERDEMO = 0;
  VERFREE = 1;
  VERSTD = 2;
  VEROEM = 3;
  VERPRO = 4;
  VERENT = 5;
  SoftVersion = VERPRO; //程序版本类型

  BDE = 0;
  ADO = 1;

  DBTYPE = ADO;

  USELOCALCODE = 0;
  USEREMOTECODE = 1;

  USECODE = USELOCALCODE;
  RequestVersion = 5;

  LF = 0;
  LD = 1;
  ZQ = 2;
  DUDU = 3;
  ZYL = 4;
  WL = 5;
  TEST = 53;

  VEROWNER = LF;

  OEM = 0;
  OEM775 = 1;
  OEMVER = OEM;

  ENDYEAR = 2005;
  ENDMONTH = 4;
  ENDDAY = 8;

  OLDMONSTERMODE = 0;
  NEWMONSTERMODE = 1;
  PROCESSMONSTMODE = NEWMONSTERMODE; //处理怪物模式

  THREADENGINE = 0; //DB数据库SOCKET连接使用线程
  TIMERENGINE = 1; //DB数据库SOCKET连接使用控件
  DBSOCKETMODE = THREADENGINE;
  IDSOCKETMODE = TIMERENGINE;
  USERENGINEMODE = TIMERENGINE;

  CHECKENDYEAR = ENDYEAR;
  CHECKENDMONTH = ENDMONTH;
  CHECKENDDAY = ENDDAY;

  //MAXMAGIC = 30; //可学技能数
  //最高可升级等级

  MAXUPLEVEL = High(Word) {65535};


  MAXHUMPOWER = High(Word) {65535};

  BODYLUCKUNIT = 5.0E3;

  HAM_ALL = 0;
  HAM_PEACE = 1;
  HAM_DEAR = 2;
  HAM_MASTER = 3;
  HAM_GROUP = 4;
  HAM_GUILD = 5;
  HAM_PKATTACK = 6;

  DEFHIT = 5;
  DEFSPEED = 15;
  WARR = 0;
  WIZARD = 1;
  TAOS = 2;

  //SIZEOFTHUMAN = $1B16; //6934
  SIZEOFTHUMAN = $2144; //8516

  MONSTER_SANDMOB = 3;
  MONSTER_ROCKMAN = 4;
  MONSTER_RON = 9;
  MONSTER_MINORNUMA = 18;
  ANIMAL_CHICKEN = 20;
  ANIMAL_DEER = 21;
  MONSTER_OMA = 23;
  MONSTER_OMAKNIGHT = 25;
  MONSTER_OMAWARRIOR = 27;
  MONSTER_SPITSPIDER = 30;
  MONSTER_STICK = 39;
  MONSTER_DUALAXE = 42;
  MONSTER_THONEDARK = 74;
  MONSTER_LIGHTZOMBI = 78;
  MONSTER_WHITESKELETON = 94;
  MONSTER_BEEQUEEN = 124;
  MONSTER_BEE = 125;
  MONSTER_MAGUNGSA = 143;
  MONSTER_SCULTURE1 = 145;
  MONSTER_SCULTURE2 = 148;
  MONSTER_SCULTUREKING = 152;
  MONSTER_ELFMONSTER = 161;
  MONSTER_ELFWARRIOR = 162;

  SUPREGUARD = 11;
  CHICKEN = 51;
  DEER = 52;
  WOLF = 53;
  TRAINER = 55;

  sMAN = 'MAN';
  sSUNRAISE = 'SUNRAISE';
  sDAY = 'DAY';
  sSUNSET = 'SUNSET';
  sNIGHT = 'NIGHT';
  sWARRIOR = 'WARRIOR';
  sWIZARD = 'WIZARD';
  sTAOS = 'TAOIST';
  sSUN = 'SUN';
  sMON = 'MON';
  sTUE = 'TUE';
  sWED = 'WED';
  sTHU = 'THU';
  sFRI = 'FRI';
  sSAT = 'SAT';

  //脚本常量
  sCHECK = 'CHECK';
  nCHECK = 1;
  sRANDOM = 'RANDOM';
  nRANDOM = 2;
  sGENDER = 'GENDER';
  nGENDER = 3;
  sDAYTIME = 'DAYTIME';
  nDAYTIME = 4;
  sCHECKOPEN = 'CHECKOPEN';
  nCHECKOPEN = 5;
  sCHECKUNIT = 'CHECKUNIT';
  nCHECKUNIT = 6;
  sCHECKLEVEL = 'CHECKLEVEL';
  nCHECKLEVEL = 7;
  sCHECKJOB = 'CHECKJOB';
  nCHECKJOB = 8;
  sCHECKBBCOUNT = 'CHECKBBCOUNT';
  nCHECKBBCOUNT = 9;

  sCHECKITEM = 'CHECKITEM';
  nCHECKITEM = 20;
  sCHECKITEMW = 'CHECKITEMW';
  nCHECKITEMW = 21;
  sCHECKGOLD = 'CHECKGOLD';
  nCHECKGOLD = 22;
  sISTAKEITEM = 'ISTAKEITEM';
  nISTAKEITEM = 23;
  sCHECKDURA = 'CHECKDURA';
  nCHECKDURA = 24;
  sCHECKDURAEVA = 'CHECKDURAEVA';
  nCHECKDURAEVA = 25;
  sDAYOFWEEK = 'DAYOFWEEK';
  nDAYOFWEEK = 26;
  sHOUR = 'HOUR';
  nHOUR = 27;
  sMIN = 'MIN';
  nMIN = 28;
  sCHECKPKPOINT = 'CHECKPKPOINT';
  nCHECKPKPOINT = 29;
  sCHECKLUCKYPOINT = 'CHECKLUCKYPOINT';
  nCHECKLUCKYPOINT = 30;
  sCHECKMONMAP = 'CHECKMONMAP';
  nCHECKMONMAP = 31;
  sCHECKMONAREA = 'CHECKMONAREA';
  nCHECKMONAREA = 32;
  sCHECKHUM = 'CHECKHUM';
  nCHECKHUM = 33;
  sCHECKBAGGAGE = 'CHECKBAGGAGE';
  nCHECKBAGGAGE = 34;

  sEQUAL = 'EQUAL';
  nEQUAL = 35;
  sLARGE = 'LARGE';
  nLARGE = 36;
  sSMALL = 'SMALL';
  nSMALL = 37;
  sSC_CHECKMAGIC = 'CHECKMAGIC';
  nSC_CHECKMAGIC = 38;
  sSC_CHKMAGICLEVEL = 'CHKMAGICLEVEL';
  nSC_CHKMAGICLEVEL = 39;
  sSC_CHECKMONRECALL = 'CHECKMONRECALL';
  nSC_CHECKMONRECALL = 40;
  sSC_CHECKHORSE = 'CHECKHORSE';
  nSC_CHECKHORSE = 41;
  sSC_CHECKRIDING = 'CHECKRIDING';
  nSC_CHECKRIDING = 42;
  sSC_STARTDAILYQUEST = 'STARTDAILYQUEST';
  nSC_STARTDAILYQUEST = 45;
  sSC_CHECKDAILYQUEST = 'CHECKDAILYQUEST';
  nSC_CHECKDAILYQUEST = 46;
  sSC_RANDOMEX = 'RANDOMEX';
  nSC_RANDOMEX = 47;
  sCHECKNAMELIST = 'CHECKNAMELIST';
  nCHECKNAMELIST = 48;
  sSC_CHECKWEAPONLEVEL = 'CHECKWEAPONLEVEL';
  nSC_CHECKWEAPONLEVEL = 49;
  sSC_CHECKWEAPONATOM = 'CHECKWEAPONATOM';
  nSC_CHECKWEAPONATOM = 50;
  sSC_CHECKREFINEWEAPON = 'CHECKREFINEWEAPON';
  nSC_CHECKREFINEWEAPON = 51;
  sSC_CHECKWEAPONMCTYPE = 'CHECKWEAPONMCTYPE';
  nSC_CHECKWEAPONMCTYPE = 52;
  sSC_CHECKREFINEITEM = 'CHECKREFINEITEM';
  nSC_CHECKREFINEITEM = 53;
  sSC_HASWEAPONATOM = 'HASWEAPONATOM';
  nSC_HASWEAPONATOM = 54;

  sSC_ISGUILDMASTER = 'ISGUILDMASTER';
  nSC_ISGUILDMASTER = 55;
  sSC_CANPROPOSECASTLEWAR = 'CANPROPOSECASTLEWAR';
  nSC_CANPROPOSECASTLEWAR = 56;
  sSC_CANHAVESHOOTER = 'CANHAVESHOOTER';
  nSC_CANHAVESHOOTER = 57;
  sSC_CHECKFAME = 'CHECKFAME';
  nSC_CHECKFAME = 58;
  sSC_ISONCASTLEWAR = 'ISONCASTLEWAR';
  nSC_ISONCASTLEWAR = 59;
  sSC_ISONREADYCASTLEWAR = 'ISONREADYCASTLEWAR';
  nSC_ISONREADYCASTLEWAR = 60;
  sSC_ISCASTLEGUILD = 'ISCASTLEGUILD';
  nSC_ISCASTLEGUILD = 61;
  sSC_ISATTACKGUILD = 'ISATTACKGUILD'; //是否为攻城方
  nSC_ISATTACKGUILD = 63;
  sSC_ISDEFENSEGUILD = 'ISDEFENSEGUILD'; //是否为守城方
  nSC_ISDEFENSEGUILD = 65;
  sSC_CHECKSHOOTER = 'CHECKSHOOTER';
  nSC_CHECKSHOOTER = 66;
  sSC_CHECKSAVEDSHOOTER = 'CHECKSAVEDSHOOTER';
  nSC_CHECKSAVEDSHOOTER = 67;
  sSC_HASGUILD = 'HAVEGUILD'; //是否加入行会
  nSC_HASGUILD = 68;
  sSC_CHECKCASTLEDOOR = 'CHECKCASTLEDOOR'; //检查城门
  nSC_CHECKCASTLEDOOR = 69;
  sSC_CHECKCASTLEDOOROPEN = 'CHECKCASTLEDOOROPEN'; //城门是否打开
  nSC_CHECKCASTLEDOOROPEN = 70;
  sSC_CHECKPOS = 'CHECKPOS';
  nSC_CHECKPOS = 71;
  sSC_CANCHARGESHOOTER = 'CANCHARGESHOOTER';
  nSC_CANCHARGESHOOTER = 72;
  sSC_ISATTACKALLYGUILD = 'ISATTACKALLYGUILD'; //是否为攻城方联盟行会
  nSC_ISATTACKALLYGUILD = 73;
  sSC_ISDEFENSEALLYGUILD = 'ISDEFENSEALLYGUILD'; //是否为守城方联盟行会
  nSC_ISDEFENSEALLYGUILD = 74;
  sSC_TESTTEAM = 'TESTTEAM';
  nSC_TESTTEAM = 75;
  sSC_ISSYSOP = 'ISSYSOP';
  nSC_ISSYSOP = 76;
  sSC_ISADMIN = 'ISADMIN';
  nSC_ISADMIN = 77;
  sSC_CHECKBONUS = 'CHECKBONUS';
  nSC_CHECKBONUS = 78;
  sSC_CHECKMARRIAGE = 'CHECKMARRIAGE';
  nSC_CHECKMARRIAGE = 79;
  sSC_CHECKMARRIAGERING = 'CHECKMARRIAGERING';
  nSC_CHECKMARRIAGERING = 80;

  sSC_CHECKGMETERM = 'CHECKGMETERM';
  nSC_CHECKGMETERM = 100;
  sSC_CHECKOPENGME = 'CHECKOPENGME';
  nSC_CHECKOPENGME = 101;
  sSC_CHECKENTERGMEMAP = 'CHECKENTERGMEMAP';
  nSC_CHECKENTERGMEMAP = 102;
  sSC_CHECKSERVER = 'CHECKSERVER';
  nSC_CHECKSERVER = 103;
  sSC_ELARGE = 'ELARGE';
  nSC_ELARGE = 104;
  sSC_ESMALL = 'ESMALL';
  nSC_ESMALL = 105;
  sSC_CHECKGROUPCOUNT = 'CHECKGROUPCOUNT';
  nSC_CHECKGROUPCOUNT = 106;
  sSC_CHECKACCESSORY = 'CHECKACCESSORY';
  nSC_CHECKACCESSORY = 107;
  sSC_ONERROR = 'ONERROR';
  nSC_ONERROR = 108;
  sSC_CHECKARMOR = 'CHECKARMOR';
  nSC_CHECKARMOR = 109;

  sCHECKACCOUNTLIST = 'CHECKACCOUNTLIST';
  nCHECKACCOUNTLIST = 135;
  sCHECKIPLIST = 'CHECKIPLIST';
  nCHECKIPLIST = 136;
  sCHECKCREDITPOINT = 'CHECKCREDITPOINT';
  nCHECKCREDITPOINT = 137;
  sSC_CHECKPOSEDIR = 'CHECKPOSEDIR';
  nSC_CHECKPOSEDIR = 138;
  sSC_CHECKPOSELEVEL = 'CHECKPOSELEVEL';
  nSC_CHECKPOSELEVEL = 139;
  sSC_CHECKPOSEGENDER = 'CHECKPOSEGENDER';
  nSC_CHECKPOSEGENDER = 140;
  sSC_CHECKLEVELEX = 'CHECKLEVELEX';
  nSC_CHECKLEVELEX = 141;
  sSC_CHECKBONUSPOINT = 'CHECKBONUSPOINT';
  nSC_CHECKBONUSPOINT = 142;
  sSC_CHECKMARRY = 'CHECKMARRY';
  nSC_CHECKMARRY = 143;
  sSC_CHECKPOSEMARRY = 'CHECKPOSEMARRY';
  nSC_CHECKPOSEMARRY = 144;
  sSC_CHECKMARRYCOUNT = 'CHECKMARRYCOUNT';
  nSC_CHECKMARRYCOUNT = 145;
  sSC_CHECKMASTER = 'CHECKMASTER';
  nSC_CHECKMASTER = 146;
  sSC_HAVEMASTER = 'HAVEMASTER';
  nSC_HAVEMASTER = 147;
  sSC_CHECKPOSEMASTER = 'CHECKPOSEMASTER';
  nSC_CHECKPOSEMASTER = 148;
  sSC_POSEHAVEMASTER = 'POSEHAVEMASTER';
  nSC_POSEHAVEMASTER = 149;
  sSC_CHECKISMASTER = 'CHECKPOSEISMASTER';
  nSC_CHECKISMASTER = 150;
  sSC_CHECKPOSEISMASTER = 'CHECKISMASTER';
  nSC_CHECKPOSEISMASTER = 151;
  sSC_CHECKNAMEIPLIST = 'CHECKNAMEIPLIST';
  nSC_CHECKNAMEIPLIST = 152;
  sSC_CHECKACCOUNTIPLIST = 'CHECKACCOUNTIPLIST';
  nSC_CHECKACCOUNTIPLIST = 153;
  sSC_CHECKSLAVECOUNT = 'CHECKSLAVECOUNT';
  nSC_CHECKSLAVECOUNT = 154;
  sSC_CHECKCASTLEMASTER = 'ISCASTLEMASTER';
  nSC_CHECKCASTLEMASTER = 155;
  sSC_ISNEWHUMAN = 'ISNEWHUMAN';
  nSC_ISNEWHUMAN = 156;
  sSC_CHECKMEMBERTYPE = 'CHECKMEMBERTYPE';
  nSC_CHECKMEMBERTYPE = 157;
  sSC_CHECKMEMBERLEVEL = 'CHECKMEMBERLEVEL';
  nSC_CHECKMEMBERLEVEL = 158;
  sSC_CHECKGAMEGOLD = 'CHECKGAMEGOLD';
  nSC_CHECKGAMEGOLD = 159;
  sSC_CHECKGAMEPOINT = 'CHECKGAMEPOINT';
  nSC_CHECKGAMEPOINT = 160;

  sSC_CHECKNAMELISTPOSITION = 'CHECKNAMELISTPOSITION';
  nSC_CHECKNAMELISTPOSITION = 161;
  sSC_CHECKGUILDLIST = 'CHECKGUILDLIST';
  nSC_CHECKGUILDLIST = 162;
  sSC_CHECKRENEWLEVEL = 'CHECKRENEWLEVEL';
  nSC_CHECKRENEWLEVEL = 163;

  sSC_CHECKSLAVELEVEL = 'CHECKSLAVELEVEL';
  nSC_CHECKSLAVELEVEL = 164;
  sSC_CHECKSLAVENAME = 'CHECKSLAVENAME';
  nSC_CHECKSLAVENAME = 165;

  sSC_CHECKCREDITPOINT = 'CHECKCREDITPOINT';
  nSC_CHECKCREDITPOINT = 166;

  sSC_CHECKOFGUILD = 'CHECKOFGUILD';
  nSC_CHECKOFGUILD = 167;
  sSC_CHECKPAYMENT = 'CHECKPAYMENT';
  nSC_CHECKPAYMENT = 168;
  sSC_CHECKUSEITEM = 'CHECKUSEITEM';
  nSC_CHECKUSEITEM = 169;
  sSC_CHECKBAGSIZE = 'CHECKBAGSIZE';
  nSC_CHECKBAGSIZE = 170;
  sSC_CHECKLISTCOUNT = 'CHECKLISTCOUNT';
  nSC_CHECKLISTCOUNT = 171;
  sSC_CHECKDC = 'CHECKDC';
  nSC_CHECKDC = 172;
  sSC_CHECKMC = 'CHECKMC';
  nSC_CHECKMC = 173;
  sSC_CHECKSC = 'CHECKSC';
  nSC_CHECKSC = 174;
  sSC_CHECKHP = 'CHECKHP';
  nSC_CHECKHP = 175;
  sSC_CHECKMP = 'CHECKMP';
  nSC_CHECKMP = 176;

  sSC_CHECKITEMTYPE = 'CHECKITEMTYPE';
  nSC_CHECKITEMTYPE = 180;
  sSC_CHECKEXP = 'CHECKEXP';
  nSC_CHECKEXP = 181;
  sSC_CHECKCASTLEGOLD = 'CHECKCASTLEGOLD';
  nSC_CHECKCASTLEGOLD = 182;

  sSC_PASSWORDERRORCOUNT = 'PASSWORDERRORCOUNT';
  nSC_PASSWORDERRORCOUNT = 183;
  sSC_ISLOCKPASSWORD = 'ISLOCKPASSWORD';
  nSC_ISLOCKPASSWORD = 184;
  sSC_ISLOCKSTORAGE = 'ISLOCKSTORAGE';
  nSC_ISLOCKSTORAGE = 185;

  sSC_CHECKBUILDPOINT = 'CHECKGUILDBUILDPOINT';
  nSC_CHECKBUILDPOINT = 186;
  sSC_CHECKAURAEPOINT = 'CHECKGUILDAURAEPOINT';
  nSC_CHECKAURAEPOINT = 187;
  sSC_CHECKSTABILITYPOINT = 'CHECKGUILDSTABILITYPOINT';
  nSC_CHECKSTABILITYPOINT = 188;
  sSC_CHECKFLOURISHPOINT = 'CHECKGUILDFLOURISHPOINT';
  nSC_CHECKFLOURISHPOINT = 189;

  sSC_CHECKCONTRIBUTION = 'CHECKCONTRIBUTION'; //贡献度
  nSC_CHECKCONTRIBUTION = 190;
  sSC_CHECKRANGEMONCOUNT = 'CHECKRANGEMONCOUNT'; //检查一个区域中有多少怪
  nSC_CHECKRANGEMONCOUNT = 191;

  sSC_CHECKITEMADDVALUE = 'CHECKITEMADDVALUE';
  nSC_CHECKITEMADDVALUE = 192;
  sSC_CHECKINMAPRANGE = 'CHECKINMAPRANGE';
  nSC_CHECKINMAPRANGE = 193;

  sSC_CASTLECHANGEDAY = 'CASTLECHANGEDAY';
  nSC_CASTLECHANGEDAY = 194;
  sSC_CASTLEWARDAY = 'CASTLEWARAY';
  nSC_CASTLEWARDAY = 195;
  sSC_ONLINELONGMIN = 'ONLINELONGMIN';
  nSC_ONLINELONGMIN = 196;
  sSC_CHECKGUILDCHIEFITEMCOUNT = 'CHECKGUILDCHIEFITEMCOUNT';
  nSC_CHECKGUILDCHIEFITEMCOUNT = 197;

  sSC_CHECKNAMEDATELIST = 'CHECKNAMEDATELIST';
  nSC_CHECKNAMEDATELIST = 198;
  sSC_CHECKMAPHUMANCOUNT = 'CHECKMAPHUMANCOUNT';
  nSC_CHECKMAPHUMANCOUNT = 199;

  sSC_CHECKMAPMONCOUNT = 'CHECKMAPMONCOUNT';
  nSC_CHECKMAPMONCOUNT = 200;
  sSC_CHECKVAR = 'CHECKVAR';
  nSC_CHECKVAR = 201;
  sSC_CHECKSERVERNAME = 'CHECKSERVERNAME';
  nSC_CHECKSERVERNAME = 202;

  sCHECKMAPNAME = 'CHECKMAPNAME';
  nCHECKMAPNAME = 203;

  sINSAFEZONE = 'INSAFEZONE';
  nINSAFEZONE = 204;

  sCHECKSKILL = 'CHECKSKILL';
  nCHECKSKILL = 205;

  nSC_CHECKUSERDATE = 206;
  sSC_CHECKUSERDATE = 'CHECKUSERDATE';

  sSC_CHECKCONTAINSTEXT = 'CHECKCONTAINSTEXT';
  nSC_CHECKCONTAINSTEXT = 207;

  sSC_COMPARETEXT = 'COMPARETEXT';
  nSC_COMPARETEXT = 208;

  sSC_CHECKTEXTLIST = 'CHECKTEXTLIST';
  nSC_CHECKTEXTLIST = 209;

  sSC_ISGROUPMASTER = 'ISGROUPMASTER';
  nSC_ISGROUPMASTER = 210;

  sSC_CHECKCONTAINSTEXTLIST = 'CHECKCONTAINSTEXTLIST';
  nSC_CHECKCONTAINSTEXTLIST = 211;

  sSC_CHECKONLINE = 'CHECKONLINE';
  nSC_CHECKONLINE = 212;

  sSC_CHECKTEXTLENGTH = 'CHECKTEXTLENGTH';
  nSC_CHECKTEXTLENGTH = 213;

  sSC_ISDUPMODE = 'ISDUPMODE';
  nSC_ISDUPMODE = 214;

  sSC_ISOFFLINEMODE = 'ISOFFLINEMODE';
  nSC_ISOFFLINEMODE = 215;

  sSC_CHECKSTATIONTIME = 'CHECKSTATIONTIME';
  nSC_CHECKSTATIONTIME = 216;

  sSC_CHECKSIGNMAP = 'CHECKSIGNMAP';
  nSC_CHECKSIGNMAP = 217;

  sSC_HAVEHERO = 'HAVEHERO';
  nSC_HAVEHERO = 218;

  {
  sSC_CHECKHEROONLINE = 'CHECKHEROONLINE';
  nSC_CHECKHEROONLINE = 219;

  sSC_CHECKHEROLEVEL = 'CHECKHEROLEVEL';
  nSC_CHECKHEROLEVEL = 220;

  sSC_CHECKHEROJOB = 'CHECKHEROJOB';
  nSC_CHECKHEROJOB = 221;
  }

  sSC_CHECKGUILDMEMBERMAXLIMIT = 'CHECKGUILDMEMBERMAXLIMIT';
  nSC_CHECKGUILDMEMBERMAXLIMIT = 222;

  sSC_CHECKGUILDNAMEDATELIST = 'CHECKGUILDNAMEDATELIST';
  nSC_CHECKGUILDNAMEDATELIST = 223;

  sSC_CHECKRANGEROUPCOUNT = 'CHECKRANGEROUPCOUNT';
  nSC_CHECKRANGEROUPCOUNT = 224;

  nSC_CHECKONLINEPLAYCOUNT = 225;
  sSC_CHECKONLINEPLAYCOUNT = 'CHECKONLINEPLAYCOUNT';



  nSC_CHECKITEMLIMIT = 226;
  sSC_CHECKITEMLIMIT = 'CHECKITEMLIMIT';

  nSC_CHECKITEMLIMITCOUNT = 227;
  sSC_CHECKITEMLIMITCOUNT = 'CHECKITEMLIMITCOUNT';

  nSC_CHECKMEMORYITEM = 228;
  sSC_CHECKMEMORYITEM = 'CHECKMEMORYITEM';

  nSC_CHECKUPGRADEITEMS = 229;
  sSC_CHECKUPGRADEITEMS = 'CHECKUPGRADEITEMS';

  nSC_CHECKIPUTTEM = 230;
  sSC_CHECKIPUTTEM = 'CHECKIPUTTEM';

  nSC_CHECKDEATH = 231;
  sSC_CHECKDEATH = 'CHECKDEATH';


  nSC_ISUNDERWAR = 232;
  sSC_ISUNDERWAR = 'ISUNDERWAR';

  nSC_CHECKPKPOINTEX = 233;
  sSC_CHECKPKPOINTEX = 'CHECKPKPOINTEX';

  nSC_CHECKUSEITEMBIND = 234;
  sSC_CHECKUSEITEMBIND = 'CHECKUSEITEMBIND';

  nSC_CHECKITEMBIND = 235;
  sSC_CHECKITEMBIND = 'CHECKITEMBIND';


  nSC_CHECKITEMNEWADDVALUE = 236;
  sSC_CHECKITEMNEWADDVALUE = 'CHECKITEMNEWADDVALUE';

  nSC_ISSPACELOCK = 237;
  sSC_ISSPACELOCK = 'ISSPACELOCK';


  nSC_CHECKRANGEMAPMAGICEVENTCOUNT = 238;
  sSC_CHECKRANGEMAPMAGICEVENTCOUNT = 'CHECKRANGEMAPMAGICEVENTCOUNT';


  sSC_CHECKITEMNEWADDVALUECOUNT = 'CHECKITEMNEWADDVALUECOUNT';
  nSC_CHECKITEMNEWADDVALUECOUNT = 239;

  sSC_GETDUELMAP = 'GETDUELMAP';
  nSC_GETDUELMAP = 240;

  sSC_CHECKMAPDUELING = 'CHECKMAPDUELING';
  nSC_CHECKMAPDUELING = 241;

  sSC_CHECKHUMDUELING = 'CHECKHUMDUELING';
  nSC_CHECKHUMDUELING = 242;


  sSC_CHECKCANUSEITEM = 'CHECKCANUSEITEM';
  nSC_CHECKCANUSEITEM = 243;

  sSC_CHECKINCURRRECT = 'CHECKINCURRRECT';
  nSC_CHECKINCURRRECT = 244;

  sSC_CHECKGUILDMEMBER = 'CHECKGUILDMEMBER';
  nSC_CHECKGUILDMEMBER = 245;

  sSC_INDEXOF = 'INDEXOF';
  nSC_INDEXOF = 246;

  sSC_CHECKMASKED = 'CHECKMASKED';
  nSC_CHECKMASKED = 247;


  sSC_CHECKUSEITEMSTARSLEVEL = 'CHECKUSEITEMSTARSLEVEL';
  nSC_CHECKUSEITEMSTARSLEVEL = 248;

  sSC_CHECKBAGITEMSTARSLEVEL = 'CHECKBAGITEMSTARSLEVEL';
  nSC_CHECKBAGITEMSTARSLEVEL = 249;

  sSC_CHECKHEROGROUP = 'CHECKHEROGROUP';
  nSC_CHECKHEROGROUP = 250;

  sSC_CHECKPUTITEMTYPE = 'CHECKPUTITEMTYPE';
  nSC_CHECKPUTITEMTYPE = 251;

  sSC_CHECKSLAVERANGE = 'CHECKSLAVERANGE';
  nSC_CHECKSLAVERANGE = 252;


  sSC_ISAI = 'ISAI';
  nSC_ISAI = 253;

  sSC_CHECKBAGITEMINLIST = 'CHECKBAGITEMINLIST';
  nSC_CHECKBAGITEMINLIST = 254;


  nSC_INCASTLEWARAREA = 255;
  sSC_INCASTLEWARAREA = 'INCASTLEWARAREA';


  sSC_ACTMISSION = 'ACTMISSION';
  nSC_ACTMISSION = 1000;






















  //Action
  sSET = 'SET';
  nSET = 1;
  sTAKE = 'TAKE';
  nTAKE = 2;
  sSC_GIVE = 'GIVE';
  nSC_GIVE = 3;
  sTAKEW = 'TAKEW';
  nTAKEW = 4;
  sCLOSE = 'CLOSE';
  nCLOSE = 5;
  sRESET = 'RESET';
  nRESET = 6;
  sSETOPEN = 'SETOPEN';
  nSETOPEN = 7;
  sSETUNIT = 'SETUNIT';
  nSETUNIT = 8;
  sRESETUNIT = 'RESETUNIT';
  nRESETUNIT = 9;
  sBREAK = 'BREAK';
  nBREAK = 10;
  sTIMERECALL = 'TIMERECALL';
  nTIMERECALL = 11;
  sSC_PARAM1 = 'PARAM1';
  nSC_PARAM1 = 12;
  sSC_PARAM2 = 'PARAM2';
  nSC_PARAM2 = 13;
  sSC_PARAM3 = 'PARAM3';
  nSC_PARAM3 = 14;
  sSC_PARAM4 = 'PARAM4';
  nSC_PARAM4 = 15;
  sSC_EXEACTION = 'EXEACTION';
  nSC_EXEACTION = 16;

  sMAPMOVE = 'MAPMOVE';
  nMAPMOVE = 19;
  sMAP = 'MAP';
  nMAP = 20;
  sTAKECHECKITEM = 'TAKECHECKITEM';
  nTAKECHECKITEM = 21;
  sMONGEN = 'MONGEN';
  nMONGEN = 22;
  sSC_MONGENP = 'MONGENP';
  nSC_MONGENP = 23;
  sMONCLEAR = 'MONCLEAR';
  nMONCLEAR = 24;
  sMOV = 'MOV';
  nMOV = 25;
  sINC = 'INC';
  nINC = 26;
  sDEC = 'DEC';
  nDEC = 27;
  sSUM = 'SUM';
  nSUM = 28;
  sSC_DIV = 'DIV';
  sSC_MUL = 'MUL';
  sSC_PERCENT = 'PERCENT';

  sBREAKTIMERECALL = 'BREAKTIMERECALL';
  nBREAKTIMERECALL = 29;
  sSENDMSG = 'SENDMSG';
  nSENDMSG = 30;
  sCHANGEMODE = 'CHANGEMODE';
  nCHANGEMODE = 31;
  sPKPOINT = 'PKPOINT';
  nPKPOINT = 32;
  sCHANGEXP = 'CHANGEXP';
  nCHANGEXP = 33;
  sSC_RECALLMOB = 'RECALLMOB';
  nSC_RECALLMOB = 34;
  sKICK = 'KICK';
  nKICK = 35;
  sMOVR = 'MOVR';
  nMOVR = 50;
  sEXCHANGEMAP = 'EXCHANGEMAP';
  nEXCHANGEMAP = 51;
  sRECALLMAP = 'RECALLMAP';
  nRECALLMAP = 52;
  sADDBATCH = 'ADDBATCH';
  nADDBATCH = 53;
  sBATCHDELAY = 'BATCHDELAY';
  nBATCHDELAY = 54;
  sBATCHMOVE = 'BATCHMOVE';
  nBATCHMOVE = 55;
  sPLAYDICE = 'PLAYDICE';
  nPLAYDICE = 56;
  sSC_PASTEMAP = 'PASTEMAP';
  sSC_LOADGEN = 'LOADGEN';

  sADDNAMELIST = 'ADDNAMELIST';
  nADDNAMELIST = 57;

  sDELNAMELIST = 'DELNAMELIST';
  nDELNAMELIST = 58;

  sADDGUILDLIST = 'ADDGUILDLIST';
  nADDGUILDLIST = 59;

  sDELGUILDLIST = 'DELGUILDLIST';
  nDELGUILDLIST = 60;

  sADDACCOUNTLIST = 'ADDACCOUNTLIST';
  nADDACCOUNTLIST = 61;
  sDELACCOUNTLIST = 'DELACCOUNTLIST';
  nDELACCOUNTLIST = 62;
  sADDIPLIST = 'ADDIPLIST';
  nADDIPLIST = 63;
  sDELIPLIST = 'DELIPLIST';
  nDELIPLIST = 64;

  sGOQUEST = 'GOQUEST';
  nGOQUEST = 100;
  sENDQUEST = 'ENDQUEST';
  nENDQUEST = 101;
  sGOTO = 'GOTO';
  nGOTO = 102;
  sSC_HAIRCOLOR = 'HAIRCOLOR';
  nSC_HAIRCOLOR = 104;
  sSC_WEARCOLOR = 'WEARCOLOR';
  nSC_WEARCOLOR = 105;
  sSC_HAIRSTYLE = 'HAIRSTYLE';
  nSC_HAIRSTYLE = 106;
  sSC_MONRECALL = 'MONRECALL';
  nSC_MONRECALL = 107;
  sSC_HORSECALL = 'HORSECALL';
  nSC_HORSECALL = 108;
  sSC_HAIRRNDCOL = 'HAIRRNDCOL';
  nSC_HAIRRNDCOL = 109;
  sSC_RANDSETDAILYQUEST = 'RANDSETDAILYQUEST';
  nSC_RANDSETDAILYQUEST = 110;
  sSC_REFINEWEAPON = 'REFINEWEAPON';
  nSC_REFINEWEAPON = 113;
  sSC_RECALLGROUPMEMBERS = 'RECALLGROUPMEMBERS';
  nSC_RECALLGROUPMEMBERS = 117;
  sSC_MAPTING = 'MAPTING';
  nSC_MAPTING = 118;
  sSC_WRITEWEAPONNAME = 'WRITEWEAPONNAME';
  nSC_WRITEWEAPONNAME = 119;
  sSC_DELAYGOTO = 'DELAYGOTO';
  nSC_DELAYGOTO = 120;
  sSC_ENABLECMD = 'ENABLECMD';
  nSC_ENABLECMD = 121;
  sSC_LINEMSG = 'LINEMSG';
  nSC_LINEMSG = 122;
  sSC_EVENTMSG = 'EVENTMSG';
  nSC_EVENTMSG = 123;
  sSC_SOUNDMSG = 'SOUNDMSG';
  nSC_SOUNDMSG = 124;
  sSC_SETMISSION = 'SETMISSION';
  nSC_SETMISSION = 125;
  sSC_CLEARMISSION = 'CLEARMISSION';
  nSC_CLEARMISSION = 126;
  sSC_MONPWR = 'MONPWR';
  nSC_MONPWR = 127;
  sSC_ENTER_OK = 'ENTER_OK';
  nSC_ENTER_OK = 128;
  sSC_ENTER_FAIL = 'ENTER_FAIL';
  nSC_ENTER_FAIL = 129;
  sSC_MONADDITEM = 'MONADDITEM';
  nSC_MONADDITEM = 130;
  sSC_CHANGEWEATHER = 'CHANGEWEATHER';
  nSC_CHANGEWEATHER = 131;
  sSC_CHANGEWEAPONATOM = 'CHANGEWEAPONATOM';
  nSC_CHANGEWEAPONATOM = 132;
  sSC_GETREPAIRCOST = 'GETREPAIRCOST';
  nSC_GETREPAIRCOST = 134;
  sSC_KILLHORSE = 'KILLHORSE';
  nSC_KILLHORSE = 133;
  sSC_REPAIRITEM = 'REPAIRITEM';
  nSC_REPAIRITEM = 135;
  sSC_USEREMERGENCYCLOSE = 'USEREMERGENCYCLOSE';
  nSC_USEREMERGENCYCLOSE = 138;
  sSC_BUILDGUILD = 'BUILDGUILD';
  nSC_BUILDGUILD = 139;
  sSC_GUILDWAR = 'GUILDWAR';
  nSC_GUILDWAR = 140;
  sSC_CHANGEUSERNAME = 'CHANGEUSERNAME';
  nSC_CHANGEUSERNAME = 141;
  sSC_CHANGEMONLEVEL = 'CHANGEMONLEVEL';
  nSC_CHANGEMONLEVEL = 142;
  sSC_DROPITEMMAP = 'DROPITEMMAP';
  nSC_DROPITEMMAP = 143;
  sSC_CLEARITEMMAP = 'CLEARITEMMAP';
  nSC_CLEARITEMMAP = 170;
  sSC_PROPOSECASTLEWAR = 'PROPOSECASTLEWAR';
  nSC_PROPOSECASTLEWAR = 144;
  sSC_FINISHCASTLEWAR = 'FINISHCASTLEWAR';
  nSC_FINISHCASTLEWAR = 145;
  sSC_MOVENPC = 'MOVENPC';
  nSC_MOVENPC = 146;
  sSC_SPEAK = 'SPEAK';
  nSC_SPEAK = 147;
  sSC_SENDCMD = 'SENDCMD';
  nSC_SENDCMD = 148;
  sSC_INCFAME = 'INCFAME';
  nSC_INCFAME = 149;
  sSC_DECFAME = 'DECFAME';
  nSC_DECFAME = 150;
  sSC_CAPTURECASTLEFLAG = 'CAPTURECASTLEFLAG';
  nSC_CAPTURECASTLEFLAG = 151;
  sSC_MAKESHOOTER = 'MAKESHOOTER';
  nSC_MAKESHOOTER = 153;
  sSC_KILLSHOOTER = 'KILLSHOOTER';
  nSC_KILLSHOOTER = 154;
  sSC_LEAVESHOOTER = 'LEAVESHOOTER';
  nSC_LEAVESHOOTER = 155;
  sSC_CHANGEMAPATTR = 'CHANGEMAPATTR';
  nSC_CHANGEMAPATTR = 157;
  sSC_RESETMAPATTR = 'RESETMAPATTR';
  nSC_RESETMAPATTR = 158;
  sSC_MAKECASTLEDOOR = 'MAKECASTLEDOOR';
  nSC_MAKECASTLEDOOR = 159;
  sSC_REPAIRCASTLEDOOR = 'REPAIRCASTLEDOOR';
  nSC_REPAIRCASTLEDOOR = 160;
  sSC_CHARGESHOOTER = 'CHARGESHOOTER';
  nSC_CHARGESHOOTER = 161;
  sSC_SETAREAATTR = 'SETAREAATTR';
  nSC_SETAREAATTR = 162;
  sSC_CLEARDELAYGOTO = 'CLEARDELAYGOTO';
  nSC_CLEARDELAYGOTO = 163;

  sSC_TESTFLAG = 'TESTFLAG';
  nSC_TESTFLAG = 164;
  sSC_APPLYFLAG = 'APPLYFLAG';
  nSC_APPLYFLAG = 165;
  sSC_PASTEFLAG = 'PASTEFLAG';
  nSC_PASTEFLAG = 166;
  sSC_GETBACKCASTLEGOLD = 'GETBACKCASTLEGOLD';
  nSC_GETBACKCASTLEGOLD = 167;
  sSC_GETBACKUPGITEM = 'GETBACKUPGITEM';
  nSC_GETBACKUPGITEM = 168;
  sSC_TINGWAR = 'TINGWAR';
  nSC_TINGWAR = 169;
  sSC_SAVEPASSWD = 'SAVEPASSWD';
  nSC_SAVEPASSWD = 171;
  sSC_CREATENPC = 'CREATENPC';
  nSC_CREATENPC = 172;
  sSC_TAKEBONUS = 'TAKEBONUS';
  nSC_TAKEBONUS = 173;
  sSC_SYSMSG = 'SYSMSG';
  nSC_SYSMSG = 174;
  sSC_LOADVALUE = 'LOADVALUE';
  nSC_LOADVALUE = 175;
  sSC_SAVEVALUE = 'SAVEVALUE';
  nSC_SAVEVALUE = 176;
  sSC_SAVELOG = 'SAVELOG';
  nSC_SAVELOG = 177;
  sSC_GETMARRIED = 'GETMARRIED';
  nSC_GETMARRIED = 178;
  sSC_DIVORCE = 'DIVORCE';
  nSC_DIVORCE = 189;
  sSC_CAPTURESAYING = 'CAPTURESAYING';
  nSC_CAPTURESAYING = 190;
  sSC_CANCELMARRIAGERING = 'CANCELMARRIAGERING';
  nSC_CANCELMARRIAGERING = 191;
  sSC_OPENUSERMARKET = 'OPENUSERMARKET';
  nSC_OPENUSERMARKET = 192;
  sSC_SETTYPEUSERMARKET = 'SETTYPEUSERMARKET';
  nSC_SETTYPEUSERMARKET = 193;
  sSC_CHECKSOLDITEMSUSERMARKET = 'CHECKSOLDITEMSUSERMARKET';
  nSC_CHECKSOLDITEMSUSERMARKET = 194;
  sSC_SETGMEMAP = 'SETGMEMAP';
  nSC_SETGMEMAP = 200;
  sSC_SETGMEPOINT = 'SETGMEPOINT';
  nSC_SETGMEPOINT = 201;
  sSC_SETGMETIME = 'SETGMETIME';
  nSC_SETGMETIME = 209;
  sSC_STARTNEWGME = 'STARTNEWGME';
  nSC_STARTNEWGME = 202;
  sSC_MOVETOGMEMAP = 'MOVETOGMEMAP';
  mSC_MOVETOGMEMAP = 203;
  sSC_FINISHGME = 'FINISHGME';
  nSC_FINISHGME = 204;
  sSC_CONTINUEGME = 'CONTINUEGME';
  nSC_CONTINUEGME = 205;
  sSC_SETGMEPLAYTIME = 'SETGMEPLAYTIME';
  nSC_SETGMEPLAYTIME = 206;
  sSC_SETGMEPAUSETIME = 'SETGMEPAUSETIME';
  nSC_SETGMEPAUSETIME = 207;
  sSC_SETGMELIMITUSER = 'SETGMELIMITUSER';
  nSC_SETGMELIMITUSER = 208;
  sSC_SETEVENTMAP = 'SETEVENTMAP';
  nSC_SETEVENTMAP = 210;
  sSC_RESETEVENTMAP = 'RESETEVENTMAP';
  nSC_RESETEVENTMAP = 211;
  sSC_TESTREFINEPOINTS = 'TESTREFINEPOINTS';
  nSC_TESTREFINEPOINTS = 220;
  sSC_RESETREFINEWEAPON = 'RESETREFINEWEAPON';
  nSC_RESETREFINEWEAPON = 221;
  sSC_TESTREFINEACCESSORIES = 'TESTREFINEACCESSORIES';
  nSC_TESTREFINEACCESSORIES = 222;
  sSC_REFINEACCESSORIES = 'REFINEACCESSORIES';
  nSC_REFINEACCESSORIES = 223;
  sSC_APPLYMONMISSION = 'APPLYMONMISSION';
  nSC_APPLYMONMISSION = 225;
  sSC_MAPMOVER = 'MAPMOVER';
  nSC_MAPMOVER = 226;
  sSC_ADDSTR = 'ADDSTR';
  nSC_ADDSTR = 227;
  sSC_SETEVENTDAMAGE = 'SETEVENTDAMAGE';
  nSC_SETEVENTDAMAGE = 228;
  sSC_FORMATSTR = 'FORMATSTR';
  nSC_FORMATSTR = 229;
  sSC_CLEARPATH = 'CLEARPATH';
  nSC_CLEARPATH = 230;
  sSC_ADDPATH = 'ADDPATH';
  nSC_ADDPATH = 231;
  sSC_APPLYPATH = 'APPLYPATH';
  nSC_APPLYPATH = 232;
  sSC_MAPSPELL = 'MAPSPELL';
  nSC_MAPSPELL = 233;
  sSC_GIVEEXP = 'GIVEEXP';
  nSC_GIVEEXP = 234;
  sSC_GROUPMOVE = 'GROUPMOVE';
  nSC_GROUPMOVE = 235;
  sSC_GIVEEXPMAP = 'GIVEEXPMAP';
  nSC_GIVEEXPMAP = 236;
  sSC_APPLYMONEX = 'APPLYMONEX';
  nSC_APPLYMONEX = 237;
  sSC_CLEARNAMELIST = 'CLEARNAMELIST';
  nSC_CLEARNAMELIST = 238;
  sSC_TINGCASTLEVISITOR = 'TINGCASTLEVISITOR';
  nSC_TINGCASTLEVISITOR = 239;
  sSC_MAKEHEALZONE = 'MAKEHEALZONE';
  nSC_MAKEHEALZONE = 240;
  sSC_MAKEDAMAGEZONE = 'MAKEDAMAGEZONE';
  nSC_MAKEDAMAGEZONE = 241;
  sSC_CLEARZONE = 'CLEARZONE';
  nSC_CLEARZONE = 242;
  sSC_READVALUESQL = 'READVALUESQL';
  nSC_READVALUESQL = 250;
  sSC_READSTRINGSQL = 'READSTRINGSQL';
  nSC_READSTRINGSQL = 255;
  sSC_WRITEVALUESQL = 'WRITEVALUESQL';
  nSC_WRITEVALUESQL = 251;
  sSC_INCVALUESQL = 'INCVALUESQL';
  nSC_INCVALUESQL = 252;
  sSC_DECVALUESQL = 'DECVALUESQL';
  nSC_DECVALUESQL = 253;
  sSC_UPDATEVALUESQL = 'UPDATEVALUESQL';
  nSC_UPDATEVALUESQL = 254;
  sSC_KILLSLAVE = 'KILLSLAVE';
  nSC_KILLSLAVE = 260;
  sSC_SETITEMEVENT = 'SETITEMEVENT';
  nSC_SETITEMEVENT = 261;
  sSC_REMOVEITEMEVENT = 'REMOVEITEMEVENT';
  nSC_REMOVEITEMEVENT = 262;
  sSC_RETURN = 'RETURN';
  nSC_RETURN = 263;
  sSC_CLEARCASTLEOWNER = 'CLEARCASTLEOWNER';
  nSC_CLEARCASTLEOWNER = 270;
  sSC_DISSOLUTIONGUILD = 'DISSOLUTIONGUILD';
  nSC_DISSOLUTIONGUILD = 271;
  sSC_CHANGEGENDER = 'CHANGEGENDER';
  nSC_CHANGEGENDER = 272;
  sSC_SETFAME = 'SETFAME';
  nSC_SETFAME = 273;

  sSC_CHANGELEVEL = 'CHANGELEVEL';
  nSC_CHANGELEVEL = 300;
  sSC_MARRY = 'MARRY';
  nSC_MARRY = 301;
  sSC_UNMARRY = 'UNMARRY';
  nSC_UNMARRY = 302;
  sSC_GETMARRY = 'GETMARRY';
  nSC_GETMARRY = 303;
  sSC_GETMASTER = 'GETMASTER';
  nSC_GETMASTER = 304;

  sSC_CLEARSKILL = 'CLEARSKILL';
  nSC_CLEARSKILL = 305;
  sSC_DELNOJOBSKILL = 'DELNOJOBSKILL';
  nSC_DELNOJOBSKILL = 306;
  sSC_DELSKILL = 'DELSKILL';
  nSC_DELSKILL = 307;
  sSC_ADDSKILL = 'ADDSKILL';
  nSC_ADDSKILL = 308;
  sSC_SKILLLEVEL = 'SKILLLEVEL';
  nSC_SKILLLEVEL = 309;

  sSC_CHANGEPKPOINT = 'CHANGEPKPOINT';
  nSC_CHANGEPKPOINT = 310;
  sSC_CHANGEEXP = 'CHANGEEXP';
  nSC_CHANGEEXP = 311;
  sSC_CHANGEJOB = 'CHANGEJOB';
  nSC_CHANGEJOB = 312;
  sSC_MISSION = 'MISSION';
  nSC_MISSION = 313;
  sSC_MOBPLACE = 'MOBPLACE';
  nSC_MOBPLACE = 314;
  sSC_SETMEMBERTYPE = 'SETMEMBERTYPE';
  nSC_SETMEMBERTYPE = 315;
  sSC_SETMEMBERLEVEL = 'SETMEMBERLEVEL';
  nSC_SETMEMBERLEVEL = 316;
  sSC_GAMEGOLD = 'GAMEGOLD';
  nSC_GAMEGOLD = 317;
  sSC_AUTOADDGAMEGOLD = 'AUTOADDGAMEGOLD';
  nSC_AUTOADDGAMEGOLD = 318;
  sSC_AUTOSUBGAMEGOLD = 'AUTOSUBGAMEGOLD';
  nSC_AUTOSUBGAMEGOLD = 319;
  sSC_CHANGENAMECOLOR = 'CHANGENAMECOLOR';
  nSC_CHANGENAMECOLOR = 320;
  sSC_CLEARPASSWORD = 'CLEARPASSWORD';
  nSC_CLEARPASSWORD = 321;
  sSC_RENEWLEVEL = 'RENEWLEVEL';
  nSC_RENEWLEVEL = 322;
  sSC_KILLMONEXPRATE = 'KILLMONEXPRATE';
  nSC_KILLMONEXPRATE = 323;
  sSC_POWERRATE = 'POWERRATE';
  nSC_POWERRATE = 324;
  sSC_CHANGEMODE = 'CHANGEMODE';
  nSC_CHANGEMODE = 325;
  sSC_CHANGEPERMISSION = 'CHANGEPERMISSION';
  nSC_CHANGEPERMISSION = 326;
  sSC_KILL = 'KILL';
  nSC_KILL = 327;
  sSC_KICK = 'KICK';
  nSC_KICK = 328;
  sSC_BONUSPOINT = 'BONUSPOINT';
  nSC_BONUSPOINT = 329;
  sSC_RESTRENEWLEVEL = 'RESTRENEWLEVEL';
  nSC_RESTRENEWLEVEL = 330;
  sSC_DELMARRY = 'DELMARRY';
  nSC_DELMARRY = 331;
  sSC_DELMASTER = 'DELMASTER';
  nSC_DELMASTER = 332;
  sSC_MASTER = 'MASTER';
  nSC_MASTER = 333;
  sSC_UNMASTER = 'UNMASTER';
  nSC_UNMASTER = 334;
  sSC_CREDITPOINT = 'CREDITPOINT';
  nSC_CREDITPOINT = 335;
  sSC_CLEARNEEDITEMS = 'CLEARNEEDITEMS';
  nSC_CLEARNEEDITEMS = 336;
  sSC_CLEARMAKEITEMS = 'CLEARMAKEITEMS';
  nSC_CLEARMAEKITEMS = 337;
  sSC_SETSENDMSGFLAG = 'SETSENDMSGFLAG';
  nSC_SETSENDMSGFLAG = 338;
  sSC_UPGRADEITEMS = 'UPGRADEITEM';
  nSC_UPGRADEITEMS = 339;
  sSC_UPGRADEITEMSEX = 'UPGRADEITEMEX';
  nSC_UPGRADEITEMSEX = 340;
  sSC_MONGENEX = 'MONGENEX';
  nSC_MONGENEX = 341;
  sSC_CLEARMAPMON = 'CLEARMAPMON';
  nSC_CLEARMAPMON = 342;
  sSC_SETMAPMODE = 'SETMPAMODE';
  nSC_SETMAPMODE = 343;
  sSC_GAMEPOINT = 'GAMEPOINT';
  nSC_GAMEPOINT = 344;
  sSC_PKZONE = 'PKZONE';
  nSC_PKZONE = 345;
  sSC_RESTBONUSPOINT = 'RESTBONUSPOINT';
  nSC_RESTBONUSPOINT = 346;

  sSC_TAKECASTLEGOLD = 'TAKECASTLEGOLD';
  nSC_TAKECASTLEGOLD = 347;
  sSC_HUMANHP = 'HUMANHP';
  nSC_HUMANHP = 348;
  sSC_HUMANMP = 'HUMANMP';
  nSC_HUMANMP = 349;

  sSC_BUILDPOINT = 'GUILDBUILDPOINT';
  nSC_BUILDPOINT = 350;
  sSC_AURAEPOINT = 'GUILDAURAEPOINT';
  nSC_AURAEPOINT = 351;
  sSC_STABILITYPOINT = 'GUILDSTABILITYPOINT';
  nSC_STABILITYPOINT = 352;
  sSC_FLOURISHPOINT = 'GUILDFLOURISHPOINT';
  nSC_FLOURISHPOINT = 353;
  sSC_OPENMAGICBOX = 'OPENITEMBOX' {'OPENMAGICBOX'};
  nSC_OPENMAGICBOX = 354;
  sSC_SETRANKLEVELNAME = 'SETRANKLEVELNAME';
  nSC_SETRANKLEVELNAME = 355;
  sSC_GMEXECUTE = 'GMEXECUTE';
  nSC_GMEXECUTE = 356;
  sSC_GUILDCHIEFITEMCOUNT = 'GUILDCHIEFITEMCOUNT';
  nSC_GUILDCHIEFITEMCOUNT = 357;
  sSC_ADDNAMEDATELIST = 'ADDNAMEDATELIST';
  nSC_ADDNAMEDATELIST = 358;
  sSC_DELNAMEDATELIST = 'DELNAMEDATELIST';
  nSC_DELNAMEDATELIST = 359;
  sSC_MOBFIREBURN = 'MOBFIREBURN';
  nSC_MOBFIREBURN = 360;
  sSC_MESSAGEBOX = 'MESSAGEBOX';
  nSC_MESSAGEBOX = 361;

  sSC_SETSCRIPTFLAG = 'SETSCRIPTFLAG'; //设置用于NPC输入框操作的控制标志
  nSC_SETSCRIPTFLAG = 362;
  sSC_SETAUTOGETEXP = 'SETAUTOGETEXP';
  nSC_SETAUTOGETEXP = 363;
  sSC_VAR = 'VAR';
  nSC_VAR = 364;
  sSC_LOADVAR = 'LOADVAR';
  nSC_LOADVAR = 365;
  sSC_SAVEVAR = 'SAVEVAR';
  nSC_SAVEVAR = 366;
  sSC_CALCVAR = 'CALCVAR';
  nSC_CALCVAR = 367;

  sOFFLINEPLAY = 'OFFLINEPLAY';
  nOFFLINEPLAY = 368;
  sKICKOFFLINE = 'KICKOFFLINE';
  nKICKOFFLINE = 369;
  sSTARTTAKEGOLD = 'STARTTAKEGOLD';
  nSTARTTAKEGOLD = 370;
 { sDELAYGOTO = 'DELAYGOTO';
  nDELAYGOTO = 371; }
  sCLEARDELAYGOTO = 'CLEARDELAYGOTO';
  nCLEARDELAYGOTO = 372;
  sCHANGERECOMMENDGAMEGOLD = 'CHANGERECOMMENDGAMEGOLD';
  nCHANGERECOMMENDGAMEGOLD = 373;

  sSC_ADDUSERDATE = 'ADDUSERDATE';
  nSC_ADDUSERDATE = 374;

  sSC_DELUSERDATE = 'DELUSERDATE';
  nSC_DELUSERDATE = 375;

  sSC_ANSIREPLACETEXT = 'ANSIREPLACETEXT';
  nSC_ANSIREPLACETEXT = 376;

  sSC_ENCODETEXT = 'ENCODETEXT';
  nSC_ENCODETEXT = 377;
  sSC_DECODETEXT = 'DECODETEXT';
  nSC_DECODETEXT = 378;

  sSC_ADDTEXTLIST = 'ADDTEXTLIST';
  nSC_ADDTEXTLIST = 379;

  sSC_DELTEXTLIST = 'DELTEXTLIST';
  nSC_DELTEXTLIST = 380;

  sSC_GROUPMAPMOVE = 'GROUPMAPMOVE';
  nSC_GROUPMAPMOVE = 381;

  sSC_RECALLHUMAN = 'RECALLHUMAN';
  nSC_RECALLHUMAN = 382;

  sSC_REGOTO = 'REGOTO';
  nSC_REGOTO = 383;

  sSC_INTTOSTR = 'INTTOSTR';
  nSC_INTTOSTR = 384;

  sSC_STRTOINT = 'STRTOINT';
  nSC_STRTOINT = 385;

  sSC_GUILDMOVE = 'GUILDMOVE';
  nSC_GUILDMOVE = 386;

  sSC_GUILDMAPMOVE = 'GUILDMAPMOVE';
  nSC_GUILDMAPMOVE = 387;

  sSC_RANDOMMOVE = 'RANDOMMOVE';
  nSC_RANDOMMOVE = 388;

  sSC_USEBONUSPOINT = 'USEBONUSPOINT';
  nSC_USEBONUSPOINT = 389;

  sSC_TAKEONITEM = 'TAKEONITEM';
  nSC_TAKEONITEM = 390;

  sSC_TAKEOFFITEM = 'TAKEOFFITEM';
  nSC_TAKEOFFITEM = 391;

  sSC_CREATEHERO = 'CREATEHERO';
  nSC_CREATEHERO = 392;

  sSC_DELETEHERO = 'DELETEHERO';
  nSC_DELETEHERO = 393;

  {
  sSC_CHANGEHEROLEVEL = 'CHANGEHEROLEVEL';
  nSC_CHANGEHEROLEVEL = 394;

  sSC_CHANGEHEROJOB = 'CHANGEHEROJOB';
  nSC_CHANGEHEROJOB = 395;

  sSC_CLEARHEROSKILL = 'CLEARHEROSKILL';
  nSC_CLEARHEROSKILL = 396;

  sSC_CHANGEHEROPKPOINT = 'CHANGEHEROPKPOINT';
  nSC_CHANGEHEROPKPOINT = 397;

  sSC_CHANGEHEROEXP = 'CHANGEHEROEXP';
  nSC_CHANGEHEROEXP = 398;
  }
  sSC_GIVEEX = 'GIVEEX';
  nSC_GIVEEX = 399;

  sSC_TIMEOPEN = 'TIMEOPEN';
  nSC_TIMEOPEN = 400;

  sSC_TIMECLOSE = 'TIMECLOSE';
  nSC_TIMECLOSE = 401;

  sSC_GUILDMEMBERMAXLIMIT = 'GUILDMEMBERMAXLIMIT';
  nSC_GUILDMEMBERMAXLIMIT = 402;

  sSC_ADDGUILDNAMEDATELIST = 'ADDGUILDNAMEDATELIST';
  nSC_ADDGUILDNAMEDATELIST = 403;
  sSC_DELGUILDNAMEDATELIST = 'DELGUILDNAMEDATELIST';
  nSC_DELGUILDNAMEDATELIST = 404;

  sSC_GOHOME = 'GOHOME';
  nSC_GOHOME = 405;

  sSC_ADDBLOCKIPLIST = 'ADDBLOCKIPLIST';
  nSC_ADDBLOCKIPLIST = 406;

  sSC_MOVDATA = 'MOVEDATA';
  nSC_MOVDATA = 407;

  sSC_SENDCOLORMSG = 'SENDCOLORMSG';
  nSC_SENDCOLORMSG = 408;

  sSC_ADDRANDOMMAPGATE = 'ADDRANDOMMAPGATE';
  nSC_ADDRANDOMMAPGATE = 409;

  sSC_DELRANDOMMAPGATE = 'DELRANDOMMAPGATE';
  nSC_DELRANDOMMAPGATE = 410;

  sSC_GETRANDOMMAPGATE = 'GETRANDOMMAPGATE';
  nSC_GETRANDOMMAPGATE = 411;

  sSC_OPENBOOK = 'OPENBOOK';
  nSC_OPENBOOK = 412;

  sSC_OPENBOX = 'OPENBOX';
  nSC_OPENBOX = 413;


  sSC_CHANGEITEMS = 'CHANGEITEMS';
  nSC_CHANGEITEMS = 414;

  sSC_CLEARREMEMBER = 'CLEARREMEMBER';
  nSC_CLEARREMEMBER = 415;

  sSC_SENDMOVEMSG = 'SENDMOVEMSG';
  nSC_SENDMOVEMSG = 416;

  sSC_RECALLHERO = 'RECALLHERO';
  nSC_RECALLHERO = 417;

  sSC_HEROLOGOUT = 'HEROLOGOUT';
  nSC_HEROLOGOUT = 418;

  sSC_SETITEMSLIGHT = 'SETITEMSLIGHT';
  nSC_SETITEMSLIGHT = 419;

  sSC_READRANDOMSTR = 'READRANDOMSTR';
  nSC_READRANDOMSTR = 420;


  sSC_CHANGERANGEMONPOS = 'CHANGERANGEMONPOS';
  nSC_CHANGERANGEMONPOS = 421;


  sSC_READ = 'READ';
  nSC_READ = 422;
  sSC_WRITE = 'WRITE';
  nSC_WRITE = 423;


  nSC_DIV = 424;
  nSC_MUL = 425;
  nSC_PERCENT = 426;


  sSC_CHANGEITEMNEWADDVALUE = 'CHANGEITEMNEWADDVALUE';
  nSC_CHANGEITEMNEWADDVALUE = 427;

  sSC_OPENHOMEPAGE = 'OPENHOMEPAGE';
  nSC_OPENHOMEPAGE = 428;

  sSC_PKZONEX = 'PKZONEX';
  nSC_PKZONEX = 429;


  sSC_SETITEMSLIGHTEX = 'SETITEMSLIGHTEX';
  nSC_SETITEMSLIGHTEX = 430;


  sSC_SPELL = 'SPELL';
  nSC_SPELL = 431;


  sSC_ADDMAPMAGICEVENT = 'ADDMAPMAGICEVENT';
  nSC_ADDMAPMAGICEVENT = 432;


  sSC_RANDOMADDMAPMAGICEVENT = 'RANDOMADDMAPMAGICEVENT';
  nSC_RANDOMADDMAPMAGICEVENT = 433;

  sSC_SNOW = 'SNOW';
  nSC_SNOW = 434;

  sSC_RANDOMUPGRADEITEM = 'RANDOMUPGRADEITEM';
  nSC_RANDOMUPGRADEITEM = 435;

  sSC_LOCK = 'LOCK';
  nSC_LOCK = 436;

  sSC_UNLOCK = 'UNLOCK';
  nSC_UNLOCK = 437;

  sSC_CLEARDUELMAP = 'CLEARDUELMAP';
  nSC_CLEARDUELMAP = 438;

  sSC_GETDUELITEMS = 'GETDUELITEMS';
  nSC_GETDUELITEMS = 439;

  sSC_APPDUEL = 'APPDUEL';
  nSC_APPDUEL = 440;

  sSC_CANUSEITEM = 'CANUSEITEM';
  nSC_CANUSEITEM = 441;


  sSC_AUTOGOTOXY = 'AUTOGOTOXY';
  nSC_AUTOGOTOXY = 442;

  sSC_CHANGENEWSTATUS = 'CHANGENEWSTATUS';
  nSC_CHANGENEWSTATUS = 443;

  sSC_SENDDELAYMSG = 'SENDDELAYMSG';
  nSC_SENDDELAYMSG = 444;



  sSC_ACTVARLIST = 'ACTVARLIST';
  nSC_ACTVARLIST = 445;

  sSC_SETMASKED = 'SETMASKED';
  nSC_SETMASKED = 446;


  sSC_SENDCENTERMSG = 'SENDCENTERMSG';
  nSC_SENDCENTERMSG = 447;

  sSC_CHANGEUSEITEMSTARSLEVEL = 'CHANGEUSEITEMSTARSLEVEL';
  nSC_CHANGEUSEITEMSTARSLEVEL = 448;

  sSC_CHANGEBAGITEMSTARSLEVEL = 'CHANGEBAGITEMSTARSLEVEL';
  nSC_CHANGEBAGITEMSTARSLEVEL = 449;

  sSC_BINDBAGITEM = 'BINDBAGITEM';
  nSC_BINDBAGITEM = 450;


  sSC_HEROGROUP = 'HEROGROUP';
  nSC_HEROGROUP = 451;

  sSC_UNHEROGROUP = 'UNHEROGROUP';
  nSC_UNHEROGROUP = 452;



  sSC_SETSCTIMER = 'SETONTIMER';
  nSC_SETSCTIMER = 453;

  sSC_KILLSCTIMER = 'SETOFFTIMER';
  nSC_KILLSCTIMER = 454;



  sSC_PLAYSOUND = 'PLAYSOUND';
  nSC_PLAYSOUND = 455;

  sSC_SHOWEFFECT = 'SHOWEFFECT';
  nSC_SHOWEFFECT = 456;


  sSC_CHANGEITEMVALUE = 'CHANGEITEMVALUE';
  nSC_CHANGEITEMVALUE = 458;

  sSC_VIBRATION = 'VIBRATION';
  nSC_VIBRATION = 459;

  sSC_OPENBIGDIALOGBOX = 'OPENBIGDIALOGBOX';
  nSC_OPENBIGDIALOGBOX = 460;

  sSC_CLOSEBIGDIALOGBOX = 'CLOSEBIGDIALOGBOX';
  nSC_CLOSEBIGDIALOGBOX = 461;

  sSC_TAGMAPMOVE = 'TAGMAPMOVE';
  nSC_TAGMAPMOVE = 462;

  sSC_TAGMAPINFO = 'TAGMAPINFO';
  nSC_TAGMAPINFO = 463;


  sSC_AISTART = 'AISTART';
  nSC_AISTART = 464;

  sSC_AISTOP = 'AISTOP';
  nSC_AISTOP = 465;

  sSC_CHANGEIPADDRESS = 'CHANGEIPADDRESS';
  nSC_CHANGEIPADDRESS = 466;

  sSC_CHANGEATTATCKMODE = 'CHANGEATTATCKMODE';
  nSC_CHANGEATTATCKMODE = 467;

  sSC_AILOGON = 'AILOGON';
  nSC_AILOGON = 468;


  sSC_AILOGONEX = 'AILOGONEX';
  nSC_AILOGONEX = 469;


  sSC_KICKALL = 'KICKALL';
  nSC_KICKALL = 470;

  sSC_TAKEITEMLIST = 'TAKEITEMLIST';
  nSC_TAKEITEMLIST = 471;

  sSC_SHOWRANKLEVLNAME = 'SHOWRANKLEVLNAME';
  nSC_SHOWRANKLEVLNAME = 472;


  sSC_LOADROBOTCONFIG = 'LOADROBOTCONFIG';
  nSC_LOADROBOTCONFIG = 473;




  sSL_SENDMSG = '@@sendmsg';
  sSUPERREPAIR = '@s_repair';
  sSUPERREPAIROK = '~@s_repair';
  sSUPERREPAIRFAIL = '@fail_s_repair';
  sREPAIR = '@repair';
  sREPAIROK = '~@repair';
  sBUY = '@buy';
  sSELL = '@sell';
  sMAKEDURG = '@makedrug';
  sPRICES = '@prices';
  sSTORAGE = '@storage';
  sGETBACK = '@getback';

  sBIGSTORAGE = '@bigstorage';
  sBIGGETBACK = '@biggetback';

  sGETPREVIOUSPAGE = '@getpreviouspage';
  sGETNEXTPAGE = '@getnextpage';

  sUPGRADENOW = '@upgradenow';
  sUPGRADEING = '~@upgradenow_ing';
  sUPGRADEOK = '~@upgradenow_ok';
  sUPGRADEFAIL = '~@upgradenow_fail';
  sGETBACKUPGNOW = '@getbackupgnow';
  sGETBACKUPGOK = '~@getbackupgnow_ok';
  sGETBACKUPGFAIL = '~@getbackupgnow_fail';
  sGETBACKUPGFULL = '~@getbackupgnow_bagfull';
  sGETBACKUPGING = '~@getbackupgnow_ing';
  sEXIT = '@exit';
  sBACK = '@back';
  sMAIN = '@main';
  sFAILMAIN = '~@main';

  sGETMASTER = '@@getmaster';
  sGETMARRY = '@@getmarry';
  sUSEITEMNAME = '@@useitemname';

  sGETSELLGOLD = '@getsellgold'; //增加拍卖的三个命令
  sSELLOFF = '@selloff';
  sBUYOFF = '@buyoff';
  sRMST = '@@rmst'; //接受歌曲
  sofflinemsg = '@@offlinemsg';

  sstartdealgold = '@startdealgold'; //元宝转帐
  sdealgold = '@@dealgold';

  sBUILDGUILDNOW = '@@buildguildnow';
  sSCL_GUILDWAR = '@@guildwar';
  sDONATE = '@@donate';
  sREQUESTCASTLEWAR = '@requestcastlewarnow';

  sCASTLENAME = '@@castlename';
  sWITHDRAWAL = '@@withdrawal';
  sRECEIPTS = '@@receipts';
  sOPENMAINDOOR = '@openmaindoor';
  sCLOSEMAINDOOR = '@closemaindoor';
  sREPAIRDOORNOW = '@repairdoornow';
  sREPAIRWALLNOW1 = '@repairwallnow1';
  sREPAIRWALLNOW2 = '@repairwallnow2';
  sREPAIRWALLNOW3 = '@repairwallnow3';
  sHIREARCHERNOW = '@hirearchernow';
  sHIREGUARDNOW = '@hireguardnow';
  sHIREGUARDOK = '@hireguardok';
  sMarket_Def = 'Market_Def\';
  sNpc_def = 'Npc_def\';

  sUserLevelOrder = '@UserLevelOrder';
  sWarrorLevelOrder = '@WarrorLevelOrder';
  sWizardLevelOrder = '@WizardLevelOrder';
  sTaoistLevelOrder = '@TaoistLevelOrder';
  sMasterCountOrder = '@MasterCountOrder';

  sLevelOrderHomePage = '@LevelOrderHomePage';
  sLevelOrderPreviousPage = '@LevelOrderPreviousPage';
  sLevelOrderNextPage = '@LevelOrderNextPage';
  sLevelOrderLastPage = '@LevelOrderLastPage';
  sMyLevelOrder = '@MyLevelOrder';

  sCqFirHero = '@@cqfirHero';

  sGotoVillage = '@GotoVillage';
  sUPGRADEITEMS = '@upgradeitems';

  sAppDuel = '@@AppDuel';
type
  TLevelNeedExp = array[1..MAXCHANGELEVEL] of LongWord;
  TItemBind = record
    nMakeIdex: Integer;
    nItemIdx: Integer;
    //boAddLight: Boolean;
    sBindName: string[20];
  end;
  pTItemBind = ^TItemBind;

  TItemBox = record
    StdItem: TStdItem;
    ItemList: TGStringList;
  end;
  pTItemBox = ^TItemBox;

  TBoxItemType = (i_Center, i_Give, i_Fill);
  TBoxItem = record
    sItemName: string;
    ItemType: TBoxItemType;
    nItemCount: Integer;
  end;
  pTBoxItem = ^TBoxItem;


  {TItemAbility = record //OK    //Size 40
    wHP: Word;
    wMP: Word;
    wAC: Integer;
    wMAC: Integer;
    wDC: Integer;
    wMC: Integer;
    wSC: Integer;

    wMaxHP: Word;
    wMaxMP: Word;
    wMaxAC: Integer;
    wMaxMAC: Integer;
    wMaxDC: Integer;
    wMaxMC: Integer;
    wMaxSC: Integer;

    wHitPoint: Word;
    wSpeedPoint: Word;

    wAntiPoison: Word;
    wPoisonRecover: Word;
    wHealthRecover: Word;
    wSpellRecover: Word;
    wAntiMagic: Word;
    nHitSpeed: Integer;

    btLuck: Byte;
    btUnLuck: Byte;
    btWeaponStrong: Byte;

    wAniCount: Word;
    wShape: Word;

    wExpRate: Word;
    wDCRate: Word;
    wMCRate: Word;
    wSCRate: Word;

  end;
  pTItemAbility = ^TItemAbility;

  TGroupItems = record
    sGroupName: string;
    nMemberCount: Integer;
    btReserved: Byte;
    sDescr: string;
    Ability: TItemAbility;
  end;
  pTGroupItems = ^TGroupItems; }


  TConsoleData = packed record
    nCrcExtInt: Integer;
    nCrcDllInt: Integer;
  end;
  pTConsoleData = ^TConsoleData;

  TClientConf = record
    boClientCanSet: Boolean;
    boRUNHUMAN: Boolean;
    boRUNMON: Boolean;
    boRunNpc: Boolean;
    boWarRunAll: Boolean;
    btDieColor: Byte;
    wSpellTime: Word;
    wHitIime: Word;
    wItemFlashTime: Word;
    btItemSpeed: Byte;
    boCanStartRun: Boolean;
    boParalyCanRun: Boolean;
    boParalyCanWalk: Boolean;
    boParalyCanHit: Boolean;
    boParalyCanSpell: Boolean;
    boShowRedHPLable: Boolean;
    boShowHPNumber: Boolean;
    boShowJobLevel: Boolean;
    boDuraAlert: Boolean;
    boMagicLock: Boolean;
    boAutoPuckUpItem: Boolean;
  end;

  pTConfig = ^TConfig;

  TThreadInfo = record
    dwRunTick: LongWord;
    boActived: Boolean;
    nRunFlag: Integer;
    boTerminaled: Boolean;
    nRunTime: Integer;
    nMaxRunTime: Integer;
    hThreadHandle: Integer;
    dwThreadID: LongWord;
    Config: pTConfig;
  end;

  pTThreadInfo = ^TThreadInfo;

  TEncode6BitBuf = array[0..275] of Byte;
  TDecode6BitBuf = array[0..276] of Byte;

  TConfig = record
    nConfigSize: Integer;
    sServerName: string;
    sServerIPaddr: string;
    sRegServerAddr: string;
    nRegServerPort: Integer;
    sRegIP: string;
    sWebSite: string;
    sBbsSite: string;
    sClientDownload: string;
    sQQ: string;
    sPhone: string;
    sBankAccount0: string;
    sBankAccount1: string;
    sBankAccount2: string;
    sBankAccount3: string;
    sBankAccount4: string;
    sBankAccount5: string;
    sBankAccount6: string;
    sBankAccount7: string;
    sBankAccount8: string;
    sBankAccount9: string;
    nServerNumber: Integer;
    boVentureServer: Boolean;
    boTestServer: Boolean;
    boServiceMode: Boolean;
    boNonPKServer: Boolean;
    nTestLevel: Integer;
    nTestGold: Integer;
    nTestUserLimit: Integer;
    nSendBlock: Integer;
    nCheckBlock: Integer;
    nAvailableBlock: Integer;
    nGateLoad: Integer;
    nUserFull: Integer;
    nZenFastStep: Integer;
    sGateAddr: string;
    nGatePort: Integer;
    sDBAddr: string;
    nDBPort: Integer;
    sIDSAddr: string;
    nIDSPort: Integer;
    sMsgSrvAddr: string;
    nMsgSrvPort: Integer;
    sLogServerAddr: string;
    nLogServerPort: Integer;
    boDiscountForNightTime: Boolean;
    nHalfFeeStart: Integer;
    nHalfFeeEnd: Integer;
    boViewHackMessage: Boolean;
    boViewAdmissionFailure: Boolean;
    sBaseDir: string;
    sGuildDir: string;
    sGuildFile: string;
    sVentureDir: string;
    sConLogDir: string;
    sCastleDir: string;
    sCastleFile: string;
    sEnvirDir: string;
    sMapDir: string;
    sNoticeDir: string;
    sLogDir: string;
    sPlugDir: string;
    sClientFile1: string;
    sClientFile2: string;
    sClientFile3: string;

    sClothsMan: string;
    sClothsWoman: string;
    sWoodenSword: string;
    sCandle: string;
    sBasicDrug: string;
    sGoldStone: string;
    sSilverStone: string;
    sSteelStone: string;
    sCopperStone: string;
    sBlackStone: string;
    sZuma: array[0..3] of string[15];
    sBee: string;
    sSpider: string;
    sWomaHorn: string;
    sZumaPiece: string;
    sGameGoldName: string;
    sGamePointName: string;
    sPayMentPointName: string;
    DBSocket: Integer;
    nHealthFillTime: Integer;
    nSpellFillTime: Integer;
    nMonUpLvNeedKillBase: Integer;
    nMonUpLvRate: Integer;
    MonUpLvNeedKillCount: array[0..SLAVEMAXLEVEL - 2] of Integer;
    SlaveColor: array[0..SLAVEMAXLEVEL - 1] of Byte;
    dwNeedExps: TLevelNeedExp;
    dwHeroNeedExps: TLevelNeedExp;
    WideAttack: array[0..2] of Byte;
    CrsAttack: array[0..6] of Byte;
    SpitMap: array[0..7, 0..4, 0..4] of Byte;
    sHomeMap: string;
    nHomeX: Integer;
    nHomeY: Integer;
    sRedHomeMap: string;
    nRedHomeX: Integer;
    nRedHomeY: Integer;
    sRedDieHomeMap: string;
    nRedDieHomeX: Integer;
    nRedDieHomeY: Integer;
    dwDecPkPointTime: LongWord;
    nDecPkPointCount: Integer;
    dwPKFlagTime: LongWord;
    nKillHumanAddPKPoint: Integer;
    nKillHumanDecLuckPoint: Integer;
    dwDecLightItemDrugTime: LongWord;
    nSafeZoneSize: Integer;
    nStartPointSize: Integer;
    dwHumanGetMsgTime: LongWord;
    nGroupMembersMax: Integer;
    sFireBallSkill: string;
    sHealSkill: string;
    ReNewNameColor: array[0..9] of Byte; //($FF,$FE,$93,$9A,$E5,$A8,$B4,$FC,$B4,$FC);
    dwReNewNameColorTime: LongWord;
    boReNewChangeColor: Boolean;
    boReNewLevelClearExp: Boolean;
    BonusAbilofWarr: TNakedAbility;
    BonusAbilofWizard: TNakedAbility;
    BonusAbilofTaos: TNakedAbility;
    NakedAbilofWarr: TNakedAbility;
    NakedAbilofWizard: TNakedAbility;
    NakedAbilofTaos: TNakedAbility;
    nUpgradeWeaponMaxPoint: Integer;
    nUpgradeWeaponPrice: Integer;
    dwUPgradeWeaponGetBackTime: LongWord;
    nClearExpireUpgradeWeaponDays: Integer;
    nUpgradeWeaponDCRate: Integer;
    nUpgradeWeaponDCTwoPointRate: Integer;
    nUpgradeWeaponDCThreePointRate: Integer;
    nUpgradeWeaponSCRate: Integer;
    nUpgradeWeaponSCTwoPointRate: Integer;
    nUpgradeWeaponSCThreePointRate: Integer;
    nUpgradeWeaponMCRate: Integer;
    nUpgradeWeaponMCTwoPointRate: Integer;
    nUpgradeWeaponMCThreePointRate: Integer;
    boDeleteUpgradeFailWeapon: Boolean;

    dwProcessMonstersTime: LongWord;
    dwRegenMonstersTime: LongWord;
    nMonGenRate: Integer;
    nProcessMonRandRate: Integer;
    nProcessMonLimitCount: Integer;
    nSoftVersionDate: Integer;
    boCanOldClientLogon: Boolean;
    dwConsoleShowUserCountTime: LongWord;
    dwShowLineNoticeTime: LongWord;
    nLineNoticeColor: Integer;
    nStartCastleWarDays: Integer;
    nStartCastlewarTime: Integer;
    dwShowCastleWarEndMsgTime: LongWord;
    dwCastleWarTime: LongWord;
    dwGetCastleTime: LongWord;
    dwGuildWarTime: LongWord;
    nBuildGuildPrice: Integer;
    nGuildWarPrice: Integer;
    nMakeDurgPrice: Integer;
    nHumanMaxGold: Integer;
    nHumanTryModeMaxGold: Integer;
    nTryModeLevel: Integer;
    boTryModeUseStorage: Boolean;
    nCanShoutMsgLevel: Integer;
    boShowMakeItemMsg: Boolean;
    boShutRedMsgShowGMName: Boolean;
    nSayMsgMaxLen: Integer;
    dwSayMsgTime: LongWord;
    nSayMsgCount: Integer;
    dwDisableSayMsgTime: LongWord;
    nSayRedMsgMaxLen: Integer;
    boShowGuildName: Boolean;
    boShowRankLevelName: Boolean;
    boMonSayMsg: Boolean;
    nStartPermission: Integer;
    boKillHumanWinLevel: Boolean;
    boKilledLostLevel: Boolean;
    boKillHumanWinExp: Boolean;
    boKilledLostExp: Boolean;
    nKillHumanWinLevel: Integer;
    nKilledLostLevel: Integer;
    nKillHumanWinExp: Integer;
    nKillHumanLostExp: Integer;
    nHumanLevelDiffer: Integer;
    nMonsterPowerRate: Integer;
    nItemsPowerRate: Integer;
    nItemsACPowerRate: Integer;
    boSendOnlineCount: Boolean;
    nSendOnlineCountRate: Integer;
    dwSendOnlineTime: LongWord;
    dwSaveHumanRcdTime: LongWord;
    dwHumanFreeDelayTime: LongWord;
    dwMakeGhostTime: LongWord;
    dwClearDropOnFloorItemTime: LongWord;
    dwFloorItemCanPickUpTime: LongWord;
    boPasswordLockSystem: Boolean; //是否启用密码保护系统
    boLockDealAction: Boolean; //是否锁定交易操作
    boLockDropAction: Boolean; //是否锁定扔物品操作
    boLockGetBackItemAction: Boolean; //是否锁定取仓库操作
    boLockHumanLogin: Boolean; //是否锁定走操作
    boLockWalkAction: Boolean; //是否锁定走操作
    boLockRunAction: Boolean; //是否锁定跑操作
    boLockHitAction: Boolean; //是否锁定攻击操作
    boLockSpellAction: Boolean; //是否锁定魔法操作
    boLockSendMsgAction: Boolean; //是否锁定发信息操作
    boLockUserItemAction: Boolean; //是否锁定使用物品操作
    boLockInObModeAction: Boolean; //锁定时进入隐身状态
    nPasswordErrorCountLock: Integer; //输入密码错误超过 指定次数则锁定密码
    boPasswordErrorKick: Boolean; //输入密码错误超过限制则踢下线
    nSendRefMsgRange: Integer;
    boDecLampDura: Boolean;
    boHungerSystem: Boolean;
    boHungerDecHP: Boolean;
    boHungerDecPower: Boolean;
    boDiableHumanRun: Boolean;
    boRUNHUMAN: Boolean;
    boRUNMON: Boolean;
    boRunNpc: Boolean;
    boRunGuard: Boolean;
    boWarDisHumRun: Boolean;
    boGMRunAll: Boolean;
    boSafeAreaLimited: Boolean;
    dwTryDealTime: LongWord;
    dwDealOKTime: LongWord;
    boCanNotGetBackDeal: Boolean;
    boDisableDeal: Boolean;
    nMasterOKLevel: Integer;
    nMasterOKCreditPoint: Integer;
    nMasterOKBonusPoint: Integer;
    boPKLevelProtect: Boolean;
    nPKProtectLevel: Integer;
    nRedPKProtectLevel: Integer;
    nItemPowerRate: Integer;
    nItemExpRate: Integer;
    nScriptGotoCountLimit: Integer;
    btHearMsgFColor: Byte; //前景
    btHearMsgBColor: Byte; //背景
    btWhisperMsgFColor: Byte; //前景
    btWhisperMsgBColor: Byte; //背景
    btGMWhisperMsgFColor: Byte; //前景
    btGMWhisperMsgBColor: Byte; //背景
    btCryMsgFColor: Byte; //前景
    btCryMsgBColor: Byte; //背景
    btGreenMsgFColor: Byte; //前景
    btGreenMsgBColor: Byte; //背景
    btBlueMsgFColor: Byte; //前景
    btBlueMsgBColor: Byte; //背景
    btRedMsgFColor: Byte; //前景
    btRedMsgBColor: Byte; //背景
    btGuildMsgFColor: Byte; //前景
    btGuildMsgBColor: Byte; //背景
    btGroupMsgFColor: Byte; //前景
    btGroupMsgBColor: Byte; //背景
    btCustMsgFColor: Byte; //前景
    btCustMsgBColor: Byte; //背景
    nMonRandomAddValue: Integer;
    nMakeRandomAddValue: Integer;
    nScriptRandomAddValue: Integer;
    nWeaponDCAddValueMaxLimit: Integer;
    nWeaponDCAddValueRate: Integer;
    nWeaponMCAddValueMaxLimit: Integer;
    nWeaponMCAddValueRate: Integer;
    nWeaponSCAddValueMaxLimit: Integer;
    nWeaponSCAddValueRate: Integer;
    nDressDCAddRate: Integer;
    nDressDCAddValueMaxLimit: Integer;
    nDressDCAddValueRate: Integer;
    nDressMCAddRate: Integer;
    nDressMCAddValueMaxLimit: Integer;
    nDressMCAddValueRate: Integer;
    nDressSCAddRate: Integer;
    nDressSCAddValueMaxLimit: Integer;
    nDressSCAddValueRate: Integer;
    nNeckLace202124DCAddRate: Integer;
    nNeckLace202124DCAddValueMaxLimit: Integer;
    nNeckLace202124DCAddValueRate: Integer;
    nNeckLace202124MCAddRate: Integer;
    nNeckLace202124MCAddValueMaxLimit: Integer;
    nNeckLace202124MCAddValueRate: Integer;
    nNeckLace202124SCAddRate: Integer;
    nNeckLace202124SCAddValueMaxLimit: Integer;
    nNeckLace202124SCAddValueRate: Integer;
    nNeckLace19DCAddRate: Integer;
    nNeckLace19DCAddValueMaxLimit: Integer;
    nNeckLace19DCAddValueRate: Integer;
    nNeckLace19MCAddRate: Integer;
    nNeckLace19MCAddValueMaxLimit: Integer;
    nNeckLace19MCAddValueRate: Integer;
    nNeckLace19SCAddRate: Integer;
    nNeckLace19SCAddValueMaxLimit: Integer;
    nNeckLace19SCAddValueRate: Integer;
    nArmRing26DCAddRate: Integer;
    nArmRing26DCAddValueMaxLimit: Integer;
    nArmRing26DCAddValueRate: Integer;
    nArmRing26MCAddRate: Integer;
    nArmRing26MCAddValueMaxLimit: Integer;
    nArmRing26MCAddValueRate: Integer;
    nArmRing26SCAddRate: Integer;
    nArmRing26SCAddValueMaxLimit: Integer;
    nArmRing26SCAddValueRate: Integer;
    nRing22DCAddRate: Integer;
    nRing22DCAddValueMaxLimit: Integer;
    nRing22DCAddValueRate: Integer;
    nRing22MCAddRate: Integer;
    nRing22MCAddValueMaxLimit: Integer;
    nRing22MCAddValueRate: Integer;
    nRing22SCAddRate: Integer;
    nRing22SCAddValueMaxLimit: Integer;
    nRing22SCAddValueRate: Integer;
    nRing23DCAddRate: Integer;
    nRing23DCAddValueMaxLimit: Integer;
    nRing23DCAddValueRate: Integer;
    nRing23MCAddRate: Integer;
    nRing23MCAddValueMaxLimit: Integer;
    nRing23MCAddValueRate: Integer;
    nRing23SCAddRate: Integer;
    nRing23SCAddValueMaxLimit: Integer;
    nRing23SCAddValueRate: Integer;
    nHelMetDCAddRate: Integer;
    nHelMetDCAddValueMaxLimit: Integer;
    nHelMetDCAddValueRate: Integer;
    nHelMetMCAddRate: Integer;
    nHelMetMCAddValueMaxLimit: Integer;
    nHelMetMCAddValueRate: Integer;
    nHelMetSCAddRate: Integer;
    nHelMetSCAddValueMaxLimit: Integer;
    nHelMetSCAddValueRate: Integer;
    nUnknowHelMetACAddRate: Integer;
    nUnknowHelMetACAddValueMaxLimit: Integer;
    nUnknowHelMetMACAddRate: Integer;
    nUnknowHelMetMACAddValueMaxLimit: Integer;
    nUnknowHelMetDCAddRate: Integer;
    nUnknowHelMetDCAddValueMaxLimit: Integer;
    nUnknowHelMetMCAddRate: Integer;
    nUnknowHelMetMCAddValueMaxLimit: Integer;
    nUnknowHelMetSCAddRate: Integer;
    nUnknowHelMetSCAddValueMaxLimit: Integer;
    nUnknowRingACAddRate: Integer;
    nUnknowRingACAddValueMaxLimit: Integer;
    nUnknowRingMACAddRate: Integer;
    nUnknowRingMACAddValueMaxLimit: Integer;
    nUnknowRingDCAddRate: Integer;
    nUnknowRingDCAddValueMaxLimit: Integer;
    nUnknowRingMCAddRate: Integer;
    nUnknowRingMCAddValueMaxLimit: Integer;
    nUnknowRingSCAddRate: Integer;
    nUnknowRingSCAddValueMaxLimit: Integer;
    nUnknowNecklaceACAddRate: Integer;
    nUnknowNecklaceACAddValueMaxLimit: Integer;
    nUnknowNecklaceMACAddRate: Integer;
    nUnknowNecklaceMACAddValueMaxLimit: Integer;
    nUnknowNecklaceDCAddRate: Integer;
    nUnknowNecklaceDCAddValueMaxLimit: Integer;
    nUnknowNecklaceMCAddRate: Integer;
    nUnknowNecklaceMCAddValueMaxLimit: Integer;
    nUnknowNecklaceSCAddRate: Integer;
    nUnknowNecklaceSCAddValueMaxLimit: Integer;
    nMonOneDropGoldCount: Integer;
    nMakeMineHitRate: Integer; //挖矿命中率
    nMakeMineRate: Integer; //挖矿率
    nStoneTypeRate: Integer;
    nStoneTypeRateMin: Integer;
    nGoldStoneMin: Integer;
    nGoldStoneMax: Integer;
    nSilverStoneMin: Integer;
    nSilverStoneMax: Integer;
    nSteelStoneMin: Integer;
    nSteelStoneMax: Integer;
    nBlackStoneMin: Integer;
    nBlackStoneMax: Integer;
    nStoneMinDura: Integer;
    nStoneGeneralDuraRate: Integer;
    nStoneAddDuraRate: Integer;
    nStoneAddDuraMax: Integer;
    nWinLottery6Min: Integer;
    nWinLottery6Max: Integer;
    nWinLottery5Min: Integer;
    nWinLottery5Max: Integer;
    nWinLottery4Min: Integer;
    nWinLottery4Max: Integer;
    nWinLottery3Min: Integer;
    nWinLottery3Max: Integer;
    nWinLottery2Min: Integer;
    nWinLottery2Max: Integer;
    nWinLottery1Min: Integer;
    nWinLottery1Max: Integer; //16180 + 1820;
    nWinLottery1Gold: Integer;
    nWinLottery2Gold: Integer;
    nWinLottery3Gold: Integer;
    nWinLottery4Gold: Integer;
    nWinLottery5Gold: Integer;
    nWinLottery6Gold: Integer;
    nWinLotteryRate: Integer;
    nWinLotteryCount: Integer;
    nNoWinLotteryCount: Integer;
    nWinLotteryLevel1: Integer;
    nWinLotteryLevel2: Integer;
    nWinLotteryLevel3: Integer;
    nWinLotteryLevel4: Integer;
    nWinLotteryLevel5: Integer;
    nWinLotteryLevel6: Integer;
    GlobalVal: array[0..499] of Integer; //G
    GlobaDyMval: array[0..99] of Integer; //M
    GlobalAVal: array[0..499] of string; //A
    nItemNumber: Integer;
    nItemNumberEx: Integer;
    nGuildRecallTime: Integer;
    nGroupRecallTime: Integer;
    boControlDropItem: Boolean;
    boInSafeDisableDrop: Boolean;
    nCanDropGold: Integer;
    nCanDropPrice: Integer;
    boSendCustemMsg: Boolean;
    boSubkMasterSendMsg: Boolean;
    nSuperRepairPriceRate: Integer; //特修价格倍数
    nRepairItemDecDura: Integer; //普通修理掉持久数(特持久上限减下限再除以此数为减的数值)
    boDieScatterBag: Boolean;
    nDieScatterBagRate: Integer;
    boDieRedScatterBagAll: Boolean;
    nDieDropUseItemRate: Integer;
    nDieRedDropUseItemRate: Integer;
    boDieDropGold: Boolean;
    boKillByHumanDropUseItem: Boolean;
    boKillByMonstDropUseItem: Boolean;
    boKickExpireHuman: Boolean;
    nGuildRankNameLen: Integer;
    nGuildMemberMaxLimit: Integer;
    nGuildNameLen: Integer;
    nAttackPosionRate: Integer;
    nAttackPosionTime: Integer;
    dwRevivalTime: LongWord; //复活间隔时间
    boUserMoveCanDupObj: Boolean;
    boUserMoveCanOnItem: Boolean;
    dwUserMoveTime: LongWord;
    dwPKDieLostExpRate: LongWord;
    nPKDieLostLevelRate: Integer;
    btPKFlagNameColor: Byte;
    btPKLevel1NameColor: Byte;
    btPKLevel2NameColor: Byte;
    btAllyAndGuildNameColor: Byte;
    btWarGuildNameColor: Byte;
    btInFreePKAreaNameColor: Byte;
    boSpiritMutiny: Boolean;
    dwSpiritMutinyTime: LongWord;
    nSpiritPowerRate: Integer;
    boMasterDieMutiny: Boolean;
    nMasterDieMutinyRate: Integer;
    nMasterDieMutinyPower: Integer;
    nMasterDieMutinySpeed: Integer;
    boBBMonAutoChangeColor: Boolean;
    dwBBMonAutoChangeColorTime: Integer;
    boOldClientShowHiLevel: Boolean;
    boShowScriptActionMsg: Boolean;
    nRunSocketDieLoopLimit: Integer;
    boThreadRun: Boolean;
    boShowExceptionMsg: Boolean;
    boShowPreFixMsg: Boolean;
    nMagicAttackRage: Integer; //魔法锁定范围
    sBoneFamm: string;
    nBoneFammCount: Integer;
    //    g_Config.BoneFammArray                       :array[0..9] of TRecallMigic;
    sDogz: string;
    nDogzCount: Integer;
    sMoon: string;
    nMoonCount: Integer;
    //    g_Config.DogzArray                           :array[0..9] of TRecallMigic;
    nAmyOunsulPoint: Integer;
    boDisableInSafeZoneFireCross: Boolean;
    boGroupMbAttackPlayObject: Boolean;
    dwPosionDecHealthTime: LongWord;
    nPosionDamagarmor: Integer; //中红毒着持久及减防量（实际大小为 12 / 10）
    boLimitSwordLong: Boolean;
    nSwordLongPowerRate: Integer;
    nFireBoomRage: Integer;
    nSnowWindRange: Integer;
    nElecBlizzardRange: Integer;
    nMagTurnUndeadLevel: Integer; //圣言怪物等级限制
    nMagTammingLevel: Integer; //诱惑之光怪物等级限制
    nMagTammingTargetLevel: Integer; //诱惑怪物相差等级机率，此数字越小机率越大；
    nMagTammingHPRate: Integer; //成功机率=怪物最高HP 除以 此倍率，此倍率越大诱惑机率越高
    nMagTammingCount: Integer;
    nMabMabeHitRandRate: Integer;
    nMabMabeHitMinLvLimit: Integer;
    nMabMabeHitSucessRate: Integer;
    nMabMabeHitMabeTimeRate: Integer;
    sCASTLENAME: string;
    sCastleHomeMap: string;
    nCastleHomeX: Integer;
    nCastleHomeY: Integer;
    nCastleWarRangeX: Integer;
    nCastleWarRangeY: Integer;
    nCastleTaxRate: Integer;
    boGetAllNpcTax: Boolean;
    nHireGuardPrice: Integer;
    nHireArcherPrice: Integer;
    nCastleGoldMax: Integer;
    nCastleOneDayGold: Integer;
    nRepairDoorPrice: Integer;
    nRepairWallPrice: Integer;
    nCastleMemberPriceRate: Integer;
    nMaxHitMsgCount: Integer;
    nMaxSpellMsgCount: Integer;
    nMaxRunMsgCount: Integer;
    nMaxWalkMsgCount: Integer;
    nMaxTurnMsgCount: Integer;
    nMaxSitDonwMsgCount: Integer;
    nMaxDigUpMsgCount: Integer;
    boSpellSendUpdateMsg: Boolean;
    boActionSendActionMsg: Boolean;
    boKickOverSpeed: Boolean;
    btSpeedControlMode: Byte;
    nOverSpeedKickCount: Integer;
    dwDropOverSpeed: LongWord;
    dwHitIntervalTime: LongWord; //攻击间隔
    dwMagicHitIntervalTime: LongWord; //魔法间隔
    dwRunIntervalTime: LongWord; //跑步间隔
    dwWalkIntervalTime: LongWord; //走路间隔
    dwTurnIntervalTime: LongWord; //换方向间隔
    boControlActionInterval: Boolean;
    boControlWalkHit: Boolean;
    boControlRunLongHit: Boolean;
    boControlRunHit: Boolean;
    boControlRunMagic: Boolean;
    dwActionIntervalTime: LongWord; //组合操作间隔
    dwRunLongHitIntervalTime: LongWord; //跑位刺杀间隔
    dwRunHitIntervalTime: LongWord; //跑位攻击间隔
    dwWalkHitIntervalTime: LongWord; //走位攻击间隔
    dwRunMagicIntervalTime: LongWord; //跑位魔法间隔
    boDisableStruck: Boolean; //不显示人物弯腰动作
    boDisableSelfStruck: Boolean; //自己不显示人物弯腰动作
    dwStruckTime: LongWord; //人物弯腰停留时间
    dwKillMonExpMultiple: LongWord; //杀怪经验倍数
    dwRequestVersion: LongWord;
    boHighLevelKillMonFixExp: Boolean;
    boAddUserItemNewValue: Boolean;
    sLineNoticePreFix: string;
    sSysMsgPreFix: string;
    sGuildMsgPreFix: string;
    sGroupMsgPreFix: string;
    sHintMsgPreFix: string;
    sGMRedMsgpreFix: string;
    sMonSayMsgpreFix: string;
    sCustMsgpreFix: string;
    sCastleMsgpreFix: string;
    sGuildNotice: string;
    sGuildWar: string;
    sGuildAll: string;
    sGuildMember: string;
    sGuildMemberRank: string;
    sGuildChief: string;
    boKickAllUser: Boolean;
    boTestSpeedMode: Boolean;
    ClientConf: TClientConf;
    nWeaponMakeUnLuckRate: Integer;
    nWeaponMakeLuckPoint1: Integer;
    nWeaponMakeLuckPoint2: Integer;
    nWeaponMakeLuckPoint3: Integer;
    nWeaponMakeLuckPoint2Rate: Integer;
    nWeaponMakeLuckPoint3Rate: Integer;
    boCheckUserItemPlace: Boolean;
    nClientKey: Integer;
    nLevelValueOfTaosHP: Integer;
    nLevelValueOfTaosHPRate: Double;
    nLevelValueOfTaosMP: Integer;
    nLevelValueOfWizardHP: Integer;
    nLevelValueOfWizardHPRate: Double;
    nLevelValueOfWarrHP: Integer;
    nLevelValueOfWarrHPRate: Double;

    nHeroLevelValueOfTaosHP: Integer;
    nHeroLevelValueOfTaosHPRate: Double;
    nHeroLevelValueOfTaosMP: Integer;
    nHeroLevelValueOfWizardHP: Integer;
    nHeroLevelValueOfWizardHPRate: Double;
    nHeroLevelValueOfWarrHP: Integer;
    nHeroLevelValueOfWarrHPRate: Double;

    nProcessMonsterInterval: Integer;

    nAppIconCrc: Integer;
    boCheckFail: Boolean;
    BoneFammArray: array[0..9] of TRecallMigic;
    DogzArray: array[0..9] of TRecallMigic;

    boIDSocketConnected: Boolean;
    UserIDSection: TRTLCriticalSection;
    sIDSocketRecvText: string;
    nIDSocketRecvIncLen: Integer;
    nIDSocketRecvMaxLen: Integer;
    nIDSocketRecvCount: Integer;
    nIDReceiveMaxTime: Integer;
    nIDSocketWSAErrCode: Integer;
    nIDSocketErrorCount: Integer;

    nLoadDBCount: Integer;
    nLoadDBErrorCount: Integer;
    nSaveDBCount: Integer;
    nDBQueryID: Integer;
    boDBSocketConnected: Boolean;
    nDBSocketRecvIncLen: Integer;
    nDBSocketRecvMaxLen: Integer;
    sDBSocketRecvText: string;
    sDBSocketBufferText: string;

    boDBSocketWorking: Boolean;
    nDBSocketRecvCount: Integer;
    nDBReceiveMaxTime: Integer;
    nDBSocketWSAErrCode: Integer;
    nDBSocketErrorCount: Integer;

    UserEngineThread: pTThreadInfo;
    IDSocketThread: pTThreadInfo;
    DBSOcketThread: pTThreadInfo;

    nServerFile_CRCB: Integer;
    nServerFile_CRCA: Integer;

    nClientFile1_CRC: Integer;
    nClientFile2_CRC: Integer;
    nClientFile3_CRC: Integer;

    Encode6BitBuf: TEncode6BitBuf;
    Decode6BitBuf: TDecode6BitBuf;

    nUserSellOffCount: Integer;
    nUserSellOffTax: Integer;

    boPullPlayObject: Boolean;
    nMagDelayTimeDoubly: Integer;
    nMagPowerDoubly: Integer;
    boPlayObjectReduceMP: Boolean;
    boGroupMbAttackSlave: Boolean;
    nBigStorageLimitCount: Integer;
    boDropGoldToPlayBag: Boolean; //金币入包
    boChangeUseItemNameByPlayName: Boolean;
    sChangeUseItemName: string;
    boUseFixExp: Boolean;
    nBaseExp: Integer;
    nAddExp: Integer;
    nDedingUseTime: Integer;
    boDedingAllowPK: Boolean;
    boRegenMonsters: Boolean;

    nCopyHumanBagCount: Integer;
    nAllowCopyHumanCount: Integer;
    boAddMasterName: Boolean;
    sCopyHumName: string;
    nCopyHumAddHPRate: Integer;
    nCopyHumAddMPRate: Integer;
    sCopyHumBagItems1: string;
    sCopyHumBagItems2: string;
    sCopyHumBagItems3: string;
    boAllowGuardAttack: Boolean;

    dwWarrorAttackTime: LongWord;
    dwWizardAttackTime: LongWord;
    dwTaoistAttackTime: LongWord;
    dwWarrorWalkTime: LongWord;
    dwWizardWalkTime: LongWord;
    dwTaoistWalkTime: LongWord;

    boAllowReCallMobOtherHum: Boolean;
    boNeedLevelHighTarget: Boolean;

    dwGetDBSockMsgTime: LongWord;
    boPullCrossInSafeZone: Boolean;
    boHighLevelGroupFixExp: Boolean;
    boStartMapEvent: Boolean;

    nLimitExpLevel: Integer;
    nLimitExpValue: Integer;

    boChangeMapFireExtinguish: Boolean;
    nFireDelayTimeRate: Integer;
    nFirePowerRate: Integer;
    nDidingPowerRate: Integer;

    //nLimitMinOrderLevel: Integer; //进入排行的最低等级
    nHeroStartLevel: Integer;
    nHeroKillMonExpRate: Integer;
    HeroBagItemCounts: array[0..4] of Integer;
    dwHeroWarrorAttackTime: LongWord;
    dwHeroWizardAttackTime: LongWord;
    dwHeroTaoistAttackTime: LongWord;
    dwHeroWarrorWalkTime: LongWord;
    dwHeroWizardWalkTime: LongWord;
    dwHeroTaoistWalkTime: LongWord;


    boHeroKillByMonstDropUseItem: Boolean;
    boHeroKillByHumanDropUseItem: Boolean;
    boHeroDieScatterBag: Boolean;
    boHeroDieRedScatterBagAll: Boolean;
    nHeroDieDropUseItemRate: Integer;
    nHeroDieRedDropUseItemRate: Integer;
    nHeroDieScatterBagRate: Integer;

    nHeroAddHPRate: Integer;
    nHeroAddMPRate: Integer;

    nMaxAngryValue: Integer;
    nAddAngryValue: Integer;
    nDecAngryValue: Integer;
    nHeroAttackRate: Integer;
    sHeroClothsMan: string;
    sHeroClothsWoman: string;
    sHeroWoodenSword: string;
    sHeroBasicDrug: string;
    btHeroNameColor: Byte;
    nSkill43DelayTime: Integer;
    nSkill50DelayTime: Integer;
    nSkill58DelayTime: Integer;
    nSkillZRJFDelayTime: Integer;

    nSkill43PowerRate: Integer;
    nSkill58PowerRate: Integer;
    boCheckClientVersion: Boolean;
    boAllowRecallSelf: Boolean;

    boAllowRecallDogz: Boolean;
    boAllowRecallMoon: Boolean;
    boAllowRecallAll: Boolean;
    boRobotAttack: Boolean;
    nLimitLoginTime: Integer;


    boAllowClientChgSpeed: Boolean;
    //nClientGameOptionType: Integer;

    nSkill60Rate: Integer;
    nSkill61Rate: Integer;
    nSkill62Rate: Integer;
    nSkill63Rate: Integer;
    nSkill64Rate: Integer;
    nSkill65Rate: Integer;

    nRecallHeroTime: Integer;
    sRecallHeroHint: string;

    nMonRandomNewAddValue: Integer;
    nMakeRandomNewAddValue: Integer;
    nScriptRandomNewAddValue: Integer;

    nMonRandomNotLimit: Integer;
    nMakeRandomNotLimit: Integer;
    nScriptRandomNotLimit: Integer;
    nItemMaxLimitDay: Integer;
    nItemLimitDayRate: Integer;


    nWeaponMaxLimitDay: Integer;
    nWeaponLimitDayRate: Integer;
    nWeaponNotLimitRate: Integer;

    nDressMaxLimitDay: Integer;
    nDressLimitDayRate: Integer;
    nDressNotLimitRate: Integer;

    nNeckLaceMaxLimitDay: Integer;
    nNeckLaceLimitDayRate: Integer;
    nNeckLaceNotLimitRate: Integer;

    nArmRingMaxLimitDay: Integer;
    nArmRingLimitDayRate: Integer;
    nArmRingNotLimitRate: Integer;

    nRingMaxLimitDay: Integer;
    nRingLimitDayRate: Integer;
    nRingNotLimitRate: Integer;

    nHelMetMaxLimitDay: Integer;
    nHelMetLimitDayRate: Integer;
    nHelMetNotLimitRate: Integer;

    nOtherMaxLimitDay: Integer;
    nOtherLimitDayRate: Integer;
    nOtherNotLimitRate: Integer;

    nWeaponNewAddValueMaxLimit: Integer;
    nWeaponNewAddValueRate: Integer;
    nDressNewAddRate: Integer;
    nDressNewAddValueMaxLimit: Integer;
    nDressNewAddValueRate: Integer;
    nNeckLace202124NewAddRate: Integer;
    nNeckLace202124NewAddValueMaxLimit: Integer;
    nNeckLace202124NewAddValueRate: Integer;
    nNeckLace19NewAddRate: Integer;
    nNeckLace19NewAddValueMaxLimit: Integer;
    nNeckLace19NewAddValueRate: Integer;
    nArmRing26NewAddRate: Integer;
    nArmRing26NewAddValueMaxLimit: Integer;
    nArmRing26NewAddValueRate: Integer;
    nRing22NewAddRate: Integer;
    nRing22NewAddValueMaxLimit: Integer;
    nRing22NewAddValueRate: Integer;
    nRing23NewAddRate: Integer;
    nRing23NewAddValueMaxLimit: Integer;
    nRing23NewAddValueRate: Integer;
    nHelMetNewAddRate: Integer;
    nHelMetNewAddValueMaxLimit: Integer;
    nHelMetNewAddValueRate: Integer;
    nUnknowHelMetNewAddRate: Integer;
    nUnknowHelMetNewAddValueMaxLimit: Integer;
    nUnknowRingNewAddRate: Integer;
    nUnknowRingNewAddValueMaxLimit: Integer;
    nUnknowNecklaceNewAddRate: Integer;
    nUnknowNecklaceNewAddValueMaxLimit: Integer;

    boBindItemNoDeal: Boolean;
    boBindItemNoScatter: Boolean;
    boBindItemNoDrop: Boolean;
    boBindItemNoSellOff: Boolean;
    boBindItemNoPickUp: Boolean;

    boCopyItemClear: Boolean;

    nMonRandomAddPoint: Integer;
    nMakeRandomAddPoint: Integer;
    nScriptRandomAddPoint: Integer;

    nWeaponPointType: Integer;
    nWeaponPointAddRate: Integer;
    nWeaponPointAddValueMaxLimit: Integer;
    nWeaponPointAddValueRate: Integer;

    nDressPointType: Integer;
    nDressPointAddRate: Integer;
    nDressPointAddValueMaxLimit: Integer;
    nDressPointAddValueRate: Integer;

    nNeckLacePointType: Integer;
    nNeckLacePointAddRate: Integer;
    nNeckLacePointAddValueMaxLimit: Integer;
    nNeckLacePointAddValueRate: Integer;

    nArmRingPointType: Integer;
    nArmRingPointAddRate: Integer;
    nArmRingPointAddValueMaxLimit: Integer;
    nArmRingPointAddValueRate: Integer;

    nRingPointType: Integer;
    nRingPointAddRate: Integer;
    nRingPointAddValueMaxLimit: Integer;
    nRingPointAddValueRate: Integer;

    nHelMetPointType: Integer;
    nHelMetPointAddRate: Integer;
    nHelMetPointAddValueMaxLimit: Integer;
    nHelMetPointAddValueRate: Integer;

    nShoesPointType: Integer;
    nShoesPointAddRate: Integer;
    nShoesPointAddValueMaxLimit: Integer;
    nShoesPointAddValueRate: Integer;

    nBeltPointType: Integer;
    nBeltPointAddRate: Integer;
    nBeltPointAddValueMaxLimit: Integer;
    nBeltPointAddValueRate: Integer;


    WeaponNewAbil: array[0..10] of Boolean;
    DressNewAbil: array[0..10] of Boolean;
    NeckLaceNewAbil: array[0..10] of Boolean;
    ArmRingNewAbil: array[0..10] of Boolean;
    RingNewAbil: array[0..10] of Boolean;
    HelMetNewAbil: array[0..10] of Boolean;
    ShoesNewAbil: array[0..10] of Boolean;
    BeltNewAbil: array[0..10] of Boolean;






    boAllowItemAddValue: Boolean;
    boAllowItemAddPoint: Boolean;
    boAllowItemTime: Boolean;



    boHeroUseBagItem: Boolean;
    boMonUseBagItem: Boolean;
    boHumUseBagItem: Boolean;

    nNewShieldUseRate: Integer;
    nNewShieldDamageRate: Integer;
    nNewShieldWaitTime: Integer;

    nShowClientItemStyle: Integer;
    nSpaceSkillDelayTime: Integer;
    nSpaceSkillKeepTime: Integer;

    boNoAllowWarRangeUseSpaceSkill: Boolean;
    boAllowSpaceOutAttack: Boolean;
    boSafeNoAllowTargetBB: Boolean;
    nGroupFireCharmPowerRate: Integer;

    nUseItemSpeed: Integer;
    nMagicMovePositionTime: Integer;
    nMagicMovePositionRate: Integer;
    boNoHintMagicFail: Boolean;
    boNoHintMagicOK: Boolean;
    boNoHintMagicClose: Boolean;
    nSkill75PowerRate: Integer;
    nSkill76PowerRate: Integer;
    nSkill77PowerRate: Integer;
    dwTryDuelTime: LongWord;
    dwDuelOKTime: LongWord;
    boCanNotGetBackDuel: Boolean;
    boDisableDuel: Boolean;
    boSafeCanStore: Boolean;
    boOpenStoreGMMode: Boolean;
    boOpenStoreCheckLevel: Boolean;
    nOpenStoreCheckLevel: Integer;
    nMaxLevel: LongInt;
    sUnKnowName: string;

    nMoonLowPowerRate: Integer;
    nMoonHighPowerRate: Integer;

    StatusDelayTime: array[1..2] of Integer;

    nGreenNumber: Integer;
    boChangeMapReleasePoison: Boolean;
    boGetRandomHomePoint: Boolean;
    nWalkSpeedRate: Integer;
    nAttackSpeedRate: Integer;

    nSerieMagicTime: Integer;

    SerieMagicPowerRate: array[0..12 - 1] of Integer;
    SerieMagicBlasthitPowerRate: array[0..12 - 1] of Integer;
    SerieMagicAttackRange: array[0..12 - 1] of Integer;
    SerieMagicBlasthitRate: array[0..12 - 1, 0..3] of Integer;

    sAIHomeMap: string;
    nAIHomeX: Integer;
    nAIHomeY: Integer;

    nItemMaxStarCount: Integer;
    boCheckSpeedHack: Boolean;

    boAutoRepairItem: Boolean;
    boRenewHealth: Boolean;
    nRenewPercent: Integer;

    sAIConfigListFileName: string;
    boCheckCanUpgradeStarItem: Boolean;
  end;

  TGameCommand = record
    Data,
      PRVMSG,
      ALLOWMSG,
      LETSHOUT,
      LETTRADE,
      LETGUILD,
      ENDGUILD,
      BANGUILDCHAT,
      AUTHALLY,
      AUTH,
      AUTHCANCEL,
      DIARY,
      USERMOVE,
      SEARCHING,
      ALLOWGROUPCALL,
      GROUPRECALLL,
      ALLOWGUILDRECALL,
      GUILDRECALLL,
      UNLOCKSTORAGE,
      UnLock,
      Lock,
      PASSWORDLOCK,
      SETPASSWORD,
      CHGPASSWORD,
      CLRPASSWORD,
      UNPASSWORD,
      MEMBERFUNCTION,
      MEMBERFUNCTIONEX,
      DEAR,
      ALLOWDEARRCALL,
      DEARRECALL,
      Master,
      ALLOWMASTERRECALL,
      MASTERECALL,
      ATTACKMODE,
      REST,
      TAKEONHORSE,
      TAKEOFHORSE,
      HUMANLOCAL,
      Move,
      POSITIONMOVE,
      INFO,
      MOBLEVEL,
      MOBCOUNT,
      HUMANCOUNT,
      Map,
      KICK,
      TING,
      SUPERTING,
      MAPMOVE,
      SHUTUP,
      RELEASESHUTUP,
      SHUTUPLIST,
      GAMEMASTER,
      OBSERVER,
      SUEPRMAN,
      Level,
      SABUKWALLGOLD,
      RECALL,
      REGOTO,
      SHOWFLAG,
      SHOWOPEN,
      SHOWUNIT,
      Attack,
      MOB,
      MOBNPC,
      DELNPC,
      NPCSCRIPT,
      RECALLMOB,
      LUCKYPOINT,
      LOTTERYTICKET,
      RELOADGUILD,
      RELOADLINENOTICE,
      RELOADABUSE,
      BACKSTEP,
      BALL,
      FREEPENALTY,
      PKPOINT,
      IncPkPoint,
      CHANGELUCK,
      HUNGER,
      HAIR,
      TRAINING,
      DELETESKILL,
      CHANGEJOB,
      CHANGEGENDER,
      NAMECOLOR,
      Mission,
      MobPlace,
      TRANSPARECY,
      DELETEITEM,
      LEVEL0,
      CLEARMISSION,
      SETFLAG,
      SETOPEN,
      SETUNIT,
      RECONNECTION,
      DISABLEFILTER,
      CHGUSERFULL,
      CHGZENFASTSTEP,
      CONTESTPOINT,
      STARTCONTEST,
      ENDCONTEST,
      ANNOUNCEMENT,
      OXQUIZROOM,
      GSA,
      CHANGEITEMNAME,
      DISABLESENDMSG,
      ENABLESENDMSG,
      DISABLESENDMSGLIST,
      KILL,
      MAKE,
      SMAKE,
      BonusPoint,
      DELBONUSPOINT,
      RESTBONUSPOINT,
      FIREBURN,
      TESTFIRE,
      TESTSTATUS,
      DELGOLD,
      ADDGOLD,
      DELGAMEGOLD,
      ADDGAMEGOLD,
      GAMEGOLD,
      GAMEPOINT,
      CREDITPOINT,
      TESTGOLDCHANGE,
      REFINEWEAPON,
      RELOADADMIN,
      ReLoadNpc,
      RELOADMANAGE,
      RELOADROBOTMANAGE,
      RELOADROBOT,
      RELOADMONITEMS,
      RELOADDIARY,
      RELOADITEMDB,
      RELOADMAGICDB,
      RELOADMONSTERDB,
      RELOADMINMAP,
      ReAlive,
      ADJUESTLEVEL,
      ADJUESTEXP,
      AddGuild,
      DELGUILD,
      CHANGESABUKLORD,
      FORCEDWALLCONQUESTWAR,
      ADDTOITEMEVENT,
      ADDTOITEMEVENTASPIECES,
      ItemEventList,
      STARTINGGIFTNO,
      DELETEALLITEMEVENT,
      STARTITEMEVENT,
      ITEMEVENTTERM,
      ADJUESTTESTLEVEL,
      TRAININGSKILL,
      OPDELETESKILL,
      CHANGEWEAPONDURA,
      RELOADGUILDALL,
      WHO,
      TOTAL,
      TESTGA,
      MAPINFO,
      SBKDOOR,
      CHANGEDEARNAME,
      CHANGEMASTERNAME,
      STARTQUEST,
      SETPERMISSION,
      CLEARMON,
      RENEWLEVEL,
      DENYIPLOGON,
      DENYACCOUNTLOGON,
      DENYCHARNAMELOGON,
      DELDENYIPLOGON,
      DELDENYACCOUNTLOGON,
      DELDENYCHARNAMELOGON,
      SHOWDENYIPLOGON,
      SHOWDENYACCOUNTLOGON,
      SHOWDENYCHARNAMELOGON,
      VIEWWHISPER,
      SPIRIT,
      SPIRITSTOP,
      SetMapMode,
      SHOWMAPMODE,
      TESTSERVERCONFIG,
      SERVERSTATUS,
      TESTGETBAGITEM,
      CLEARBAG,
      SHOWUSEITEMINFO,
      BINDUSEITEM,
      MOBFIREBURN,
      TESTSPEEDMODE,
      REMTEMSG,
      COLORSAY,
      SETCOLORSAY,
      AllowReAlive,
      UserItem,
      SIGNMOVE,
      SHOWEFFECT,
      SEARCHMON,
      CLEARCOPYITEM,
      RANGECLEARCOPYITEM,
      UNBINDUSEITEM,
      RestHero,
      LOCKLOGON: TGameCmd;
  end;

  TGateObj = record
    sName: string;
    sSMapNO: string;
    sDMapNO: string;
    boFlag: Boolean;
    DEnvir: TEnvirnoment;
    nSMapX: Integer;
    nSMapY: Integer;
    nDMapX: Integer;
    nDMapY: Integer;
  end;
  pTGateObj = ^TGateObj;

  TMapQuestInfo = record
    sMapName: string[16];
    nFlags: Integer;
    nFlag: Integer;
    nValue: Integer;
    boFlag: Boolean;
    sMonName: string[14];
    sNeedItem: string[14];
    sScriptName: string[14];
    boGroup: Boolean;
    s08: string;
    s0C: string;
    bo10: Boolean;
    NPC: TMerchant;
  end;
  pTMapQuestInfo = ^TMapQuestInfo;

  TMagicEvent = record
    BaseObjectList: TList;
    dwStartTick: LongWord;
    dwTime: LongWord;
    Events: array[0..7] of THolyCurtainEvent;
  end;
  pTMagicEvent = ^TMagicEvent;

{$IF OEMVER = OEM775}
  TLevelInfo = record
    wHP: Word;
    wMP: Word;
    dwExp: LongWord;
    wAC: Word;
    wMaxAC: Word;
    wACLimit: Word;
    wMAC: Word;
    wMaxMAC: Word;
    wMACLimit: Word;
    wDC: Word;
    wMaxDC: Word;
    wDCLimit: Word;
    dwDCExp: LongWord;
    wMC: Word;
    wMaxMC: Word;
    wMCLimit: Word;
    dwMCExp: LongWord;
    wSC: Word;
    wMaxSC: Word;
    wSCLimit: Word;
    dwSCExp: LongWord;
  end;


{$IFEND}
procedure LoadStringList;
procedure UnLoadStringList;
procedure SaveStringList;

function GetPageCount(ItemCount: Integer): Integer;
procedure SetProcessName(sName: string);
procedure CopyStdItemToOStdItem(StdItem: pTStdItem; OStdItem: pTOStdItem);

function AddToProcTable(ProcAddr: Pointer; sProcName: string; nProcCode: Integer): Boolean;
function AddToPulgProcTable(sProcName: string; nProcCode: Integer): Integer;
function AddToObjTable(Obj: TObject; sObjName: string; nObjcCode: Integer): Boolean;

function GetExVersionNO(nVersionDate: Integer; var nOldVerstionDate: Integer): Integer;
function GetNextDirection(sX, sY, dx, dy: Integer): Byte;
function LoadLineNotice(FileName: string): Boolean;
function GetMultiServerAddrPort(btServerIndex: Byte; var sIPaddr: string; var nPort: Integer): Boolean;
procedure MainOutMessage(Msg: string);

function AddDateTimeOfDay(DateTime: TDateTime; nDay: Integer): TDateTime;
function GetGoldShape(nGold: Integer): Word; //金币在地上显示的外形ID
function GetRandomLook(nBaseLook, nRage: Integer): Integer;
function FilterShowName(sName: string): string;
function CheckGuildName(sGuildName: string): Boolean;
function CheckUserItems(nIdx: Integer; StdItem: pTStdItem): Boolean;
function GetItemType(StdItem: pTStdItem): Byte;
function GetItemNumber(): Integer;
function GetItemNumberEx(): Integer;
function sub_4B2F80(nDir, nRage: Integer): Byte;
function GetValNameNo(sText: string): Integer;
function IsUseItem(nIndex: Integer): Boolean;
function GetMakeItemInfo(sItemName: string): TStringList;
procedure AddLogonCostLog(sMsg: string);
procedure AddGameDataLog(sMsg: string);
procedure TrimStringList(sList: TStringList);
function CanMakeItem(sItemName: string): Boolean;
function CanMoveMap(sMapName: string): Boolean;
function LoadMonSayMsg(): Boolean;
function LoadItemBindIPaddr(): Boolean;
function SaveItemBindIPaddr(): Boolean;
function LoadItemBindAccount(): Boolean;
function SaveItemBindAccount(): Boolean;
function LoadItemBindCharName(): Boolean;
function SaveItemBindCharName(): Boolean;
function LoadDisableMakeItem(): Boolean;
function SaveDisableMakeItem(): Boolean;
function SaveAdminList(): Boolean;
function LoadUnMasterList(): Boolean;
function SaveUnMasterList(): Boolean;
function LoadUnForceMasterList(): Boolean;
function SaveUnForceMasterList(): Boolean;
function LoadEnableMakeItem(): Boolean;
function SaveEnableMakeItem(): Boolean;
function LoadDisableMoveMap(): Boolean;
function SaveDisableMoveMap(): Boolean;

function LoadAllowSellOffItemList(): Boolean; //加载允许寄售物品
function SaveAllowSellOffItemList(): Boolean; //保存允许寄售物品

//function LoadItemDblClickList(): Boolean; //加载物品事件触发列表
//function SaveItemDblClickList(): Boolean; //保存物品事件触发列表
function LoadRememberItemList(): Boolean;
function SaveRememberItemList(): Boolean;
function GetRememberItem(MakeIndex, Index: Integer): pTRememberItem;

function CanSellOffItem(sItemName: string): Boolean;

function GetUseItemName(nIndex: Integer): string;
function GetUseItemIdx(sName: string): Integer;
function LoadMonDropLimitList(): Boolean;
function SaveMonDropLimitList(): Boolean;
function LoadDisableTakeOffList(): Boolean;
function SaveDisableTakeOffList(): Boolean;
function InDisableTakeOffList(nItemIdx: Integer): Boolean;
function LoadDisableSendMsgList(): Boolean;
function SaveDisableSendMsgList(): Boolean;
function GetDisableSendMsgList(sHumanName: string): Boolean;
function LoadGameLogItemNameList(): Boolean;
function GetGameLogItemNameList(sItemName: string): Byte;
function SaveGameLogItemNameList(): Boolean;
function LoadDenyIPAddrList(): Boolean;
function GetDenyIPaddrList(sIPaddr: string): Boolean;
function SaveDenyIPAddrList(): Boolean;
function LoadDenyAccountList(): Boolean;
function GetDenyAccountList(sAccount: string): Boolean;
function SaveDenyAccountList(): Boolean;
function LoadDenyChrNameList(): Boolean;
function GetDenyChrNameList(sChrName: string): Boolean;
function SaveDenyChrNameList(): Boolean;
function LoadNoClearMonList(): Boolean;
function GetNoClearMonList(sMonName: string): Boolean;
function SaveNoClearMonList(): Boolean;
procedure LoadExp();
procedure LoadGameCommand();
procedure LoadString();
procedure LoadConfig();
function GetRGB(c256: Byte): TColor; stdcall;
procedure SendGameCenterMsg(wIdent: Word; sSENDMSG: string);
function GetIPAddr: string;
function GetIPLocal(sIPaddr: string): string;
function IsCheapStuff(tByte: Byte): Boolean;
function CompareIPaddr(sIPaddr, dIPaddr: string): Boolean;
function GetStartPointInfo(nIndex: Integer; var nX, nY: Integer): string;
function GetStartTime(nTime: LongWord): string;
procedure StartFixExp();

function GetBindItemType(nShape: Integer): Integer;
procedure LoadBindItemTypeFromUnbindList();
function IsAllowPickUpItem(const sItemName: string): Boolean;
procedure LoadAllowPickUpItemList();


function IsAllowScatterItem(sItemName: string): Boolean;
procedure LoadAllowScatterItemList();





function GetFilesSize(FileName: string): Integer; //获取文件大小

function FindItemBox(sItemName: string): pTItemBox;
function LoadBoxList(): Boolean;
function SaveBoxList(): Boolean;
procedure LoadBoxItem(ItemBox: pTItemBox);
procedure SaveBoxItem(SaveList: TStringList; ItemBox: pTItemBox);
function GetBoxItemTypeName(ItemType: TBoxItemType): string;

function IsBindAccount(nItemIdx, nMakeIdex: Integer): Boolean;
function IsBindCharName(nItemIdx, nMakeIdex: Integer): Boolean;
function IsBindIPaddr(nItemIdx, nMakeIdex: Integer): Boolean;

function CanUpgradeItem(sItemName: string): Boolean;
function LoadEnableUpgradeItem(): Boolean;
function SaveEnableUpgradeItem(): Boolean;

function LoadAICharNameList(): Boolean;
function GetAICharNameList(sName: string): Boolean;
function SaveAICharNameList(): Boolean;
function LoadAIHeroNameList(): Boolean;
function GetAIHeroNameList(sName: string): Boolean;
function SaveAIHeroNameList(): Boolean;

function GetAIHeroName(sCharName: string): string;
//function GetMemoryIniFile(const sFileName: string): TMemoryIniFile;
var
  g_Buffer: PChar;
  sCaptionExtText: string;
  sSoftVersionType: string;
  g_dwGameCenterHandle: THandle;
  IsDebuggerPresent: function(): Boolean; stdcall;

  //CertCheck         :TList; //用于检查角色创建释放
  //EventCheck         :TList; //用于检查事件创建释放

{$IF OEMVER = OEM775}
  Level775: TIniFile;
{$IFEND}
  Config: TIniFile;
  CommandConf: TIniFile;
  StringConf: TIniFile;
  Memo: TMemo;
  ProcArray: TProcArray;
  ObjectArray: TObjectArray;
  PlugProcArray: TProcArray;
  PlugInEngine: TPlugInManage;
  nServerIndex: Integer = 0;
  RunSocket: TRunSocket;
  MainLogMsgList: TStringList;
  LogStringList: TStringList;
  LogonCostLogList: TStringList;
  g_MapManager: TMapManager;
  ItemUnit: TItemUnit;
  MagicManager: TMagicManager;
  NoticeManager: TNoticeManager;
  g_GuildManager: TGuildManager;
  g_EventManager: TEventManager;
  g_CastleManager: TCastleManager;


  DataEngine: TDataEngine;

  FrontEngine: TFrontEngine;
  UserEngine: TUserEngine;
  RobotManage: TRobotManage;
  g_MakeItemList: TStringList;
  g_StartPointList: TStringList;
  ServerTableList: TList;
  g_DenySayMsgList: TQuickList;
  MiniMapList: TStringList;
  g_UnbindList: TStringList;
  LineNoticeList: TStringList;
  QuestDiaryList: TList;
  ItemEventList: TStringList;
  AbuseTextList: TStringList;
  g_MonSayMsgList: TStringList; //怪物说明信息列表
  g_DisableMakeItemList: TGStringList; //禁止制造物品列表
  g_EnableMakeItemList: TGStringList; //禁止制造物品列表
  g_DisableMoveMapList: TGStringList; //禁止移动地图列表
  g_ItemNameList: TGList; //物品别名列表
  g_DisableSendMsgList: TGStringList; //禁止发信息名称列表
  g_MonDropLimitLIst: TGStringList; //怪物爆物品限制
  g_DisableTakeOffList: TGStringList; //禁止取下物品列表
  g_AllowSellOffItemList: TGStringList; //允许寄售物品列表 新增

  g_EnableUpgradeItemList: TGStringList; //禁止升级物品列表


  g_SellList: TSellEngine;
  g_GoldList: TGoldEngine;
  g_Storage: TStorageEngine; //无限仓库

  g_DuelEngine: TDuelEngine; //挑战

  g_MapEventListOfDropItem: TGList;
  g_MapEventListOfPickUpItem: TGList;
  g_MapEventListOfMine: TGList;
  g_MapEventListOfWalk: TGList;
  g_MapEventListOfRun: TGList;

  g_AllowPickUpItemList: TGStringList = nil; //分身允许捡取物品列表
  g_RememberItemList: TQuickList; //物品事件触发列表

  g_ItemBoxList: TGStringList;

  g_AllowScatterItemList: TGStringList;

  g_GroupItems: TGroupItems;


  g_MsgFilterList: TGList;

  g_BindItemTypeList: TGList;

  g_ItemBindIPaddr: TGList;
  g_ItemBindAccount: TGList;
  g_ItemBindCharName: TGList;
  g_UnMasterList: TGStringList; //出师记录表
  g_UnForceMasterList: TGStringList; //强行出师记录表
  g_GameLogItemNameList: TGStringList; //游戏日志物品名
  g_boGameLogGold: Boolean;
  g_boGameLogGameGold: Boolean;
  g_boGameLogGamePoint: Boolean;
  g_boGameLogHumanDie: Boolean;
  g_DenyIPAddrList: TGStringList; //IP过滤列表
  g_DenyChrNameList: TGStringList; //角色过滤列表
  g_DenyAccountList: TGStringList; //登录帐号过滤列表
  g_NoClearMonList: TGStringList; //不清除怪物列表
  n4EBBD0: Integer;
  g_CheckCode: TCheckCode;
  g_nIdent: Integer;
  g_ProcessMsg: TProcessMessage;
  LogMsgCriticalSection: TRTLCriticalSection;
  ProcessMsgCriticalSection: TRTLCriticalSection;
  UserDBSection: TRTLCriticalSection;
  ProcessHumanCriticalSection: TRTLCriticalSection;
  HumanSortCriticalSection: TRTLCriticalSection;

  CS_6: TCriticalSection;

  g_nTotalHumCount: Integer;

  g_boMission: Boolean;
  g_sMissionMap: string;
  g_nMissionX: Integer;
  g_nMissionY: Integer;

  boStartReady: Boolean;
  g_boExitServer: Boolean;
  boFilterWord: Boolean;

  sLogFileName: string;
  nRunTimeMin: Integer;
  nRunTimeMax: Integer;

  g_nBaseObjTimeMin: Integer;
  g_nBaseObjTimeMax: Integer;
  g_nSockCountMin: Integer;
  g_nSockCountMax: Integer;
  g_nUsrTimeMin: Integer;
  g_nUsrTimeMax: Integer;
  g_nHumCountMin: Integer;
  g_nHumCountMax: Integer;

  g_nMonTimeMin: Integer;
  g_nMonTimeMax: Integer;
  g_nMonGenTime: Integer;
  g_nMonGenTimeMin: Integer;
  g_nMonGenTimeMax: Integer;
  g_nMonProcTime: Integer;
  g_nMonProcTimeMin: Integer;
  g_nMonProcTimeMax: Integer;
  dwUsrRotCountMin: Integer;
  dwUsrRotCountMax: Integer;

  g_dwUsrRotCountTick: LongWord; //0x4EBD48          :LongWord;
  g_nProcessHumanLoopTime: Integer; //0x004EBD54    //处理人物列表循环次数
  g_dwHumLimit: LongWord = 30; //0x4EBD98
  g_dwHeroLimit: LongWord = 30; //0x4EBD98
  g_dwMonLimit: LongWord = 30; //0x4EBD9C
  g_dwZenLimit: LongWord = 5; //0x4EBDA0
  g_dwNpcLimit: LongWord = 5; //0x4EBDA4
  g_dwSocLimit: LongWord = 10; //0x4EBDA8
  g_dwSocCheckTimeOut: LongWord = 50; //2 * 1000;
  nDecLimit: Integer = 20; //0x4EBDAC
  nShiftUsrDataNameNo: Integer;




  g_nHeroUsrTimeMin: Integer;
  g_nHeroUsrTimeMax: Integer;
  g_nHeroCountMin: Integer;
  g_nHeroCountMax: Integer;

  dwHeroUsrRotCountMin: Integer;
  dwHeroUsrRotCountMax: Integer;

  g_dwHeroUsrRotCountTick: LongWord; //0x4EBD48          :LongWord;
  g_nProcessHeroLoopTime: Integer; //0x004EBD54
{$IF OEMVER = OEM775}
  sConfig775FileName: string = '.\775.txt';
{$IFEND}
  sConfigFileName: string = '.\!Setup.txt';
  sExpConfigFileName: string = '.\Exps.ini';
  sCommandFileName: string = '.\Command.ini';
  sStringFileName: string = '.\String.ini';
  dwRunDBTimeMax: LongWord; //0x004EBC98
  g_dwStartTick: LongWord; //0x004EBD14

  g_dwRunTick: LongWord; //0x4EBD18;
  n4EBD1C: Integer;

  g_nGameTime: Integer;

  g_sMonGenInfo1: string; //0x4EBD58
  g_sMonGenInfo2: string; //0x4EBD78
  g_sProcessName: string;
  g_sOldProcessName: string;
  g_ManageNPC: TNormNpc;
  g_RobotNPC: TNormNpc;
  g_PlayRobotNPC: TPlayRobotManage = nil;

  g_FunctionNPC: TMerchant;
  g_MissionNPC: TMerchant;
  g_DynamicVarList: TList;
  nCurrentMonthly: Integer;
  nTotalTimeUsage: Integer;
  nLastMonthlyTotalUsage: Integer;
  nGrossTotalCnt: Integer;
  nGrossResetCnt: Integer;
  n4EBB68: Integer;
  n4EBB6C: Integer;

  g_boMinimize: Boolean = True;


  g_StringList: array[0..9] of TStringList;


  g_AICharNameList: TGStringList;
  g_AIHeroNameList: TGStringList;
  g_AI3: TAI3;

  g_nSayCount: Integer = 0;

  g_TempGlobalVal: array[0..499] of Integer; //G
  g_TempGlobalAVal: array[0..499] of string; //A

  g_FindPath: TFindPath;


  g_nSaveGlobalValIdx: Integer = 0;

  g_MemoryIniFileList: TStringList;

  g_ItemManager: TItemManager;

  ColorTable: array[0..255] of TRGBQuad;
  ColorArray: array[0..1023] of Byte = (
    $00, $00, $00, $00, $00, $00, $80, $00, $00, $80, $00, $00, $00, $80, $80, $00,
    $80, $00, $00, $00, $80, $00, $80, $00, $80, $80, $00, $00, $C0, $C0, $C0, $00,
    $97, $80, $55, $00, $C8, $B9, $9D, $00, $73, $73, $7B, $00, $29, $29, $2D, $00,
    $52, $52, $5A, $00, $5A, $5A, $63, $00, $39, $39, $42, $00, $18, $18, $1D, $00,
    $10, $10, $18, $00, $18, $18, $29, $00, $08, $08, $10, $00, $71, $79, $F2, $00,
    $5F, $67, $E1, $00, $5A, $5A, $FF, $00, $31, $31, $FF, $00, $52, $5A, $D6, $00,
    $00, $10, $94, $00, $18, $29, $94, $00, $00, $08, $39, $00, $00, $10, $73, $00,
    $00, $18, $B5, $00, $52, $63, $BD, $00, $10, $18, $42, $00, $99, $AA, $FF, $00,
    $00, $10, $5A, $00, $29, $39, $73, $00, $31, $4A, $A5, $00, $73, $7B, $94, $00,
    $31, $52, $BD, $00, $10, $21, $52, $00, $18, $31, $7B, $00, $10, $18, $2D, $00,
    $31, $4A, $8C, $00, $00, $29, $94, $00, $00, $31, $BD, $00, $52, $73, $C6, $00,
    $18, $31, $6B, $00, $42, $6B, $C6, $00, $00, $4A, $CE, $00, $39, $63, $A5, $00,
    $18, $31, $5A, $00, $00, $10, $2A, $00, $00, $08, $15, $00, $00, $18, $3A, $00,
    $00, $00, $08, $00, $00, $00, $29, $00, $00, $00, $4A, $00, $00, $00, $9D, $00,
    $00, $00, $DC, $00, $00, $00, $DE, $00, $00, $00, $FB, $00, $52, $73, $9C, $00,
    $4A, $6B, $94, $00, $29, $4A, $73, $00, $18, $31, $52, $00, $18, $4A, $8C, $00,
    $11, $44, $88, $00, $00, $21, $4A, $00, $10, $18, $21, $00, $5A, $94, $D6, $00,
    $21, $6B, $C6, $00, $00, $6B, $EF, $00, $00, $77, $FF, $00, $84, $94, $A5, $00,
    $21, $31, $42, $00, $08, $10, $18, $00, $08, $18, $29, $00, $00, $10, $21, $00,
    $18, $29, $39, $00, $39, $63, $8C, $00, $10, $29, $42, $00, $18, $42, $6B, $00,
    $18, $4A, $7B, $00, $00, $4A, $94, $00, $7B, $84, $8C, $00, $5A, $63, $6B, $00,
    $39, $42, $4A, $00, $18, $21, $29, $00, $29, $39, $46, $00, $94, $A5, $B5, $00,
    $5A, $6B, $7B, $00, $94, $B1, $CE, $00, $73, $8C, $A5, $00, $5A, $73, $8C, $00,
    $73, $94, $B5, $00, $73, $A5, $D6, $00, $4A, $A5, $EF, $00, $8C, $C6, $EF, $00,
    $42, $63, $7B, $00, $39, $56, $6B, $00, $5A, $94, $BD, $00, $00, $39, $63, $00,
    $AD, $C6, $D6, $00, $29, $42, $52, $00, $18, $63, $94, $00, $AD, $D6, $EF, $00,
    $63, $8C, $A5, $00, $4A, $5A, $63, $00, $7B, $A5, $BD, $00, $18, $42, $5A, $00,
    $31, $8C, $BD, $00, $29, $31, $35, $00, $63, $84, $94, $00, $4A, $6B, $7B, $00,
    $5A, $8C, $A5, $00, $29, $4A, $5A, $00, $39, $7B, $9C, $00, $10, $31, $42, $00,
    $21, $AD, $EF, $00, $00, $10, $18, $00, $00, $21, $29, $00, $00, $6B, $9C, $00,
    $5A, $84, $94, $00, $18, $42, $52, $00, $29, $5A, $6B, $00, $21, $63, $7B, $00,
    $21, $7B, $9C, $00, $00, $A5, $DE, $00, $39, $52, $5A, $00, $10, $29, $31, $00,
    $7B, $BD, $CE, $00, $39, $5A, $63, $00, $4A, $84, $94, $00, $29, $A5, $C6, $00,
    $18, $9C, $10, $00, $4A, $8C, $42, $00, $42, $8C, $31, $00, $29, $94, $10, $00,
    $10, $18, $08, $00, $18, $18, $08, $00, $10, $29, $08, $00, $29, $42, $18, $00,
    $AD, $B5, $A5, $00, $73, $73, $6B, $00, $29, $29, $18, $00, $4A, $42, $18, $00,
    $4A, $42, $31, $00, $DE, $C6, $63, $00, $FF, $DD, $44, $00, $EF, $D6, $8C, $00,
    $39, $6B, $73, $00, $39, $DE, $F7, $00, $8C, $EF, $F7, $00, $00, $E7, $F7, $00,
    $5A, $6B, $6B, $00, $A5, $8C, $5A, $00, $EF, $B5, $39, $00, $CE, $9C, $4A, $00,
    $B5, $84, $31, $00, $6B, $52, $31, $00, $D6, $DE, $DE, $00, $B5, $BD, $BD, $00,
    $84, $8C, $8C, $00, $DE, $F7, $F7, $00, $18, $08, $00, $00, $39, $18, $08, $00,
    $29, $10, $08, $00, $00, $18, $08, $00, $00, $29, $08, $00, $A5, $52, $00, $00,
    $DE, $7B, $00, $00, $4A, $29, $10, $00, $6B, $39, $10, $00, $8C, $52, $10, $00,
    $A5, $5A, $21, $00, $5A, $31, $10, $00, $84, $42, $10, $00, $84, $52, $31, $00,
    $31, $21, $18, $00, $7B, $5A, $4A, $00, $A5, $6B, $52, $00, $63, $39, $29, $00,
    $DE, $4A, $10, $00, $21, $29, $29, $00, $39, $4A, $4A, $00, $18, $29, $29, $00,
    $29, $4A, $4A, $00, $42, $7B, $7B, $00, $4A, $9C, $9C, $00, $29, $5A, $5A, $00,
    $14, $42, $42, $00, $00, $39, $39, $00, $00, $59, $59, $00, $2C, $35, $CA, $00,
    $21, $73, $6B, $00, $00, $31, $29, $00, $10, $39, $31, $00, $18, $39, $31, $00,
    $00, $4A, $42, $00, $18, $63, $52, $00, $29, $73, $5A, $00, $18, $4A, $31, $00,
    $00, $21, $18, $00, $00, $31, $18, $00, $10, $39, $18, $00, $4A, $84, $63, $00,
    $4A, $BD, $6B, $00, $4A, $B5, $63, $00, $4A, $BD, $63, $00, $4A, $9C, $5A, $00,
    $39, $8C, $4A, $00, $4A, $C6, $63, $00, $4A, $D6, $63, $00, $4A, $84, $52, $00,
    $29, $73, $31, $00, $5A, $C6, $63, $00, $4A, $BD, $52, $00, $00, $FF, $10, $00,
    $18, $29, $18, $00, $4A, $88, $4A, $00, $4A, $E7, $4A, $00, $00, $5A, $00, $00,
    $00, $88, $00, $00, $00, $94, $00, $00, $00, $DE, $00, $00, $00, $EE, $00, $00,
    $00, $FB, $00, $00, $94, $5A, $4A, $00, $B5, $73, $63, $00, $D6, $8C, $7B, $00,
    $D6, $7B, $6B, $00, $FF, $88, $77, $00, $CE, $C6, $C6, $00, $9C, $94, $94, $00,
    $C6, $94, $9C, $00, $39, $31, $31, $00, $84, $18, $29, $00, $84, $00, $18, $00,
    $52, $42, $4A, $00, $7B, $42, $52, $00, $73, $5A, $63, $00, $F7, $B5, $CE, $00,
    $9C, $7B, $8C, $00, $CC, $22, $77, $00, $FF, $AA, $DD, $00, $2A, $B4, $F0, $00,
    $9F, $00, $DF, $00, $B3, $17, $E3, $00, $F0, $FB, $FF, $00, $A4, $A0, $A0, $00,
    $80, $80, $80, $00, $00, $00, $FF, $00, $00, $FF, $00, $00, $00, $FF, $FF, $00,
    $FF, $00, $00, $00, $FF, $00, $FF, $00, $FF, $FF, $00, $00, $FF, $FF, $FF, $00
    );

  g_GMRedMsgCmd: Char = '!';
  g_nGMREDMSGCMD: Integer = 6;
  g_dwSendOnlineTick: LongWord;

  g_HighLevelHuman: TObject = nil;
  g_HighPKPointHuman: TObject = nil;
  g_HighDCHuman: TObject = nil;
  g_HighMCHuman: TObject = nil;
  g_HighSCHuman: TObject = nil;
  g_HighOnlineHuman: TObject = nil;

  g_dwSpiritMutinyTick: LongWord;

{$IF USECODE = USEREMOTECODE}
  g_Encode6BitBuf: TEncode6BitBuf = (
    $55, $8B, $EC, $83, $C4, $E0, $89, $4D, $F4, $89, $55, $F8, $89, $45, $FC, $33,
    $C0, $89, $45, $EC, $C6, $45, $E5, $00, $33, $C0, $89, $45, $E8, $8B, $45, $F4,
    $48, $85, $C0, $0F, $8C, $C3, $00, $00, $00, $40, $89, $45, $E0, $C7, $45, $F0,
    $00, $00, $00, $00, $8B, $45, $E8, $3B, $45, $08, $0F, $8D, $AC, $00, $00, $00,
    $8B, $45, $FC, $8B, $55, $F0, $8A, $04, $10, $88, $45, $E6, $8B, $4D, $EC, $83,
    $C1, $02, $33, $C0, $8A, $45, $E6, $D3, $E8, $0A, $45, $E5, $24, $3F, $88, $45,
    $E7, $8B, $45, $EC, $83, $C0, $02, $B9, $08, $00, $00, $00, $2B, $C8, $33, $C0,
    $8A, $45, $E6, $D3, $E0, $C1, $E8, $02, $24, $3F, $88, $45, $E5, $83, $45, $EC,
    $02, $83, $7D, $EC, $06, $7D, $13, $8A, $45, $E7, $04, $3C, $8B, $55, $F8, $8B,
    $4D, $E8, $88, $04, $0A, $FF, $45, $E8, $EB, $46, $8B, $45, $08, $48, $3B, $45,
    $E8, $7E, $23, $8A, $45, $E7, $04, $3C, $8B, $55, $F8, $8B, $4D, $E8, $88, $04,
    $0A, $8A, $45, $E5, $04, $3C, $8B, $55, $F8, $8B, $4D, $E8, $88, $44, $0A, $01,
    $83, $45, $E8, $02, $EB, $11, $8A, $45, $E7, $04, $3C, $8B, $55, $F8, $8B, $4D,
    $E8, $88, $04, $0A, $FF, $45, $E8, $33, $C0, $89, $45, $EC, $C6, $45, $E5, $00,
    $FF, $45, $F0, $FF, $4D, $E0, $0F, $85, $48, $FF, $FF, $FF, $83, $7D, $EC, $00,
    $7E, $11, $8A, $45, $E5, $04, $3C, $8B, $55, $F8, $8B, $4D, $E8, $88, $04, $0A,
    $FF, $45, $E8, $8B, $45, $F8, $8B, $55, $E8, $C6, $04, $10, $00, $8B, $E5, $5D,
    $C2, $04, $00, $90);

  g_Decode6BitBuf: TDecode6BitBuf = (
    $55, $8B, $EC, $83, $C4, $DC, $89, $4D, $F4, $89, $55, $F8, $89, $45, $FC, $C7,
    $45, $EC, $02, $00, $00, $00, $33, $C0, $89, $45, $E8, $33, $C0, $89, $45, $E4,
    $C6, $45, $E2, $00, $8B, $45, $F4, $48, $85, $C0, $0F, $8C, $B5, $00, $00, $00,
    $40, $89, $45, $DC, $C7, $45, $F0, $00, $00, $00, $00, $8B, $45, $FC, $8B, $55,
    $F0, $0F, $B6, $04, $10, $83, $E8, $3C, $78, $10, $8B, $45, $FC, $8B, $55, $F0,
    $8A, $04, $10, $2C, $3C, $88, $45, $E3, $EB, $0A, $33, $C0, $89, $45, $E4, $E9,
    $81, $00, $00, $00, $8B, $45, $E4, $3B, $45, $08, $7D, $79, $8B, $45, $E8, $83,
    $C0, $06, $83, $F8, $08, $7C, $43, $B9, $06, $00, $00, $00, $2B, $4D, $EC, $8A,
    $45, $E3, $24, $3F, $25, $FF, $00, $00, $00, $D3, $E8, $0A, $45, $E2, $88, $45,
    $E1, $8B, $45, $F8, $8B, $55, $E4, $8A, $4D, $E1, $88, $0C, $10, $FF, $45, $E4,
    $33, $C0, $89, $45, $E8, $83, $7D, $EC, $06, $7D, $06, $83, $45, $EC, $02, $EB,
    $09, $C7, $45, $EC, $02, $00, $00, $00, $EB, $1F, $8B, $4D, $EC, $8A, $45, $E3,
    $D2, $E0, $8B, $55, $EC, $22, $82, $02, $15, $5E, $00, $88, $45, $E2, $B8, $08,
    $00, $00, $00, $2B, $45, $EC, $01, $45, $E8, $FF, $45, $F0, $FF, $4D, $DC, $0F,
    $85, $56, $FF, $FF, $FF, $8B, $45, $F8, $8B, $55, $E4, $C6, $04, $10, $00, $8B,
    $E5, $5D, $C2, $04, $00);
{$IFEND}
  g_Config: TConfig = (
    nConfigSize: SizeOf(TConfig);
    sServerName: 'MakeGM';
    sServerIPaddr: '127.0.0.1';
    sRegServerAddr: '222.180.37.42';
    nRegServerPort: 37000;
    sRegIP: '127.0.0.1';
    sWebSite: 'http://www.MakeGM.com';
    sBbsSite: 'http://bbs.MakeGM.com';
    sClientDownload: 'http://www.MakeGM.com';
    sQQ: '88888888';
    sPhone: '123456789';
    sBankAccount0: '银行信息';
    sBankAccount1: '银行信息';
    sBankAccount2: '银行信息';
    sBankAccount3: '银行信息';
    sBankAccount4: '银行信息';
    sBankAccount5: '银行信息';
    sBankAccount6: '银行信息';
    sBankAccount7: '银行信息';
    sBankAccount8: '银行信息';
    sBankAccount9: '银行信息';
    nServerNumber: 0;
    boVentureServer: False;
    boTestServer: True;
    boServiceMode: False;
    boNonPKServer: False;
    nTestLevel: 1;
    nTestGold: 0;
    nTestUserLimit: 1000;
    nSendBlock: 1024;
    nCheckBlock: 4069;
    nAvailableBlock: 8000;
    nGateLoad: 0;
    nUserFull: 1000;
    nZenFastStep: 300;
    sGateAddr: '127.0.0.1';
    nGatePort: 5000;
    sDBAddr: '127.0.0.1';
    nDBPort: 6000;
    sIDSAddr: '127.0.0.1';
    nIDSPort: 5600;
    sMsgSrvAddr: '127.0.0.1';
    nMsgSrvPort: 4900;
    sLogServerAddr: '127.0.0.1';
    nLogServerPort: 10000;
    boDiscountForNightTime: False;
    nHalfFeeStart: 2;
    nHalfFeeEnd: 10;
    boViewHackMessage: False;
    boViewAdmissionFailure: False;
    sBaseDir: '.\BaseDir\';
    sGuildDir: '.\GuildDir\List\';
    sGuildFile: '.\GuildDir\List.txt';
    sVentureDir: '.\VentureDir\';
    sConLogDir: '.\ConLogDir\';
    sCastleDir: '.\CastleDir\';
    sCastleFile: '.\CastleDir\List.txt';
    sEnvirDir: '.\Envir\';
    sMapDir: '.\Map\';
    sNoticeDir: '.\Notice\';
    sLogDir: '.\Log\';
    sPlugDir: '.\';
    sClientFile1: 'mir.1';
    sClientFile2: 'mir.2';
    sClientFile3: 'mir.3';

    sClothsMan: '布衣(男)';
    sClothsWoman: '布衣(女)';
    sWoodenSword: '木剑';
    sCandle: '蜡烛';
    sBasicDrug: '金创药(小量)';
    sGoldStone: '金矿';
    sSilverStone: '银矿';
    sSteelStone: '铁矿';
    sCopperStone: '铜矿';
    sBlackStone: '黑铁矿';
    sZuma: ('祖玛卫士', '祖玛雕像', '祖玛弓箭手', '楔蛾');
    sBee: '小角蝇';
    sSpider: '小蜘蛛';
    sWomaHorn: '沃玛号角';
    sZumaPiece: '祖玛头像';
    sGameGoldName: '飞尔币';
    sGamePointName: '游戏点';
    sPayMentPointName: '秒卡点';
    DBSocket: INVALID_SOCKET;
    nHealthFillTime: 300;
    nSpellFillTime: 800;
    nMonUpLvNeedKillBase: 100;
    nMonUpLvRate: 16;
    MonUpLvNeedKillCount: (0, 0, 50, 100, 200, 300, 600, 1200);
    SlaveColor: ($FF, $FE, $93, $9A, $E5, $A8, $B4, $FC, 249);
    //dwNeedExps              :TLevelNeedExp;
    WideAttack: (7, 1, 2);
    CrsAttack: (7, 1, 2, 3, 4, 5, 6);
    SpitMap: (
    ((0, 0, 1, 0, 0), //DR_UP
    (0, 0, 1, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0)),
    ((0, 0, 0, 0, 1), //DR_UPRIGHT
    (0, 0, 0, 1, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0)),
    ((0, 0, 0, 0, 0), //DR_RIGHT
    (0, 0, 0, 0, 0),
    (0, 0, 0, 1, 1),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0)),
    ((0, 0, 0, 0, 0), //DR_DOWNRIGHT
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 1, 0),
    (0, 0, 0, 0, 1)),
    ((0, 0, 0, 0, 0), //DR_DOWN
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 1, 0, 0),
    (0, 0, 1, 0, 0)),
    ((0, 0, 0, 0, 0), //DR_DOWNLEFT
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 1, 0, 0, 0),
    (1, 0, 0, 0, 0)),
    ((0, 0, 0, 0, 0), //DR_LEFT
    (0, 0, 0, 0, 0),
    (1, 1, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0)),
    ((1, 0, 0, 0, 0), //DR_UPLEFT
    (0, 1, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0),
    (0, 0, 0, 0, 0))
    );

    sHomeMap: '0';
    nHomeX: 289;
    nHomeY: 618;
    sRedHomeMap: '3';
    nRedHomeX: 845;
    nRedHomeY: 674;
    sRedDieHomeMap: '3';
    nRedDieHomeX: 839;
    nRedDieHomeY: 668;
    dwDecPkPointTime: 2 * 60 * 1000;
    nDecPkPointCount: 1;
    dwPKFlagTime: 60 * 1000;
    nKillHumanAddPKPoint: 100;
    nKillHumanDecLuckPoint: 500;
    dwDecLightItemDrugTime: 500;
    nSafeZoneSize: 10;
    nStartPointSize: 2;
    dwHumanGetMsgTime: 200;
    nGroupMembersMax: 10;
    sFireBallSkill: '火球术';
    sHealSkill: '治愈术';
    ReNewNameColor: ($FF, $FE, $93, $9A, $E5, $A8, $B4, $FC, $B4, $FC);
    dwReNewNameColorTime: 2000;
    boReNewChangeColor: True;
    boReNewLevelClearExp: True;
    BonusAbilofWarr: (DC: 17; MC: 20; SC: 20; AC: 20; MAC: 20; HP: 1; MP: 3; Hit: 20; Speed: 35; X2: 0);
    BonusAbilofWizard: (DC: 17; MC: 25; SC: 30; AC: 20; MAC: 15; HP: 2; MP: 1; Hit: 25; Speed: 35; X2: 0);
    BonusAbilofTaos: (DC: 20; MC: 30; SC: 17; AC: 20; MAC: 15; HP: 2; MP: 1; Hit: 30; Speed: 30; X2: 0);
    NakedAbilofWarr: (DC: 512; MC: 2560; SC: 20; AC: 768; MAC: 1280; HP: 0; MP: 0; Hit: 0; Speed: 0; X2: 0);
    NakedAbilofWizard: (DC: 512; MC: 512; SC: 2560; AC: 1280; MAC: 768; HP: 0; MP: 0; Hit: 5; Speed: 0; X2: 0);
    NakedAbilofTaos: (DC: 20; MC: 30; SC: 17; AC: 20; MAC: 15; HP: 2; MP: 1; Hit: 30; Speed: 30; X2: 0);
    nUpgradeWeaponMaxPoint: 20;
    nUpgradeWeaponPrice: 10000;
    dwUPgradeWeaponGetBackTime: 60 * 60 * 1000;
    nClearExpireUpgradeWeaponDays: 8;
    nUpgradeWeaponDCRate: 100;
    nUpgradeWeaponDCTwoPointRate: 30;
    nUpgradeWeaponDCThreePointRate: 200;
    nUpgradeWeaponSCRate: 100;
    nUpgradeWeaponSCTwoPointRate: 30;
    nUpgradeWeaponSCThreePointRate: 200;
    nUpgradeWeaponMCRate: 100;
    nUpgradeWeaponMCTwoPointRate: 30;
    nUpgradeWeaponMCThreePointRate: 200;
    boDeleteUpgradeFailWeapon: False;

    dwProcessMonstersTime: 10;
    dwRegenMonstersTime: 200;
    nMonGenRate: 10;
    nProcessMonRandRate: 5;
    nProcessMonLimitCount: 5;
    nSoftVersionDate: 20020522;
    boCanOldClientLogon: True;
    dwConsoleShowUserCountTime: 10 * 60 * 1000;
    dwShowLineNoticeTime: 5 * 60 * 1000;
    nLineNoticeColor: 2;
    nStartCastleWarDays: 4;
    nStartCastlewarTime: 20;
    dwShowCastleWarEndMsgTime: 10 * 60 * 1000;
    dwCastleWarTime: 3 * 60 * 60 * 1000;
    dwGetCastleTime: 10 * 60 * 1000;
    dwGuildWarTime: 3 * 60 * 60 * 1000;
    nBuildGuildPrice: 1000000;
    nGuildWarPrice: 30000;
    nMakeDurgPrice: 100;
    nHumanMaxGold: 10000000;
    nHumanTryModeMaxGold: 100000;
    nTryModeLevel: 7;
    boTryModeUseStorage: False;
    nCanShoutMsgLevel: 7;
    boShowMakeItemMsg: False;
    boShutRedMsgShowGMName: False;
    nSayMsgMaxLen: 80;
    dwSayMsgTime: 3 * 1000;
    nSayMsgCount: 2;
    dwDisableSayMsgTime: 60 * 1000;
    nSayRedMsgMaxLen: 255;
    boShowGuildName: True;
    boShowRankLevelName: True;
    boMonSayMsg: False;
    nStartPermission: 0;
    boKillHumanWinLevel: False;
    boKilledLostLevel: False;
    boKillHumanWinExp: False;
    boKilledLostExp: False;
    nKillHumanWinLevel: 1;
    nKilledLostLevel: 1;
    nKillHumanWinExp: 100000;
    nKillHumanLostExp: 100000;
    nHumanLevelDiffer: 10;
    nMonsterPowerRate: 10;
    nItemsPowerRate: 10;
    nItemsACPowerRate: 10;
    boSendOnlineCount: True;
    nSendOnlineCountRate: 10;
    dwSendOnlineTime: 5 * 60 * 1000;
    dwSaveHumanRcdTime: 10 * 60 * 1000;
    dwHumanFreeDelayTime: 5 * 60 * 1000;
    dwMakeGhostTime: 3 * 60 * 1000;
    dwClearDropOnFloorItemTime: 60 * 60 * 1000;
    dwFloorItemCanPickUpTime: 2 * 60 * 1000;
    boPasswordLockSystem: False; //是否启用密码保护系统
    boLockDealAction: False; //是否锁定交易操作
    boLockDropAction: False; //是否锁定扔物品操作
    boLockGetBackItemAction: False; //是否锁定取仓库操作
    boLockHumanLogin: False; //是否锁定走操作
    boLockWalkAction: False; //是否锁定走操作
    boLockRunAction: False; //是否锁定跑操作
    boLockHitAction: False; //是否锁定攻击操作
    boLockSpellAction: False; //是否锁定魔法操作
    boLockSendMsgAction: False; //是否锁定发信息操作
    boLockUserItemAction: False; //是否锁定使用物品操作
    boLockInObModeAction: False; //锁定时进入隐身状态
    nPasswordErrorCountLock: 3; //输入密码错误超过 指定次数则锁定密码
    boPasswordErrorKick: False; //输入密码错误超过限制则踢下线
    nSendRefMsgRange: 12;
    boDecLampDura: True;
    boHungerSystem: False;
    boHungerDecHP: False;
    boHungerDecPower: False;
    boDiableHumanRun: True;
    boRUNHUMAN: False;
    boRUNMON: False;
    boRunNpc: False;
    boRunGuard: False;
    boWarDisHumRun: False;
    boGMRunAll: False;
    boSafeAreaLimited: False;
    dwTryDealTime: 3000;
    dwDealOKTime: 1000;
    boCanNotGetBackDeal: True;
    boDisableDeal: False;
    nMasterOKLevel: 500;
    nMasterOKCreditPoint: 0;
    nMasterOKBonusPoint: 0;
    boPKLevelProtect: False;
    nPKProtectLevel: 10;
    nRedPKProtectLevel: 10;
    nItemPowerRate: 10000;
    nItemExpRate: 10000;
    nScriptGotoCountLimit: 30;
    btHearMsgFColor: $00; //前景
    btHearMsgBColor: $FF; //背景
    btWhisperMsgFColor: $FC; //前景
    btWhisperMsgBColor: $FF; //背景
    btGMWhisperMsgFColor: $FF; //前景
    btGMWhisperMsgBColor: $38; //背景
    btCryMsgFColor: $0; //前景
    btCryMsgBColor: $97; //背景
    btGreenMsgFColor: $DB; //前景
    btGreenMsgBColor: $FF; //背景
    btBlueMsgFColor: $FF; //前景
    btBlueMsgBColor: $FC; //背景
    btRedMsgFColor: $FF; //前景
    btRedMsgBColor: $38; //背景
    btGuildMsgFColor: $DB; //前景
    btGuildMsgBColor: $FF; //背景
    btGroupMsgFColor: $C4; //前景
    btGroupMsgBColor: $FF; //背景
    btCustMsgFColor: $FC; //前景
    btCustMsgBColor: $FF; //背景
    nMonRandomAddValue: 10;
    nMakeRandomAddValue: 10;
    nScriptRandomAddValue: 10;
    nWeaponDCAddValueMaxLimit: 12;
    nWeaponDCAddValueRate: 15;
    nWeaponMCAddValueMaxLimit: 12;
    nWeaponMCAddValueRate: 15;
    nWeaponSCAddValueMaxLimit: 12;
    nWeaponSCAddValueRate: 15;
    nDressDCAddRate: 40;
    nDressDCAddValueMaxLimit: 6;
    nDressDCAddValueRate: 20;
    nDressMCAddRate: 40;
    nDressMCAddValueMaxLimit: 6;
    nDressMCAddValueRate: 20;
    nDressSCAddRate: 40;
    nDressSCAddValueMaxLimit: 6;
    nDressSCAddValueRate: 20;
    nNeckLace202124DCAddRate: 40;
    nNeckLace202124DCAddValueMaxLimit: 6;
    nNeckLace202124DCAddValueRate: 20;
    nNeckLace202124MCAddRate: 40;
    nNeckLace202124MCAddValueMaxLimit: 6;
    nNeckLace202124MCAddValueRate: 20;
    nNeckLace202124SCAddRate: 40;
    nNeckLace202124SCAddValueMaxLimit: 6;
    nNeckLace202124SCAddValueRate: 20;
    nNeckLace19DCAddRate: 30;
    nNeckLace19DCAddValueMaxLimit: 6;
    nNeckLace19DCAddValueRate: 20;
    nNeckLace19MCAddRate: 30;
    nNeckLace19MCAddValueMaxLimit: 6;
    nNeckLace19MCAddValueRate: 20;
    nNeckLace19SCAddRate: 30;
    nNeckLace19SCAddValueMaxLimit: 6;
    nNeckLace19SCAddValueRate: 20;
    nArmRing26DCAddRate: 30;
    nArmRing26DCAddValueMaxLimit: 6;
    nArmRing26DCAddValueRate: 20;
    nArmRing26MCAddRate: 30;
    nArmRing26MCAddValueMaxLimit: 6;
    nArmRing26MCAddValueRate: 20;
    nArmRing26SCAddRate: 30;
    nArmRing26SCAddValueMaxLimit: 6;
    nArmRing26SCAddValueRate: 20;
    nRing22DCAddRate: 30;
    nRing22DCAddValueMaxLimit: 6;
    nRing22DCAddValueRate: 20;
    nRing22MCAddRate: 30;
    nRing22MCAddValueMaxLimit: 6;
    nRing22MCAddValueRate: 20;
    nRing22SCAddRate: 30;
    nRing22SCAddValueMaxLimit: 6;
    nRing22SCAddValueRate: 20;
    nRing23DCAddRate: 30;
    nRing23DCAddValueMaxLimit: 6;
    nRing23DCAddValueRate: 20;
    nRing23MCAddRate: 30;
    nRing23MCAddValueMaxLimit: 6;
    nRing23MCAddValueRate: 20;
    nRing23SCAddRate: 30;
    nRing23SCAddValueMaxLimit: 6;
    nRing23SCAddValueRate: 20;
    nHelMetDCAddRate: 30;
    nHelMetDCAddValueMaxLimit: 6;
    nHelMetDCAddValueRate: 20;
    nHelMetMCAddRate: 30;
    nHelMetMCAddValueMaxLimit: 6;
    nHelMetMCAddValueRate: 20;
    nHelMetSCAddRate: 30;
    nHelMetSCAddValueMaxLimit: 6;
    nHelMetSCAddValueRate: 20;
    nUnknowHelMetACAddRate: 20;
    nUnknowHelMetACAddValueMaxLimit: 4;
    nUnknowHelMetMACAddRate: 20;
    nUnknowHelMetMACAddValueMaxLimit: 4;
    nUnknowHelMetDCAddRate: 30;
    nUnknowHelMetDCAddValueMaxLimit: 3;
    nUnknowHelMetMCAddRate: 30;
    nUnknowHelMetMCAddValueMaxLimit: 3;
    nUnknowHelMetSCAddRate: 30;
    nUnknowHelMetSCAddValueMaxLimit: 3;
    nUnknowRingACAddRate: 20;
    nUnknowRingACAddValueMaxLimit: 4;
    nUnknowRingMACAddRate: 20;
    nUnknowRingMACAddValueMaxLimit: 4;
    nUnknowRingDCAddRate: 20;
    nUnknowRingDCAddValueMaxLimit: 6;
    nUnknowRingMCAddRate: 20;
    nUnknowRingMCAddValueMaxLimit: 6;
    nUnknowRingSCAddRate: 20;
    nUnknowRingSCAddValueMaxLimit: 6;
    nUnknowNecklaceACAddRate: 20;
    nUnknowNecklaceACAddValueMaxLimit: 5;
    nUnknowNecklaceMACAddRate: 20;
    nUnknowNecklaceMACAddValueMaxLimit: 5;
    nUnknowNecklaceDCAddRate: 30;
    nUnknowNecklaceDCAddValueMaxLimit: 5;
    nUnknowNecklaceMCAddRate: 30;
    nUnknowNecklaceMCAddValueMaxLimit: 5;
    nUnknowNecklaceSCAddRate: 30;
    nUnknowNecklaceSCAddValueMaxLimit: 5;
    nMonOneDropGoldCount: 2000;
    nMakeMineHitRate: 4; //挖矿命中率
    nMakeMineRate: 12; //挖矿率
    nStoneTypeRate: 120;
    nStoneTypeRateMin: 56;
    nGoldStoneMin: 1;
    nGoldStoneMax: 2;
    nSilverStoneMin: 3;
    nSilverStoneMax: 20;
    nSteelStoneMin: 21;
    nSteelStoneMax: 45;
    nBlackStoneMin: 46;
    nBlackStoneMax: 56;
    nStoneMinDura: 3000;
    nStoneGeneralDuraRate: 13000;
    nStoneAddDuraRate: 20;
    nStoneAddDuraMax: 10000;
    nWinLottery6Min: 1;
    nWinLottery6Max: 4999;
    nWinLottery5Min: 14000;
    nWinLottery5Max: 15999;
    nWinLottery4Min: 16000;
    nWinLottery4Max: 16149;
    nWinLottery3Min: 16150;
    nWinLottery3Max: 16169;
    nWinLottery2Min: 16170;
    nWinLottery2Max: 16179;
    nWinLottery1Min: 16180;
    nWinLottery1Max: 16185; //16180 + 1820;
    nWinLottery1Gold: 1000000;
    nWinLottery2Gold: 200000;
    nWinLottery3Gold: 100000;
    nWinLottery4Gold: 10000;
    nWinLottery5Gold: 1000;
    nWinLottery6Gold: 500;
    nWinLotteryRate: 30000;
    nWinLotteryCount: 0;
    nNoWinLotteryCount: 0;
    nWinLotteryLevel1: 0;
    nWinLotteryLevel2: 0;
    nWinLotteryLevel3: 0;
    nWinLotteryLevel4: 0;
    nWinLotteryLevel5: 0;
    nWinLotteryLevel6: 0;
    //GlobalVal: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

    nItemNumber: 0;
    nItemNumberEx: High(Integer) div 2;
    nGuildRecallTime: 180;
    nGroupRecallTime: 180;
    boControlDropItem: False;
    boInSafeDisableDrop: False;
    nCanDropGold: 1000;
    nCanDropPrice: 500;
    boSendCustemMsg: True;
    boSubkMasterSendMsg: True;
    nSuperRepairPriceRate: 3; //特修价格倍数
    nRepairItemDecDura: 30; //普通修理掉持久数(特持久上限减下限再除以此数为减的数值)
    boDieScatterBag: True;
    nDieScatterBagRate: 3;
    boDieRedScatterBagAll: True;
    nDieDropUseItemRate: 30;
    nDieRedDropUseItemRate: 15;
    boDieDropGold: False;
    boKillByHumanDropUseItem: False;
    boKillByMonstDropUseItem: True;
    boKickExpireHuman: False;
    nGuildRankNameLen: 16;
    nGuildMemberMaxLimit: 200;
    nGuildNameLen: 16;
    nAttackPosionRate: 5;
    nAttackPosionTime: 5;
    dwRevivalTime: 60 * 1000; //复活间隔时间
    boUserMoveCanDupObj: False;
    boUserMoveCanOnItem: True;
    dwUserMoveTime: 10;
    dwPKDieLostExpRate: 1000;
    nPKDieLostLevelRate: 20000;
    btPKFlagNameColor: $2F;
    btPKLevel1NameColor: $FB;
    btPKLevel2NameColor: $F9;
    btAllyAndGuildNameColor: $B4;
    btWarGuildNameColor: $45;
    btInFreePKAreaNameColor: $DD;
    boSpiritMutiny: False;
    dwSpiritMutinyTime: 30 * 60 * 1000;
    nSpiritPowerRate: 2;
    boMasterDieMutiny: False;
    nMasterDieMutinyRate: 5;
    nMasterDieMutinyPower: 10;
    nMasterDieMutinySpeed: 5;
    boBBMonAutoChangeColor: False;
    dwBBMonAutoChangeColorTime: 3000;
    boOldClientShowHiLevel: True;
    boShowScriptActionMsg: True;
    nRunSocketDieLoopLimit: 100;
    boThreadRun: False;
    boShowExceptionMsg: False;
    boShowPreFixMsg: True;
    nMagicAttackRage: 8; //魔法锁定范围
    sBoneFamm: '变异骷髅';
    nBoneFammCount: 1;
    //    g_Config.BoneFammArray                       :array[0..9] of TRecallMigic;
    sDogz: '神兽';
    nDogzCount: 1;

    sMoon: 'Test';
    nMoonCount: 1;
    //    g_Config.DogzArray                           :array[0..9] of TRecallMigic;
    nAmyOunsulPoint: 10;
    boDisableInSafeZoneFireCross: False;
    boGroupMbAttackPlayObject: True;
    dwPosionDecHealthTime: 2500;
    nPosionDamagarmor: 12; //中红毒着持久及减防量（实际大小为 12 / 10）
    boLimitSwordLong: False;
    nSwordLongPowerRate: 100;
    nFireBoomRage: 1;
    nSnowWindRange: 1;
    nElecBlizzardRange: 2;
    nMagTurnUndeadLevel: 50; //圣言怪物等级限制
    nMagTammingLevel: 50; //诱惑之光怪物等级限制
    nMagTammingTargetLevel: 10; //诱惑怪物相差等级机率，此数字越小机率越大；
    nMagTammingHPRate: 100; //成功机率=怪物最高HP 除以 此倍率，此倍率越大诱惑机率越高
    nMagTammingCount: 5;
    nMabMabeHitRandRate: 100;
    nMabMabeHitMinLvLimit: 10;
    nMabMabeHitSucessRate: 21;
    nMabMabeHitMabeTimeRate: 20;
    sCASTLENAME: '沙巴克';
    sCastleHomeMap: '3';
    nCastleHomeX: 644;
    nCastleHomeY: 290;
    nCastleWarRangeX: 100;
    nCastleWarRangeY: 100;
    nCastleTaxRate: 5;
    boGetAllNpcTax: False;
    nHireGuardPrice: 300000;
    nHireArcherPrice: 300000;
    nCastleGoldMax: 10000000;
    nCastleOneDayGold: 2000000;
    nRepairDoorPrice: 2000000;
    nRepairWallPrice: 500000;
    nCastleMemberPriceRate: 80;
    nMaxHitMsgCount: 1;
    nMaxSpellMsgCount: 1;
    nMaxRunMsgCount: 1;
    nMaxWalkMsgCount: 1;
    nMaxTurnMsgCount: 1;
    nMaxSitDonwMsgCount: 1;
    nMaxDigUpMsgCount: 1;
    boSpellSendUpdateMsg: False;
    boActionSendActionMsg: False;
    boKickOverSpeed: False;
    btSpeedControlMode: 0;
    nOverSpeedKickCount: 4;
    dwDropOverSpeed: 10;
    dwHitIntervalTime: 900; //攻击间隔
    dwMagicHitIntervalTime: 800; //魔法间隔
    dwRunIntervalTime: 600; //跑步间隔
    dwWalkIntervalTime: 600; //走路间隔
    dwTurnIntervalTime: 600; //换方向间隔
    boControlActionInterval: True;
    boControlWalkHit: True;
    boControlRunLongHit: True;
    boControlRunHit: True;
    boControlRunMagic: True;
    dwActionIntervalTime: 350; //组合操作间隔
    dwRunLongHitIntervalTime: 800; //跑位刺杀间隔
    dwRunHitIntervalTime: 800; //跑位攻击间隔
    dwWalkHitIntervalTime: 800; //走位攻击间隔
    dwRunMagicIntervalTime: 900; //跑位魔法间隔
    boDisableStruck: False; //不显示人物弯腰动作
    boDisableSelfStruck: False; //自己不显示人物弯腰动作
    dwStruckTime: 100; //人物弯腰停留时间
    dwKillMonExpMultiple: 1; //杀怪经验倍数
{$IF SoftVersion = VERENT}
    dwRequestVersion: 98;
{$ELSE}
    dwRequestVersion: RequestVersion;
{$IFEND}
    boHighLevelKillMonFixExp: False;
    boAddUserItemNewValue: True;
    sLineNoticePreFix: '';
    sSysMsgPreFix: '';
    sGuildMsgPreFix: '';
    sGroupMsgPreFix: '';
    sHintMsgPreFix: '';
    sGMRedMsgpreFix: '';
    sMonSayMsgpreFix: '';
    sCustMsgpreFix: '';
    sCastleMsgpreFix: '';
    sGuildNotice: 'Notice';
    sGuildWar: '敌对行会';
    sGuildAll: '联盟行会';
    sGuildMember: '行会成员';
    sGuildMemberRank: '行会成员';
    sGuildChief: 'Guild Leader';
    boKickAllUser: False;
    boTestSpeedMode: False;
    ClientConf: (
    boClientCanSet: True;
    boRUNHUMAN: True;
    boRUNMON: True;
    boRunNpc: True;
    boWarRunAll: True;
    btDieColor: 5;
    wSpellTime: 500;
    wHitIime: 1400;
    wItemFlashTime: 5 * 100;
    btItemSpeed: 25;
    boCanStartRun: True;
    boParalyCanRun: False;
    boParalyCanWalk: False;
    boParalyCanHit: False;
    boParalyCanSpell: False;
    boShowRedHPLable: True;
    boShowHPNumber: True;
    boShowJobLevel: True;
    boDuraAlert: True;
    boMagicLock: True;
    boAutoPuckUpItem: False;
    );
    nWeaponMakeUnLuckRate: 20;
    nWeaponMakeLuckPoint1: 1;
    nWeaponMakeLuckPoint2: 3;
    nWeaponMakeLuckPoint3: 7;
    nWeaponMakeLuckPoint2Rate: 6;
    nWeaponMakeLuckPoint3Rate: 10 + 30;
    boCheckUserItemPlace: True;
{$IF DEMOCLIENT = 1}
    nClientKey: 6534;
{$ELSE}
    nClientKey: 500;
{$IFEND}
    nLevelValueOfTaosHP: 6;
    nLevelValueOfTaosHPRate: 2;
    nLevelValueOfTaosMP: 8;
    nLevelValueOfWizardHP: 15;
    nLevelValueOfWizardHPRate: 1;
    nLevelValueOfWarrHP: 4;
    nLevelValueOfWarrHPRate: 4;

    nHeroLevelValueOfTaosHP: 3;
    nHeroLevelValueOfTaosHPRate: 2;
    nHeroLevelValueOfTaosMP: 4;
    nHeroLevelValueOfWizardHP: 8;
    nHeroLevelValueOfWizardHPRate: 1;
    nHeroLevelValueOfWarrHP: 2;
    nHeroLevelValueOfWarrHPRate: 4;

    nProcessMonsterInterval: 2;
    nUserSellOffCount: 5; //拍卖数量
    nUserSellOffTax: 10; //征收税率
    nMagDelayTimeDoubly: 100;
    nMagPowerDoubly: 100;
    boPlayObjectReduceMP: True;
    boGroupMbAttackSlave: False;
    nBigStorageLimitCount: 100;
    boDropGoldToPlayBag: True;
    boChangeUseItemNameByPlayName: True;
    sChangeUseItemName: '〖改〗';
    boUseFixExp: True;
    nBaseExp: 100000000;
    nAddExp: 1000000;
    nDedingUseTime: 10;
    boDedingAllowPK: True;
    boRegenMonsters: True;

    nCopyHumanBagCount: 40;
    nAllowCopyHumanCount: 1;
    boAddMasterName: True;
    sCopyHumName: '的英雄';
    nCopyHumAddHPRate: 60;
    nCopyHumAddMPRate: 60;
    sCopyHumBagItems1: '超级金创药,超级魔法药';
    sCopyHumBagItems2: '超级金创药,超级魔法药';
    sCopyHumBagItems3: '超级金创药,超级魔法药,灰色药粉(大量),黄色药粉(大量),护身符(大)';
    boAllowGuardAttack: False;
    dwWarrorAttackTime: 1200;
    dwWizardAttackTime: 1200;
    dwTaoistAttackTime: 1200;

    dwWarrorWalkTime: 500;
    dwWizardWalkTime: 500;
    dwTaoistWalkTime: 500;

    boAllowReCallMobOtherHum: True;
    boNeedLevelHighTarget: True;

    dwGetDBSockMsgTime: 5000;
    boPullCrossInSafeZone: True;
    boHighLevelGroupFixExp: True;
    boStartMapEvent: False;
    nLimitExpLevel: 1000;
    nLimitExpValue: 1;

    boChangeMapFireExtinguish: True;
    nFireDelayTimeRate: 100;
    nFirePowerRate: 100;
    nDidingPowerRate: 100;

    //nLimitMinOrderLevel: 30;
    nHeroStartLevel: 1;
    nHeroKillMonExpRate: 40;
    HeroBagItemCounts: (1, 20, 30, 35, 40);
    dwHeroWarrorAttackTime: 1200;
    dwHeroWizardAttackTime: 1200;
    dwHeroTaoistAttackTime: 1200;

    dwHeroWarrorWalkTime: 500;
    dwHeroWizardWalkTime: 500;
    dwHeroTaoistWalkTime: 500;

    boHeroKillByMonstDropUseItem: True;
    boHeroKillByHumanDropUseItem: False;
    boHeroDieScatterBag: True;
    boHeroDieRedScatterBagAll: True;
    nHeroDieDropUseItemRate: 30;
    nHeroDieRedDropUseItemRate: 15;
    nHeroDieScatterBagRate: 3;
    nHeroAddHPRate: 60;
    nHeroAddMPRate: 60;

    nMaxAngryValue: 30;
    nAddAngryValue: 1;
    nDecAngryValue: 3;
    nHeroAttackRate: 100;
    sHeroClothsMan: '布衣(男)';
    sHeroClothsWoman: '布衣(女)'; sHeroWoodenSword: '木剑'; sHeroBasicDrug: '金创药(小量)';
    btHeroNameColor: 6;
    nSkill43DelayTime: 10;
    nSkill50DelayTime: 3;
    nSkill58DelayTime: 10;
    nSkillZRJFDelayTime: 10;
    nSkill43PowerRate: 100;
    nSkill58PowerRate: 100;
    boCheckClientVersion: True;
    boAllowRecallSelf: True;
    boAllowRecallDogz: False;
    boAllowRecallMoon: True;
    boAllowRecallAll: True;
    boRobotAttack: False;
    nLimitLoginTime: 20;

    boAllowClientChgSpeed: True;
    //nClientGameOptionType: 1;
    nSkill60Rate: 100;
    nSkill61Rate: 100;
    nSkill62Rate: 100;
    nSkill63Rate: 100;
    nSkill64Rate: 100;
    nSkill65Rate: 100;
    nRecallHeroTime: 60;
    sRecallHeroHint: '你的英雄体质还很虚弱.需要%d秒才能继续召唤';
    nMonRandomNewAddValue: 100;
    nMakeRandomNewAddValue: 100;
    nScriptRandomNewAddValue: 100;

    nMonRandomNotLimit: 100;
    nMakeRandomNotLimit: 100;
    nScriptRandomNotLimit: 100;
    nItemMaxLimitDay: 10;
    nItemLimitDayRate: 15;

    nWeaponMaxLimitDay: 10;
    nWeaponLimitDayRate: 15;
    nWeaponNotLimitRate: 100;

    nDressMaxLimitDay: 10;
    nDressLimitDayRate: 15;
    nDressNotLimitRate: 100;

    nNeckLaceMaxLimitDay: 10;
    nNeckLaceLimitDayRate: 15;
    nNeckLaceNotLimitRate: 100;

    nArmRingMaxLimitDay: 10;
    nArmRingLimitDayRate: 15;
    nArmRingNotLimitRate: 100;

    nRingMaxLimitDay: 10;
    nRingLimitDayRate: 15;
    nRingNotLimitRate: 100;

    nHelMetMaxLimitDay: 10;
    nHelMetLimitDayRate: 15;
    nHelMetNotLimitRate: 100;

    nOtherMaxLimitDay: 5;
    nOtherLimitDayRate: 5;
    nOtherNotLimitRate: 5;

    nWeaponNewAddValueMaxLimit: 4;
    nWeaponNewAddValueRate: 50;
    nDressNewAddRate: 50;
    nDressNewAddValueMaxLimit: 2;
    nDressNewAddValueRate: 50;
    nNeckLace202124NewAddRate: 100;
    nNeckLace202124NewAddValueMaxLimit: 2;
    nNeckLace202124NewAddValueRate: 50;
    nNeckLace19NewAddRate: 60;
    nNeckLace19NewAddValueMaxLimit: 2;
    nNeckLace19NewAddValueRate: 50;
    nArmRing26NewAddRate: 60;
    nArmRing26NewAddValueMaxLimit: 2;
    nArmRing26NewAddValueRate: 50;
    nRing22NewAddRate: 60;
    nRing22NewAddValueMaxLimit: 2;
    nRing22NewAddValueRate: 50;
    nRing23NewAddRate: 60;
    nRing23NewAddValueMaxLimit: 2;
    nRing23NewAddValueRate: 50;
    nHelMetNewAddRate: 60;
    nHelMetNewAddValueMaxLimit: 2;
    nHelMetNewAddValueRate: 50;
    nUnknowHelMetNewAddRate: 60;
    nUnknowHelMetNewAddValueMaxLimit: 1;
    nUnknowRingNewAddRate: 50;
    nUnknowRingNewAddValueMaxLimit: 2;
    nUnknowNecklaceNewAddRate: 60;
    nUnknowNecklaceNewAddValueMaxLimit: 3;
    boBindItemNoDeal: True;
    boBindItemNoScatter: True;
    boBindItemNoDrop: True;
    boBindItemNoSellOff: True;
    boBindItemNoPickUp: True;
    boCopyItemClear: True;


    nMonRandomAddPoint: 100;
    nMakeRandomAddPoint: 100;
    nScriptRandomAddPoint: 100;

    nWeaponPointType: 0;
    nWeaponPointAddRate: 50;
    nWeaponPointAddValueMaxLimit: 10;
    nWeaponPointAddValueRate: 60;

    nDressPointType: 1;
    nDressPointAddRate: 50;
    nDressPointAddValueMaxLimit: 10;
    nDressPointAddValueRate: 60;

    nNeckLacePointType: 2;
    nNeckLacePointAddRate: 50;
    nNeckLacePointAddValueMaxLimit: 10;
    nNeckLacePointAddValueRate: 60;

    nArmRingPointType: 3;
    nArmRingPointAddRate: 50;
    nArmRingPointAddValueMaxLimit: 10;
    nArmRingPointAddValueRate: 60;

    nRingPointType: 4;
    nRingPointAddRate: 50;
    nRingPointAddValueMaxLimit: 10;
    nRingPointAddValueRate: 60;

    nHelMetPointType: 0;
    nHelMetPointAddRate: 50;
    nHelMetPointAddValueMaxLimit: 10;
    nHelMetPointAddValueRate: 60;

    nShoesPointType: 1;
    nShoesPointAddRate: 50;
    nShoesPointAddValueMaxLimit: 10;
    nShoesPointAddValueRate: 60;

    nBeltPointType: 2;
    nBeltPointAddRate: 50;
    nBeltPointAddValueMaxLimit: 10;
    nBeltPointAddValueRate: 60;

    WeaponNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    DressNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    NeckLaceNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    ArmRingNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    RingNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    HelMetNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    ShoesNewAbil: (False, False, False, False, False, False, False, False, False, False, False);
    BeltNewAbil: (False, False, False, False, False, False, False, False, False, False, False);


    boAllowItemAddValue: True;
    boAllowItemAddPoint: True;
    boAllowItemTime: True;

    boHeroUseBagItem: True;
    boMonUseBagItem: True;
    boHumUseBagItem: False;

    nNewShieldUseRate: 2;
    nNewShieldDamageRate: 10;
    nNewShieldWaitTime: 30;

    nShowClientItemStyle: 0;
    nSpaceSkillDelayTime: 10;
    nSpaceSkillKeepTime: 60;
    boNoAllowWarRangeUseSpaceSkill: True;
    boAllowSpaceOutAttack: True;
    boSafeNoAllowTargetBB: True;
    nGroupFireCharmPowerRate: 100;
    nUseItemSpeed: 0;
    nMagicMovePositionTime: 5;
    nMagicMovePositionRate: 3;
    boNoHintMagicFail: True;
    boNoHintMagicOK: False;
    boNoHintMagicClose: False;
    nSkill75PowerRate: 100;
    nSkill76PowerRate: 100;
    nSkill77PowerRate: 100;
    dwTryDuelTime: 3000;
    dwDuelOKTime: 1000;
    boCanNotGetBackDuel: True;
    boDisableDuel: False;
    boSafeCanStore: True;
    boOpenStoreGMMode: True;
    boOpenStoreCheckLevel: True;
    nOpenStoreCheckLevel: 50;
    nMaxLevel: 65535;
    sUnKnowName: '神秘人';
    nMoonLowPowerRate: 100;
    nMoonHighPowerRate: 100;
    StatusDelayTime: (5, 5);
    nGreenNumber: 100;
    boChangeMapReleasePoison: True;
    boGetRandomHomePoint: True;
    nWalkSpeedRate: 0;
    nAttackSpeedRate: 0;
    nSerieMagicTime: 30;
    SerieMagicPowerRate: (100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100);
    SerieMagicBlasthitPowerRate: (200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200);
    SerieMagicAttackRange: (1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2);
    SerieMagicBlasthitRate: (
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30),
    (0, 10, 20, 30));

    sAIHomeMap: '3';
    nAIHomeX: 330;
    nAIHomeY: 330;
    nItemMaxStarCount: 20;
    boCheckSpeedHack: True;

    boAutoRepairItem: True;
    boRenewHealth: True;
    nRenewPercent: 60;
    sAIConfigListFileName: '';
    boCheckCanUpgradeStarItem: False;
    );
  //===============================================================

  sDBName: string = 'HeroDB'; //BDE 数据源名称
  g_sADODBString: string = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\Envir\Database.mdb;Persist Security Info=False'; //ADO 数据源名称

{$IF OEMVER = OEM775}
  g_LevelInfo: array[0..MAXLEVEL] of TLevelInfo;
{$IFEND}
  //g_dwOldNeedExps, g_dwHeroNeedExps: TLevelNeedExp;
  //g_dwHeroNeedExps: TLevelNeedExp;// = (
  g_dwHeroNeedExps: TLevelNeedExp = (
    100, //1
    200, //2
    300, //3
    400, //4
    600, //5
    900, //6
    1200, //7
    1700, //8
    2500, //9
    6000, //10
    8000, //11
    10000, //12
    15000, //13
    30000, //14
    40000, //15
    50000, //16
    70000, //17
    100000, //18
    120000, //19
    140000, //20
    250000, //21
    300000, //22
    350000, //23
    400000, //24
    500000, //25
    700000, //26
    1000000, //27
    1400000, //28
    1800000, //29
    2000000, //30
    2400000, //31
    2800000, //32
    3200000, //33
    3600000, //34
    4000000, //35
    4800000, //36
    5600000, //37
    8200000, //38
    9000000, //39
    12000000, //40
    16000000, //41
    30000000, //42
    50000000, //43
    80000000, //44
    120000000, //45
    480000000, //46
    1000000000, //47
    3000000000, //48
    3500000000, //49
    4000000000, //50
    4000000000, //51
    4000000000, //52
    4000000000, //53
    4000000000, //54
    4000000000, //55
    4000000000, //56
    4000000000, //57
    4000000000, //58
    4000000000, //59
    4000000000, //60
    4000000000, //61
    4000000000, //62
    4000000000, //63
    4000000000, //64
    4000000000, //65
    4000000000, //66
    4000000000, //67
    4000000000, //68
    4000000000, //69
    4000000000, //70
    4000000000, //71
    4000000000, //72
    4000000000, //73
    4000000000, //74
    4000000000, //75
    4000000000, //76
    4000000000, //77
    4000000000, //78
    4000000000, //79
    4000000000, //80
    4000000000, //81
    4000000000, //82
    4000000000, //83
    4000000000, //84
    4000000000, //85
    4000000000, //86
    4000000000, //87
    4000000000, //88
    4000000000, //89
    4000000000, //90
    4000000000, //91
    4000000000, //92
    4000000000, //93
    4000000000, //94
    4000000000, //95
    4000000000, //96
    4000000000, //97
    4000000000, //98
    4000000000, //99
    4000000000, //100
    4000000000, //101
    4000000000, //102
    4000000000, //103
    4000000000, //104
    4000000000, //105
    4000000000, //106
    4000000000, //107
    4000000000, //108
    4000000000, //109
    4000000000, //110
    4000000000, //111
    4000000000, //112
    4000000000, //113
    4000000000, //114
    4000000000, //115
    4000000000, //116
    4000000000, //117
    4000000000, //118
    4000000000, //119
    4000000000, //120
    4000000000, //121
    4000000000, //122
    4000000000, //123
    4000000000, //124
    4000000000, //125
    4000000000, //126
    4000000000, //127
    4000000000, //128
    4000000000, //129
    4000000000, //130
    4000000000, //131
    4000000000, //132
    4000000000, //133
    4000000000, //134
    4000000000, //135
    4000000000, //136
    4000000000, //137
    4000000000, //138
    4000000000, //139
    4000000000, //140
    4000000000, //141
    4000000000, //142
    4000000000, //143
    4000000000, //144
    4000000000, //145
    4000000000, //146
    4000000000, //147
    4000000000, //148
    4000000000, //149
    4000000000, //150
    4000000000, //151
    4000000000, //152
    4000000000, //153
    4000000000, //154
    4000000000, //155
    4000000000, //156
    4000000000, //157
    4000000000, //158
    4000000000, //159
    4000000000, //160
    4000000000, //161
    4000000000, //162
    4000000000, //163
    4000000000, //164
    4000000000, //165
    4000000000, //166
    4000000000, //167
    4000000000, //168
    4000000000, //169
    4000000000, //170
    4000000000, //171
    4000000000, //172
    4000000000, //173
    4000000000, //174
    4000000000, //175
    4000000000, //176
    4000000000, //177
    4000000000, //178
    4000000000, //179
    4000000000, //180
    4000000000, //181
    4000000000, //182
    4000000000, //183
    4000000000, //184
    4000000000, //185
    4000000000, //186
    4000000000, //187
    4000000000, //188
    4000000000, //189
    4000000000, //190
    4000000000, //191
    4000000000, //192
    4000000000, //193
    4000000000, //194
    4000000000, //195
    4000000000, //196
    4000000000, //197
    4000000000, //198
    4000000000, //199
    4000000000, //200
    4000000000, //201
    4000000000, //202
    4000000000, //203
    4000000000, //204
    4000000000, //205
    4000000000, //206
    4000000000, //207
    4000000000, //208
    4000000000, //209
    4000000000, //210
    4000000000, //211
    4000000000, //212
    4000000000, //213
    4000000000, //214
    4000000000, //215
    4000000000, //216
    4000000000, //217
    4000000000, //218
    4000000000, //219
    4000000000, //220
    4000000000, //221
    4000000000, //222
    4000000000, //223
    4000000000, //224
    4000000000, //225
    4000000000, //226
    4000000000, //227
    4000000000, //228
    4000000000, //229
    4000000000, //230
    4000000000, //231
    4000000000, //232
    4000000000, //233
    4000000000, //234
    4000000000, //235
    4000000000, //236
    4000000000, //237
    4000000000, //238
    4000000000, //239
    4000000000, //240
    4000000000, //241
    4000000000, //242
    4000000000, //243
    4000000000, //244
    4000000000, //245
    4000000000, //246
    4000000000, //247
    4000000000, //248
    4000000000, //249
    4000000000, //250
    4000000000, //251
    4000000000, //252
    4000000000, //253
    4000000000, //254
    4000000000, //255
    4000000000, //256
    4000000000, //257
    4000000000, //258
    4000000000, //259
    4000000000, //260
    4000000000, //261
    4000000000, //262
    4000000000, //263
    4000000000, //264
    4000000000, //265
    4000000000, //266
    4000000000, //267
    4000000000, //268
    4000000000, //269
    4000000000, //270
    4000000000, //271
    4000000000, //272
    4000000000, //273
    4000000000, //274
    4000000000, //275
    4000000000, //276
    4000000000, //277
    4000000000, //278
    4000000000, //279
    4000000000, //280
    4000000000, //281
    4000000000, //282
    4000000000, //283
    4000000000, //284
    4000000000, //285
    4000000000, //286
    4000000000, //287
    4000000000, //288
    4000000000, //289
    4000000000, //290
    4000000000, //291
    4000000000, //292
    4000000000, //293
    4000000000, //294
    4000000000, //295
    4000000000, //296
    4000000000, //297
    4000000000, //298
    4000000000, //299
    4000000000, //300
    4000000000, //301
    4000000000, //302
    4000000000, //303
    4000000000, //304
    4000000000, //305
    4000000000, //306
    4000000000, //307
    4000000000, //308
    4000000000, //309
    4000000000, //310
    4000000000, //311
    4000000000, //312
    4000000000, //313
    4000000000, //314
    4000000000, //315
    4000000000, //316
    4000000000, //317
    4000000000, //318
    4000000000, //319
    4000000000, //320
    4000000000, //321
    4000000000, //322
    4000000000, //323
    4000000000, //324
    4000000000, //325
    4000000000, //326
    4000000000, //327
    4000000000, //328
    4000000000, //329
    4000000000, //330
    4000000000, //331
    4000000000, //332
    4000000000, //333
    4000000000, //334
    4000000000, //335
    4000000000, //336
    4000000000, //337
    4000000000, //338
    4000000000, //339
    4000000000, //340
    4000000000, //341
    4000000000, //342
    4000000000, //343
    4000000000, //344
    4000000000, //345
    4000000000, //346
    4000000000, //347
    4000000000, //348
    4000000000, //349
    4000000000, //350
    4000000000, //351
    4000000000, //352
    4000000000, //353
    4000000000, //354
    4000000000, //355
    4000000000, //356
    4000000000, //357
    4000000000, //358
    4000000000, //359
    4000000000, //360
    4000000000, //361
    4000000000, //362
    4000000000, //363
    4000000000, //364
    4000000000, //365
    4000000000, //366
    4000000000, //367
    4000000000, //368
    4000000000, //369
    4000000000, //370
    4000000000, //371
    4000000000, //372
    4000000000, //373
    4000000000, //374
    4000000000, //375
    4000000000, //376
    4000000000, //377
    4000000000, //378
    4000000000, //379
    4000000000, //380
    4000000000, //381
    4000000000, //382
    4000000000, //383
    4000000000, //384
    4000000000, //385
    4000000000, //386
    4000000000, //387
    4000000000, //388
    4000000000, //389
    4000000000, //390
    4000000000, //391
    4000000000, //392
    4000000000, //393
    4000000000, //394
    4000000000, //395
    4000000000, //396
    4000000000, //397
    4000000000, //398
    4000000000, //399
    4000000000, //400
    4000000000, //401
    4000000000, //402
    4000000000, //403
    4000000000, //404
    4000000000, //405
    4000000000, //406
    4000000000, //407
    4000000000, //408
    4000000000, //409
    4000000000, //410
    4000000000, //411
    4000000000, //412
    4000000000, //413
    4000000000, //414
    4000000000, //415
    4000000000, //416
    4000000000, //417
    4000000000, //418
    4000000000, //419
    4000000000, //420
    4000000000, //421
    4000000000, //422
    4000000000, //423
    4000000000, //424
    4000000000, //425
    4000000000, //426
    4000000000, //427
    4000000000, //428
    4000000000, //429
    4000000000, //430
    4000000000, //431
    4000000000, //432
    4000000000, //433
    4000000000, //434
    4000000000, //435
    4000000000, //436
    4000000000, //437
    4000000000, //438
    4000000000, //439
    4000000000, //440
    4000000000, //441
    4000000000, //442
    4000000000, //443
    4000000000, //444
    4000000000, //445
    4000000000, //446
    4000000000, //447
    4000000000, //448
    4000000000, //449
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000, //498
    4000000000, //499
    4000000000, //500
    4000000000, //50
    4000000000, //51
    4000000000, //52
    4000000000, //53
    4000000000, //54
    4000000000, //55
    4000000000, //56
    4000000000, //57
    4000000000, //58
    4000000000, //59
    4000000000, //60
    4000000000, //61
    4000000000, //62
    4000000000, //63
    4000000000, //64
    4000000000, //65
    4000000000, //66
    4000000000, //67
    4000000000, //68
    4000000000, //69
    4000000000, //70
    4000000000, //71
    4000000000, //72
    4000000000, //73
    4000000000, //74
    4000000000, //75
    4000000000, //76
    4000000000, //77
    4000000000, //78
    4000000000, //79
    4000000000, //80
    4000000000, //81
    4000000000, //82
    4000000000, //83
    4000000000, //84
    4000000000, //85
    4000000000, //86
    4000000000, //87
    4000000000, //88
    4000000000, //89
    4000000000, //90
    4000000000, //91
    4000000000, //92
    4000000000, //93
    4000000000, //94
    4000000000, //95
    4000000000, //96
    4000000000, //97
    4000000000, //98
    4000000000, //99
    4000000000, //100
    4000000000, //101
    4000000000, //102
    4000000000, //103
    4000000000, //104
    4000000000, //105
    4000000000, //106
    4000000000, //107
    4000000000, //108
    4000000000, //109
    4000000000, //110
    4000000000, //111
    4000000000, //112
    4000000000, //113
    4000000000, //114
    4000000000, //115
    4000000000, //116
    4000000000, //117
    4000000000, //118
    4000000000, //119
    4000000000, //120
    4000000000, //121
    4000000000, //122
    4000000000, //123
    4000000000, //124
    4000000000, //125
    4000000000, //126
    4000000000, //127
    4000000000, //128
    4000000000, //129
    4000000000, //130
    4000000000, //131
    4000000000, //132
    4000000000, //133
    4000000000, //134
    4000000000, //135
    4000000000, //136
    4000000000, //137
    4000000000, //138
    4000000000, //139
    4000000000, //140
    4000000000, //141
    4000000000, //142
    4000000000, //143
    4000000000, //144
    4000000000, //145
    4000000000, //146
    4000000000, //147
    4000000000, //148
    4000000000, //149
    4000000000, //150
    4000000000, //151
    4000000000, //152
    4000000000, //153
    4000000000, //154
    4000000000, //155
    4000000000, //156
    4000000000, //157
    4000000000, //158
    4000000000, //159
    4000000000, //160
    4000000000, //161
    4000000000, //162
    4000000000, //163
    4000000000, //164
    4000000000, //165
    4000000000, //166
    4000000000, //167
    4000000000, //168
    4000000000, //169
    4000000000, //170
    4000000000, //171
    4000000000, //172
    4000000000, //173
    4000000000, //174
    4000000000, //175
    4000000000, //176
    4000000000, //177
    4000000000, //178
    4000000000, //179
    4000000000, //180
    4000000000, //181
    4000000000, //182
    4000000000, //183
    4000000000, //184
    4000000000, //185
    4000000000, //186
    4000000000, //187
    4000000000, //188
    4000000000, //189
    4000000000, //190
    4000000000, //191
    4000000000, //192
    4000000000, //193
    4000000000, //194
    4000000000, //195
    4000000000, //196
    4000000000, //197
    4000000000, //198
    4000000000, //199
    4000000000, //200
    4000000000, //201
    4000000000, //202
    4000000000, //203
    4000000000, //204
    4000000000, //205
    4000000000, //206
    4000000000, //207
    4000000000, //208
    4000000000, //209
    4000000000, //210
    4000000000, //211
    4000000000, //212
    4000000000, //213
    4000000000, //214
    4000000000, //215
    4000000000, //216
    4000000000, //217
    4000000000, //218
    4000000000, //219
    4000000000, //220
    4000000000, //221
    4000000000, //222
    4000000000, //223
    4000000000, //224
    4000000000, //225
    4000000000, //226
    4000000000, //227
    4000000000, //228
    4000000000, //229
    4000000000, //230
    4000000000, //231
    4000000000, //232
    4000000000, //233
    4000000000, //234
    4000000000, //235
    4000000000, //236
    4000000000, //237
    4000000000, //238
    4000000000, //239
    4000000000, //240
    4000000000, //241
    4000000000, //242
    4000000000, //243
    4000000000, //244
    4000000000, //245
    4000000000, //246
    4000000000, //247
    4000000000, //248
    4000000000, //249
    4000000000, //250
    4000000000, //251
    4000000000, //252
    4000000000, //253
    4000000000, //254
    4000000000, //255
    4000000000, //256
    4000000000, //257
    4000000000, //258
    4000000000, //259
    4000000000, //260
    4000000000, //261
    4000000000, //262
    4000000000, //263
    4000000000, //264
    4000000000, //265
    4000000000, //266
    4000000000, //267
    4000000000, //268
    4000000000, //269
    4000000000, //270
    4000000000, //271
    4000000000, //272
    4000000000, //273
    4000000000, //274
    4000000000, //275
    4000000000, //276
    4000000000, //277
    4000000000, //278
    4000000000, //279
    4000000000, //280
    4000000000, //281
    4000000000, //282
    4000000000, //283
    4000000000, //284
    4000000000, //285
    4000000000, //286
    4000000000, //287
    4000000000, //288
    4000000000, //289
    4000000000, //290
    4000000000, //291
    4000000000, //292
    4000000000, //293
    4000000000, //294
    4000000000, //295
    4000000000, //296
    4000000000, //297
    4000000000, //298
    4000000000, //299
    4000000000, //300
    4000000000, //301
    4000000000, //302
    4000000000, //303
    4000000000, //304
    4000000000, //305
    4000000000, //306
    4000000000, //307
    4000000000, //308
    4000000000, //309
    4000000000, //310
    4000000000, //311
    4000000000, //312
    4000000000, //313
    4000000000, //314
    4000000000, //315
    4000000000, //316
    4000000000, //317
    4000000000, //318
    4000000000, //319
    4000000000, //320
    4000000000, //321
    4000000000, //322
    4000000000, //323
    4000000000, //324
    4000000000, //325
    4000000000, //326
    4000000000, //327
    4000000000, //328
    4000000000, //329
    4000000000, //330
    4000000000, //331
    4000000000, //332
    4000000000, //333
    4000000000, //334
    4000000000, //335
    4000000000, //336
    4000000000, //337
    4000000000, //338
    4000000000, //339
    4000000000, //340
    4000000000, //341
    4000000000, //342
    4000000000, //343
    4000000000, //344
    4000000000, //345
    4000000000, //346
    4000000000, //347
    4000000000, //348
    4000000000, //349
    4000000000, //350
    4000000000, //351
    4000000000, //352
    4000000000, //353
    4000000000, //354
    4000000000, //355
    4000000000, //356
    4000000000, //357
    4000000000, //358
    4000000000, //359
    4000000000, //360
    4000000000, //361
    4000000000, //362
    4000000000, //363
    4000000000, //364
    4000000000, //365
    4000000000, //366
    4000000000, //367
    4000000000, //368
    4000000000, //369
    4000000000, //370
    4000000000, //371
    4000000000, //372
    4000000000, //373
    4000000000, //374
    4000000000, //375
    4000000000, //376
    4000000000, //377
    4000000000, //378
    4000000000, //379
    4000000000, //380
    4000000000, //381
    4000000000, //382
    4000000000, //383
    4000000000, //384
    4000000000, //385
    4000000000, //386
    4000000000, //387
    4000000000, //388
    4000000000, //389
    4000000000, //390
    4000000000, //391
    4000000000, //392
    4000000000, //393
    4000000000, //394
    4000000000, //395
    4000000000, //396
    4000000000, //397
    4000000000, //398
    4000000000, //399
    4000000000, //400
    4000000000, //401
    4000000000, //402
    4000000000, //403
    4000000000, //404
    4000000000, //405
    4000000000, //406
    4000000000, //407
    4000000000, //408
    4000000000, //409
    4000000000, //410
    4000000000, //411
    4000000000, //412
    4000000000, //413
    4000000000, //414
    4000000000, //415
    4000000000, //416
    4000000000, //417
    4000000000, //418
    4000000000, //419
    4000000000, //420
    4000000000, //421
    4000000000, //422
    4000000000, //423
    4000000000, //424
    4000000000, //425
    4000000000, //426
    4000000000, //427
    4000000000, //428
    4000000000, //429
    4000000000, //430
    4000000000, //431
    4000000000, //432
    4000000000, //433
    4000000000, //434
    4000000000, //435
    4000000000, //436
    4000000000, //437
    4000000000, //438
    4000000000, //439
    4000000000, //440
    4000000000, //441
    4000000000, //442
    4000000000, //443
    4000000000, //444
    4000000000, //445
    4000000000, //446
    4000000000, //447
    4000000000, //448
    4000000000, //449
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000, //498
    4000000000, //499
    4000000000, //500
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000 //500
    );

  g_dwOldNeedExps: TLevelNeedExp = (
    100, //1
    200, //2
    300, //3
    400, //4
    600, //5
    900, //6
    1200, //7
    1700, //8
    2500, //9
    6000, //10
    8000, //11
    10000, //12
    15000, //13
    30000, //14
    40000, //15
    50000, //16
    70000, //17
    100000, //18
    120000, //19
    140000, //20
    250000, //21
    300000, //22
    350000, //23
    400000, //24
    500000, //25
    700000, //26
    1000000, //27
    1400000, //28
    1800000, //29
    2000000, //30
    2400000, //31
    2800000, //32
    3200000, //33
    3600000, //34
    4000000, //35
    4800000, //36
    5600000, //37
    8200000, //38
    9000000, //39
    12000000, //40
    16000000, //41
    30000000, //42
    50000000, //43
    80000000, //44
    120000000, //45
    480000000, //46
    1000000000, //47
    3000000000, //48
    3500000000, //49
    4000000000, //50
    4000000000, //51
    4000000000, //52
    4000000000, //53
    4000000000, //54
    4000000000, //55
    4000000000, //56
    4000000000, //57
    4000000000, //58
    4000000000, //59
    4000000000, //60
    4000000000, //61
    4000000000, //62
    4000000000, //63
    4000000000, //64
    4000000000, //65
    4000000000, //66
    4000000000, //67
    4000000000, //68
    4000000000, //69
    4000000000, //70
    4000000000, //71
    4000000000, //72
    4000000000, //73
    4000000000, //74
    4000000000, //75
    4000000000, //76
    4000000000, //77
    4000000000, //78
    4000000000, //79
    4000000000, //80
    4000000000, //81
    4000000000, //82
    4000000000, //83
    4000000000, //84
    4000000000, //85
    4000000000, //86
    4000000000, //87
    4000000000, //88
    4000000000, //89
    4000000000, //90
    4000000000, //91
    4000000000, //92
    4000000000, //93
    4000000000, //94
    4000000000, //95
    4000000000, //96
    4000000000, //97
    4000000000, //98
    4000000000, //99
    4000000000, //100
    4000000000, //101
    4000000000, //102
    4000000000, //103
    4000000000, //104
    4000000000, //105
    4000000000, //106
    4000000000, //107
    4000000000, //108
    4000000000, //109
    4000000000, //110
    4000000000, //111
    4000000000, //112
    4000000000, //113
    4000000000, //114
    4000000000, //115
    4000000000, //116
    4000000000, //117
    4000000000, //118
    4000000000, //119
    4000000000, //120
    4000000000, //121
    4000000000, //122
    4000000000, //123
    4000000000, //124
    4000000000, //125
    4000000000, //126
    4000000000, //127
    4000000000, //128
    4000000000, //129
    4000000000, //130
    4000000000, //131
    4000000000, //132
    4000000000, //133
    4000000000, //134
    4000000000, //135
    4000000000, //136
    4000000000, //137
    4000000000, //138
    4000000000, //139
    4000000000, //140
    4000000000, //141
    4000000000, //142
    4000000000, //143
    4000000000, //144
    4000000000, //145
    4000000000, //146
    4000000000, //147
    4000000000, //148
    4000000000, //149
    4000000000, //150
    4000000000, //151
    4000000000, //152
    4000000000, //153
    4000000000, //154
    4000000000, //155
    4000000000, //156
    4000000000, //157
    4000000000, //158
    4000000000, //159
    4000000000, //160
    4000000000, //161
    4000000000, //162
    4000000000, //163
    4000000000, //164
    4000000000, //165
    4000000000, //166
    4000000000, //167
    4000000000, //168
    4000000000, //169
    4000000000, //170
    4000000000, //171
    4000000000, //172
    4000000000, //173
    4000000000, //174
    4000000000, //175
    4000000000, //176
    4000000000, //177
    4000000000, //178
    4000000000, //179
    4000000000, //180
    4000000000, //181
    4000000000, //182
    4000000000, //183
    4000000000, //184
    4000000000, //185
    4000000000, //186
    4000000000, //187
    4000000000, //188
    4000000000, //189
    4000000000, //190
    4000000000, //191
    4000000000, //192
    4000000000, //193
    4000000000, //194
    4000000000, //195
    4000000000, //196
    4000000000, //197
    4000000000, //198
    4000000000, //199
    4000000000, //200
    4000000000, //201
    4000000000, //202
    4000000000, //203
    4000000000, //204
    4000000000, //205
    4000000000, //206
    4000000000, //207
    4000000000, //208
    4000000000, //209
    4000000000, //210
    4000000000, //211
    4000000000, //212
    4000000000, //213
    4000000000, //214
    4000000000, //215
    4000000000, //216
    4000000000, //217
    4000000000, //218
    4000000000, //219
    4000000000, //220
    4000000000, //221
    4000000000, //222
    4000000000, //223
    4000000000, //224
    4000000000, //225
    4000000000, //226
    4000000000, //227
    4000000000, //228
    4000000000, //229
    4000000000, //230
    4000000000, //231
    4000000000, //232
    4000000000, //233
    4000000000, //234
    4000000000, //235
    4000000000, //236
    4000000000, //237
    4000000000, //238
    4000000000, //239
    4000000000, //240
    4000000000, //241
    4000000000, //242
    4000000000, //243
    4000000000, //244
    4000000000, //245
    4000000000, //246
    4000000000, //247
    4000000000, //248
    4000000000, //249
    4000000000, //250
    4000000000, //251
    4000000000, //252
    4000000000, //253
    4000000000, //254
    4000000000, //255
    4000000000, //256
    4000000000, //257
    4000000000, //258
    4000000000, //259
    4000000000, //260
    4000000000, //261
    4000000000, //262
    4000000000, //263
    4000000000, //264
    4000000000, //265
    4000000000, //266
    4000000000, //267
    4000000000, //268
    4000000000, //269
    4000000000, //270
    4000000000, //271
    4000000000, //272
    4000000000, //273
    4000000000, //274
    4000000000, //275
    4000000000, //276
    4000000000, //277
    4000000000, //278
    4000000000, //279
    4000000000, //280
    4000000000, //281
    4000000000, //282
    4000000000, //283
    4000000000, //284
    4000000000, //285
    4000000000, //286
    4000000000, //287
    4000000000, //288
    4000000000, //289
    4000000000, //290
    4000000000, //291
    4000000000, //292
    4000000000, //293
    4000000000, //294
    4000000000, //295
    4000000000, //296
    4000000000, //297
    4000000000, //298
    4000000000, //299
    4000000000, //300
    4000000000, //301
    4000000000, //302
    4000000000, //303
    4000000000, //304
    4000000000, //305
    4000000000, //306
    4000000000, //307
    4000000000, //308
    4000000000, //309
    4000000000, //310
    4000000000, //311
    4000000000, //312
    4000000000, //313
    4000000000, //314
    4000000000, //315
    4000000000, //316
    4000000000, //317
    4000000000, //318
    4000000000, //319
    4000000000, //320
    4000000000, //321
    4000000000, //322
    4000000000, //323
    4000000000, //324
    4000000000, //325
    4000000000, //326
    4000000000, //327
    4000000000, //328
    4000000000, //329
    4000000000, //330
    4000000000, //331
    4000000000, //332
    4000000000, //333
    4000000000, //334
    4000000000, //335
    4000000000, //336
    4000000000, //337
    4000000000, //338
    4000000000, //339
    4000000000, //340
    4000000000, //341
    4000000000, //342
    4000000000, //343
    4000000000, //344
    4000000000, //345
    4000000000, //346
    4000000000, //347
    4000000000, //348
    4000000000, //349
    4000000000, //350
    4000000000, //351
    4000000000, //352
    4000000000, //353
    4000000000, //354
    4000000000, //355
    4000000000, //356
    4000000000, //357
    4000000000, //358
    4000000000, //359
    4000000000, //360
    4000000000, //361
    4000000000, //362
    4000000000, //363
    4000000000, //364
    4000000000, //365
    4000000000, //366
    4000000000, //367
    4000000000, //368
    4000000000, //369
    4000000000, //370
    4000000000, //371
    4000000000, //372
    4000000000, //373
    4000000000, //374
    4000000000, //375
    4000000000, //376
    4000000000, //377
    4000000000, //378
    4000000000, //379
    4000000000, //380
    4000000000, //381
    4000000000, //382
    4000000000, //383
    4000000000, //384
    4000000000, //385
    4000000000, //386
    4000000000, //387
    4000000000, //388
    4000000000, //389
    4000000000, //390
    4000000000, //391
    4000000000, //392
    4000000000, //393
    4000000000, //394
    4000000000, //395
    4000000000, //396
    4000000000, //397
    4000000000, //398
    4000000000, //399
    4000000000, //400
    4000000000, //401
    4000000000, //402
    4000000000, //403
    4000000000, //404
    4000000000, //405
    4000000000, //406
    4000000000, //407
    4000000000, //408
    4000000000, //409
    4000000000, //410
    4000000000, //411
    4000000000, //412
    4000000000, //413
    4000000000, //414
    4000000000, //415
    4000000000, //416
    4000000000, //417
    4000000000, //418
    4000000000, //419
    4000000000, //420
    4000000000, //421
    4000000000, //422
    4000000000, //423
    4000000000, //424
    4000000000, //425
    4000000000, //426
    4000000000, //427
    4000000000, //428
    4000000000, //429
    4000000000, //430
    4000000000, //431
    4000000000, //432
    4000000000, //433
    4000000000, //434
    4000000000, //435
    4000000000, //436
    4000000000, //437
    4000000000, //438
    4000000000, //439
    4000000000, //440
    4000000000, //441
    4000000000, //442
    4000000000, //443
    4000000000, //444
    4000000000, //445
    4000000000, //446
    4000000000, //447
    4000000000, //448
    4000000000, //449
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000, //498
    4000000000, //499
    4000000000, //500
    4000000000, //50
    4000000000, //51
    4000000000, //52
    4000000000, //53
    4000000000, //54
    4000000000, //55
    4000000000, //56
    4000000000, //57
    4000000000, //58
    4000000000, //59
    4000000000, //60
    4000000000, //61
    4000000000, //62
    4000000000, //63
    4000000000, //64
    4000000000, //65
    4000000000, //66
    4000000000, //67
    4000000000, //68
    4000000000, //69
    4000000000, //70
    4000000000, //71
    4000000000, //72
    4000000000, //73
    4000000000, //74
    4000000000, //75
    4000000000, //76
    4000000000, //77
    4000000000, //78
    4000000000, //79
    4000000000, //80
    4000000000, //81
    4000000000, //82
    4000000000, //83
    4000000000, //84
    4000000000, //85
    4000000000, //86
    4000000000, //87
    4000000000, //88
    4000000000, //89
    4000000000, //90
    4000000000, //91
    4000000000, //92
    4000000000, //93
    4000000000, //94
    4000000000, //95
    4000000000, //96
    4000000000, //97
    4000000000, //98
    4000000000, //99
    4000000000, //100
    4000000000, //101
    4000000000, //102
    4000000000, //103
    4000000000, //104
    4000000000, //105
    4000000000, //106
    4000000000, //107
    4000000000, //108
    4000000000, //109
    4000000000, //110
    4000000000, //111
    4000000000, //112
    4000000000, //113
    4000000000, //114
    4000000000, //115
    4000000000, //116
    4000000000, //117
    4000000000, //118
    4000000000, //119
    4000000000, //120
    4000000000, //121
    4000000000, //122
    4000000000, //123
    4000000000, //124
    4000000000, //125
    4000000000, //126
    4000000000, //127
    4000000000, //128
    4000000000, //129
    4000000000, //130
    4000000000, //131
    4000000000, //132
    4000000000, //133
    4000000000, //134
    4000000000, //135
    4000000000, //136
    4000000000, //137
    4000000000, //138
    4000000000, //139
    4000000000, //140
    4000000000, //141
    4000000000, //142
    4000000000, //143
    4000000000, //144
    4000000000, //145
    4000000000, //146
    4000000000, //147
    4000000000, //148
    4000000000, //149
    4000000000, //150
    4000000000, //151
    4000000000, //152
    4000000000, //153
    4000000000, //154
    4000000000, //155
    4000000000, //156
    4000000000, //157
    4000000000, //158
    4000000000, //159
    4000000000, //160
    4000000000, //161
    4000000000, //162
    4000000000, //163
    4000000000, //164
    4000000000, //165
    4000000000, //166
    4000000000, //167
    4000000000, //168
    4000000000, //169
    4000000000, //170
    4000000000, //171
    4000000000, //172
    4000000000, //173
    4000000000, //174
    4000000000, //175
    4000000000, //176
    4000000000, //177
    4000000000, //178
    4000000000, //179
    4000000000, //180
    4000000000, //181
    4000000000, //182
    4000000000, //183
    4000000000, //184
    4000000000, //185
    4000000000, //186
    4000000000, //187
    4000000000, //188
    4000000000, //189
    4000000000, //190
    4000000000, //191
    4000000000, //192
    4000000000, //193
    4000000000, //194
    4000000000, //195
    4000000000, //196
    4000000000, //197
    4000000000, //198
    4000000000, //199
    4000000000, //200
    4000000000, //201
    4000000000, //202
    4000000000, //203
    4000000000, //204
    4000000000, //205
    4000000000, //206
    4000000000, //207
    4000000000, //208
    4000000000, //209
    4000000000, //210
    4000000000, //211
    4000000000, //212
    4000000000, //213
    4000000000, //214
    4000000000, //215
    4000000000, //216
    4000000000, //217
    4000000000, //218
    4000000000, //219
    4000000000, //220
    4000000000, //221
    4000000000, //222
    4000000000, //223
    4000000000, //224
    4000000000, //225
    4000000000, //226
    4000000000, //227
    4000000000, //228
    4000000000, //229
    4000000000, //230
    4000000000, //231
    4000000000, //232
    4000000000, //233
    4000000000, //234
    4000000000, //235
    4000000000, //236
    4000000000, //237
    4000000000, //238
    4000000000, //239
    4000000000, //240
    4000000000, //241
    4000000000, //242
    4000000000, //243
    4000000000, //244
    4000000000, //245
    4000000000, //246
    4000000000, //247
    4000000000, //248
    4000000000, //249
    4000000000, //250
    4000000000, //251
    4000000000, //252
    4000000000, //253
    4000000000, //254
    4000000000, //255
    4000000000, //256
    4000000000, //257
    4000000000, //258
    4000000000, //259
    4000000000, //260
    4000000000, //261
    4000000000, //262
    4000000000, //263
    4000000000, //264
    4000000000, //265
    4000000000, //266
    4000000000, //267
    4000000000, //268
    4000000000, //269
    4000000000, //270
    4000000000, //271
    4000000000, //272
    4000000000, //273
    4000000000, //274
    4000000000, //275
    4000000000, //276
    4000000000, //277
    4000000000, //278
    4000000000, //279
    4000000000, //280
    4000000000, //281
    4000000000, //282
    4000000000, //283
    4000000000, //284
    4000000000, //285
    4000000000, //286
    4000000000, //287
    4000000000, //288
    4000000000, //289
    4000000000, //290
    4000000000, //291
    4000000000, //292
    4000000000, //293
    4000000000, //294
    4000000000, //295
    4000000000, //296
    4000000000, //297
    4000000000, //298
    4000000000, //299
    4000000000, //300
    4000000000, //301
    4000000000, //302
    4000000000, //303
    4000000000, //304
    4000000000, //305
    4000000000, //306
    4000000000, //307
    4000000000, //308
    4000000000, //309
    4000000000, //310
    4000000000, //311
    4000000000, //312
    4000000000, //313
    4000000000, //314
    4000000000, //315
    4000000000, //316
    4000000000, //317
    4000000000, //318
    4000000000, //319
    4000000000, //320
    4000000000, //321
    4000000000, //322
    4000000000, //323
    4000000000, //324
    4000000000, //325
    4000000000, //326
    4000000000, //327
    4000000000, //328
    4000000000, //329
    4000000000, //330
    4000000000, //331
    4000000000, //332
    4000000000, //333
    4000000000, //334
    4000000000, //335
    4000000000, //336
    4000000000, //337
    4000000000, //338
    4000000000, //339
    4000000000, //340
    4000000000, //341
    4000000000, //342
    4000000000, //343
    4000000000, //344
    4000000000, //345
    4000000000, //346
    4000000000, //347
    4000000000, //348
    4000000000, //349
    4000000000, //350
    4000000000, //351
    4000000000, //352
    4000000000, //353
    4000000000, //354
    4000000000, //355
    4000000000, //356
    4000000000, //357
    4000000000, //358
    4000000000, //359
    4000000000, //360
    4000000000, //361
    4000000000, //362
    4000000000, //363
    4000000000, //364
    4000000000, //365
    4000000000, //366
    4000000000, //367
    4000000000, //368
    4000000000, //369
    4000000000, //370
    4000000000, //371
    4000000000, //372
    4000000000, //373
    4000000000, //374
    4000000000, //375
    4000000000, //376
    4000000000, //377
    4000000000, //378
    4000000000, //379
    4000000000, //380
    4000000000, //381
    4000000000, //382
    4000000000, //383
    4000000000, //384
    4000000000, //385
    4000000000, //386
    4000000000, //387
    4000000000, //388
    4000000000, //389
    4000000000, //390
    4000000000, //391
    4000000000, //392
    4000000000, //393
    4000000000, //394
    4000000000, //395
    4000000000, //396
    4000000000, //397
    4000000000, //398
    4000000000, //399
    4000000000, //400
    4000000000, //401
    4000000000, //402
    4000000000, //403
    4000000000, //404
    4000000000, //405
    4000000000, //406
    4000000000, //407
    4000000000, //408
    4000000000, //409
    4000000000, //410
    4000000000, //411
    4000000000, //412
    4000000000, //413
    4000000000, //414
    4000000000, //415
    4000000000, //416
    4000000000, //417
    4000000000, //418
    4000000000, //419
    4000000000, //420
    4000000000, //421
    4000000000, //422
    4000000000, //423
    4000000000, //424
    4000000000, //425
    4000000000, //426
    4000000000, //427
    4000000000, //428
    4000000000, //429
    4000000000, //430
    4000000000, //431
    4000000000, //432
    4000000000, //433
    4000000000, //434
    4000000000, //435
    4000000000, //436
    4000000000, //437
    4000000000, //438
    4000000000, //439
    4000000000, //440
    4000000000, //441
    4000000000, //442
    4000000000, //443
    4000000000, //444
    4000000000, //445
    4000000000, //446
    4000000000, //447
    4000000000, //448
    4000000000, //449
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000, //498
    4000000000, //499
    4000000000, //500
    4000000000, //450
    4000000000, //451
    4000000000, //452
    4000000000, //453
    4000000000, //454
    4000000000, //455
    4000000000, //456
    4000000000, //457
    4000000000, //458
    4000000000, //459
    4000000000, //460
    4000000000, //461
    4000000000, //462
    4000000000, //463
    4000000000, //464
    4000000000, //465
    4000000000, //466
    4000000000, //467
    4000000000, //468
    4000000000, //469
    4000000000, //470
    4000000000, //471
    4000000000, //472
    4000000000, //473
    4000000000, //474
    4000000000, //475
    4000000000, //476
    4000000000, //477
    4000000000, //478
    4000000000, //479
    4000000000, //480
    4000000000, //481
    4000000000, //482
    4000000000, //483
    4000000000, //484
    4000000000, //485
    4000000000, //486
    4000000000, //487
    4000000000, //488
    4000000000, //489
    4000000000, //490
    4000000000, //491
    4000000000, //492
    4000000000, //493
    4000000000, //494
    4000000000, //495
    4000000000, //496
    4000000000, //497
    4000000000 //500
    );
  //===============================================================        MagicManager
  //游戏命令方面参数
  g_GameCommand: TGameCommand = (
    Data: (sCmd: 'Date'; nPermissionMin: 0; nPermissionMax: 10);
    PRVMSG: (sCmd: 'PrvMsg'; nPermissionMin: 0; nPermissionMax: 10);
    ALLOWMSG: (sCmd: 'AllowMsg'; nPermissionMin: 0; nPermissionMax: 10);
    LETSHOUT: (sCmd: 'LetShout'; nPermissionMin: 0; nPermissionMax: 10);
    LETTRADE: (sCmd: 'LetTrade'; nPermissionMin: 0; nPermissionMax: 10);
    LETGUILD: (sCmd: 'LetGuild'; nPermissionMin: 0; nPermissionMax: 10);
    ENDGUILD: (sCmd: 'EndGuild'; nPermissionMin: 0; nPermissionMax: 10);
    BANGUILDCHAT: (sCmd: 'BanGuildChat'; nPermissionMin: 0; nPermissionMax: 10);
    AUTHALLY: (sCmd: 'AuthAlly'; nPermissionMin: 0; nPermissionMax: 10);
    AUTH: (sCmd: '联盟'; nPermissionMin: 0; nPermissionMax: 10);
    AUTHCANCEL: (sCmd: '取消联盟'; nPermissionMin: 0; nPermissionMax: 10);
    DIARY: (sCmd: 'Diary'; nPermissionMin: 0; nPermissionMax: 10);
    USERMOVE: (sCmd: 'Move'; nPermissionMin: 0; nPermissionMax: 10);
    SEARCHING: (sCmd: 'Searching'; nPermissionMin: 0; nPermissionMax: 10);
    ALLOWGROUPCALL: (sCmd: 'AllowGroupRecall'; nPermissionMin: 0; nPermissionMax: 10);
    GROUPRECALLL: (sCmd: 'GroupRecall'; nPermissionMin: 0; nPermissionMax: 10);
    ALLOWGUILDRECALL: (sCmd: 'AllowGuildRecall'; nPermissionMin: 0; nPermissionMax: 10);
    GUILDRECALLL: (sCmd: 'GuildRecall'; nPermissionMin: 0; nPermissionMax: 10);
    UNLOCKSTORAGE: (sCmd: 'UnLockStorage'; nPermissionMin: 0; nPermissionMax: 10);
    UnLock: (sCmd: 'UnLock'; nPermissionMin: 0; nPermissionMax: 10);
    Lock: (sCmd: 'Lock'; nPermissionMin: 0; nPermissionMax: 10);
    PASSWORDLOCK: (sCmd: 'PasswordLock'; nPermissionMin: 0; nPermissionMax: 10);
    SETPASSWORD: (sCmd: 'SetPassword'; nPermissionMin: 0; nPermissionMax: 10);
    CHGPASSWORD: (sCmd: 'ChgPassword'; nPermissionMin: 0; nPermissionMax: 10);
    CLRPASSWORD: (sCmd: 'ClrPassword'; nPermissionMin: 10; nPermissionMax: 10);
    UNPASSWORD: (sCmd: 'UnPassword'; nPermissionMin: 0; nPermissionMax: 10);
    MEMBERFUNCTION: (sCmd: 'MemberFunc'; nPermissionMin: 0; nPermissionMax: 10);
    MEMBERFUNCTIONEX: (sCmd: 'MemberFuncEx'; nPermissionMin: 0; nPermissionMax: 10);
    DEAR: (sCmd: 'Dear'; nPermissionMin: 0; nPermissionMax: 10);
    ALLOWDEARRCALL: (sCmd: 'AllowDearRecall'; nPermissionMin: 0; nPermissionMax: 10);
    DEARRECALL: (sCmd: 'DearRecall'; nPermissionMin: 0; nPermissionMax: 10);
    Master: (sCmd: 'Master'; nPermissionMin: 0; nPermissionMax: 10);
    ALLOWMASTERRECALL: (sCmd: 'AllowMasterRecall'; nPermissionMin: 0; nPermissionMax: 10);
    MASTERECALL: (sCmd: 'MasterRecall'; nPermissionMin: 0; nPermissionMax: 10);
    ATTACKMODE: (sCmd: 'AttackMode'; nPermissionMin: 0; nPermissionMax: 10);
    REST: (sCmd: 'Rest'; nPermissionMin: 0; nPermissionMax: 10);
    TAKEONHORSE: (sCmd: '骑马'; nPermissionMin: 0; nPermissionMax: 10);
    TAKEOFHORSE: (sCmd: '下马'; nPermissionMin: 0; nPermissionMax: 10);
    HUMANLOCAL: (sCmd: 'HumanLocal'; nPermissionMin: 3; nPermissionMax: 10);
    Move: (sCmd: 'Move'; nPermissionMin: 3; nPermissionMax: 6);
    POSITIONMOVE: (sCmd: 'PositionMove'; nPermissionMin: 3; nPermissionMax: 6);
    INFO: (sCmd: 'Info'; nPermissionMin: 3; nPermissionMax: 10);
    MOBLEVEL: (sCmd: 'MobLevel'; nPermissionMin: 3; nPermissionMax: 10);
    MOBCOUNT: (sCmd: 'MobCount'; nPermissionMin: 3; nPermissionMax: 10);
    HUMANCOUNT: (sCmd: 'HumanCount'; nPermissionMin: 3; nPermissionMax: 10);
    Map: (sCmd: 'Map'; nPermissionMin: 3; nPermissionMax: 10);
    KICK: (sCmd: 'Kick'; nPermissionMin: 10; nPermissionMax: 10);
    TING: (sCmd: 'Ting'; nPermissionMin: 10; nPermissionMax: 10);
    SUPERTING: (sCmd: 'SuperTing'; nPermissionMin: 10; nPermissionMax: 10);
    MAPMOVE: (sCmd: 'MapMove'; nPermissionMin: 10; nPermissionMax: 10);
    SHUTUP: (sCmd: 'Shutup'; nPermissionMin: 10; nPermissionMax: 10);
    RELEASESHUTUP: (sCmd: 'ReleaseShutup'; nPermissionMin: 10; nPermissionMax: 10);
    SHUTUPLIST: (sCmd: 'ShutupList'; nPermissionMin: 10; nPermissionMax: 10);
    GAMEMASTER: (sCmd: 'GameMaster'; nPermissionMin: 10; nPermissionMax: 10);
    OBSERVER: (sCmd: 'Observer'; nPermissionMin: 10; nPermissionMax: 10);
    SUEPRMAN: (sCmd: 'Superman'; nPermissionMin: 10; nPermissionMax: 10);
    Level: (sCmd: 'Level'; nPermissionMin: 10; nPermissionMax: 10);
    SABUKWALLGOLD: (sCmd: 'SabukWallGold'; nPermissionMin: 10; nPermissionMax: 10);
    RECALL: (sCmd: 'Recall'; nPermissionMin: 10; nPermissionMax: 10);
    REGOTO: (sCmd: 'ReGoto'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWFLAG: (sCmd: 'showflag'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWOPEN: (sCmd: 'showopen'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWUNIT: (sCmd: 'showunit'; nPermissionMin: 10; nPermissionMax: 10);
    Attack: (sCmd: 'Attack'; nPermissionMin: 10; nPermissionMax: 10);
    MOB: (sCmd: 'Mob'; nPermissionMin: 10; nPermissionMax: 10);
    MOBNPC: (sCmd: 'MobNpc'; nPermissionMin: 10; nPermissionMax: 10);
    DELNPC: (sCmd: 'DelNpc'; nPermissionMin: 10; nPermissionMax: 10);
    NPCSCRIPT: (sCmd: 'NpcScript'; nPermissionMin: 10; nPermissionMax: 10);
    RECALLMOB: (sCmd: 'RecallMob'; nPermissionMin: 10; nPermissionMax: 10);
    LUCKYPOINT: (sCmd: 'LuckyPoint'; nPermissionMin: 10; nPermissionMax: 10);
    LOTTERYTICKET: (sCmd: 'LotteryTicket'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADGUILD: (sCmd: 'ReloadGuild'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADLINENOTICE: (sCmd: 'ReloadLineNotice'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADABUSE: (sCmd: 'ReloadAbuse'; nPermissionMin: 10; nPermissionMax: 10);
    BACKSTEP: (sCmd: 'Backstep'; nPermissionMin: 10; nPermissionMax: 10);
    BALL: (sCmd: 'Ball'; nPermissionMin: 10; nPermissionMax: 10);
    FREEPENALTY: (sCmd: 'FreePK'; nPermissionMin: 10; nPermissionMax: 10);
    PKPOINT: (sCmd: 'PKpoint'; nPermissionMin: 10; nPermissionMax: 10);
    IncPkPoint: (sCmd: 'IncPkPoint'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGELUCK: (sCmd: 'ChangeLuck'; nPermissionMin: 10; nPermissionMax: 10);
    HUNGER: (sCmd: 'Hunger'; nPermissionMin: 10; nPermissionMax: 10);
    HAIR: (sCmd: 'hair'; nPermissionMin: 10; nPermissionMax: 10);
    TRAINING: (sCmd: 'Training'; nPermissionMin: 10; nPermissionMax: 10);
    DELETESKILL: (sCmd: 'DeleteSkill'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEJOB: (sCmd: 'ChangeJob'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEGENDER: (sCmd: 'ChangeGender'; nPermissionMin: 10; nPermissionMax: 10);
    NAMECOLOR: (sCmd: 'NameColor'; nPermissionMin: 10; nPermissionMax: 10);
    Mission: (sCmd: 'Mission'; nPermissionMin: 10; nPermissionMax: 10);
    MobPlace: (sCmd: 'MobPlace'; nPermissionMin: 10; nPermissionMax: 10);
    TRANSPARECY: (sCmd: 'Transparency'; nPermissionMin: 10; nPermissionMax: 10);
    DELETEITEM: (sCmd: 'DeleteItem'; nPermissionMin: 10; nPermissionMax: 10);
    LEVEL0: (sCmd: 'Level0'; nPermissionMin: 10; nPermissionMax: 10);
    CLEARMISSION: (sCmd: 'ClearMission'; nPermissionMin: 10; nPermissionMax: 10);
    SETFLAG: (sCmd: 'setflag'; nPermissionMin: 10; nPermissionMax: 10);
    SETOPEN: (sCmd: 'setopen'; nPermissionMin: 10; nPermissionMax: 10);
    SETUNIT: (sCmd: 'setunit'; nPermissionMin: 10; nPermissionMax: 10);
    RECONNECTION: (sCmd: 'Reconnection'; nPermissionMin: 10; nPermissionMax: 10);
    DISABLEFILTER: (sCmd: 'DisableFilter'; nPermissionMin: 10; nPermissionMax: 10);
    CHGUSERFULL: (sCmd: 'CHGUSERFULL'; nPermissionMin: 10; nPermissionMax: 10);
    CHGZENFASTSTEP: (sCmd: 'CHGZENFASTSTEP'; nPermissionMin: 10; nPermissionMax: 10);
    CONTESTPOINT: (sCmd: 'ContestPoint'; nPermissionMin: 10; nPermissionMax: 10);
    STARTCONTEST: (sCmd: 'StartContest'; nPermissionMin: 10; nPermissionMax: 10);
    ENDCONTEST: (sCmd: 'EndContest'; nPermissionMin: 10; nPermissionMax: 10);
    ANNOUNCEMENT: (sCmd: 'Announcement'; nPermissionMin: 10; nPermissionMax: 10);
    OXQUIZROOM: (sCmd: 'OXQuizRoom'; nPermissionMin: 10; nPermissionMax: 10);
    GSA: (sCmd: 'gsa'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEITEMNAME: (sCmd: 'ChangeItemName'; nPermissionMin: 10; nPermissionMax: 10);
    DISABLESENDMSG: (sCmd: 'DisableSendMsg'; nPermissionMin: 10; nPermissionMax: 10);
    ENABLESENDMSG: (sCmd: 'EnableSendMsg'; nPermissionMin: 10; nPermissionMax: 10);
    DISABLESENDMSGLIST: (sCmd: 'DisableSendMsgList'; nPermissionMin: 10; nPermissionMax: 10);
    KILL: (sCmd: 'Kill'; nPermissionMin: 10; nPermissionMax: 10);
    MAKE: (sCmd: 'make'; nPermissionMin: 10; nPermissionMax: 10);
    SMAKE: (sCmd: 'Supermake'; nPermissionMin: 10; nPermissionMax: 10);
    BonusPoint: (sCmd: 'BonusPoint'; nPermissionMin: 10; nPermissionMax: 10);
    DELBONUSPOINT: (sCmd: 'DelBonusPoint'; nPermissionMin: 10; nPermissionMax: 10);
    RESTBONUSPOINT: (sCmd: 'RestBonusPoint'; nPermissionMin: 10; nPermissionMax: 10);
    FIREBURN: (sCmd: 'FireBurn'; nPermissionMin: 10; nPermissionMax: 10);
    TESTFIRE: (sCmd: 'TestFire'; nPermissionMin: 10; nPermissionMax: 10);
    TESTSTATUS: (sCmd: 'TestStatus'; nPermissionMin: 10; nPermissionMax: 10);
    DELGOLD: (sCmd: 'DelGold'; nPermissionMin: 10; nPermissionMax: 10);
    ADDGOLD: (sCmd: 'AddGold'; nPermissionMin: 10; nPermissionMax: 10);
    DELGAMEGOLD: (sCmd: 'DelGamePoint'; nPermissionMin: 10; nPermissionMax: 10);
    ADDGAMEGOLD: (sCmd: 'AddGamePoint'; nPermissionMin: 10; nPermissionMax: 10);
    GAMEGOLD: (sCmd: 'GameGold'; nPermissionMin: 10; nPermissionMax: 10);
    GAMEPOINT: (sCmd: 'GamePoint'; nPermissionMin: 10; nPermissionMax: 10);
    CREDITPOINT: (sCmd: 'CreditPoint'; nPermissionMin: 10; nPermissionMax: 10);
    TESTGOLDCHANGE: (sCmd: 'Test_GOLD_Change'; nPermissionMin: 10; nPermissionMax: 10);
    REFINEWEAPON: (sCmd: 'RefineWeapon'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADADMIN: (sCmd: 'ReloadAdmin'; nPermissionMin: 10; nPermissionMax: 10);
    ReLoadNpc: (sCmd: 'ReloadNpc'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADMANAGE: (sCmd: 'ReloadManage'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADROBOTMANAGE: (sCmd: 'ReloadRobotManage'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADROBOT: (sCmd: 'ReloadRobot'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADMONITEMS: (sCmd: 'ReloadMonItems'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADDIARY: (sCmd: 'ReloadDiary'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADITEMDB: (sCmd: 'ReloadItemDB'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADMAGICDB: (sCmd: 'ReloadMagicDB'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADMONSTERDB: (sCmd: 'ReloadMonsterDB'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADMINMAP: (sCmd: 'ReLoadMinMap'; nPermissionMin: 10; nPermissionMax: 10);
    ReAlive: (sCmd: 'ReAlive'; nPermissionMin: 10; nPermissionMax: 10);
    ADJUESTLEVEL: (sCmd: 'AdjustLevel'; nPermissionMin: 10; nPermissionMax: 10);
    ADJUESTEXP: (sCmd: 'AdjustExp'; nPermissionMin: 10; nPermissionMax: 10);
    AddGuild: (sCmd: 'AddGuild'; nPermissionMin: 10; nPermissionMax: 10);
    DELGUILD: (sCmd: 'DelGuild'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGESABUKLORD: (sCmd: 'ChangeSabukLord'; nPermissionMin: 10; nPermissionMax: 10);
    FORCEDWALLCONQUESTWAR: (sCmd: 'ForcedWallconquestWar'; nPermissionMin: 10; nPermissionMax: 10);
    ADDTOITEMEVENT: (sCmd: 'AddToItemEvent'; nPermissionMin: 10; nPermissionMax: 10);
    ADDTOITEMEVENTASPIECES: (sCmd: 'AddToItemEventAsPieces'; nPermissionMin: 10; nPermissionMax: 10);
    ItemEventList: (sCmd: 'ItemEventList'; nPermissionMin: 10; nPermissionMax: 10);
    STARTINGGIFTNO: (sCmd: 'StartingGiftNo'; nPermissionMin: 10; nPermissionMax: 10);
    DELETEALLITEMEVENT: (sCmd: 'DeleteAllItemEvent'; nPermissionMin: 10; nPermissionMax: 10);
    STARTITEMEVENT: (sCmd: 'StartItemEvent'; nPermissionMin: 10; nPermissionMax: 10);
    ITEMEVENTTERM: (sCmd: 'ItemEventTerm'; nPermissionMin: 10; nPermissionMax: 10);
    ADJUESTTESTLEVEL: (sCmd: 'AdjustTestLevel'; nPermissionMin: 10; nPermissionMax: 10);
    TRAININGSKILL: (sCmd: 'TrainingSkill'; nPermissionMin: 10; nPermissionMax: 10);
    OPDELETESKILL: (sCmd: 'OPDeleteSkill'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEWEAPONDURA: (sCmd: 'ChangeWeaponDura'; nPermissionMin: 10; nPermissionMax: 10);
    RELOADGUILDALL: (sCmd: 'ReloadGuildAll'; nPermissionMin: 10; nPermissionMax: 10);
    WHO: (sCmd: 'Who '; nPermissionMin: 3; nPermissionMax: 10);
    TOTAL: (sCmd: 'Total '; nPermissionMin: 5; nPermissionMax: 10);
    TESTGA: (sCmd: 'Testga'; nPermissionMin: 10; nPermissionMax: 10);
    MAPINFO: (sCmd: 'MapInfo'; nPermissionMin: 10; nPermissionMax: 10);
    SBKDOOR: (sCmd: 'SbkDoor'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEDEARNAME: (sCmd: 'DearName'; nPermissionMin: 10; nPermissionMax: 10);
    CHANGEMASTERNAME: (sCmd: 'MasterName'; nPermissionMin: 10; nPermissionMax: 10);
    STARTQUEST: (sCmd: 'StartQuest'; nPermissionMin: 10; nPermissionMax: 10);
    SETPERMISSION: (sCmd: 'SetPermission'; nPermissionMin: 10; nPermissionMax: 10);
    CLEARMON: (sCmd: 'ClearMon'; nPermissionMin: 10; nPermissionMax: 10);
    RENEWLEVEL: (sCmd: 'ReNewLevel'; nPermissionMin: 10; nPermissionMax: 10);
    DENYIPLOGON: (sCmd: 'DenyIPLogon'; nPermissionMin: 10; nPermissionMax: 10);
    DENYACCOUNTLOGON: (sCmd: 'DenyAccountLogon'; nPermissionMin: 10; nPermissionMax: 10);
    DENYCHARNAMELOGON: (sCmd: 'DenyCharNameLogon'; nPermissionMin: 10; nPermissionMax: 10);
    DELDENYIPLOGON: (sCmd: 'DelDenyIPLogon'; nPermissionMin: 10; nPermissionMax: 10);
    DELDENYACCOUNTLOGON: (sCmd: 'DelDenyAccountLogon'; nPermissionMin: 10; nPermissionMax: 10);
    DELDENYCHARNAMELOGON: (sCmd: 'DelDenyCharNameLogon'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWDENYIPLOGON: (sCmd: 'ShowDenyIPLogon'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWDENYACCOUNTLOGON: (sCmd: 'ShowDenyAccountLogon'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWDENYCHARNAMELOGON: (sCmd: 'ShowDenyCharNameLogon'; nPermissionMin: 10; nPermissionMax: 10);
    VIEWWHISPER: (sCmd: 'ViewWhisper'; nPermissionMin: 10; nPermissionMax: 10);
    SPIRIT: (sCmd: '祈祷生效'; nPermissionMin: 10; nPermissionMax: 10);
    SPIRITSTOP: (sCmd: '停止叛变'; nPermissionMin: 10; nPermissionMax: 10);
    SetMapMode: (sCmd: 'SetMapMode'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWMAPMODE: (sCmd: 'ShowMapMode'; nPermissionMin: 10; nPermissionMax: 10);
    TESTSERVERCONFIG: (sCmd: 'TestServerConfig'; nPermissionMin: 10; nPermissionMax: 10);
    SERVERSTATUS: (sCmd: 'ServerStatus'; nPermissionMin: 10; nPermissionMax: 10);
    TESTGETBAGITEM: (sCmd: 'TestGetBagItem'; nPermissionMin: 10; nPermissionMax: 10);
    CLEARBAG: (sCmd: 'ClearBag'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWUSEITEMINFO: (sCmd: 'ShowUseItemInfo'; nPermissionMin: 10; nPermissionMax: 10);
    BINDUSEITEM: (sCmd: 'BindUseItem'; nPermissionMin: 10; nPermissionMax: 10);
    MOBFIREBURN: (sCmd: 'MobFireBurn'; nPermissionMin: 10; nPermissionMax: 10);
    TESTSPEEDMODE: (sCmd: 'TestSpeedMode'; nPermissionMin: 10; nPermissionMax: 10);
    REMTEMSG: (sCmd: 'RemoteMsg'; nPermissionMin: 10; nPermissionMax: 10);
    COLORSAY: (sCmd: '允许彩色字体聊天'; nPermissionMin: 10; nPermissionMax: 10);
    SETCOLORSAY: (sCmd: '设置聊天字体颜色'; nPermissionMin: 0; nPermissionMax: 0);
    AllowReAlive: (sCmd: '允许复活'; nPermissionMin: 0; nPermissionMax: 0);
    UserItem: (sCmd: 'USERITEM'; nPermissionMin: 10; nPermissionMax: 10);
    SIGNMOVE: (sCmd: 'SIGNMOVE'; nPermissionMin: 10; nPermissionMax: 10);
    SHOWEFFECT: (sCmd: 'SHOWEFFECT'; nPermissionMin: 10; nPermissionMax: 10);
    SEARCHMON: (sCmd: 'SEARCHMON'; nPermissionMin: 6; nPermissionMax: 6);
    CLEARCOPYITEM: (sCmd: 'CLEARCOPYITEM'; nPermissionMin: 10; nPermissionMax: 10);
    RANGECLEARCOPYITEM: (sCmd: 'RANGECLEARCOPYITEM'; nPermissionMin: 10; nPermissionMax: 10);
    UNBINDUSEITEM: (sCmd: 'UnBindUseItem'; nPermissionMin: 10; nPermissionMax: 10);
    RestHero: (sCmd: 'RestHero'; nPermissionMin: 0; nPermissionMax: 10);
    LOCKLOGON: (sCmd: 'LockLogin'; nPermissionMin: 0; nPermissionMax: 0);
    );
  //===============================================================
  //游戏显示文字内容参数
  sClientSoftVersionError: string = '游戏版本错误！！！';
  sDownLoadNewClientSoft: string = '请到网站上下载最新版本游戏客户端软件。';
  sForceDisConnect: string = '连接被强行中断！！！';
  sClientSoftVersionTooOld: string = '您现在使用的客户端软件版本太老了，大量的游戏效果新将无法使用。';
  sDownLoadAndUseNewClient: string = '为了更好的进行游戏，请下载最新的客户端软件！！！';
  sOnlineUserFull: string = '可允许的玩家数量已满';
  sYouNowIsTryPlayMode: string = '你现在处于测试中，你可以在七级以前使用，但是会限制你的一些功能.';
  g_sNowIsFreePlayMode: string = '当前服务器运行于测试模式.';
  sAttackModeOfAll: string = '[攻击模式: 全体攻击]';
  sAttackModeOfPeaceful: string = '[攻击模式: 和平攻击]';
  sAttackModeOfDear: string = '[Attack Mode: Marriage]';
  sAttackModeOfMaster: string = '[Attack Mode: Master]';
  sAttackModeOfGroup: string = '[攻击模式: 编组攻击]';
  sAttackModeOfGuild: string = '[攻击模式: 行会攻击]';
  sAttackModeOfRedWhite: string = '[攻击模式: 红名攻击]';
  sStartChangeAttackModeHelp: string = '使用组合快捷键 CTRL-H 更改攻击模式...';
  sStartNoticeMsg: string = '欢迎进入本服务器进行游戏...';

  sThrustingOn: string = '启用刺杀剑法';
  sThrustingOff: string = '关闭刺杀剑法';
  sHalfMoonOn: string = '开启半月弯刀';
  sHalfMoonOff: string = '关闭半月弯刀';
  sCrsHitOn: string = '开启光风斩';
  sCrsHitOff: string = '关闭光风斩';
  sFireSpiritsSummoned: string = '召唤烈火精灵成功...';
  sFireSpiritsFail: string = '召唤烈火精灵失败';

  sZRJFSpiritsSummoned: string = '逐日剑法开启成功...';
  sZRJFSpiritsFail: string = '逐日剑法关闭';


  sCidSpiritsSummoned: string = '破空剑开启成功...';
  sCidSpiritsFail: string = '破空剑开启失败';

  sKTZSpiritsSummoned: string = '开天斩开启成功...';
  sKTZSpiritsFail: string = '开天斩开启失败';

  sSpiritsGone: string = '召唤烈火结束！！！';
  sCIDSpiritsGone: string = '破空剑关闭！！！';
  sKTZSpiritsGone: string = '开天斩关闭！！！';

  sMateDoTooweak: string = '冲撞力不够！！！';

  g_sTheWeaponBroke: string = '武器破碎！！！';
  sTheWeaponRefineSuccessfull: string = '升级成功！！！';
  sTheWeaponRefineFail: string = '升级失败！！！';

  sYouPoisoned: string = '中毒了！！！';

  sPetRest: string = '下属：休息';
  sPetAttack: string = '下属：攻击';

  sWearNotOfWoMan: string = '非女性用品！！！';
  sWearNotOfMan: string = '非男性用品！！！';
  sHandWeightNot: string = '腕力不够！！！';
  sWearWeightNot: string = '负重力不够！！！';
  g_sItemIsNotThisAccount: string = '此物品不为此帐号所有！！！';
  g_sItemIsNotThisIPaddr: string = '此物品不为此IP所有！！！';
  g_sItemIsNotThisCharName: string = '此物品不为你所有！！！';
  g_sLevelNot: string = '等级不够！！！';
  g_sJobOrLevelNot: string = '职业不对或等级不够！！！';
  g_sJobOrDCNot: string = '职业不对或攻击力不够！！！';
  g_sJobOrMCNot: string = '职业不对或魔法力不够！！！';
  g_sJobOrSCNot: string = '职业不对或道术不够！！！';
  g_sDCNot: string = '攻击力不够！！！';
  g_sMCNot: string = '魔法力不够！！！';
  g_sSCNot: string = '道术不够！！！';
  g_sCreditPointNot: string = '声望点不够！！！';
  g_sReNewLevelNot: string = '转生等级不够！！！';
  g_sGuildNot: string = '加入了行会才可以使用此物品！！！';
  g_sGuildMasterNot: string = '行会掌门才可以使用此物品！！！';
  g_sSabukHumanNot: string = '沙城成员才可以使用此物品！！！';
  g_sSabukMasterManNot: string = '沙城城主才可以使用此物品！！！';
  g_sMemberNot: string = '会员才可以使用此物品！！！';
  g_sMemberTypeNot: string = '指定类型的会员可以使用此物品！！！';
  g_sCanottWearIt: string = '此物品不适使用！！！';

  sCanotUseDrugOnThisMap: string = '此地图不允许使用任何药品！！！';
  sGameMasterMode: string = '已进入管理员模式';
  sReleaseGameMasterMode: string = '已退出管理员模式';
  sObserverMode: string = '已进入隐身模式';
  g_sReleaseObserverMode: string = '已退出隐身模式';
  sSupermanMode: string = '已进入无敌模式';
  sReleaseSupermanMode: string = '已退出无敌模式';
  sYouFoundNothing: string = '未获取任何物品！！！';

  g_sNoPasswordLockSystemMsg: string = '游戏密码保护系统还没有启用！！！';
  g_sAlreadySetPasswordMsg: string = '仓库早已设置了一个密码，如需要修改密码请使用修改密码命令！！！';
  g_sReSetPasswordMsg: string = '请重复输入一次仓库密码：';
  g_sPasswordOverLongMsg: string = '输入的密码长度不正确！！！，密码长度必须在 4 - 7 的范围内，请重新设置密码。';
  g_sReSetPasswordOKMsg: string = '密码设置成功！！，仓库已经自动上锁，请记好您的仓库密码，在取仓库时需要使用此密码开锁。';
  g_sReSetPasswordNotMatchMsg: string = '二次输入的密码不一致，请重新设置密码！！！';
  g_sPleaseInputUnLockPasswordMsg: string = '请输入仓库密码：';
  g_sStorageUnLockOKMsg: string = '密码输入成功！！！，仓库已经开锁。';
  g_sPasswordUnLockOKMsg: string = '密码输入成功！！！，密码系统已经开锁。';
  g_sStorageAlreadyUnLockMsg: string = '仓库早已解锁！！！';
  g_sStorageNoPasswordMsg: string = '仓库还没设置密码！！！';
  g_sUnLockPasswordFailMsg: string = '密码输入错误！！！，请检查好再输入。';
  g_sLockStorageSuccessMsg: string = '仓库加锁成功。';
  g_sStoragePasswordClearMsg: string = '仓库密码已清除！！！';
  g_sPleaseUnloadStoragePasswordMsg: string = '请先解锁密码再使用此命令清除密码！！！';
  g_sStorageAlreadyLockMsg: string = '仓库早已加锁了！！！';
  g_sStoragePasswordLockedMsg: string = '由于密码输入错误超过三次，仓库密码已被锁定！！！';
  g_sSetPasswordMsg: string = '请输入一个长度为 4 - 7 位的仓库密码: ';
  g_sPleaseInputOldPasswordMsg: string = '请输入原仓库密码: ';
  g_sOldPasswordIsClearMsg: string = '密码已清除。';
  g_sPleaseUnLockPasswordMsg: string = '请先解锁仓库密码后再用此命令清除密码！！！';
  g_sNoPasswordSetMsg: string = '仓库还没设置密码，请用设置密码命令设置仓库密码！！！';
  g_sOldPasswordIncorrectMsg: string = '输入的原仓库密码不正确！！！';
  g_sStorageIsLockedMsg: string = '仓库已被加锁，请先输入仓库正确的开锁密码，再取物品！！！';
  g_sActionIsLockedMsg: string = '你当前已启用密码保护系统，请先输入正确的密码，才可以正常游戏！！！';
  g_sPasswordNotSetMsg: string = '对不起，没有设置仓库密码此功能无法使用，设置仓库密码请输入指令 @%s';
  g_sNotPasswordProtectMode: string = '你正处于非保护模式，如想你的装备更加安全，请输入指令 @%s';
  g_sCanotDropGoldMsg: string = '太少的金币不允许扔在地上！！！';
  g_sCanotDropInSafeZoneMsg: string = '安全区不允许扔东西在地上！！！';
  g_sCanotDropItemMsg: string = '当前无法进行此操作！！！';
  g_sCanotUseItemMsg: string = '当前无法进行此操作！！！';
  g_sCanotMapUseItemMsg: string = '当前地图不允许使用%s！！！';

  g_sCanotUserDropItem: string = '此物品禁止扔在地上！！！';
  g_sCanotUserRepairItem: string = '此物品禁止修理！！！';
  g_sCanotUserStorageItem: string = '此物品禁止存仓库！！！';
  g_sCanotUserDealItem: string = '此物品禁止交易！！！';



  g_sCanotTryDealMsg: string = '当前无法进行此操作！！！';
  g_sPleaseTryDealLaterMsg: string = '请稍候再交易！！！';
  g_sDealItemsDenyGetBackMsg: string = '交易的金币或物品不可以取回，要取回请取消再重新交易！！！';
  g_sDisableDealItemsMsg: string = '交易功能暂时关闭！！！';
  g_sDealActionCancelMsg: string = '交易取消！！！';
  g_sPoseDisableDealMsg: string = '对方禁止进入交易';
  g_sDealSuccessMsg: string = '交易成功...';
  g_sDealOKTooFast: string = '过早按了成交按钮。';
  g_sYourBagSizeTooSmall: string = '你的背包空间不够，无法装下对方交易给你的物品！！！';
  g_sDealHumanBagSizeTooSmall: string = '交易对方的背包空间不够，无法装下对方交易给你的物品！！！';
  g_sYourGoldLargeThenLimit: string = '你的所带的金币太多，无法装下对方交易给你的金币！！！';
  g_sDealHumanGoldLargeThenLimit: string = '交易对方的所带的金币太多，无法装下对方交易给你的金币！！！';
  g_sYouDealOKMsg: string = '你已经确认交易了。';
  g_sPoseDealOKMsg: string = '对方已经确认交易了。';
  g_sKickClientUserMsg: string = '请不要使用非法外挂软件！！！';

  g_sStartMarryManMsg: string = '[%n]: %s 与 %d 的婚礼现在开始...';
  g_sStartMarryWoManMsg: string = '[%n]: %d 与 %s 的婚礼现在开始...';
  g_sStartMarryManAskQuestionMsg: string = '[%n]: %s 你愿意娶 %d 小姐为妻，并照顾她一生一世吗？';
  g_sStartMarryWoManAskQuestionMsg: string = '[%n]: %d 你愿意娶 %s 小姐为妻，并照顾她一生一世吗？';

  g_sMarryManAnswerQuestionMsg: string = '[%s]: 我愿意！！！，%d 小姐我会尽我一生的时间来照顾您，让您过上快乐美满的日子的。';
  g_sMarryManAskQuestionMsg: string = '[%n]: %d 你愿意嫁给 %s 先生为妻，并照顾他一生一世吗？';

  g_sMarryWoManAnswerQuestionMsg: string = '[%s]: 我愿意！！！，%d 先生我愿意让你来照顾我，保护我。';
  g_sMarryWoManGetMarryMsg: string = '[%n]: 我宣布 %d 先生与 %s 小姐正式成为合法夫妻。';

  g_sMarryWoManDenyMsg: string = '[%s]: %d 你这个好色之徒，谁会愿意嫁给你呀！！！，癞蛤蟆想吃天鹅肉。';
  g_sMarryWoManCancelMsg: string = '[%n]: 真是可惜，二个人这个时候才翻脸，你们培养好感情后再来找我吧！！！';

  g_sfUnMarryManLoginMsg: string = '你的老婆%d已经强行与你脱离了夫妻关系了！！！';
  g_sfUnMarryWoManLoginMsg: string = '你的老公%d已经强行与你脱离了夫妻关系了！！！';

  g_sManLoginDearOnlineSelfMsg: string = '你的老婆%d当前位于%m(%x:%y)。';
  g_sManLoginDearOnlineDearMsg: string = '你的老公%s在:%m(%x:%y)上线了！！！。';

  g_sWoManLoginDearOnlineSelfMsg: string = '你的老公当前位于%m(%x:%y)。';
  g_sWoManLoginDearOnlineDearMsg: string = '你的老婆%s在:%m(%x:%y) 上线了！！！。';

  g_sManLoginDearNotOnlineMsg: string = '你的老婆现在不在线！！！';
  g_sWoManLoginDearNotOnlineMsg: string = '你的老公现在不在线！！！';

  g_sManLongOutDearOnlineMsg: string = '你的老公在:%m(%x:%y)下线了！！！。';
  g_sWoManLongOutDearOnlineMsg: string = '你的老婆在:%m(%x:%y)下线了！！！。';

  g_sYouAreNotMarryedMsg: string = '你都没结婚查什么？';
  g_sYourWifeNotOnlineMsg: string = '你的老婆还没有上线！！！';
  g_sYourHusbandNotOnlineMsg: string = '你的老公还没有上线！！！';

  g_sYourWifeNowLocateMsg: string = '你的老婆现在位于:';
  g_sYourHusbandSearchLocateMsg: string = '你的老公正在找你，他现在位于:';
  g_sYourHusbandNowLocateMsg: string = '你的老公现在位于:';
  g_sYourWifeSearchLocateMsg: string = '你的老婆正在找你，他现在位于:';


  g_sfUnMasterLoginMsg: string = '你的一个徒弟已经背判师门了！！！';
  g_sfUnMasterListLoginMsg: string = '你的师父%d已经将你逐出师门了！！！';

  g_sMasterListOnlineSelfMsg: string = '你的师父%d当前位于%m(%x:%y)。';
  g_sMasterListOnlineMasterMsg: string = '你的徒弟%s在:%m(%x:%y)上线了！！！。';

  g_sMasterOnlineSelfMsg: string = '你的徒弟当前位于%m(%x:%y)。';
  g_sMasterOnlineMasterListMsg: string = '你的师父%s在:%m(%x:%y) 上线了！！！。';

  g_sMasterLongOutMasterListOnlineMsg: string = '你的师父在:%m(%x:%y)下线了！！！。';
  g_sMasterListLongOutMasterOnlineMsg: string = '你的徒弟%s在:%m(%x:%y)下线了！！！。';

  g_sMasterListNotOnlineMsg: string = '你的师父现不在线！！！';
  g_sMasterNotOnlineMsg: string = '你的徒弟现不在线！！！';

  g_sYouAreNotMasterMsg: string = '你都没师徒关系查什么？';
  g_sYourMasterNotOnlineMsg: string = '你的师父还没有上线！！！';
  g_sYourMasterListNotOnlineMsg: string = '你的徒弟还没有上线！！！';

  g_sYourMasterNowLocateMsg: string = '你的师父现在位于:';
  g_sYourMasterListSearchLocateMsg: string = '你的徒弟正在找你，他现在位于:';
  g_sYourMasterListNowLocateMsg: string = '你的徒弟现在位于:';
  g_sYourMasterSearchLocateMsg: string = '你的师父正在找你，他现在位于:';
  g_sYourMasterListUnMasterOKMsg: string = '你的徒弟%d已经圆满出师了！！！';
  g_sYouAreUnMasterOKMsg: string = '你已经出师了！！！';

  g_sUnMasterLoginMsg: string = '你的一个徒弟已经圆满出师了！！！';

  g_sNPCSayUnMasterOKMsg: string = '[%n]: 我宣布%d与%s正式脱离师徒关系。';

  g_sNPCSayForceUnMasterMsg: string = '[%n]: 我宣布%s与%d已经正式脱离师徒关系！！！';

  g_sMyInfo: string = '『人物名称』:%name 『当前位置』:%map(%x:%y)\『当前等级』:%level ' +
  '『金 币 数』:%gold 『PK 点 数』:%pk\『生 命 值』:%minhp/%maxhp 『魔 法 值』:%minmp/%maxmp\' +
    '『攻 击 力』:%mindc/%maxdc『魔 法 力』:%minmc/%maxmc『道 术 力』:%minsc/%maxsc\『登录时间』' +
    ':%logontime 『在线时长』:%logonlong 分钟';

  g_sSendOnlineCountMsg: string = '当前在线人数: %c';

  g_sOpenedDealMsg: string = '开始交易。';
  g_sSendCustMsgCanNotUseNowMsg: string = '祝福语功能还没有开放！！！';
  g_sSubkMasterMsgCanNotUseNowMsg: string = '城主发信息功能还没有开放！！！';
  g_sWeaponRepairSuccess: string = '武器修复成功...';
  g_sDefenceUpTime: string = '防御力增加%d秒';
  g_sDefenceDownTime: string = '防御力减少%d秒';
  g_sMagDefenceUpTime: string = '魔法防御力增加%d秒';
  g_sMagDefenceDownTime: string = '魔法防御力减少%d秒';
  g_sWinLottery1Msg: string = '祝贺您，中了一等奖。';
  g_sWinLottery2Msg: string = '祝贺您，中了二等奖。';
  g_sWinLottery3Msg: string = '祝贺您，中了三等奖。';
  g_sWinLottery4Msg: string = '祝贺您，中了四等奖。';
  g_sWinLottery5Msg: string = '祝贺您，中了五等奖。';
  g_sWinLottery6Msg: string = '祝贺您，中了六等奖。';
  g_sNotWinLotteryMsg: string = '等下次机会吧！！！';
  g_sWeaptonMakeLuck: string = '武器被加幸运了...';
  g_sWeaptonNotMakeLuck: string = '无效！！！';
  g_sTheWeaponIsCursed: string = '你的武器被诅咒了！！！';
  g_sCanotTakeOffItem: string = '无法取下物品！！！';
  g_sJoinGroup: string = '%s 已加入小组.';
  g_sTryModeCanotUseStorage: string = '试玩模式不可以使用仓库功能！！！';
  g_sCanotGetItems: string = '无法携带更多的东西！！！';
  g_sEnableDearRecall: string = '允许夫妻传送！！！';
  g_sDisableDearRecall: string = '禁止夫妻传送！！！';
  g_sEnableMasterRecall: string = '允许师徒传送！！！';
  g_sDisableMasterRecall: string = '禁止师徒传送！！！';
  g_sNowCurrDateTime: string = '当前日期时间: ';
  g_sEnableAllowRebirth: string = '[允许复活]';
  g_sDisableAllowRebirth: string = '[禁止复活]';
  g_sEnableHearWhisper: string = '[允许私聊]';
  g_sDisableHearWhisper: string = '[禁止私聊]';
  g_sEnableShoutMsg: string = '[允许群聊]';
  g_sDisableShoutMsg: string = '[禁止群聊]';
  g_sEnableDealMsg: string = '[允许交易]';
  g_sDisableDealMsg: string = '[禁止交易]';
  g_sEnableGuildChat: string = '[允许行会聊天]';
  g_sDisableGuildChat: string = '[禁止行会聊天]';
  g_sEnableJoinGuild: string = '[允许加入行会]';
  g_sDisableJoinGuild: string = '[禁止加入行会]';
  g_sEnableAuthAllyGuild: string = '[允许行会联盟]';
  g_sDisableAuthAllyGuild: string = '[禁止行会联盟]';
  g_sEnableGroupRecall: string = '[允许天地合一]';
  g_sDisableGroupRecall: string = '[禁止天地合一]';
  g_sEnableGuildRecall: string = '[允许行会合一]';
  g_sDisableGuildRecall: string = '[禁止行会合一]';
  g_sPleaseInputPassword: string = '请输入密码:';
  g_sTheMapDisableMove: string = '地图%s(%s)不允许传送！！！';
  g_sTheMapNotFound: string = '%s 此地图号不存在！！！';
  g_sYourIPaddrDenyLogon: string = '你当前登录的IP地址已被禁止登录了！！！';
  g_sYourAccountDenyLogon: string = '你当前登录的帐号已被禁止登录了！！！';
  g_sYourCharNameDenyLogon: string = '你当前登录的人物已被禁止登录了！！！';
  g_sCanotPickUpItem: string = '在一定时间以内无法捡起此物品！！！';
  g_sCanotPickUpBindItem: string = '别人的绑定物品，你无法捡起此物品！！！';

  g_sCanotSendmsg: string = '无法发送信息.';
  g_sUserDenyWhisperMsg: string = ' 拒绝私聊！！！';
  g_sUserNotOnLine: string = '  没有在线！！！';
  g_sRevivalRecoverMsg: string = '复活戒指生效，体力恢复.';
  g_sClientVersionTooOld: string = '由于您使用的客户端版本太老了，无法正确显示人物信息！！！';

  g_sCastleGuildName: string = '(%CastleName)%Guildname[%RankName]';
  g_sNoCastleGuildName: string = '%GuildName[%RankName]';
  g_sWarrReNewName: string = '%ChrName\*<圣>*';
  g_sWizardReNewName: string = '%ChrName\*<神>*';
  g_sTaosReNewName: string = '%ChrName\*<尊>*';
  g_sRankLevelName: string = '%s\平民';
  g_sManDearName: string = '%s的老公';
  g_sWoManDearName: string = '%s的老婆';
  g_sMasterName: string = '%s的师父';
  g_sNoMasterName: string = '%s的徒弟';
  g_sHumanShowName: string = '%ChrName\%GuildName\%DearName\%MasterName';

  g_sChangePermissionMsg: string = '当前权限等级为:%d';
  g_sChangeKillMonExpRateMsg: string = '经验倍数:%g 时长%d秒';
  g_sChangePowerRateMsg: string = '攻击力倍数:%g 时长%d秒';
  g_sChangeMemberLevelMsg: string = '当前会员等级为:%d';
  g_sChangeMemberTypeMsg: string = '当前会员类型为:%d';
  g_sScriptChangeHumanHPMsg: string = '当前HP值为:%d';
  g_sScriptChangeHumanMPMsg: string = '当前MP值为:%d';
  g_sScriptGuildAuraePointNoGuild: string = '你还没加入行会！！！';
  g_sScriptGuildAuraePointMsg: string = '你的行会人气度为:%d';
  g_sScriptGuildBuildPointNoGuild: string = '你还没加入行会！！！';
  g_sScriptGuildBuildPointMsg: string = '你的行会的建筑度为:%d';
  g_sScriptGuildFlourishPointNoGuild: string = '你还没加入行会！！！';
  g_sScriptGuildFlourishPointMsg: string = '你的行会的繁荣度为:%d';
  g_sScriptGuildStabilityPointNoGuild: string = '你的行会的建筑度为:%d';
  g_sScriptGuildStabilityPointMsg: string = '你的行会的安定度为:%d';
  g_sScriptChiefItemCountMsg: string = '你的行会的超级装备数为:%d';

  g_sDisableSayMsg: string = '[由于你重复发相同的内容，%d分钟内你将被禁止发言...]';
  g_sOnlineCountMsg: string = '在线数: %d';
  g_sTotalOnlineCountMsg: string = '总在线数: %d';
  g_sYouNeedLevelMsg: string = '你的等级要在%d级以上才能用此功能！！！';
  g_sThisMapDisableSendCyCyMsg: string = '本地图不允许喊话！！！';
  g_sYouCanSendCyCyLaterMsg: string = '%d秒后才可以再发文字！！！';
  g_sYouIsDisableSendMsg: string = '禁止聊天！！！';
  g_sYouMurderedMsg: string = '你犯了谋杀罪！！！';
  g_sYouKilledByMsg: string = '你被%s杀害了！！！';
  g_sYouProtectedByLawOfDefense: string = '[你受到正当规则保护。]';
  g_sYourUseItemIsNul: string = '你的%s处没有放上装备！！！';

  g_sBigStorageCountIsNul: string = '限制存放数量不超过 %d！！！';

  g_sNoRecallHero: string = '当前地图不允许召唤英雄！！！';


  g_sOpenedDuelMsg: string = '开始挑战。';
  g_sCanotTryDuelMsg: string = '当前无法进行此操作！！！';
  g_sPleaseTryDuelLaterMsg: string = '请稍候再挑战！！！';
  g_sDuelItemsDenyGetBackMsg: string = '挑战的金币或物品不可以取回，要取回请取消再重新挑战！！！';
  g_sDisableDuelItemsMsg: string = '挑战功能暂时关闭！！！';
  g_sDuelActionCancelMsg: string = '挑战取消！！！';
  g_sPoseDisableDuelMsg: string = '对方禁止进入挑战';
  g_sDuelSuccessMsg: string = '挑战成功...';
  g_sDuelOKTooFast: string = '过早按了挑战按钮。';
  g_sDuelYourBagSizeTooSmall: string = '你的背包空间不够，无法装下对方挑战给你的物品！！！';
  g_sDuelHumanBagSizeTooSmall: string = '挑战对方的背包空间不够，无法装下对方挑战给你的物品！！！';
  g_sDuelYourGoldLargeThenLimit: string = '你的所带的金币太多，无法装下对方挑战给你的金币！！！';
  g_sDuelHumanGoldLargeThenLimit: string = '挑战对方的所带的金币太多，无法装下对方挑战给你的金币！！！';
  g_sYouDuelOKMsg: string = '你已经确认挑战了。';
  g_sPoseDuelOKMsg: string = '对方已经确认挑战了。';


  g_sCanUseSerieMagicMsg: string = '连击已启动';
  g_sUseSerieMagicTimeMsg: string = '连击技冷却时间还有%d秒';
  g_sUseSerieMagicBlasthitMsg: string = '你的%s出现爆击,造成额外伤害';

  g_sCartMonsterNotCanMoveMsg: string = '你离目标距离太远.当前它的坐标是(%d:%d)';
resourcestring

  g_sGameLogMsg1 = '%d'#9'%s'#9'%d'#9'%d'#9'%s'#9'%s'#9'%d'#9'%s'#9'%s';
  g_sHumanDieEvent = '人物死亡事件';
  g_sHitOverSpeed = '[攻击超速] %s 间隔:%d 数量:%d';
  g_sRunOverSpeed = '[跑步超速] %s 间隔:%d 数量:%d';
  g_sWalkOverSpeed = '[行走超速] %s 间隔:%d 数量:%d';
  g_sSpellOverSpeed = '[魔法超速] %s 间隔:%d 数量:%d';
  g_sBunOverSpeed = '[游戏超速] %s 间隔:%d 数量:%d';

  g_sGameCommandPermissionTooLow = '权限不够！！！';
  g_sGameCommandParamUnKnow = '命令格式: @%s %s';
  g_sGameCommandMoveHelpMsg = '地图号';
  g_sGameCommandPositionMoveHelpMsg = '地图号 座标X 座标Y';
  g_sGameCommandPositionMoveCanotMoveToMap = '无法移动到地图: %s X:%s Y:%s';
  g_sGameCommandPositionMoveCanotMoveToMap1 = '无法移动到地图: %s X:%d Y:%d';
  g_sGameCommandInfoHelpMsg = '人物名称';
  //  g_sGameCommandHumanNotOnLine             :String = '%s 现在没在线！！！';
  g_sNowNotOnLineOrOnOtherServer = '%s 现在不在线，或在其它服务器上！！！';
  g_sGameCommandMobCountHelpMsg = '地图号';
  g_sGameCommandMobCountMapNotFound = '指定的地图不存在！！！';
  g_sGameCommandMobCountMonsterCount = '怪物数量：%d';
  g_sGameCommandHumanCountHelpMsg = '地图号';
  g_sGameCommandKickHumanHelpMsg = '人物名称';
  g_sGameCommandTingHelpMsg = '人物名称';
  g_sGameCommandSuperTingHelpMsg = '人物名称 范围(0-10)';
  g_sGameCommandMapMoveHelpMsg = '源地图  目标地图';
  g_sGameCommandMapMoveMapNotFound = '地图%s不存在！！！';
  g_sGameCommandShutupHelpMsg = '人物名称  时间长度(分钟)';
  g_sGameCommandShutupHumanMsg = '%s 已被禁言%d分钟';
  g_sGameCommandGamePointHelpMsg = '人物名称 控制符(+,-,=) 游戏点数(1-100000000)';
  g_sGameCommandGamePointHumanMsg = '你的游戏点已增加%d点，当前总点数为%d点。';
  g_sGameCommandGamePointGMMsg = '%s的游戏点已增加%d点，当前总点数为%d点。';


  g_sGameCommandCreditPointHelpMsg = '人物名称 控制符(+,-,=) 声望点数(0-255)';


  g_sGameCommandCreditPointHumanMsg = '你的声望点已增加%d点，当前总声望点数为%d点。';
  g_sGameCommandCreditPointGMMsg = '%s的声望点已增加%d点，当前总声望点数为%d点。';

  g_sGameCommandGameGoldHelpMsg = ' 人物名称 控制符(+,-,=) 游戏币(1-200000000)';
  g_sGameCommandGameGoldHumanMsg = '你的%s已增加%d，当前拥有%d%s。';
  g_sGameCommandGameGoldGMMsg = '%s的%s已增加%d，当前拥有%d%s。';

  g_sGameCommandMapInfoMsg = '地图名称: %s(%s)';
  g_sGameCommandMapInfoSizeMsg = '地图大小: X(%d) Y(%d)';

  g_sGameCommandShutupReleaseHelpMsg = '人物名称';
  g_sGameCommandShutupReleaseCanSendMsg = '你已经恢复聊天功能！！！';
  g_sGameCommandShutupReleaseHumanCanSendMsg = '%s 已经恢复聊天。';
  g_sGameCommandShutupListIsNullMsg = '禁言列表为空！！！';

  g_sGameCommandLevelConsoleMsg = '[等级调整] %s (%d -> %d)';
  g_sGameCommandSbkGoldHelpMsg = '城堡名称 控制符(=、-、+) 金币数(1-100000000)';
  g_sGameCommandSbkGoldCastleNotFoundMsg = '城堡%s未找到！！！';
  g_sGameCommandSbkGoldShowMsg = '%s的金币数为: %d 今天收入: %d';
  g_sGameCommandRecallHelpMsg = '人物名称';
  g_sGameCommandReGotoHelpMsg = '人物名称';
  g_sGameCommandShowHumanFlagHelpMsg = '人物名称 标识号';
  g_sGameCommandShowHumanFlagONMsg = '%s: [%d] = ON';
  g_sGameCommandShowHumanFlagOFFMsg = '%s: [%d] = OFF';

  g_sGameCommandShowHumanUnitHelpMsg = '人物名称 单元号';
  g_sGameCommandShowHumanUnitONMsg = '%s: [%d] = ON';
  g_sGameCommandShowHumanUnitOFFMsg = '%s: [%d] = OFF';
  g_sGameCommandMobHelpMsg = '怪物名称 数量 等级';
  g_sGameCommandMobMsg = '怪物名称不正确或其它未问题！！！';
  g_sGameCommandMobNpcHelpMsg = 'NPC名称 脚本文件名 外形(数字) 属沙城(0,1)';
  g_sGameCommandNpcScriptHelpMsg = '？？？？';
  g_sGameCommandDelNpcMsg = '命令使用方法不正确，必须与NPC面对面，才能使用此命令！！！';
  g_sGameCommandDelNpcMsg1 = '命令使用方法不正确，请输入正确NPC名称！！！';
  g_sGameCommandRecallMobHelpMsg = '怪物名称 数量 等级';
  g_sGameCommandLuckPointHelpMsg = '人物名称 控制符 幸运点数';

  g_sGameCommandLuckPointMsg = '%s 的幸运点数为:%d/%g 幸运值为:%d';
  g_sGameCommandLotteryTicketMsg = '已中彩票数:%d 未中彩票数:%d 一等奖:%d 二等奖:%d 三等奖:%d 四等奖:%d 五等奖:%d 六等奖:%d ';
  g_sGameCommandReloadGuildHelpMsg = '行会名称';
  g_sGameCommandReloadGuildOnMasterserver = '此命令只能在主游戏服务器上执行！！！';
  g_sGameCommandReloadGuildNotFoundGuildMsg = '未找到行会%s！！！';
  g_sGameCommandReloadGuildSuccessMsg = '行会%s重加载成功...';

  g_sGameCommandReloadLineNoticeSuccessMsg = '重新加载公告设置信息完成。';
  g_sGameCommandReloadLineNoticeFailMsg = '重新加载公告设置信息失败！！！';
  g_sGameCommandFreePKHelpMsg = '人物名称';
  g_sGameCommandFreePKHumanMsg = '你的PK值已经被清除...';
  g_sGameCommandFreePKMsg = '%s的PK值已经被清除...';
  g_sGameCommandPKPointHelpMsg = '人物名称';
  g_sGameCommandPKPointMsg = '%s的PK点数为:%d';
  g_sGameCommandIncPkPointHelpMsg = '人物名称 PK点数';
  g_sGameCommandIncPkPointAddPointMsg = '%s的PK值已增加%d点...';
  g_sGameCommandIncPkPointDecPointMsg = '%s的PK值已减少%d点...';
  g_sGameCommandHumanLocalHelpMsg = '人物名称';
  g_sGameCommandHumanLocalMsg = '%s来自:%s';
  g_sGameCommandPrvMsgHelpMsg = '人物名称';
  g_sGameCommandPrvMsgUnLimitMsg = '%s 已从禁止私聊列表中删除...';
  g_sGameCommandPrvMsgLimitMsg = '%s 已被加入禁止私聊列表...';
  g_sGamecommandMakeHelpMsg = ' 物品名称  数量';
  g_sGamecommandMakeItemNameOrPerMissionNot = '输入的物品名称不正确，或权限不够！！！';
  g_sGamecommandMakeInCastleWarRange = '攻城区域，禁止使用此功能！！！';
  g_sGamecommandMakeInSafeZoneRange = '非安全区，禁止使用此功能！！！';

  g_sGamecommandMakeItemNameNotFound = '%s 物品名称不正确！！！';
  g_sGamecommandSuperMakeHelpMsg = '身上没指定物品！！！';
  g_sGameCommandViewWhisperHelpMsg = ' 人物名称';
  g_sGameCommandViewWhisperMsg1 = '已停止侦听%s的私聊信息...';
  g_sGameCommandViewWhisperMsg2 = '正在侦听%s的私聊信息...';
  g_sGameCommandReAliveHelpMsg = ' 人物名称';
  g_sGameCommandReAliveMsg = '%s 已获重生.';
  g_sGameCommandChangeJobHelpMsg = ' 人物名称 职业类型(Warr Wizard Taos)';
  g_sGameCommandChangeJobMsg = '%s 的职业更改成功。';
  g_sGameCommandChangeJobHumanMsg = '职业更改成功。';
  g_sGameCommandTestGetBagItemsHelpMsg = '(用于测试升级武器方面参数)';
  g_sGameCommandShowUseItemInfoHelpMsg = '人物名称';
  g_sGameCommandBindUseItemHelpMsg = '人物名称 物品类型 绑定方法';
  g_sGameCommandBindUseItemNoItemMsg = '%s的%s没有戴物品！！！';
  g_sGameCommandBindUseItemAlreadBindMsg = '%s的%s上的物品早已绑定过了！！！';
  g_sGameCommandMobFireBurnHelpMsg = '命令格式: %s %s %s %s %s %s %s';
  g_sGameCommandMobFireBurnMapNotFountMsg = '地图%s 不存在';


  g_sGameCommandUnBindUseItemHelpMsg = '人物名称 物品类型';
  g_sGameCommandUnBindUseItemNoItemMsg = '%s的%s没有戴物品！！！';
  g_sGameCommandUnBindUseItemAlreadBindMsg = '%s的%s上的物品已解除绑定！！！';

resourcestring
  U_DRESSNAME = '衣服';
  U_WEAPONNAME = '武器';
  U_RIGHTHANDNAME = '照明物';
  U_NECKLACENAME = '项链';
  U_HELMETNAME = '头盔';
  U_ARMRINGLNAME = '左手镯';
  U_ARMRINGRNAME = '右手镯';
  U_RINGLNAME = '左戒指';
  U_RINGRNAME = '右戒指';

  U_BUJUKNAME = '物品';
  U_BELTNAME = '腰带';
  U_BOOTSNAME = '鞋子';
  U_CHARMNAME = '宝石';

  //===============================================================
var
  nIPLocal: Integer = -1;
  nStartRegister: Integer = -1;
  nGetRegisterName: Integer = -1;
  dwStartTime: LongWord = 0;
  dwStartTimeTick: LongWord = 0;
  g_nSaveRcdErrorCount: Integer;
  g_dwShowSaveRcdErrorTick: LongWord = 0;
implementation

uses HUtil32, EncryptUnit;

{function GetMemoryIniFile(const sFileName: string): TMemoryIniFile;
var
  I: Integer;
  IniFile: TMemoryIniFile;
begin
  Result := nil;
  for I := 0 to g_MemoryIniFileList.Count - 1 do begin
    if CompareText(g_MemoryIniFileList.Strings[I], sFileName) = 0 then begin
      Result := TMemoryIniFile(g_MemoryIniFileList.Objects[I]);
      Exit;
    end;
  end;

  IniFile := TMemoryIniFile.Create;
  g_MemoryIniFileList.AddObject(sFileName, IniFile);
  Result := IniFile;
  IniFile.LoadFromFile(sFileName);
  //MainOutMessage(sFileName);
end;}

function GetFilesSize(FileName: string): Integer; //获取文件大小
var
  Size: Integer;
  SearchRec: TSearchRec;
begin //获取文件大小MB or KB or Byte
  Size := 0;
  FindFirst(FileName, faAnyFile, SearchRec);
  Size := Size + SearchRec.Size;
  FindClose(SearchRec);
  Result := Size;
end;

procedure SetProcessName(sName: string);
begin
  //  g_sOldProcessName:=g_sProcessName;
  //  g_sProcessName:=sName;
end;

function GetPageCount(ItemCount: Integer): Integer;
begin
  Result := 0;
  if ItemCount > 7 then begin
    Result := ItemCount div 7;
    if (ItemCount mod 7) > 0 then Inc(Result);
    Dec(Result);
  end;
end;

function GetStartTime(nTime: LongWord): string;
var
  h, s, m, s1: LongWord;
begin
  if nTime >= 3600 then begin
    h := nTime div 3600;
    s := nTime mod 3600; //剩余秒
    m := s div 60;
    s1 := s mod 60;
    Result := Format('%d小时%d分钟%d秒', [h, m, s1]);
  end else begin
    if nTime >= 60 then begin
      m := nTime div 60;
      s := nTime mod 60;
      Result := Format('%d分钟%d秒', [m, s]);
    end else begin
      Result := Format('%d秒', [nTime]);
    end;
  end;
end;

procedure CopyStdItemToOStdItem(StdItem: pTStdItem; OStdItem: pTOStdItem);
begin
  OStdItem.Name := StdItem.Name;
  OStdItem.StdMode := StdItem.StdMode;
  OStdItem.Shape := StdItem.Shape;
  OStdItem.Weight := StdItem.Weight;
  OStdItem.AniCount := StdItem.AniCount;
  OStdItem.Source := StdItem.Source;
  OStdItem.Reserved := StdItem.Reserved;
  OStdItem.NeedIdentify := StdItem.NeedIdentify;
  OStdItem.Looks := StdItem.Looks;
  OStdItem.DuraMax := StdItem.DuraMax;
  OStdItem.AC := MakeWord(_MIN(High(Byte), LoWord(StdItem.AC)), _MIN(High(Byte), HiWord(StdItem.AC)));
  OStdItem.MAC := MakeWord(_MIN(High(Byte), LoWord(StdItem.MAC)), _MIN(High(Byte), HiWord(StdItem.MAC)));
  OStdItem.DC := MakeWord(_MIN(High(Byte), LoWord(StdItem.DC)), _MIN(High(Byte), HiWord(StdItem.DC)));
  OStdItem.MC := MakeWord(_MIN(High(Byte), LoWord(StdItem.MC)), _MIN(High(Byte), HiWord(StdItem.MC)));
  OStdItem.SC := MakeWord(_MIN(High(Byte), LoWord(StdItem.SC)), _MIN(High(Byte), HiWord(StdItem.SC)));
  OStdItem.Need := StdItem.Need;
  OStdItem.NeedLevel := StdItem.NeedLevel;
  OStdItem.Price := StdItem.Price;
end;



function AddToPulgProcTable(sProcName: string; nProcCode: Integer): Integer; //增加插件到列表   (插件函数)
var
  I: Integer;
begin
  Result := -1;
  for I := Low(PlugProcArray) to High(PlugProcArray) do begin
    if PlugProcArray[I].sProcName = '' then begin
      PlugProcArray[I].sProcName := sProcName;
      PlugProcArray[I].nProcCode := nProcCode;
      Result := I;
      Break;
    end;
  end;
end;

function AddToProcTable(ProcAddr: Pointer; sProcName: string; nProcCode: Integer): Boolean; //增加函数到列表  (引擎内部函数)
var
  I: Integer;
begin
  Result := False;
  for I := Low(ProcArray) to High(ProcArray) do begin
    if ProcArray[I].nProcAddr = nil then begin
      ProcArray[I].nProcAddr := ProcAddr;
      ProcArray[I].sProcName := sProcName;
      ProcArray[I].nProcCode := nProcCode;
      Result := True;
      Break;
    end;
  end;
end;

function AddToObjTable(Obj: TObject; sObjName: string; nObjcCode: Integer): Boolean; //增加对象到列表
var
  I: Integer;
begin
  Result := False;
  for I := Low(ObjectArray) to High(ObjectArray) do begin
    if ObjectArray[I].Obj = nil then begin
      ObjectArray[I].Obj := Obj;
      ObjectArray[I].sObjcName := sObjName;
      ObjectArray[I].nObjcCode := nObjcCode;
      Result := True;
      Break;
    end;
  end;
end;

function LoadLineNotice(FileName: string): Boolean;
var
  I: Integer;
  sText: string;
begin
  Result := False;
  if FileExists(FileName) then begin
    LineNoticeList.LoadFromFile(FileName);
    I := 0;
    while (True) do begin
      if LineNoticeList.Count <= I then Break;
      sText := Trim(LineNoticeList.Strings[I]);
      if sText = '' then begin
        LineNoticeList.Delete(I);
        Continue;
      end;
      //if Length(sText) > 500 then sText := Copy(sText, 1, 500);
      LineNoticeList.Strings[I] := sText;
      Inc(I);
    end;
    Result := True;
  end;
end;

function GetMultiServerAddrPort(btServerIndex: Byte; var sIPaddr: string; var nPort: Integer): Boolean;
begin
  Result := False;
  //  ServerTableList
end;

procedure MainOutMessage(Msg: string);
begin
  if not g_Config.boShowExceptionMsg then begin
    if (Length(Msg) > 2) and ((Msg[2] = 'E') or (Msg[1] = 'A')) then
      Exit;
  end;
  EnterCriticalSection(LogMsgCriticalSection);
  try
    MainLogMsgList.Add(DateTimeToStr(Now) + ' ' + Msg);
  finally
    LeaveCriticalSection(LogMsgCriticalSection);
  end;
end;

procedure LoadStringList;
{var
  I: Integer;
  sFileName: string; }
begin
 { for I := 0 to Length(g_StringList) - 1 do begin
    g_StringList[I] := TStringList.Create;
    sFileName := g_Config.sEnvirDir + 'QuestDiary\StringList' + IntToStr(I) + '.txt';
    if FileExists(sFileName) then begin
      try
        g_StringList[I].LoadFromFile(sFileName);
      except
        MainOutMessage('loading fail.... => ' + sFileName);
      end;
    end;
  end; }
end;

procedure UnLoadStringList;
//var
  //I: Integer;
  //sFileName: string;
begin
 { for I := 0 to Length(g_StringList) - 1 do begin
    if g_StringList[I] <> nil then begin
      sFileName := g_Config.sEnvirDir + 'QuestDiary\StringList' + IntToStr(I) + '.txt';
      try
        g_StringList[I].SaveToFile(sFileName);
      except
        MainOutMessage('saving fail.... => ' + sFileName);
      end;
      g_StringList[I].Free;
    end;
  end;}
end;

procedure SaveStringList;
{var
  I: Integer;
  sFileName: string;}
begin
  {for I := 0 to Length(g_StringList) - 1 do begin
    if g_StringList[I] <> nil then begin
      sFileName := g_Config.sEnvirDir + 'QuestDiary\StringList' + IntToStr(I) + '.txt';
      try
        g_StringList[I].SaveToFile(sFileName);
      except
        MainOutMessage('saving fail.... => ' + sFileName);
      end;
    end;
  end;}
end;


function GetExVersionNO(nVersionDate: Integer; var nOldVerstionDate: Integer): Integer;
begin
  Result := 0;
  nOldVerstionDate := 0;
  if nVersionDate > 100000000 then begin
    while (nVersionDate > 100000000) do begin
      Dec(nVersionDate, 100000000);
      Inc(Result, 100000000);
    end;
  end;
  nOldVerstionDate := nVersionDate;
end;

function GetNextDirection(sX, sY, dx, dy: Integer): Byte;
var
  flagx, flagy: Integer;
begin
  Result := DR_DOWN;
  if sX < dx then flagx := 1
  else if sX = dx then flagx := 0
  else flagx := -1;
  if abs(sY - dy) > 2
    then if (sX >= dx - 1) and (sX <= dx + 1) then flagx := 0;

  if sY < dy then flagy := 1
  else if sY = dy then flagy := 0
  else flagy := -1;
  if abs(sX - dx) > 2 then if (sY > dy - 1) and (sY <= dy + 1) then flagy := 0;

  if (flagx = 0) and (flagy = -1) then Result := DR_UP;
  if (flagx = 1) and (flagy = -1) then Result := DR_UPRIGHT;
  if (flagx = 1) and (flagy = 0) then Result := DR_RIGHT;
  if (flagx = 1) and (flagy = 1) then Result := DR_DOWNRIGHT;
  if (flagx = 0) and (flagy = 1) then Result := DR_DOWN;
  if (flagx = -1) and (flagy = 1) then Result := DR_DOWNLEFT;
  if (flagx = -1) and (flagy = 0) then Result := DR_LEFT;
  if (flagx = -1) and (flagy = -1) then Result := DR_UPLEFT;
end;

function CheckUserItems(nIdx: Integer; StdItem: pTStdItem): Boolean; //004B2D70
begin
  Result := False;
  case nIdx of
    U_DRESS: if StdItem.StdMode in [10, 11] then Result := True;
    U_WEAPON: if (StdItem.StdMode = 5) or (StdItem.StdMode = 6) then Result := True;
    U_RIGHTHAND: if (StdItem.StdMode = 29) or (StdItem.StdMode = 30) or (StdItem.StdMode = 28) then Result := True;
    U_NECKLACE: if (StdItem.StdMode = 19) or (StdItem.StdMode = 20) or (StdItem.StdMode = 21) then Result := True;
    U_HELMET: if StdItem.StdMode = 15 then Result := True;
    U_ARMRINGL: if (StdItem.StdMode = 24) or (StdItem.StdMode = 25) or (StdItem.StdMode = 26) then Result := True;
    U_ARMRINGR: if (StdItem.StdMode = 24) or (StdItem.StdMode = 26) then Result := True;
    U_RINGL,
      U_RINGR: if (StdItem.StdMode = 22) or (StdItem.StdMode = 23) then Result := True;
    U_BUJUK: if (StdItem.StdMode = 25) or (StdItem.StdMode = 51) then Result := True;
    U_BELT: if (StdItem.StdMode = 54) or (StdItem.StdMode = 64) then Result := True;
    U_BOOTS: if (StdItem.StdMode = 52) or (StdItem.StdMode = 62) then Result := True;
    U_CHARM: if (StdItem.StdMode = 53) or (StdItem.StdMode = 63) or (StdItem.StdMode = 7) then Result := True;
  end;
end;

function GetItemType(StdItem: pTStdItem): Byte;
begin
  case StdItem.StdMode of
    10, 11: Result := U_DRESS;
    5, 6: Result := U_WEAPON;
    28, 29, 30: Result := U_RIGHTHAND;
    19, 20, 21: Result := U_NECKLACE;
    15: Result := U_HELMET;
    24, 26: Result := U_ARMRINGL;
    22, 23: Result := U_RINGL;
    25, 51: Result := U_BUJUK;
    54, 64: Result := U_BELT;
    52, 62: Result := U_BOOTS;
    53, 63: Result := U_CHARM;
  else Result := U_BUJUK;
  end;
end;

function AddDateTimeOfDay(DateTime: TDateTime; nDay: Integer): TDateTime; //00455DD4
var
  Year, Month, Day: Word;
begin
  if nDay > 0 then begin
    Dec(nDay);
    DecodeDate(DateTime, Year, Month, Day);
    while (True) do begin
      if MonthDays[False][Month] >= (Day + nDay) then Break;
      nDay := (Day + nDay) - MonthDays[False][Month] - 1;
      Day := 1;
      if Month <= 11 then begin
        Inc(Month);
        Continue;
      end;
      Month := 1;
      if Year = 99 then begin
        Year := 2000;
        Continue;
      end;
      Inc(Year);
    end; // while
    //TryEncodeDate(Year,Month,Day,Result);
    Inc(Day, nDay);
    Result := EncodeDate(Year, Month, Day);
  end else begin
    Result := DateTime;
  end;
end;

function GetGoldShape(nGold: Integer): Word;
//00455E98
begin
  Result := 112;
  if nGold >= 30 then Result := 113;
  if nGold >= 70 then Result := 114;
  if nGold >= 300 then Result := 115;
  if nGold >= 1000 then Result := 116;
end;

function GetRandomLook(nBaseLook, nRage: Integer): Integer;
begin
  Result := nBaseLook + Random(nRage);
end;

function CheckGuildName(sGuildName: string): Boolean;
var
  I: Integer;
begin
  Result := True;
  if Length(sGuildName) > g_Config.nGuildNameLen then begin
    Result := False;
    Exit;
  end;
  for I := 1 to Length(sGuildName) do begin
    if (sGuildName[I] < '0' {30}) or
      (sGuildName[I] = '/' {2F}) or
      (sGuildName[I] = '\' {5C}) or
      (sGuildName[I] = ':' {3A}) or
      (sGuildName[I] = '*') or
      (sGuildName[I] = ' ') or
      (sGuildName[I] = '"') or
      (sGuildName[I] = '''') or
      (sGuildName[I] = '<' {3C}) or
      (sGuildName[I] = '|' {7C}) or
      (sGuildName[I] = '?' {3F}) or
      (sGuildName[I] = '>' {3E}) then begin
      Result := False;
    end;
  end;
end;

function GetItemNumber(): Integer;
begin
  Inc(g_Config.nItemNumber);
  if g_Config.nItemNumber > (High(Integer) div 2 - 1) then begin
    g_Config.nItemNumber := 1;
  end;
  Result := g_Config.nItemNumber;
end;

function GetItemNumberEx(): Integer;
begin
  Inc(g_Config.nItemNumberEx);
  if g_Config.nItemNumberEx < High(Integer) div 2 then g_Config.nItemNumberEx := High(Integer) div 2;

  if g_Config.nItemNumberEx > (High(Integer) - 1) then begin
    g_Config.nItemNumberEx := High(Integer) div 2;
  end;
  Result := g_Config.nItemNumberEx;
end;

function FilterShowName(sName: string): string;
var
  I: Integer;
  SC: string;
  bo11: Boolean;
begin
  Result := '';
  SC := '';
  bo11 := False;
  for I := 1 to Length(sName) do begin
    if ((sName[I] >= '0') and (sName[I] <= '9')) or (sName[I] = '-') then begin
      Result := Copy(sName, 1, I - 1);
      SC := Copy(sName, I, Length(sName));
      bo11 := True;
      Break;
    end;
  end;
  if not bo11 then Result := sName;
end;

function sub_4B2F80(nDir, nRage: Integer): Byte;
begin
  Result := (nDir + nRage) mod 8;
end;

function GetValNameNo(sText: string): Integer;
var
  nValNo: Integer;
  sNo: string;
begin
  Result := -1;
  if (Length(sText) > 4) or (Length(sText) = 0) then Exit;
  sNo := Copy(sText, 2, Length(sText) - 1);
  if IsStringNumber(sNo) then begin
    if UpCase(sText[1]) = 'G' then begin
      if Length(sText) = 4 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 3), -1);
        if (nValNo >= 0) and (nValNo < 500) then Result := nValNo;
      end else
        if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo;
      end;
      Exit;
    end;

    if UpCase(sText[1]) = 'I' then begin
      if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo + 1000;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1000;
      end;
      Exit;
    end;

    if UpCase(sText[1]) = 'P' then begin
      nValNo := Str_ToInt(sText[2], -1);
      if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1100;
      Exit;
    end;
    if UpCase(sText[1]) = 'D' then begin
      nValNo := Str_ToInt(sText[2], -1);
      if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1110;
      Exit;
    end;

    if UpCase(sText[1]) = 'M' then begin
      if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo + 1200;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1200;
      end;
      Exit;
    end;

    if UpCase(sText[1]) = 'N' then begin
      if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo + 1300;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1300;
      end;
      Exit;
    end;
    if UpCase(sText[1]) = 'S' then begin
      if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo + 1400;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 1400;
      end;
      Exit;
    end;

    if UpCase(sText[1]) = 'A' then begin
      if Length(sText) = 4 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 3), -1);
        if (nValNo >= 0) and (nValNo < 500) then Result := nValNo + 2000;
      end else
        if Length(sText) = 3 then begin
        nValNo := Str_ToInt(Copy(sText, 2, 2), -1);
        if (nValNo >= 0) and (nValNo < 100) then Result := nValNo + 2000;
      end else begin
        nValNo := Str_ToInt(sText[2], -1);
        if (nValNo >= 0) and (nValNo < 10) then Result := nValNo + 2000;
      end;
      Exit;
    end;

  end;
end;

function IsUseItem(nIndex: Integer): Boolean;
var
  StdItem: pTStdItem;
begin
  StdItem := UserEngine.GetStdItem(nIndex);
  if StdItem.StdMode in [19, 20, 21, 22, 23, 24, 26] then Result := True
  else Result := False;
end;

function GetMakeItemInfo(sItemName: string): TStringList;
var
  I: Integer;
begin
  Result := nil;
  for I := 0 to g_MakeItemList.Count - 1 do begin
    if g_MakeItemList.Strings[I] = sItemName then begin
      Result := TStringList(g_MakeItemList.Objects[I]);
      Break;
    end;
  end;
end;

procedure AddGameDataLog(sMsg: string);
begin
  try
    //调用插件中的日志处理函数，返回值为True 时直接退出函数，False 时使用默认函数处理游戏日志
    {if (nAddGameDataLog >= 0) and Assigned(PlugProcArray[nAddGameDataLog].nProcAddr) then begin
      if TGameDataLog(PlugProcArray[nAddGameDataLog].nProcAddr)(PChar(sMsg), Length(sMsg)) then
        Exit;
    end; }
    EnterCriticalSection(LogMsgCriticalSection);
    try
      LogStringList.Add(sMsg);
    finally
      LeaveCriticalSection(LogMsgCriticalSection);
    end;
  except

  end;
end;

procedure AddLogonCostLog(sMsg: string); //004E437C
begin
  EnterCriticalSection(LogMsgCriticalSection);
  try
    LogonCostLogList.Add(sMsg);
  finally
    LeaveCriticalSection(LogMsgCriticalSection);
  end;
end;

procedure TrimStringList(sList: TStringList);
var
  n8: Integer;
  SC: string;
begin
  n8 := 0;
  while (True) do begin
    if (sList.Count) <= n8 then Break;
    SC := Trim(sList.Strings[n8]);
    if SC = '' then begin
      sList.Delete(n8);
      Continue;
    end;
    Inc(n8);
  end;
end;

function CanMakeItem(sItemName: string): Boolean;
var
  I: Integer;
  boFind: Boolean;
begin
  Result := False;
  boFind := False;
  g_DisableMakeItemList.Lock;
  try
    for I := 0 to g_DisableMakeItemList.Count - 1 do begin
      if CompareText(g_DisableMakeItemList.Strings[I], sItemName) = 0 then begin
        Result := False;
        boFind := True;
        Break; ;
      end;
    end;
  finally
    g_DisableMakeItemList.UnLock;
  end;
  if boFind then Exit;
  g_EnableMakeItemList.Lock;
  try
    for I := 0 to g_EnableMakeItemList.Count - 1 do begin
      if CompareText(g_EnableMakeItemList.Strings[I], sItemName) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_EnableMakeItemList.UnLock;
  end;
end;

function CanUpgradeItem(sItemName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_EnableUpgradeItemList.Lock;
  try
    for I := 0 to g_EnableUpgradeItemList.Count - 1 do begin
      if CompareText(g_EnableUpgradeItemList.Strings[I], sItemName) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_EnableUpgradeItemList.UnLock;
  end;
end;

function GetStartPointInfo(nIndex: Integer; var nX, nY: Integer): string;
var
  StartPoint: pTStartPoint;
begin
  Result := '';
  nX := 0;
  nY := 0;
  if (nIndex >= 0) and (nIndex < g_StartPointList.Count) then begin
    StartPoint := pTStartPoint(g_StartPointList.Objects[nIndex]);
    if StartPoint <> nil then begin
      nX := StartPoint.nCurrX;
      nY := StartPoint.nCurrY;
      Result := StartPoint.sMapName;
    end;
  end;
end;

function CanSellOffItem(sItemName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_AllowSellOffItemList.Lock;
  try
    for I := 0 to g_AllowSellOffItemList.Count - 1 do begin
      if CompareText(g_AllowSellOffItemList.Strings[I], sItemName) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_AllowSellOffItemList.UnLock;
  end;
end;

function CanMoveMap(sMapName: string): Boolean;
var
  I: Integer;
begin
  Result := True;
  g_DisableMoveMapList.Lock;
  try
    for I := 0 to g_DisableMoveMapList.Count - 1 do begin
      if CompareText(g_DisableMoveMapList.Strings[I], sMapName) = 0 then begin
        Result := False;
        Break;
      end;
    end;
  finally
    g_DisableMoveMapList.UnLock;
  end;
end;

{function FindItemBox(nBoxType: Integer): pTItemBox;
var
  I: Integer;
  ItemBox: pTItemBox;
begin
  Result := nil;
  g_ItemBoxList.Lock;
  try
    for I := 0 to g_ItemBoxList.Count - 1 do begin
      ItemBox := pTItemBox(g_ItemBoxList.Items[I]).ItemList;
      if ItemBox.nBoxType = nBoxType then begin
        Result := ItemBox;
        Break;
      end;
    end;
  finally
    g_ItemBoxList.UnLock;
  end;
end;  }

function FindItemBox(sItemName: string): pTItemBox;
var
  I: Integer;

begin
  Result := nil;
  g_ItemBoxList.Lock;
  try
    for I := 0 to g_ItemBoxList.Count - 1 do begin
      if CompareText(g_ItemBoxList.Strings[I], sItemName) = 0 then begin
        Result := pTItemBox(g_ItemBoxList.Objects[I]);
        Break;
      end;
    end;
  finally
    g_ItemBoxList.UnLock;
  end;
end;

procedure LoadBoxItem(ItemBox: pTItemBox);
var
  I, nItemCount, nItemType: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sItemType, sItemCount, sBoxName, sItemName: string;
  BoxItem: pTBoxItem;
begin
  sFileName := g_Config.sEnvirDir + 'ItemBox.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    try
      LoadList.LoadFromFile(sFileName);
    except
      LoadList.Clear;
    end;
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if sLineText = '' then Continue;
      if (sLineText <> '') and (sLineText[1] = ';') then Continue;
      sLineText := GetValidStr3(sLineText, sBoxName, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sItemName, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sItemType, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sItemCount, [' ', ',', #9]);
      nItemCount := Str_ToInt(sItemCount, -1);
      nItemType := Str_ToInt(sItemType, -1);
      if (sBoxName <> '') and (sItemName <> '') and (nItemType in [0..2]) and (CompareText(sBoxName, ItemBox.StdItem.Name) = 0) then begin
        New(BoxItem);
        BoxItem.sItemName := sItemName;
        BoxItem.ItemType := TBoxItemType(nItemType);
        BoxItem.nItemCount := nItemCount;
        ItemBox.ItemList.AddObject(ItemBox.StdItem.Name, TObject(BoxItem));
      end;
    end;
  end else begin
    try
      ItemBox.ItemList.SaveToFile(sFileName);
    except

    end;
  end;
  LoadList.Free;
end;

procedure SaveBoxItem(SaveList: TStringList; ItemBox: pTItemBox);
var
  I: Integer;
  BoxItem: pTBoxItem;
begin
  for I := 0 to ItemBox.ItemList.Count - 1 do begin
    BoxItem := pTBoxItem(ItemBox.ItemList.Objects[I]);
    SaveList.Add(ItemBox.ItemList.Strings[I] + #9 + BoxItem.sItemName + #9 +
      IntToStr(Integer(BoxItem.ItemType)) + #9 + IntToStr(BoxItem.nItemCount));
  end;
end;

function GetBoxItemTypeName(ItemType: TBoxItemType): string;
begin
  case ItemType of
    i_Center: Result := '中间物品';
    i_Give: Result := '允许获取';
    i_Fill: Result := '填充物品';
  end;
end;

function LoadBoxList(): Boolean;
var
  I, II: Integer;
  ItemBox: pTItemBox;
  StdItem: pTStdItem;
begin
  Result := False;
  EnterCriticalSection(ProcessHumanCriticalSection);
  try
    for I := 0 to g_ItemBoxList.Count - 1 do begin
      ItemBox := pTItemBox(g_ItemBoxList.Objects[I]);
      for II := 0 to ItemBox.ItemList.Count - 1 do begin
        Dispose(pTBoxItem(ItemBox.ItemList.Objects[II]));
      end;
      ItemBox.ItemList.Free;
      Dispose(ItemBox);
    end;
    g_ItemBoxList.Clear;
    for I := 0 to UserEngine.StdItemList.Count - 1 do begin
      StdItem := UserEngine.StdItemList.Items[I];
      if (StdItem.StdMode = 31) and (StdItem.Shape in [13..16]) then begin
        New(ItemBox);
        ItemBox.StdItem := StdItem^;
        ItemBox.ItemList := TGStringList.Create;
        LoadBoxItem(ItemBox);
        g_ItemBoxList.AddObject(StdItem.Name, TObject(ItemBox));
      end;
    end;
    Result := True;
  finally
    LeaveCriticalSection(ProcessHumanCriticalSection);
  end;
end;

function SaveBoxList(): Boolean;
var
  I: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemBox: pTItemBox;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBox.txt';
  SaveList := TStringList.Create;
  g_ItemBoxList.Lock;
  try
    for I := 0 to g_ItemBoxList.Count - 1 do begin
      ItemBox := pTItemBox(g_ItemBoxList.Objects[I]);
      SaveBoxItem(SaveList, ItemBox);
    end;
  finally
    g_ItemBoxList.UnLock;
  end;
  try
    SaveList.SaveToFile(sFileName);
  except
  end;
  SaveList.Free;
  Result := True;
end;

function IsBindAccount(nItemIdx, nMakeIdex: Integer): Boolean;
var
  I: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  g_ItemBindAccount.Lock;
  try
    for I := 0 to g_ItemBindAccount.Count - 1 do begin
      ItemBind := g_ItemBindAccount.Items[I];
      if (ItemBind.nItemIdx = nItemIdx) and (ItemBind.nMakeIdex = nMakeIdex) then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_ItemBindAccount.UnLock;
  end;
end;

function IsBindCharName(nItemIdx, nMakeIdex: Integer): Boolean;
var
  I: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  g_ItemBindCharName.Lock;
  try
    for I := 0 to g_ItemBindCharName.Count - 1 do begin
      ItemBind := g_ItemBindCharName.Items[I];
      if (ItemBind.nItemIdx = nItemIdx) and (ItemBind.nMakeIdex = nMakeIdex) then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_ItemBindCharName.UnLock;
  end;
end;

function IsBindIPaddr(nItemIdx, nMakeIdex: Integer): Boolean;
var
  I: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  g_ItemBindIPaddr.Lock;
  try
    for I := 0 to g_ItemBindIPaddr.Count - 1 do begin
      ItemBind := g_ItemBindIPaddr.Items[I];
      if (ItemBind.nItemIdx = nItemIdx) and (ItemBind.nMakeIdex = nMakeIdex) then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_ItemBindIPaddr.UnLock;
  end;
end;





function LoadItemBindIPaddr(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sMakeIndex, sItemIndex, sBindName: string;
  nMakeIndex, nItemIndex: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindIPaddr.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_ItemBindIPaddr.Lock;
    try
      for I := 0 to g_ItemBindIPaddr.Count - 1 do begin
        Dispose(pTItemBind(g_ItemBindIPaddr.Items[I]));
      end;
      g_ItemBindIPaddr.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sLineText := Trim(LoadList.Strings[I]);
        if sLineText[1] = ';' then Continue;
        sLineText := GetValidStr3(sLineText, sItemIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMakeIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sBindName, [' ', ',', #9]);
        nMakeIndex := Str_ToInt(sMakeIndex, -1);
        nItemIndex := Str_ToInt(sItemIndex, -1);
        if (nMakeIndex > 0) and (nItemIndex > 0) and (sBindName <> '') then begin
          New(ItemBind);
          ItemBind.nMakeIdex := nMakeIndex;
          ItemBind.nItemIdx := nItemIndex;
          ItemBind.sBindName := sBindName;
          g_ItemBindIPaddr.Add(ItemBind);
        end;
      end;
    finally
      g_ItemBindIPaddr.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveItemBindIPaddr(): Boolean;
var
  I: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindIPaddr.txt';
  SaveList := TStringList.Create;
  g_ItemBindIPaddr.Lock;
  try
    for I := 0 to g_ItemBindIPaddr.Count - 1 do begin
      ItemBind := g_ItemBindIPaddr.Items[I];
      SaveList.Add(IntToStr(ItemBind.nItemIdx) + #9 + IntToStr(ItemBind.nMakeIdex) + #9 + ItemBind.sBindName);
    end;
  finally
    g_ItemBindIPaddr.UnLock;
  end;
  SaveList.SaveToFile(sFileName);
  SaveList.Free;
  Result := True;
end;

function LoadItemBindAccount(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sMakeIndex, sItemIndex, sBindName: string;
  nMakeIndex, nItemIndex: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindAccount.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_ItemBindAccount.Lock;
    try
      for I := 0 to g_ItemBindAccount.Count - 1 do begin
        Dispose(pTItemBind(g_ItemBindAccount.Items[I]));
      end;
      g_ItemBindAccount.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sLineText := Trim(LoadList.Strings[I]);
        if sLineText[1] = ';' then Continue;
        sLineText := GetValidStr3(sLineText, sItemIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMakeIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sBindName, [' ', ',', #9]);
        nMakeIndex := Str_ToInt(sMakeIndex, -1);
        nItemIndex := Str_ToInt(sItemIndex, -1);
        if (nMakeIndex > 0) and (nItemIndex > 0) and (sBindName <> '') then begin
          New(ItemBind);
          ItemBind.nMakeIdex := nMakeIndex;
          ItemBind.nItemIdx := nItemIndex;
          ItemBind.sBindName := sBindName;
          g_ItemBindAccount.Add(ItemBind);
        end;
      end;
    finally
      g_ItemBindAccount.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveItemBindAccount(): Boolean;
var
  I: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindAccount.txt';
  SaveList := TStringList.Create;
  g_ItemBindAccount.Lock;
  try
    for I := 0 to g_ItemBindAccount.Count - 1 do begin
      ItemBind := g_ItemBindAccount.Items[I];
      SaveList.Add(IntToStr(ItemBind.nItemIdx) + #9 + IntToStr(ItemBind.nMakeIdex) + #9 + ItemBind.sBindName);
    end;
  finally
    g_ItemBindAccount.UnLock;
  end;
  SaveList.SaveToFile(sFileName);
  SaveList.Free;
  Result := True;
end;

function GetRememberItem(MakeIndex, Index: Integer): pTRememberItem;
var
  nIndex: Integer;
  ItemEvent: pTItemEvent;
begin
  Result := nil;
  nIndex := g_RememberItemList.GetIndex(IntToStr(MakeIndex));
  if nIndex >= 0 then begin
    ItemEvent := pTItemEvent(g_RememberItemList.Objects[nIndex]);
    if Index in [1..6] then begin
      Result := @ItemEvent.RememberItem[Index - 1];
    end;
  end;
end;

function LoadRememberItemList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sMakeIndex, sItemName, sMapName, sID, sX, sY: string;
  nMakeIndex, nIndex, nID: Integer;
  nCurrX: Integer;
  nCurrY: Integer;
  ItemEvent: pTItemEvent;
begin
  Result := False;
  if g_RememberItemList <> nil then begin
    for I := 0 to g_RememberItemList.Count - 1 do begin
      Dispose(pTItemEvent(g_RememberItemList.Objects[I]));
    end;
    g_RememberItemList.Free;
  end;
  g_RememberItemList := TQuickList.Create;

  sFileName := g_Config.sEnvirDir + 'RememberItemList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if (sLineText = '') or (sLineText[1] = ';') then Continue;
      sLineText := GetValidStr3(sLineText, sItemName, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sMakeIndex, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sID, [',', #9]);
      sLineText := GetValidStr3(sLineText, sMapName, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sX, [' ', ',', #9]);
      sLineText := GetValidStr3(sLineText, sY, [' ', ',', #9]);
      nMakeIndex := Str_ToInt(sMakeIndex, -1);
      nCurrX := Str_ToInt(sX, -1);
      nCurrY := Str_ToInt(sY, -1);
      nID := Str_ToInt(sID, -1);
      if (nMakeIndex > 0) and (sMapName <> '') and (nCurrX >= 0) and (nCurrY >= 0) and (nID in [0..5]) then begin
        nIndex := g_RememberItemList.GetIndex(sMakeIndex);
        if nIndex >= 0 then begin
          ItemEvent := pTItemEvent(g_RememberItemList.Objects[nIndex]);
          ItemEvent.RememberItem[nID].sMapName := sMapName;
          ItemEvent.RememberItem[nID].nCurrX := nCurrX;
          ItemEvent.RememberItem[nID].nCurrY := nCurrY;
        end else begin
          New(ItemEvent);
          ItemEvent.sItemName := sItemName;
          ItemEvent.nMakeIndex := nMakeIndex;
          FillChar(ItemEvent.RememberItem, SizeOf(TRememberItem) * 6, #0);
          ItemEvent.RememberItem[nID].sMapName := sMapName;
          ItemEvent.RememberItem[nID].nCurrX := nCurrX;
          ItemEvent.RememberItem[nID].nCurrY := nCurrY;
          g_RememberItemList.AddObject(IntToStr(nMakeIndex), TObject(ItemEvent));
        end;
      end;
    end;
    g_RememberItemList.SortString(0, g_RememberItemList.Count - 1);
    Result := True;
  end;
end;

function SaveRememberItemList(): Boolean;
var
  I, II: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemEvent: pTItemEvent;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'RememberItemList.txt';
  SaveList := TStringList.Create;
  //g_RememberItemList.SortString(0, g_RememberItemList.Count - 1);
  for I := 0 to g_RememberItemList.Count - 1 do begin
    ItemEvent := pTItemEvent(g_RememberItemList.Objects[I]);
    for II := Low(ItemEvent.RememberItem) to High(ItemEvent.RememberItem) do begin
      if ItemEvent.RememberItem[II].sMapName <> '' then begin
        SaveList.Add(ItemEvent.sItemName + #9 + IntToStr(ItemEvent.nMakeIndex) + #9 + IntToStr(II) + #9 + ItemEvent.RememberItem[II].sMapName + #9 + IntToStr(ItemEvent.RememberItem[II].nCurrX) + #9 + IntToStr(ItemEvent.RememberItem[II].nCurrY));
      end;
    end;
  end;
  try
    SaveList.SaveToFile(sFileName);
  except

  end;
  SaveList.Free;
  Result := True;
end;
{
function LoadItemDblClickList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sMakeIndex, sItemName, sMapName, sX, sY: string;
  nMakeIndex: Integer;
  nCurrX: Integer;
  nCurrY: Integer;
  ItemEvent: pTItemEvent;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemDblClickList.txt';
  LoadList := TStringList.Create;
  if g_RememberItemList <> nil then begin
    for I := 0 to g_RememberItemList.Count - 1 do begin
      Dispose(pTItemEvent(g_RememberItemList.Objects[I]));
    end;
    g_RememberItemList.Free;
  end;
  g_RememberItemList := TQuickList.Create;
  if FileExists(sFileName) then begin
    g_RememberItemList.Lock;
    try
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sLineText := Trim(LoadList.Strings[I]);
        if (sLineText = '') or (sLineText[1] = ';') then Continue;
        sLineText := GetValidStr3(sLineText, sItemName, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMakeIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMapName, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sX, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sY, [' ', ',', #9]);
        nMakeIndex := Str_ToInt(sMakeIndex, -1);
        nCurrX := Str_ToInt(sX, -1);
        nCurrY := Str_ToInt(sY, -1);
        if (nMakeIndex > 0) and (sMapName <> '') and (nCurrX >= 0) and (nCurrY >= 0) then begin
          New(ItemEvent);
          ItemEvent.m_sItemName := sItemName;
          ItemEvent.m_nMakeIndex := nMakeIndex;
          ItemEvent.m_sMapName := sMapName;
          ItemEvent.m_nCurrX := nCurrX;
          ItemEvent.m_nCurrY := nCurrY;
          g_RememberItemList.AddObject(IntToStr(nMakeIndex), TObject(ItemEvent));
        end;
      end;
      g_RememberItemList.SortString(0, g_RememberItemList.Count - 1);
    finally
      g_RememberItemList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveItemDblClickList(): Boolean;
var
  I: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemEvent: pTItemEvent;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemDblClickList.txt';
  SaveList := TStringList.Create;
  g_RememberItemList.SortString(0, g_RememberItemList.Count - 1);
  for I := 0 to g_RememberItemList.Count - 1 do begin
    ItemEvent := pTItemEvent(g_RememberItemList.Objects[I]);
    SaveList.Add(ItemEvent.m_sItemName + #9 + IntToStr(ItemEvent.m_nMakeIndex) + #9 + ItemEvent.m_sMapName + #9 + IntToStr(ItemEvent.m_nCurrX) + #9 + IntToStr(ItemEvent.m_nCurrY));
  end;
  try
    SaveList.SaveToFile(sFileName);
  except

  end;
  SaveList.Free;
  Result := True;
end;
}
















function LoadItemBindCharName(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText, sMakeIndex, sItemIndex, sBindName: string;
  nMakeIndex, nItemIndex: Integer;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindChrName.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_ItemBindCharName.Lock;
    try
      for I := 0 to g_ItemBindCharName.Count - 1 do begin
        Dispose(pTItemBind(g_ItemBindCharName.Items[I]));
      end;
      g_ItemBindCharName.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sLineText := Trim(LoadList.Strings[I]);
        if sLineText[1] = ';' then Continue;
        sLineText := GetValidStr3(sLineText, sItemIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMakeIndex, [' ', ',', #9]);
        sLineText := GetValidStr3(sLineText, sBindName, [' ', ',', #9]);
        nMakeIndex := Str_ToInt(sMakeIndex, -1);
        nItemIndex := Str_ToInt(sItemIndex, -1);
        if (nMakeIndex > 0) and (nItemIndex > 0) and (sBindName <> '') then begin
          New(ItemBind);
          ItemBind.nMakeIdex := nMakeIndex;
          ItemBind.nItemIdx := nItemIndex;
          ItemBind.sBindName := sBindName;
          g_ItemBindCharName.Add(ItemBind);
        end;
      end;
    finally
      g_ItemBindCharName.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveItemBindCharName(): Boolean;
var
  I: Integer;
  SaveList: TStringList;
  sFileName: string;
  ItemBind: pTItemBind;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'ItemBindChrName.txt';
  SaveList := TStringList.Create;
  g_ItemBindCharName.Lock;
  try
    for I := 0 to g_ItemBindCharName.Count - 1 do begin
      ItemBind := g_ItemBindCharName.Items[I];
      SaveList.Add(IntToStr(ItemBind.nItemIdx) + #9 + IntToStr(ItemBind.nMakeIdex) + #9 + ItemBind.sBindName);
    end;
  finally
    g_ItemBindCharName.UnLock;
  end;
  SaveList.SaveToFile(sFileName);
  SaveList.Free;
  Result := True;
end;

function LoadDisableMakeItem(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DisableMakeItem.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DisableMakeItemList.Lock;
    try
      g_DisableMakeItemList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_DisableMakeItemList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_DisableMakeItemList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveDisableMakeItem(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'DisableMakeItem.txt';
  g_DisableMakeItemList.Lock;
  try
    g_DisableMakeItemList.SaveToFile(sFileName);
  finally
    g_DisableMakeItemList.UnLock;
  end;
  Result := True;
end;

function SaveAdminList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
  sPermission: string;
  nPermission: Integer;
  AdminInfo: pTAdminInfo;
begin
  sFileName := g_Config.sEnvirDir + 'AdminList.txt';
  SaveList := TStringList.Create;
  UserEngine.m_AdminList.Lock;
  try
    for I := 0 to UserEngine.m_AdminList.Count - 1 do begin
      AdminInfo := pTAdminInfo(UserEngine.m_AdminList.Items[I]);
      nPermission := AdminInfo.nLv;
      if nPermission = 10 then sPermission := '*';
      if nPermission = 9 then sPermission := '1';
      if nPermission = 8 then sPermission := '2';
      if nPermission = 7 then sPermission := '3';
      if nPermission = 6 then sPermission := '4';
      if nPermission = 5 then sPermission := '5';
      if nPermission = 4 then sPermission := '6';
      if nPermission = 3 then sPermission := '7';
      if nPermission = 2 then sPermission := '8';
      if nPermission = 1 then sPermission := '9';
{$IF VEROWNER = WL}
      SaveList.Add(sPermission + #9 + AdminInfo.sChrName + #9 + AdminInfo.sIPaddr);
{$ELSE}
      SaveList.Add(sPermission + #9 + AdminInfo.sChrName);
{$IFEND}
    end;
    SaveList.SaveToFile(sFileName);
  finally
    UserEngine.m_AdminList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadUnMasterList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'UnMaster.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_UnMasterList.Lock;
    try
      g_UnMasterList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_UnMasterList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_UnMasterList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveUnMasterList(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'UnMaster.txt';
  g_UnMasterList.Lock;
  try
    g_UnMasterList.SaveToFile(sFileName);
  finally
    g_UnMasterList.UnLock;
  end;
  Result := True;
end;

function LoadUnForceMasterList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'UnForceMaster.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_UnForceMasterList.Lock;
    try
      g_UnForceMasterList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_UnForceMasterList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_UnForceMasterList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveUnForceMasterList(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'UnForceMaster.txt';
  g_UnForceMasterList.Lock;
  try
    g_UnForceMasterList.SaveToFile(sFileName);
  finally
    g_UnForceMasterList.UnLock;
  end;
  Result := True;
end;

function LoadEnableMakeItem(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'EnableMakeItem.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_EnableMakeItemList.Lock;
    try
      g_EnableMakeItemList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_EnableMakeItemList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_EnableMakeItemList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveEnableMakeItem(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'EnableMakeItem.txt';
  g_EnableMakeItemList.Lock;
  try
    g_EnableMakeItemList.SaveToFile(sFileName);
  finally
    g_EnableMakeItemList.UnLock;
  end;
  Result := True;
end;












function LoadEnableUpgradeItem(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'EnableUpgradeItem.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_EnableUpgradeItemList.Lock;
    try
      g_EnableUpgradeItemList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_EnableUpgradeItemList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_EnableUpgradeItemList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveEnableUpgradeItem(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'EnableUpgradeItem.txt';
  g_EnableUpgradeItemList.Lock;
  try
    g_EnableUpgradeItemList.SaveToFile(sFileName);
  finally
    g_EnableUpgradeItemList.UnLock;
  end;
  Result := True;
end;


function LoadDisableMoveMap(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DisableMoveMap.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DisableMoveMapList.Lock;
    try
      g_DisableMoveMapList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_DisableMoveMapList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_DisableMoveMapList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveDisableMoveMap(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'DisableMoveMap.txt';
  g_DisableMoveMapList.Lock;
  try
    g_DisableMoveMapList.SaveToFile(sFileName);
  finally
    g_DisableMoveMapList.UnLock;
  end;
  Result := True;
end;

procedure LoadBindItemTypeFromUnbindList();
  function AddBindItemType(sItemName: string; nShape: Integer): Boolean;
  var
    BindItem: pTBindItem;
    I: Integer;
    StdItem: pTStdItem;
  begin
    Result := False;
    for I := 0 to UserEngine.StdItemList.Count - 1 do begin
      StdItem := UserEngine.StdItemList.Items[I];
      if CompareText(StdItem.Name, sItemName) = 0 then begin
        if StdItem.StdMode = 0 then begin
          if (StdItem.Shape = 0) and (StdItem.AC > 0) and (StdItem.MAC = 0) then begin //红药
            New(BindItem);
            BindItem.sUnbindItemName := StdItem.Name;
            BindItem.nStdMode := 31;
            BindItem.nShape := nShape;
            BindItem.btItemType := 0;
            g_BindItemTypeList.Add(BindItem);
            Result := True;
            Break;
          end else
            if (StdItem.Shape = 0) and (StdItem.AC = 0) and (StdItem.MAC > 0) then begin
            New(BindItem);
            BindItem.sUnbindItemName := StdItem.Name;
            BindItem.nStdMode := 31;
            BindItem.nShape := nShape;
            BindItem.btItemType := 1;
            g_BindItemTypeList.Add(BindItem);
            Result := True;
            Break;
          end else
            if (StdItem.Shape = 1) and (StdItem.AC > 0) and (StdItem.MAC > 0) then begin
            New(BindItem);
            BindItem.sUnbindItemName := StdItem.Name;
            BindItem.nStdMode := 31;
            BindItem.nShape := nShape;
            BindItem.btItemType := 2;
            g_BindItemTypeList.Add(BindItem);
            Result := True;
            Break;
          end;
        end;
      end;
    end;
  end;
var
  I: Integer;
  sItemName: string;
  nShape: Integer;
begin
  if UserEngine <> nil then begin
    g_BindItemTypeList := TGList.Create;
    for I := 0 to g_UnbindList.Count - 1 do begin
      sItemName := g_UnbindList.Strings[I];
      nShape := Integer(g_UnbindList.Objects[I]);
      AddBindItemType(sItemName, nShape);
    end;
  end;
end;

function GetBindItemType(nShape: Integer): Integer;
var
  BindItem: pTBindItem;
  I: Integer;
begin
  Result := -1;
  if g_BindItemTypeList <> nil then begin
    for I := 0 to g_BindItemTypeList.Count - 1 do begin
      BindItem := g_BindItemTypeList.Items[I];
      if BindItem.nShape = nShape then begin
        Result := BindItem.btItemType;
        Break;
      end;
    end;
  end;
end;

procedure LoadAllowPickUpItemList();
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText: string;
begin
  sFileName := g_Config.sEnvirDir + 'AllowPickUpItemList.txt';
  if FileExists(sFileName) then begin
    LoadList := TStringList.Create;
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if (sLineText <> '') and (sLineText[1] <> ';') then begin
        g_AllowPickUpItemList.Add(sLineText);
      end;
    end;
    LoadList.Free;
  end else begin
    g_AllowPickUpItemList.Add(';允许分身捡取物品列表');
    g_AllowPickUpItemList.SaveToFile(sFileName);
    g_AllowPickUpItemList.Clear;
  end;
end;

function IsAllowPickUpItem(const sItemName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  {if CompareText(sItemName, sSTRING_GOLDNAME) = 0 then begin
    Result := True;
    Exit;
  end;}
  g_AllowPickUpItemList.Lock;
  try
    for I := 0 to g_AllowPickUpItemList.Count - 1 do begin
      if CompareText(sItemName, g_AllowPickUpItemList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_AllowPickUpItemList.UnLock;
  end;
end;

procedure LoadAllowScatterItemList();
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText: string;
begin
  sFileName := g_Config.sEnvirDir + 'ScatterItemAllowList.txt';
  if g_AllowScatterItemList <> nil then begin
    FreeAndNil(g_AllowScatterItemList);
  end;
  g_AllowScatterItemList := TGStringList.Create;
  if FileExists(sFileName) then begin
    LoadList := TStringList.Create;
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if (sLineText <> '') and (sLineText[1] <> ';') then begin
        g_AllowScatterItemList.Add(sLineText);
      end;
    end;
    LoadList.Free;
  end else begin
    g_AllowScatterItemList.Add(';爆物品允许触发列表');
    g_AllowScatterItemList.SaveToFile(sFileName);
    g_AllowScatterItemList.Clear;
  end;
end;

function IsAllowScatterItem(sItemName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  if g_AllowScatterItemList <> nil then begin
    g_AllowScatterItemList.Lock;
    try
      for I := 0 to g_AllowScatterItemList.Count - 1 do begin
        if CompareText(sItemName, g_AllowScatterItemList.Strings[I]) = 0 then begin
          Result := True;
          Break;
        end;
      end;
    finally
      g_AllowScatterItemList.UnLock;
    end;
  end;
end;


function GetUseItemIdx(sName: string): Integer;
begin
  Result := -1;
  if CompareText(sName, U_DRESSNAME) = 0 then begin
    Result := 0;
  end else
    if CompareText(sName, U_WEAPONNAME) = 0 then begin
    Result := 1;
  end else
    if CompareText(sName, U_RIGHTHANDNAME) = 0 then begin
    Result := 2;
  end else
    if CompareText(sName, U_NECKLACENAME) = 0 then begin
    Result := 3;
  end else
    if CompareText(sName, U_HELMETNAME) = 0 then begin
    Result := 4;
  end else
    if CompareText(sName, U_ARMRINGLNAME) = 0 then begin
    Result := 5;
  end else
    if CompareText(sName, U_ARMRINGRNAME) = 0 then begin
    Result := 6;
  end else
    if CompareText(sName, U_RINGLNAME) = 0 then begin
    Result := 7;
  end else
    if CompareText(sName, U_RINGRNAME) = 0 then begin
    Result := 8;
  end else
    if CompareText(sName, U_BUJUKNAME) = 0 then begin
    Result := 9;
  end else
    if CompareText(sName, U_BELTNAME) = 0 then begin
    Result := 10;
  end else
    if CompareText(sName, U_BOOTSNAME) = 0 then begin
    Result := 11;
  end else
    if CompareText(sName, U_CHARMNAME) = 0 then begin
    Result := 12;
  end;
end;

function GetUseItemName(nIndex: Integer): string;
begin
  case nIndex of //
    0: Result := U_DRESSNAME;
    1: Result := U_WEAPONNAME;
    2: Result := U_RIGHTHANDNAME;
    3: Result := U_NECKLACENAME;
    4: Result := U_HELMETNAME;
    5: Result := U_ARMRINGLNAME;
    6: Result := U_ARMRINGRNAME;
    7: Result := U_RINGLNAME;
    8: Result := U_RINGRNAME;
    9: Result := U_BUJUKNAME;
    10: Result := U_BELTNAME;
    11: Result := U_BOOTSNAME;
    12: Result := U_CHARMNAME;
  end;
end;

function LoadDisableSendMsgList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DisableSendMsgList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DisableSendMsgList.Clear;
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      g_DisableSendMsgList.Add(Trim(LoadList.Strings[I]));
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function LoadMonDropLimitList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sLineText: string;
  sFileName: string;
  sItemName, sItemCount: string;
  nItemCount: Integer;
  MonDrop: pTMonDrop;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'MonDropLimitList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_MonDropLimitLIst.Clear;
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if (sLineText = '') or (sLineText[1] = ';') then Continue;
      sLineText := GetValidStr3(sLineText, sItemName, [' ', '/', ',', #9]);
      sLineText := GetValidStr3(sLineText, sItemCount, [' ', '/', ',', #9]);
      nItemCount := Str_ToInt(sItemCount, -1);
      if (sItemName <> '') and (nItemCount >= 0) then begin
        New(MonDrop);
        MonDrop.sItemName := sItemName;
        MonDrop.nDropCount := 0;
        MonDrop.nNoDropCount := 0;
        MonDrop.nCountLimit := nItemCount;
        g_MonDropLimitLIst.AddObject(sItemName, TObject(MonDrop));
      end;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveMonDropLimitList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText: string;
  MonDrop: pTMonDrop;
begin
  sFileName := g_Config.sEnvirDir + 'MonDropLimitList.txt';
  LoadList := TStringList.Create;
  for I := 0 to g_MonDropLimitLIst.Count - 1 do begin
    MonDrop := pTMonDrop(g_MonDropLimitLIst.Objects[I]);
    sLineText := MonDrop.sItemName + #9 + IntToStr(MonDrop.nCountLimit);
    LoadList.Add(sLineText);
  end;
  LoadList.SaveToFile(sFileName);
  LoadList.Free;
  Result := True;
end;

function LoadDisableTakeOffList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sLineText: string;
  sFileName: string;
  sItemName, sItemIdx: string;
  nItemIdx: Integer;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DisableTakeOffList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    LoadList.LoadFromFile(sFileName);
    g_DisableTakeOffList.Lock;
    try
      g_DisableTakeOffList.Clear;
      for I := 0 to LoadList.Count - 1 do begin
        sLineText := Trim(LoadList.Strings[I]);
        if (sLineText = '') or (sLineText[1] = ';') then Continue;
        sLineText := GetValidStr3(sLineText, sItemName, [' ', '/', ',', #9]);
        sLineText := GetValidStr3(sLineText, sItemIdx, [' ', '/', ',', #9]);
        nItemIdx := Str_ToInt(sItemIdx, -1);
        if (sItemName <> '') and (nItemIdx >= 0) then begin
          g_DisableTakeOffList.AddObject(sItemName, TObject(nItemIdx));
        end;
      end;
    finally
      g_DisableTakeOffList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveDisableTakeOffList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
  sLineText: string;
begin
  sFileName := g_Config.sEnvirDir + 'DisableTakeOffList.txt';
  LoadList := TStringList.Create;
  g_DisableTakeOffList.Lock;
  try
    for I := 0 to g_DisableTakeOffList.Count - 1 do begin
      sLineText := g_DisableTakeOffList.Strings[I] + #9 + IntToStr(Integer(g_DisableTakeOffList.Objects[I]));
      LoadList.Add(sLineText);
    end;
  finally
    g_DisableTakeOffList.UnLock;
  end;
  LoadList.SaveToFile(sFileName);
  LoadList.Free;
  Result := True;
end;

{function SaveAllowSellOffItemList():Boolean;
var
  I:integer;
  sFileName:String;
begin
  sFileName:=g_Config.sEnvirDir + 'AllowSellOffItem.txt';
  g_AllowSellOffItemList.Lock;
  try
    for I := 0 to g_AllowSellOffItemList.Count - 1 do begin
      g_AllowSellOffItemList.SaveToFile(sFileName);
    end;
  finally
    g_AllowSellOffItemList.UnLock;
  end;
  Result:=True;
end;}


function InDisableTakeOffList(nItemIdx: Integer): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_DisableTakeOffList.Lock;
  try
    for I := 0 to g_DisableTakeOffList.Count - 1 do begin
      if Integer(g_DisableTakeOffList.Objects[I]) = nItemIdx - 1 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_DisableTakeOffList.UnLock;
  end;
end;

function SaveDisableSendMsgList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'DisableSendMsgList.txt';
  LoadList := TStringList.Create;
  for I := 0 to g_DisableSendMsgList.Count - 1 do begin
    LoadList.Add(g_DisableSendMsgList.Strings[I]);
  end;
  LoadList.SaveToFile(sFileName);
  LoadList.Free;
  Result := True;
end;

function GetDisableSendMsgList(sHumanName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  for I := 0 to g_DisableSendMsgList.Count - 1 do begin
    if CompareText(sHumanName, g_DisableSendMsgList.Strings[I]) = 0 then begin
      Result := True;
      Break;
    end;
  end;
end;

function LoadAllowSellOffItemList(): Boolean; //加载允许寄售物品
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'AllowSellOffItem.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_AllowSellOffItemList.Lock;
    try
      g_AllowSellOffItemList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_AllowSellOffItemList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_AllowSellOffItemList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function SaveAllowSellOffItemList(): Boolean; //保存允许寄售物品
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'AllowSellOffItem.txt';
  g_AllowSellOffItemList.Lock;
  try
    g_AllowSellOffItemList.SaveToFile(sFileName);
  finally
    g_AllowSellOffItemList.UnLock;
  end;
  Result := True;
end;

function LoadGameLogItemNameList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'GameLogItemNameList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_GameLogItemNameList.Lock;
    try
      g_GameLogItemNameList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_GameLogItemNameList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_GameLogItemNameList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetGameLogItemNameList(sItemName: string): Byte;
var
  I: Integer;
begin
  Result := 0;
  g_GameLogItemNameList.Lock;
  try
    for I := 0 to g_GameLogItemNameList.Count - 1 do begin
      if CompareText(sItemName, g_GameLogItemNameList.Strings[I]) = 0 then begin
        Result := 1;
        Break;
      end;
    end;
  finally
    g_GameLogItemNameList.UnLock;
  end;
end;

function SaveGameLogItemNameList(): Boolean;
var
  sFileName: string;
begin
  sFileName := g_Config.sEnvirDir + 'GameLogItemNameList.txt';
  g_GameLogItemNameList.Lock;
  try
    g_GameLogItemNameList.SaveToFile(sFileName);
  finally
    g_GameLogItemNameList.UnLock;
  end;
  Result := True;
end;

function LoadDenyIPAddrList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DenyIPAddrList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DenyIPAddrList.Lock;
    try
      g_DenyIPAddrList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_DenyIPAddrList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_DenyIPAddrList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetDenyIPaddrList(sIPaddr: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_DenyIPAddrList.Lock;
  try
    for I := 0 to g_DenyIPAddrList.Count - 1 do begin
      if CompareText(sIPaddr, g_DenyIPAddrList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_DenyIPAddrList.UnLock;
  end;
end;

function SaveDenyIPAddrList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'DenyIPAddrList.txt';
  SaveList := TStringList.Create;
  g_DenyIPAddrList.Lock;
  try
    for I := 0 to g_DenyIPAddrList.Count - 1 do begin
      if Integer(g_DenyIPAddrList.Objects[I]) <> 0 then begin
        SaveList.Add(g_DenyIPAddrList.Strings[I]);
      end;
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_DenyIPAddrList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadDenyChrNameList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DenyChrNameList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DenyChrNameList.Lock;
    try
      g_DenyChrNameList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_DenyChrNameList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_DenyChrNameList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetDenyChrNameList(sChrName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_DenyChrNameList.Lock;
  try
    for I := 0 to g_DenyChrNameList.Count - 1 do begin
      if CompareText(sChrName, g_DenyChrNameList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_DenyChrNameList.UnLock;
  end;
end;

function SaveDenyChrNameList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'DenyChrNameList.txt';
  SaveList := TStringList.Create;
  g_DenyChrNameList.Lock;
  try
    for I := 0 to g_DenyChrNameList.Count - 1 do begin
      if Integer(g_DenyChrNameList.Objects[I]) <> 0 then begin
        SaveList.Add(g_DenyChrNameList.Strings[I]);
      end;
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_DenyChrNameList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadDenyAccountList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'DenyAccountList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_DenyAccountList.Lock;
    try
      g_DenyAccountList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_DenyAccountList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_DenyAccountList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetDenyAccountList(sAccount: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_DenyAccountList.Lock;
  try
    for I := 0 to g_DenyAccountList.Count - 1 do begin
      if CompareText(sAccount, g_DenyAccountList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_DenyAccountList.UnLock;
  end;
end;

function SaveDenyAccountList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'DenyAccountList.txt';
  SaveList := TStringList.Create;
  g_DenyAccountList.Lock;
  try
    for I := 0 to g_DenyAccountList.Count - 1 do begin
      if Integer(g_DenyAccountList.Objects[I]) <> 0 then begin
        SaveList.Add(g_DenyAccountList.Strings[I]);
      end;
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_DenyAccountList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadNoClearMonList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'NoClearMonList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_NoClearMonList.Lock;
    try
      g_NoClearMonList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        g_NoClearMonList.Add(Trim(LoadList.Strings[I]));
      end;
    finally
      g_NoClearMonList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetNoClearMonList(sMonName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_NoClearMonList.Lock;
  try
    for I := 0 to g_NoClearMonList.Count - 1 do begin
      if CompareText(sMonName, g_NoClearMonList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_NoClearMonList.UnLock;
  end;
end;

function SaveNoClearMonList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'NoClearMonList.txt';
  SaveList := TStringList.Create;
  g_NoClearMonList.Lock;
  try
    for I := 0 to g_NoClearMonList.Count - 1 do begin
      SaveList.Add(g_NoClearMonList.Strings[I]);
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_NoClearMonList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadMonSayMsg(): Boolean;
var
  I, II: Integer;
  sStatus, sRate, sColor, sMonName, sSayMsg: string;
  nStatus, nRate, nColor: Integer;
  LoadList: TStringList;
  sLineText: string;
  MonSayMsg: pTMonSayMsg;
  sFileName: string;
  MonSayList: TList;
  boSearch: Boolean;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'MonSayMsg.txt';
  if FileExists(sFileName) then begin
    g_MonSayMsgList.Clear;
    LoadList := TStringList.Create;
    LoadList.LoadFromFile(sFileName);
    for I := 0 to LoadList.Count - 1 do begin
      sLineText := Trim(LoadList.Strings[I]);
      if (sLineText <> '') and (sLineText[1] < ';') then begin
        sLineText := GetValidStr3(sLineText, sStatus, [' ', '/', ',', #9]);
        sLineText := GetValidStr3(sLineText, sRate, [' ', '/', ',', #9]);
        sLineText := GetValidStr3(sLineText, sColor, [' ', '/', ',', #9]);
        sLineText := GetValidStr3(sLineText, sMonName, [' ', '/', ',', #9]);
        sLineText := GetValidStr3(sLineText, sSayMsg, [' ', '/', ',', #9]);
        if (sStatus <> '') and (sRate <> '') and (sColor <> '') and (sMonName <> '') and (sSayMsg <> '') then begin
          nStatus := Str_ToInt(sStatus, -1);
          nRate := Str_ToInt(sRate, -1);
          nColor := Str_ToInt(sColor, -1);
          if (nStatus >= 0) and (nRate >= 0) and (nColor >= 0) then begin
            New(MonSayMsg);
            case nStatus of
              0: MonSayMsg.State := s_KillHuman;
              1: MonSayMsg.State := s_UnderFire;
              2: MonSayMsg.State := s_Die;
              3: MonSayMsg.State := s_MonGen;
            else MonSayMsg.State := s_UnderFire;
            end;
            case nColor of
              0: MonSayMsg.Color := c_Red;
              1: MonSayMsg.Color := c_Green;
              2: MonSayMsg.Color := c_Blue;
              3: MonSayMsg.Color := c_White;
            else MonSayMsg.Color := c_White;
            end;
            MonSayMsg.nRate := nRate;
            MonSayMsg.sSayMsg := sSayMsg;
            boSearch := False;
            for II := 0 to g_MonSayMsgList.Count - 1 do begin
              if CompareText(g_MonSayMsgList.Strings[II], sMonName) = 0 then begin
                TList(g_MonSayMsgList.Objects[II]).Add(MonSayMsg);
                boSearch := True;
                Break;
              end;
            end;
            if not boSearch then begin
              MonSayList := TList.Create;
              MonSayList.Add(MonSayMsg);
              g_MonSayMsgList.AddObject(sMonName, TObject(MonSayList));
            end;
          end;
        end;
      end;
    end;
    LoadList.Free;
    Result := True;
  end;
end;

function LoadAICharNameList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName, sCharName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'AICharNameList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_AICharNameList.Lock;
    try
      g_AICharNameList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sCharName := Trim(LoadList.Strings[I]);
        if (sCharName = '') or (sCharName[1] = ';') then Continue;
        g_AICharNameList.Add(sCharName);
      end;
    finally
      g_AICharNameList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetAICharNameList(sName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_AICharNameList.Lock;
  try
    for I := 0 to g_AICharNameList.Count - 1 do begin
      if CompareText(sName, g_AICharNameList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_AICharNameList.UnLock;
  end;
end;

function SaveAICharNameList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'AICharNameList.txt';
  SaveList := TStringList.Create;
  g_AICharNameList.Lock;
  try
    for I := 0 to g_AICharNameList.Count - 1 do begin
      SaveList.Add(g_AICharNameList.Strings[I]);
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_AICharNameList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;

function LoadAIHeroNameList(): Boolean;
var
  I: Integer;
  LoadList: TStringList;
  sFileName, sHeroName: string;
begin
  Result := False;
  sFileName := g_Config.sEnvirDir + 'AIHeroNameList.txt';
  LoadList := TStringList.Create;
  if FileExists(sFileName) then begin
    g_AIHeroNameList.Lock;
    try
      g_AIHeroNameList.Clear;
      LoadList.LoadFromFile(sFileName);
      for I := 0 to LoadList.Count - 1 do begin
        sHeroName := Trim(LoadList.Strings[I]);
        if (sHeroName = '') or (sHeroName[1] = ';') then Continue;
        g_AIHeroNameList.Add(sHeroName);
      end;
    finally
      g_AIHeroNameList.UnLock;
    end;
    Result := True;
  end else begin
    LoadList.SaveToFile(sFileName);
  end;
  LoadList.Free;
end;

function GetAIHeroName(sCharName: string): string;
var
  I: Integer;
begin
  Result := '';
  g_AICharNameList.Lock;
  g_AIHeroNameList.Lock;
  try
    for I := 0 to g_AICharNameList.Count - 1 do begin
      if CompareText(sCharName, g_AICharNameList.Strings[I]) = 0 then begin
        if (I >= 0) and (I < g_AIHeroNameList.Count) then
          Result := g_AIHeroNameList.Strings[I];
        Break;
      end;
    end;
  finally
    g_AIHeroNameList.UnLock;
    g_AICharNameList.UnLock;
  end;
end;

function GetAIHeroNameList(sName: string): Boolean;
var
  I: Integer;
begin
  Result := False;
  g_AIHeroNameList.Lock;
  try
    for I := 0 to g_AIHeroNameList.Count - 1 do begin
      if CompareText(sName, g_AIHeroNameList.Strings[I]) = 0 then begin
        Result := True;
        Break;
      end;
    end;
  finally
    g_AIHeroNameList.UnLock;
  end;
end;

function SaveAIHeroNameList(): Boolean;
var
  I: Integer;
  sFileName: string;
  SaveList: TStringList;
begin
  sFileName := g_Config.sEnvirDir + 'AIHeroNameList.txt';
  SaveList := TStringList.Create;
  g_AIHeroNameList.Lock;
  try
    for I := 0 to g_AIHeroNameList.Count - 1 do begin
      SaveList.Add(g_AIHeroNameList.Strings[I]);
    end;
    SaveList.SaveToFile(sFileName);
  finally
    g_AIHeroNameList.UnLock;
  end;
  SaveList.Free;
  Result := True;
end;


procedure StartFixExp();
begin

end;

procedure LoadExp();
var
  I: Integer;
  LoadInteger: Integer;
  LoadString: string;
begin
  LoadInteger := Config.ReadInteger('Exp', 'KillMonExpMultiple', -1);
  if LoadInteger < 0 then begin
    Config.WriteInteger('Exp', 'KillMonExpMultiple', g_Config.dwKillMonExpMultiple);
  end else begin
    g_Config.dwKillMonExpMultiple := Config.ReadInteger('Exp', 'KillMonExpMultiple', g_Config.dwKillMonExpMultiple);
  end;

  LoadInteger := Config.ReadInteger('Exp', 'HighLevelKillMonFixExp', -1);
  if LoadInteger < 0 then begin
    Config.WriteBool('Exp', 'HighLevelKillMonFixExp', g_Config.boHighLevelKillMonFixExp);
  end else begin
    g_Config.boHighLevelKillMonFixExp := Config.ReadBool('Exp', 'HighLevelKillMonFixExp', g_Config.boHighLevelKillMonFixExp);
  end;

  for I := 1 to MAXCHANGELEVEL do begin
    LoadString := Config.ReadString('Exp', 'Level' + IntToStr(I), '');
    LoadInteger := Str_ToInt(LoadString, 0);
    if LoadInteger = 0 then begin
      Config.WriteString('Exp', 'Level' + IntToStr(I), IntToStr(g_dwOldNeedExps[I]));
      g_Config.dwNeedExps[I] := g_dwOldNeedExps[I];
    end else begin
      g_Config.dwNeedExps[I] := LongWord(LoadInteger);
    end;
  end;

  for I := 1 to MAXCHANGELEVEL do begin
    LoadString := Config.ReadString('HeroExp', 'Level' + IntToStr(I), '');
    LoadInteger := Str_ToInt(LoadString, 0);
    if LoadInteger = 0 then begin
      Config.WriteString('HeroExp', 'Level' + IntToStr(I), IntToStr(g_dwHeroNeedExps[I]));
      g_Config.dwHeroNeedExps[I] := g_dwHeroNeedExps[I];
    end else begin
      g_Config.dwHeroNeedExps[I] := LongWord(LoadInteger);
    end;
  end;

  if Config.ReadInteger('Exp', 'UseFixExp', -1) < 0 then
    Config.WriteBool('Exp', 'UseFixExp', g_Config.boUseFixExp);
  g_Config.boUseFixExp := Config.ReadBool('Exp', 'UseFixExp', g_Config.boUseFixExp);

  LoadInteger := Config.ReadInteger('Exp', 'BaseExp', -1);
  if LoadInteger < 0 then
    Config.WriteInteger('Exp', 'BaseExp', g_Config.nBaseExp)
  else g_Config.nBaseExp := LoadInteger;

  LoadInteger := Config.ReadInteger('Exp', 'AddExp', -1);
  if LoadInteger < 0 then
    Config.WriteInteger('Exp', 'AddExp', g_Config.nAddExp)
  else g_Config.nAddExp := LoadInteger;
{$IF OEMVER = OEM775}
 { for I := 1 to High(g_LevelInfo) do begin
    LoadInteger := Level775.ReadInteger('HP', 'HP' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('HP', 'HP' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wHP := Level775.ReadInteger('HP', 'HP' + IntToStr(I), g_LevelInfo[I].wHP);
    end;

    LoadInteger := Level775.ReadInteger('MP', 'MP' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MP', 'MP' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMP := Level775.ReadInteger('MP', 'MP' + IntToStr(I), g_LevelInfo[I].wMP);
    end;

    LoadString := Level775.ReadString('Exp', 'Exp' + IntToStr(I), '');
    LoadInteger := Str_ToInt(LoadString, 0);
    if LoadInteger = 0 then begin
      Level775.WriteString('Exp', 'Exp' + IntToStr(I), '1000');
      g_LevelInfo[I].dwExp := g_dwOldNeedExps[I];
    end else begin
      g_LevelInfo[I].dwExp := LoadInteger;
    end;

    LoadInteger := Level775.ReadInteger('AC', 'AC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('AC', 'AC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wAC := Level775.ReadInteger('AC', 'AC' + IntToStr(I), g_LevelInfo[I].wAC);
    end;

    LoadInteger := Level775.ReadInteger('MaxAC', 'MaxAC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MaxAC', 'MaxAC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMaxAC := Level775.ReadInteger('MaxAC', 'MaxAC' + IntToStr(I), g_LevelInfo[I].wMaxAC);
    end;
    LoadInteger := Level775.ReadInteger('ACLimit', 'ACLimit' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('ACLimit', 'ACLimit' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wACLimit := Level775.ReadInteger('ACLimit', 'ACLimit' + IntToStr(I), g_LevelInfo[I].wACLimit);
    end;

    LoadInteger := Level775.ReadInteger('MAC', 'MAC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MAC', 'MAC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMAC := Level775.ReadInteger('MAC', 'MAC' + IntToStr(I), g_LevelInfo[I].wMAC);
    end;

    LoadInteger := Level775.ReadInteger('MaxMAC', 'MaxMAC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MaxMAC', 'MaxMAC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMaxMAC := Level775.ReadInteger('MaxMAC', 'MaxMAC' + IntToStr(I), g_LevelInfo[I].wMaxMAC);
    end;
    LoadInteger := Level775.ReadInteger('MACLimit', 'MACLimit' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MACLimit', 'MACLimit' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMACLimit := Level775.ReadInteger('MACLimit', 'MACLimit' + IntToStr(I), g_LevelInfo[I].wMACLimit);
    end;

    LoadInteger := Level775.ReadInteger('DC', 'DC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('DC', 'DC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wDC := Level775.ReadInteger('DC', 'DC' + IntToStr(I), g_LevelInfo[I].wDC);
    end;

    LoadInteger := Level775.ReadInteger('MaxDC', 'MaxDC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MaxDC', 'MaxDC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMaxDC := Level775.ReadInteger('MaxDC', 'MaxDC' + IntToStr(I), g_LevelInfo[I].wMaxDC);
    end;
    LoadInteger := Level775.ReadInteger('DCLimit', 'DCLimit' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('DCLimit', 'DCLimit' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wDCLimit := Level775.ReadInteger('DCLimit', 'DCLimit' + IntToStr(I), g_LevelInfo[I].wDCLimit);
    end;

    LoadInteger := Level775.ReadInteger('MC', 'MC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MC', 'MC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMC := Level775.ReadInteger('MC', 'MC' + IntToStr(I), g_LevelInfo[I].wMC);
    end;

    LoadInteger := Level775.ReadInteger('MaxMC', 'MaxMC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MaxMC', 'MaxMC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMaxMC := Level775.ReadInteger('MaxMC', 'MaxMC' + IntToStr(I), g_LevelInfo[I].wMaxMC);
    end;
    LoadInteger := Level775.ReadInteger('MCLimit', 'MCLimit' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MCLimit', 'MCLimit' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMCLimit := Level775.ReadInteger('MCLimit', 'MCLimit' + IntToStr(I), g_LevelInfo[I].wMCLimit);
    end;

    LoadInteger := Level775.ReadInteger('SC', 'SC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('SC', 'SC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wSC := Level775.ReadInteger('SC', 'SC' + IntToStr(I), g_LevelInfo[I].wSC);
    end;

    LoadInteger := Level775.ReadInteger('MaxSC', 'MaxSC' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('MaxSC', 'MaxSC' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wMaxSC := Level775.ReadInteger('MaxSC', 'MaxSC' + IntToStr(I), g_LevelInfo[I].wMaxSC);
    end;
    LoadInteger := Level775.ReadInteger('SCLimit', 'SCLimit' + IntToStr(I), -1);
    if LoadInteger < 0 then begin
      Level775.WriteInteger('SCLimit', 'SCLimit' + IntToStr(I), 100);
    end else begin
      g_LevelInfo[I].wSCLimit := Level775.ReadInteger('SCLimit', 'SCLimit' + IntToStr(I), g_LevelInfo[I].wSCLimit);
    end;
  end; }
{$IFEND}
end;

procedure LoadGameCommand();
var
  LoadString: string;
  nLoadInteger: Integer;
begin
  LoadString := CommandConf.ReadString('Command', 'Date', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Date', g_GameCommand.Data.sCmd)
  else g_GameCommand.Data.sCmd := LoadString;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'Date', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Date', g_GameCommand.Data.nPermissionMin)
  else g_GameCommand.Data.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'PrvMsg', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'PrvMsg', g_GameCommand.PRVMSG.sCmd)
  else g_GameCommand.PRVMSG.sCmd := LoadString;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'PrvMsg', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'PrvMsg', g_GameCommand.PRVMSG.nPermissionMin)
  else g_GameCommand.PRVMSG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AllowMsg', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowMsg', g_GameCommand.ALLOWMSG.sCmd)
  else g_GameCommand.ALLOWMSG.sCmd := LoadString;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'AllowMsg', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AllowMsg', g_GameCommand.ALLOWMSG.nPermissionMin)
  else g_GameCommand.ALLOWMSG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'LetShout', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LetShout', g_GameCommand.LETSHOUT.sCmd)
  else g_GameCommand.LETSHOUT.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'LetTrade', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LetTrade', g_GameCommand.LETTRADE.sCmd)
  else g_GameCommand.LETTRADE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'LetGuild', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LetGuild', g_GameCommand.LETGUILD.sCmd)
  else g_GameCommand.LETGUILD.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'EndGuild', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'EndGuild', g_GameCommand.ENDGUILD.sCmd)
  else g_GameCommand.ENDGUILD.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'BanGuildChat', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'BanGuildChat', g_GameCommand.BANGUILDCHAT.sCmd)
  else g_GameCommand.BANGUILDCHAT.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AuthAlly', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AuthAlly', g_GameCommand.AUTHALLY.sCmd)
  else g_GameCommand.AUTHALLY.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'Auth', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Auth', g_GameCommand.AUTH.sCmd)
  else g_GameCommand.AUTH.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AuthCancel', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AuthCancel', g_GameCommand.AUTHCANCEL.sCmd)
  else g_GameCommand.AUTHCANCEL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'ViewDiary', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ViewDiary', g_GameCommand.DIARY.sCmd)
  else g_GameCommand.DIARY.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'UserMove', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'UserMove', g_GameCommand.USERMOVE.sCmd)
  else g_GameCommand.USERMOVE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'Searching', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Searching', g_GameCommand.SEARCHING.sCmd)
  else g_GameCommand.SEARCHING.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AllowGroupCall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowGroupCall', g_GameCommand.ALLOWGROUPCALL.sCmd)
  else g_GameCommand.ALLOWGROUPCALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'GroupCall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GroupCall', g_GameCommand.GROUPRECALLL.sCmd)
  else g_GameCommand.GROUPRECALLL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AllowGuildReCall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowGuildReCall', g_GameCommand.ALLOWGUILDRECALL.sCmd)
  else g_GameCommand.ALLOWGUILDRECALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'GuildReCall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GuildReCall', g_GameCommand.GUILDRECALLL.sCmd)
  else g_GameCommand.GUILDRECALLL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'StorageUnLock', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageUnLock', g_GameCommand.UNLOCKSTORAGE.sCmd)
  else g_GameCommand.UNLOCKSTORAGE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'PasswordUnLock', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'PasswordUnLock', g_GameCommand.UnLock.sCmd)
  else g_GameCommand.UnLock.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'StorageLock', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageLock', g_GameCommand.Lock.sCmd)
  else g_GameCommand.Lock.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'StorageSetPassword', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageSetPassword', g_GameCommand.SETPASSWORD.sCmd)
  else g_GameCommand.SETPASSWORD.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'PasswordLock', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'PasswordLock', g_GameCommand.PASSWORDLOCK.sCmd)
  else g_GameCommand.PASSWORDLOCK.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'StorageChgPassword', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageChgPassword', g_GameCommand.CHGPASSWORD.sCmd)
  else g_GameCommand.CHGPASSWORD.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'StorageClearPassword', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageClearPassword', g_GameCommand.CLRPASSWORD.sCmd)
  else g_GameCommand.CLRPASSWORD.sCmd := LoadString;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'StorageClearPassword', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'StorageClearPassword', g_GameCommand.CLRPASSWORD.nPermissionMin)
  else g_GameCommand.CLRPASSWORD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'StorageUserClearPassword', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StorageUserClearPassword', g_GameCommand.UNPASSWORD.sCmd)
  else g_GameCommand.UNPASSWORD.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'MemberFunc', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MemberFunc', g_GameCommand.MEMBERFUNCTION.sCmd)
  else g_GameCommand.MEMBERFUNCTION.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'MemberFuncEx', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MemberFuncEx', g_GameCommand.MEMBERFUNCTIONEX.sCmd)
  else g_GameCommand.MEMBERFUNCTIONEX.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'Dear', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Dear', g_GameCommand.DEAR.sCmd)
  else g_GameCommand.DEAR.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'Master', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Master', g_GameCommand.Master.sCmd)
  else g_GameCommand.Master.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'DearRecall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DearRecall', g_GameCommand.DEARRECALL.sCmd)
  else g_GameCommand.DEARRECALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'MasterRecall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MasterRecall', g_GameCommand.MASTERECALL.sCmd)
  else g_GameCommand.MASTERECALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AllowDearRecall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowDearRecall', g_GameCommand.ALLOWDEARRCALL.sCmd)
  else g_GameCommand.ALLOWDEARRCALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AllowMasterRecall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowMasterRecall', g_GameCommand.ALLOWMASTERRECALL.sCmd)
  else g_GameCommand.ALLOWMASTERRECALL.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'AttackMode', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AttackMode', g_GameCommand.ATTACKMODE.sCmd)
  else g_GameCommand.ATTACKMODE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'Rest', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Rest', g_GameCommand.REST.sCmd)
  else g_GameCommand.REST.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'TakeOnHorse', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'TakeOnHorse', g_GameCommand.TAKEONHORSE.sCmd)
  else g_GameCommand.TAKEONHORSE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'TakeOffHorse', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'TakeOffHorse', g_GameCommand.TAKEOFHORSE.sCmd)
  else g_GameCommand.TAKEOFHORSE.sCmd := LoadString;

  LoadString := CommandConf.ReadString('Command', 'HumanLocal', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'HumanLocal', g_GameCommand.HUMANLOCAL.sCmd)
  else g_GameCommand.HUMANLOCAL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'HumanLocal', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'HumanLocal', g_GameCommand.HUMANLOCAL.nPermissionMin)
  else g_GameCommand.HUMANLOCAL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Move', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Move', g_GameCommand.Move.sCmd)
  else g_GameCommand.Move.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MoveMin', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MoveMin', g_GameCommand.Move.nPermissionMin)
  else g_GameCommand.Move.nPermissionMin := nLoadInteger;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MoveMax', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MoveMax', g_GameCommand.Move.nPermissionMax)
  else g_GameCommand.Move.nPermissionMax := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'PositionMove', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'PositionMove', g_GameCommand.POSITIONMOVE.sCmd)
  else g_GameCommand.POSITIONMOVE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'PositionMoveMin', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'PositionMoveMin', g_GameCommand.POSITIONMOVE.nPermissionMin)
  else g_GameCommand.POSITIONMOVE.nPermissionMin := nLoadInteger;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'PositionMoveMax', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'PositionMoveMax', g_GameCommand.POSITIONMOVE.nPermissionMax)
  else g_GameCommand.POSITIONMOVE.nPermissionMax := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Info', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Info', g_GameCommand.INFO.sCmd)
  else g_GameCommand.INFO.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Info', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Info', g_GameCommand.INFO.nPermissionMin)
  else g_GameCommand.INFO.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MobLevel', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MobLevel', g_GameCommand.MOBLEVEL.sCmd)
  else g_GameCommand.MOBLEVEL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MobLevel', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MobLevel', g_GameCommand.MOBLEVEL.nPermissionMin)
  else g_GameCommand.MOBLEVEL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MobCount', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MobCount', g_GameCommand.MOBCOUNT.sCmd)
  else g_GameCommand.MOBCOUNT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MobCount', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MobCount', g_GameCommand.MOBCOUNT.nPermissionMin)
  else g_GameCommand.MOBCOUNT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'HumanCount', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'HumanCount', g_GameCommand.HUMANCOUNT.sCmd)
  else g_GameCommand.HUMANCOUNT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'HumanCount', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'HumanCount', g_GameCommand.HUMANCOUNT.nPermissionMin)
  else g_GameCommand.HUMANCOUNT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Map', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Map', g_GameCommand.Map.sCmd)
  else g_GameCommand.Map.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Map', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Map', g_GameCommand.Map.nPermissionMin)
  else g_GameCommand.Map.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Kick', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Kick', g_GameCommand.KICK.sCmd)
  else g_GameCommand.KICK.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Kick', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Kick', g_GameCommand.KICK.nPermissionMin)
  else g_GameCommand.KICK.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Ting', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Ting', g_GameCommand.TING.sCmd)
  else g_GameCommand.TING.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Ting', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Ting', g_GameCommand.TING.nPermissionMin)
  else g_GameCommand.TING.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SuperTing', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SuperTing', g_GameCommand.SUPERTING.sCmd)
  else g_GameCommand.SUPERTING.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SuperTing', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SuperTing', g_GameCommand.SUPERTING.nPermissionMin)
  else g_GameCommand.SUPERTING.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MapMove', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MapMove', g_GameCommand.MAPMOVE.sCmd)
  else g_GameCommand.MAPMOVE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MapMove', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MapMove', g_GameCommand.MAPMOVE.nPermissionMin)
  else g_GameCommand.MAPMOVE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Shutup', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Shutup', g_GameCommand.SHUTUP.sCmd)
  else g_GameCommand.SHUTUP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Shutup', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Shutup', g_GameCommand.SHUTUP.nPermissionMin)
  else g_GameCommand.SHUTUP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReleaseShutup', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReleaseShutup', g_GameCommand.RELEASESHUTUP.sCmd)
  else g_GameCommand.RELEASESHUTUP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReleaseShutup', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReleaseShutup', g_GameCommand.RELEASESHUTUP.nPermissionMin)
  else g_GameCommand.RELEASESHUTUP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShutupList', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShutupList', g_GameCommand.SHUTUPLIST.sCmd)
  else g_GameCommand.SHUTUPLIST.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShutupList', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShutupList', g_GameCommand.SHUTUPLIST.nPermissionMin)
  else g_GameCommand.SHUTUPLIST.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'GameMaster', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GameMaster', g_GameCommand.GAMEMASTER.sCmd)
  else g_GameCommand.GAMEMASTER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'GameMaster', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'GameMaster', g_GameCommand.GAMEMASTER.nPermissionMin)
  else g_GameCommand.GAMEMASTER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ObServer', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ObServer', g_GameCommand.OBSERVER.sCmd)
  else g_GameCommand.OBSERVER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ObServer', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ObServer', g_GameCommand.OBSERVER.nPermissionMin)
  else g_GameCommand.OBSERVER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SuperMan', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SuperMan', g_GameCommand.SUEPRMAN.sCmd)
  else g_GameCommand.SUEPRMAN.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SuperMan', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SuperMan', g_GameCommand.SUEPRMAN.nPermissionMin)
  else g_GameCommand.SUEPRMAN.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Level', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Level', g_GameCommand.Level.sCmd)
  else g_GameCommand.Level.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Level', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Level', g_GameCommand.Level.nPermissionMin)
  else g_GameCommand.Level.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SabukWallGold', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SabukWallGold', g_GameCommand.SABUKWALLGOLD.sCmd)
  else g_GameCommand.SABUKWALLGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SabukWallGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SabukWallGold', g_GameCommand.SABUKWALLGOLD.nPermissionMin)
  else g_GameCommand.SABUKWALLGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Recall', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Recall', g_GameCommand.RECALL.sCmd)
  else g_GameCommand.RECALL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Recall', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Recall', g_GameCommand.RECALL.nPermissionMin)
  else g_GameCommand.RECALL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReGoto', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReGoto', g_GameCommand.REGOTO.sCmd)
  else g_GameCommand.REGOTO.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReGoto', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReGoto', g_GameCommand.REGOTO.nPermissionMin)
  else g_GameCommand.REGOTO.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Flag', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Flag', g_GameCommand.SHOWFLAG.sCmd)
  else g_GameCommand.SHOWFLAG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Flag', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Flag', g_GameCommand.SHOWFLAG.nPermissionMin)
  else g_GameCommand.SHOWFLAG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShowOpen', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShowOpen', g_GameCommand.SHOWOPEN.sCmd)
  else g_GameCommand.SHOWOPEN.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShowOpen', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShowOpen', g_GameCommand.SHOWOPEN.nPermissionMin)
  else g_GameCommand.SHOWOPEN.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShowUnit', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShowUnit', g_GameCommand.SHOWUNIT.sCmd)
  else g_GameCommand.SHOWUNIT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShowUnit', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShowUnit', g_GameCommand.SHOWUNIT.nPermissionMin)
  else g_GameCommand.SHOWUNIT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Attack', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Attack', g_GameCommand.Attack.sCmd)
  else g_GameCommand.Attack.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Attack', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Attack', g_GameCommand.Attack.nPermissionMin)
  else g_GameCommand.Attack.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Mob', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Mob', g_GameCommand.MOB.sCmd)
  else g_GameCommand.MOB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Mob', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Mob', g_GameCommand.MOB.nPermissionMin)
  else g_GameCommand.MOB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MobNpc', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MobNpc', g_GameCommand.MOBNPC.sCmd)
  else g_GameCommand.MOBNPC.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MobNpc', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MobNpc', g_GameCommand.MOBNPC.nPermissionMin)
  else g_GameCommand.MOBNPC.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelNpc', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelNpc', g_GameCommand.DELNPC.sCmd)
  else g_GameCommand.DELNPC.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelNpc', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelNpc', g_GameCommand.DELNPC.nPermissionMin)
  else g_GameCommand.DELNPC.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'NpcScript', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'NpcScript', g_GameCommand.NPCSCRIPT.sCmd)
  else g_GameCommand.NPCSCRIPT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'NpcScript', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'NpcScript', g_GameCommand.NPCSCRIPT.nPermissionMin)
  else g_GameCommand.NPCSCRIPT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RecallMob', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RecallMob', g_GameCommand.RECALLMOB.sCmd)
  else g_GameCommand.RECALLMOB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RecallMob', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RecallMob', g_GameCommand.RECALLMOB.nPermissionMin)
  else g_GameCommand.RECALLMOB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'LuckPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LuckPoint', g_GameCommand.LUCKYPOINT.sCmd)
  else g_GameCommand.LUCKYPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'LuckPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'LuckPoint', g_GameCommand.LUCKYPOINT.nPermissionMin)
  else g_GameCommand.LUCKYPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'LotteryTicket', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LotteryTicket', g_GameCommand.LOTTERYTICKET.sCmd)
  else g_GameCommand.LOTTERYTICKET.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'LotteryTicket', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'LotteryTicket', g_GameCommand.LOTTERYTICKET.nPermissionMin)
  else g_GameCommand.LOTTERYTICKET.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadGuild', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadGuild', g_GameCommand.RELOADGUILD.sCmd)
  else g_GameCommand.RELOADGUILD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadGuild', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadGuild', g_GameCommand.RELOADGUILD.nPermissionMin)
  else g_GameCommand.RELOADGUILD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadLineNotice', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadLineNotice', g_GameCommand.RELOADLINENOTICE.sCmd)
  else g_GameCommand.RELOADLINENOTICE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadLineNotice', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadLineNotice', g_GameCommand.RELOADLINENOTICE.nPermissionMin)
  else g_GameCommand.RELOADLINENOTICE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadAbuse', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadAbuse', g_GameCommand.RELOADABUSE.sCmd)
  else g_GameCommand.RELOADABUSE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadAbuse', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadAbuse', g_GameCommand.RELOADABUSE.nPermissionMin)
  else g_GameCommand.RELOADABUSE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'BackStep', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'BackStep', g_GameCommand.BACKSTEP.sCmd)
  else g_GameCommand.BACKSTEP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'BackStep', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'BackStep', g_GameCommand.BACKSTEP.nPermissionMin)
  else g_GameCommand.BACKSTEP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Ball', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Ball', g_GameCommand.BALL.sCmd)
  else g_GameCommand.BALL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Ball', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Ball', g_GameCommand.BALL.nPermissionMin)
  else g_GameCommand.BALL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'FreePenalty', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'FreePenalty', g_GameCommand.FREEPENALTY.sCmd)
  else g_GameCommand.FREEPENALTY.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'FreePenalty', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'FreePenalty', g_GameCommand.FREEPENALTY.nPermissionMin)
  else g_GameCommand.FREEPENALTY.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'PkPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'PkPoint', g_GameCommand.PKPOINT.sCmd)
  else g_GameCommand.PKPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'PkPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'PkPoint', g_GameCommand.PKPOINT.nPermissionMin)
  else g_GameCommand.PKPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'IncPkPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'IncPkPoint', g_GameCommand.IncPkPoint.sCmd)
  else g_GameCommand.IncPkPoint.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'IncPkPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'IncPkPoint', g_GameCommand.IncPkPoint.nPermissionMin)
  else g_GameCommand.IncPkPoint.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeLuck', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeLuck', g_GameCommand.CHANGELUCK.sCmd)
  else g_GameCommand.CHANGELUCK.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeLuck', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeLuck', g_GameCommand.CHANGELUCK.nPermissionMin)
  else g_GameCommand.CHANGELUCK.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Hunger', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Hunger', g_GameCommand.HUNGER.sCmd)
  else g_GameCommand.HUNGER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Hunger', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Hunger', g_GameCommand.HUNGER.nPermissionMin)
  else g_GameCommand.HUNGER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Hair', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Hair', g_GameCommand.HAIR.sCmd)
  else g_GameCommand.HAIR.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Hair', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Hair', g_GameCommand.HAIR.nPermissionMin)
  else g_GameCommand.HAIR.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Training', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Training', g_GameCommand.TRAINING.sCmd)
  else g_GameCommand.TRAINING.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Training', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Training', g_GameCommand.TRAINING.nPermissionMin)
  else g_GameCommand.TRAINING.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DeleteSkill', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DeleteSkill', g_GameCommand.DELETESKILL.sCmd)
  else g_GameCommand.DELETESKILL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DeleteSkill', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DeleteSkill', g_GameCommand.DELETESKILL.nPermissionMin)
  else g_GameCommand.DELETESKILL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeJob', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeJob', g_GameCommand.CHANGEJOB.sCmd)
  else g_GameCommand.CHANGEJOB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeJob', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeJob', g_GameCommand.CHANGEJOB.nPermissionMin)
  else g_GameCommand.CHANGEJOB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeGender', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeGender', g_GameCommand.CHANGEGENDER.sCmd)
  else g_GameCommand.CHANGEGENDER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeGender', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeGender', g_GameCommand.CHANGEGENDER.nPermissionMin)
  else g_GameCommand.CHANGEGENDER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'NameColor', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'NameColor', g_GameCommand.NAMECOLOR.sCmd)
  else g_GameCommand.NAMECOLOR.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'NameColor', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'NameColor', g_GameCommand.NAMECOLOR.nPermissionMin)
  else g_GameCommand.NAMECOLOR.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Mission', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Mission', g_GameCommand.Mission.sCmd)
  else g_GameCommand.Mission.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Mission', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Mission', g_GameCommand.Mission.nPermissionMin)
  else g_GameCommand.Mission.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MobPlace', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MobPlace', g_GameCommand.MobPlace.sCmd)
  else g_GameCommand.MobPlace.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MobPlace', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MobPlace', g_GameCommand.MobPlace.nPermissionMin)
  else g_GameCommand.MobPlace.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Transparecy', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Transparecy', g_GameCommand.TRANSPARECY.sCmd)
  else g_GameCommand.TRANSPARECY.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Transparecy', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Transparecy', g_GameCommand.TRANSPARECY.nPermissionMin)
  else g_GameCommand.TRANSPARECY.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DeleteItem', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DeleteItem', g_GameCommand.DELETEITEM.sCmd)
  else g_GameCommand.DELETEITEM.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DeleteItem', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DeleteItem', g_GameCommand.DELETEITEM.nPermissionMin)
  else g_GameCommand.DELETEITEM.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Level0', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Level0', g_GameCommand.LEVEL0.sCmd)
  else g_GameCommand.LEVEL0.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Level0', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Level0', g_GameCommand.LEVEL0.nPermissionMin)
  else g_GameCommand.LEVEL0.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ClearMission', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ClearMission', g_GameCommand.CLEARMISSION.sCmd)
  else g_GameCommand.CLEARMISSION.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ClearMission', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ClearMission', g_GameCommand.CLEARMISSION.nPermissionMin)
  else g_GameCommand.CLEARMISSION.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SetFlag', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SetFlag', g_GameCommand.SETFLAG.sCmd)
  else g_GameCommand.SETFLAG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SetFlag', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SetFlag', g_GameCommand.SETFLAG.nPermissionMin)
  else g_GameCommand.SETFLAG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SetOpen', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SetOpen', g_GameCommand.SETOPEN.sCmd)
  else g_GameCommand.SETOPEN.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SetOpen', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SetOpen', g_GameCommand.SETOPEN.nPermissionMin)
  else g_GameCommand.SETOPEN.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SetUnit', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SetUnit', g_GameCommand.SETUNIT.sCmd)
  else g_GameCommand.SETUNIT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SetUnit', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SetUnit', g_GameCommand.SETUNIT.nPermissionMin)
  else g_GameCommand.SETUNIT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReConnection', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReConnection', g_GameCommand.RECONNECTION.sCmd)
  else g_GameCommand.RECONNECTION.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReConnection', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReConnection', g_GameCommand.RECONNECTION.nPermissionMin)
  else g_GameCommand.RECONNECTION.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DisableFilter', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DisableFilter', g_GameCommand.DISABLEFILTER.sCmd)
  else g_GameCommand.DISABLEFILTER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DisableFilter', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DisableFilter', g_GameCommand.DISABLEFILTER.nPermissionMin)
  else g_GameCommand.DISABLEFILTER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeUserFull', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeUserFull', g_GameCommand.CHGUSERFULL.sCmd)
  else g_GameCommand.CHGUSERFULL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeUserFull', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeUserFull', g_GameCommand.CHGUSERFULL.nPermissionMin)
  else g_GameCommand.CHGUSERFULL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeZenFastStep', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeZenFastStep', g_GameCommand.CHGZENFASTSTEP.sCmd)
  else g_GameCommand.CHGZENFASTSTEP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeZenFastStep', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeZenFastStep', g_GameCommand.CHGZENFASTSTEP.nPermissionMin)
  else g_GameCommand.CHGZENFASTSTEP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ContestPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ContestPoint', g_GameCommand.CONTESTPOINT.sCmd)
  else g_GameCommand.CONTESTPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ContestPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ContestPoint', g_GameCommand.CONTESTPOINT.nPermissionMin)
  else g_GameCommand.CONTESTPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'StartContest', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StartContest', g_GameCommand.STARTCONTEST.sCmd)
  else g_GameCommand.STARTCONTEST.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'StartContest', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'StartContest', g_GameCommand.STARTCONTEST.nPermissionMin)
  else g_GameCommand.STARTCONTEST.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'EndContest', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'EndContest', g_GameCommand.ENDCONTEST.sCmd)
  else g_GameCommand.ENDCONTEST.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'EndContest', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'EndContest', g_GameCommand.ENDCONTEST.nPermissionMin)
  else g_GameCommand.ENDCONTEST.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Announcement', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Announcement', g_GameCommand.ANNOUNCEMENT.sCmd)
  else g_GameCommand.ANNOUNCEMENT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Announcement', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Announcement', g_GameCommand.ANNOUNCEMENT.nPermissionMin)
  else g_GameCommand.ANNOUNCEMENT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'OXQuizRoom', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'OXQuizRoom', g_GameCommand.OXQUIZROOM.sCmd)
  else g_GameCommand.OXQUIZROOM.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'OXQuizRoom', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'OXQuizRoom', g_GameCommand.OXQUIZROOM.nPermissionMin)
  else g_GameCommand.OXQUIZROOM.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Gsa', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Gsa', g_GameCommand.GSA.sCmd)
  else g_GameCommand.GSA.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Gsa', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Gsa', g_GameCommand.GSA.nPermissionMin)
  else g_GameCommand.GSA.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeItemName', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeItemName', g_GameCommand.CHANGEITEMNAME.sCmd)
  else g_GameCommand.CHANGEITEMNAME.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeItemName', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeItemName', g_GameCommand.CHANGEITEMNAME.nPermissionMin)
  else g_GameCommand.CHANGEITEMNAME.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DisableSendMsg', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DisableSendMsg', g_GameCommand.DISABLESENDMSG.sCmd)
  else g_GameCommand.DISABLESENDMSG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DisableSendMsg', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DisableSendMsg', g_GameCommand.DISABLESENDMSG.nPermissionMin)
  else g_GameCommand.DISABLESENDMSG.nPermissionMin := nLoadInteger;


  LoadString := CommandConf.ReadString('Command', 'EnableSendMsg', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'EnableSendMsg', g_GameCommand.ENABLESENDMSG.sCmd)
  else g_GameCommand.ENABLESENDMSG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'EnableSendMsg', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'EnableSendMsg', g_GameCommand.ENABLESENDMSG.nPermissionMin)
  else g_GameCommand.ENABLESENDMSG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DisableSendMsgList', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DisableSendMsgList', g_GameCommand.DISABLESENDMSGLIST.sCmd)
  else g_GameCommand.DISABLESENDMSGLIST.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DisableSendMsgList', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DisableSendMsgList', g_GameCommand.DISABLESENDMSGLIST.nPermissionMin)
  else g_GameCommand.DISABLESENDMSGLIST.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Kill', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Kill', g_GameCommand.KILL.sCmd)
  else g_GameCommand.KILL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Kill', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Kill', g_GameCommand.KILL.nPermissionMin)
  else g_GameCommand.KILL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Make', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Make', g_GameCommand.MAKE.sCmd)
  else g_GameCommand.MAKE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MakeMin', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MakeMin', g_GameCommand.MAKE.nPermissionMin)
  else g_GameCommand.MAKE.nPermissionMin := nLoadInteger;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'MakeMax', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MakeMax', g_GameCommand.MAKE.nPermissionMax)
  else g_GameCommand.MAKE.nPermissionMax := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SuperMake', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SuperMake', g_GameCommand.SMAKE.sCmd)
  else g_GameCommand.SMAKE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SuperMake', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SuperMake', g_GameCommand.SMAKE.nPermissionMin)
  else g_GameCommand.SMAKE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'BonusPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'BonusPoint', g_GameCommand.BonusPoint.sCmd)
  else g_GameCommand.BonusPoint.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'BonusPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'BonusPoint', g_GameCommand.BonusPoint.nPermissionMin)
  else g_GameCommand.BonusPoint.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelBonuPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelBonuPoint', g_GameCommand.DELBONUSPOINT.sCmd)
  else g_GameCommand.DELBONUSPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelBonuPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelBonuPoint', g_GameCommand.DELBONUSPOINT.nPermissionMin)
  else g_GameCommand.DELBONUSPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RestBonuPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RestBonuPoint', g_GameCommand.RESTBONUSPOINT.sCmd)
  else g_GameCommand.RESTBONUSPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RestBonuPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RestBonuPoint', g_GameCommand.RESTBONUSPOINT.nPermissionMin)
  else g_GameCommand.RESTBONUSPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'FireBurn', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'FireBurn', g_GameCommand.FIREBURN.sCmd)
  else g_GameCommand.FIREBURN.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'FireBurn', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'FireBurn', g_GameCommand.FIREBURN.nPermissionMin)
  else g_GameCommand.FIREBURN.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'TestStatus', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'TestStatus', g_GameCommand.TESTSTATUS.sCmd)
  else g_GameCommand.TESTSTATUS.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'TestStatus', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'TestStatus', g_GameCommand.TESTSTATUS.nPermissionMin)
  else g_GameCommand.TESTSTATUS.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelGold', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelGold', g_GameCommand.DELGOLD.sCmd)
  else g_GameCommand.DELGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelGold', g_GameCommand.DELGOLD.nPermissionMin)
  else g_GameCommand.DELGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AddGold', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AddGold', g_GameCommand.ADDGOLD.sCmd)
  else g_GameCommand.ADDGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AddGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AddGold', g_GameCommand.ADDGOLD.nPermissionMin)
  else g_GameCommand.ADDGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelGameGold', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelGameGold', g_GameCommand.DELGAMEGOLD.sCmd)
  else g_GameCommand.DELGAMEGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelGameGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelGameGold', g_GameCommand.DELGAMEGOLD.nPermissionMin)
  else g_GameCommand.DELGAMEGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AddGamePoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AddGamePoint', g_GameCommand.ADDGAMEGOLD.sCmd)
  else g_GameCommand.ADDGAMEGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AddGameGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AddGameGold', g_GameCommand.ADDGAMEGOLD.nPermissionMin)
  else g_GameCommand.ADDGAMEGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'GameGold', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GameGold', g_GameCommand.GAMEGOLD.sCmd)
  else g_GameCommand.GAMEGOLD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'GameGold', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'GameGold', g_GameCommand.GAMEGOLD.nPermissionMin)
  else g_GameCommand.GAMEGOLD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'GamePoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GamePoint', g_GameCommand.GAMEPOINT.sCmd)
  else g_GameCommand.GAMEPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'GamePoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'GamePoint', g_GameCommand.GAMEPOINT.nPermissionMin)
  else g_GameCommand.GAMEPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'CreditPoint', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'CreditPoint', g_GameCommand.CREDITPOINT.sCmd)
  else g_GameCommand.CREDITPOINT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'CreditPoint', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'CreditPoint', g_GameCommand.CREDITPOINT.nPermissionMin)
  else g_GameCommand.CREDITPOINT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'TestGoldChange', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'TestGoldChange', g_GameCommand.TESTGOLDCHANGE.sCmd)
  else g_GameCommand.TESTGOLDCHANGE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'TestGoldChange', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'TestGoldChange', g_GameCommand.TESTGOLDCHANGE.nPermissionMin)
  else g_GameCommand.TESTGOLDCHANGE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RefineWeapon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RefineWeapon', g_GameCommand.REFINEWEAPON.sCmd)
  else g_GameCommand.REFINEWEAPON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RefineWeapon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RefineWeapon', g_GameCommand.REFINEWEAPON.nPermissionMin)
  else g_GameCommand.REFINEWEAPON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadAdmin', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadAdmin', g_GameCommand.RELOADADMIN.sCmd)
  else g_GameCommand.RELOADADMIN.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadAdmin', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadAdmin', g_GameCommand.RELOADADMIN.nPermissionMin)
  else g_GameCommand.RELOADADMIN.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadNpc', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadNpc', g_GameCommand.ReLoadNpc.sCmd)
  else g_GameCommand.ReLoadNpc.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadNpc', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadNpc', g_GameCommand.ReLoadNpc.nPermissionMin)
  else g_GameCommand.ReLoadNpc.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadManage', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadManage', g_GameCommand.RELOADMANAGE.sCmd)
  else g_GameCommand.RELOADMANAGE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadManage', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadManage', g_GameCommand.RELOADMANAGE.nPermissionMin)
  else g_GameCommand.RELOADMANAGE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadRobotManage', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadRobotManage', g_GameCommand.RELOADROBOTMANAGE.sCmd)
  else g_GameCommand.RELOADROBOTMANAGE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadRobotManage', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadRobotManage', g_GameCommand.RELOADROBOTMANAGE.nPermissionMin)
  else g_GameCommand.RELOADROBOTMANAGE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadRobot', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadRobot', g_GameCommand.RELOADROBOT.sCmd)
  else g_GameCommand.RELOADROBOT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadRobot', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadRobot', g_GameCommand.RELOADROBOT.nPermissionMin)
  else g_GameCommand.RELOADROBOT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadMonitems', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadMonitems', g_GameCommand.RELOADMONITEMS.sCmd)
  else g_GameCommand.RELOADMONITEMS.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadMonitems', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadMonitems', g_GameCommand.RELOADMONITEMS.nPermissionMin)
  else g_GameCommand.RELOADMONITEMS.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadDiary', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadDiary', g_GameCommand.RELOADDIARY.sCmd)
  else g_GameCommand.RELOADDIARY.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadDiary', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadDiary', g_GameCommand.RELOADDIARY.nPermissionMin)
  else g_GameCommand.RELOADDIARY.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadItemDB', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadItemDB', g_GameCommand.RELOADITEMDB.sCmd)
  else g_GameCommand.RELOADITEMDB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadItemDB', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadItemDB', g_GameCommand.RELOADITEMDB.nPermissionMin)
  else g_GameCommand.RELOADITEMDB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadMagicDB', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadMagicDB', g_GameCommand.RELOADMAGICDB.sCmd)
  else g_GameCommand.RELOADMAGICDB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadMagicDB', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadMagicDB', g_GameCommand.RELOADMAGICDB.nPermissionMin)
  else g_GameCommand.RELOADMAGICDB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadMonsterDB', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadMonsterDB', g_GameCommand.RELOADMONSTERDB.sCmd)
  else g_GameCommand.RELOADMONSTERDB.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadMonsterDB', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadMonsterDB', g_GameCommand.RELOADMONSTERDB.nPermissionMin)
  else g_GameCommand.RELOADMONSTERDB.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReAlive', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReAlive', g_GameCommand.ReAlive.sCmd)
  else g_GameCommand.ReAlive.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReAlive', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReAlive', g_GameCommand.ReAlive.nPermissionMin)
  else g_GameCommand.ReAlive.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AdjuestTLevel', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AdjuestTLevel', g_GameCommand.ADJUESTLEVEL.sCmd)
  else g_GameCommand.ADJUESTLEVEL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AdjuestTLevel', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AdjuestTLevel', g_GameCommand.ADJUESTLEVEL.nPermissionMin)
  else g_GameCommand.ADJUESTLEVEL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AdjuestExp', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AdjuestExp', g_GameCommand.ADJUESTEXP.sCmd)
  else g_GameCommand.ADJUESTEXP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AdjuestExp', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AdjuestExp', g_GameCommand.ADJUESTEXP.nPermissionMin)
  else g_GameCommand.ADJUESTEXP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AddGuild', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AddGuild', g_GameCommand.AddGuild.sCmd)
  else g_GameCommand.AddGuild.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AddGuild', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AddGuild', g_GameCommand.AddGuild.nPermissionMin)
  else g_GameCommand.AddGuild.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelGuild', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelGuild', g_GameCommand.DELGUILD.sCmd)
  else g_GameCommand.DELGUILD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelGuild', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelGuild', g_GameCommand.DELGUILD.nPermissionMin)
  else g_GameCommand.DELGUILD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeSabukLord', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeSabukLord', g_GameCommand.CHANGESABUKLORD.sCmd)
  else g_GameCommand.CHANGESABUKLORD.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeSabukLord', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeSabukLord', g_GameCommand.CHANGESABUKLORD.nPermissionMin)
  else g_GameCommand.CHANGESABUKLORD.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ForcedWallConQuestWar', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ForcedWallConQuestWar', g_GameCommand.FORCEDWALLCONQUESTWAR.sCmd)
  else g_GameCommand.FORCEDWALLCONQUESTWAR.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ForcedWallConQuestWar', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ForcedWallConQuestWar', g_GameCommand.FORCEDWALLCONQUESTWAR.nPermissionMin)
  else g_GameCommand.FORCEDWALLCONQUESTWAR.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AddToItemEvent', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AddToItemEvent', g_GameCommand.ADDTOITEMEVENT.sCmd)
  else g_GameCommand.ADDTOITEMEVENT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AddToItemEvent', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AddToItemEvent', g_GameCommand.ADDTOITEMEVENT.nPermissionMin)
  else g_GameCommand.ADDTOITEMEVENT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AddToItemEventAspieces', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AddToItemEventAspieces', g_GameCommand.ADDTOITEMEVENTASPIECES.sCmd)
  else g_GameCommand.ADDTOITEMEVENTASPIECES.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AddToItemEventAspieces', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AddToItemEventAspieces', g_GameCommand.ADDTOITEMEVENTASPIECES.nPermissionMin)
  else g_GameCommand.ADDTOITEMEVENTASPIECES.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ItemEventList', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ItemEventList', g_GameCommand.ItemEventList.sCmd)
  else g_GameCommand.ItemEventList.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ItemEventList', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ItemEventList', g_GameCommand.ItemEventList.nPermissionMin)
  else g_GameCommand.ItemEventList.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'StartIngGiftNO', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StartIngGiftNO', g_GameCommand.STARTINGGIFTNO.sCmd)
  else g_GameCommand.STARTINGGIFTNO.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'StartIngGiftNO', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'StartIngGiftNO', g_GameCommand.STARTINGGIFTNO.nPermissionMin)
  else g_GameCommand.STARTINGGIFTNO.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DeleteAllItemEvent', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DeleteAllItemEvent', g_GameCommand.DELETEALLITEMEVENT.sCmd)
  else g_GameCommand.DELETEALLITEMEVENT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DeleteAllItemEvent', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DeleteAllItemEvent', g_GameCommand.DELETEALLITEMEVENT.nPermissionMin)
  else g_GameCommand.DELETEALLITEMEVENT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'StartItemEvent', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StartItemEvent', g_GameCommand.STARTITEMEVENT.sCmd)
  else g_GameCommand.STARTITEMEVENT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'StartItemEvent', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'StartItemEvent', g_GameCommand.STARTITEMEVENT.nPermissionMin)
  else g_GameCommand.STARTITEMEVENT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ItemEventTerm', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ItemEventTerm', g_GameCommand.ITEMEVENTTERM.sCmd)
  else g_GameCommand.ITEMEVENTTERM.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ItemEventTerm', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ItemEventTerm', g_GameCommand.ITEMEVENTTERM.nPermissionMin)
  else g_GameCommand.ITEMEVENTTERM.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AdjuestTestLevel', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AdjuestTestLevel', g_GameCommand.ADJUESTTESTLEVEL.sCmd)
  else g_GameCommand.ADJUESTTESTLEVEL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AdjuestTestLevel', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AdjuestTestLevel', g_GameCommand.ADJUESTTESTLEVEL.nPermissionMin)
  else g_GameCommand.ADJUESTTESTLEVEL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'OpTraining', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'OpTraining', g_GameCommand.TRAININGSKILL.sCmd)
  else g_GameCommand.TRAININGSKILL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'OpTraining', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'OpTraining', g_GameCommand.TRAININGSKILL.nPermissionMin)
  else g_GameCommand.TRAININGSKILL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'OpDeleteSkill', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'OpDeleteSkill', g_GameCommand.OPDELETESKILL.sCmd)
  else g_GameCommand.OPDELETESKILL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'OpDeleteSkill', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'OpDeleteSkill', g_GameCommand.OPDELETESKILL.nPermissionMin)
  else g_GameCommand.OPDELETESKILL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeWeaponDura', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeWeaponDura', g_GameCommand.CHANGEWEAPONDURA.sCmd)
  else g_GameCommand.CHANGEWEAPONDURA.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeWeaponDura', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeWeaponDura', g_GameCommand.CHANGEWEAPONDURA.nPermissionMin)
  else g_GameCommand.CHANGEWEAPONDURA.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReloadGuildAll', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReloadGuildAll', g_GameCommand.RELOADGUILDALL.sCmd)
  else g_GameCommand.RELOADGUILDALL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReloadGuildAll', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReloadGuildAll', g_GameCommand.RELOADGUILDALL.nPermissionMin)
  else g_GameCommand.RELOADGUILDALL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Who', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Who', g_GameCommand.WHO.sCmd)
  else g_GameCommand.WHO.sCmd := LoadString;

  nLoadInteger := CommandConf.ReadInteger('Permission', 'Who', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Who', g_GameCommand.WHO.nPermissionMin)
  else g_GameCommand.WHO.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'Total', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'Total', g_GameCommand.TOTAL.sCmd)
  else g_GameCommand.TOTAL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'Total', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'Total', g_GameCommand.TOTAL.nPermissionMin)
  else g_GameCommand.TOTAL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'TestGa', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'TestGa', g_GameCommand.TESTGA.sCmd)
  else g_GameCommand.TESTGA.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'TestGa', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'TestGa', g_GameCommand.TESTGA.nPermissionMin)
  else g_GameCommand.TESTGA.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'MapInfo', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'MapInfo', g_GameCommand.MAPINFO.sCmd)
  else g_GameCommand.MAPINFO.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'MapInfo', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'MapInfo', g_GameCommand.MAPINFO.nPermissionMin)
  else g_GameCommand.MAPINFO.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SbkDoor', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SbkDoor', g_GameCommand.SBKDOOR.sCmd)
  else g_GameCommand.SBKDOOR.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SbkDoor', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SbkDoor', g_GameCommand.SBKDOOR.nPermissionMin)
  else g_GameCommand.SBKDOOR.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeDearName', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeDearName', g_GameCommand.CHANGEDEARNAME.sCmd)
  else g_GameCommand.CHANGEDEARNAME.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeDearName', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeDearName', g_GameCommand.CHANGEDEARNAME.nPermissionMin)
  else g_GameCommand.CHANGEDEARNAME.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ChangeMasterName', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ChangeMasterrName', g_GameCommand.CHANGEMASTERNAME.sCmd)
  else g_GameCommand.CHANGEMASTERNAME.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ChangeMasterName', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ChangeMasterName', g_GameCommand.CHANGEMASTERNAME.nPermissionMin)
  else g_GameCommand.CHANGEMASTERNAME.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'StartQuest', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'StartQuest', g_GameCommand.STARTQUEST.sCmd)
  else g_GameCommand.STARTQUEST.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'StartQuest', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'StartQuest', g_GameCommand.STARTQUEST.nPermissionMin)
  else g_GameCommand.STARTQUEST.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SetPermission', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SetPermission', g_GameCommand.SETPERMISSION.sCmd)
  else g_GameCommand.SETPERMISSION.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SetPermission', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SetPermission', g_GameCommand.SETPERMISSION.nPermissionMin)
  else g_GameCommand.SETPERMISSION.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ClearMon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ClearMon', g_GameCommand.CLEARMON.sCmd)
  else g_GameCommand.CLEARMON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ClearMon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ClearMon', g_GameCommand.CLEARMON.nPermissionMin)
  else g_GameCommand.CLEARMON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ReNewLevel', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ReNewLevel', g_GameCommand.RENEWLEVEL.sCmd)
  else g_GameCommand.RENEWLEVEL.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ReNewLevel', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ReNewLevel', g_GameCommand.RENEWLEVEL.nPermissionMin)
  else g_GameCommand.RENEWLEVEL.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DenyIPaddrLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DenyIPaddrLogon', g_GameCommand.DENYIPLOGON.sCmd)
  else g_GameCommand.DENYIPLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DenyIPaddrLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DenyIPaddrLogon', g_GameCommand.DENYIPLOGON.nPermissionMin)
  else g_GameCommand.DENYIPLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DenyAccountLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DenyAccountLogon', g_GameCommand.DENYACCOUNTLOGON.sCmd)
  else g_GameCommand.DENYACCOUNTLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DenyAccountLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DenyAccountLogon', g_GameCommand.DENYACCOUNTLOGON.nPermissionMin)
  else g_GameCommand.DENYACCOUNTLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DenyCharNameLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DenyCharNameLogon', g_GameCommand.DENYCHARNAMELOGON.sCmd)
  else g_GameCommand.DENYCHARNAMELOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DenyCharNameLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DenyCharNameLogon', g_GameCommand.DENYCHARNAMELOGON.nPermissionMin)
  else g_GameCommand.DENYCHARNAMELOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelDenyIPLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelDenyIPLogon', g_GameCommand.DELDENYIPLOGON.sCmd)
  else g_GameCommand.DELDENYIPLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelDenyIPLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelDenyIPLogon', g_GameCommand.DELDENYIPLOGON.nPermissionMin)
  else g_GameCommand.DELDENYIPLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelDenyAccountLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelDenyAccountLogon', g_GameCommand.DELDENYACCOUNTLOGON.sCmd)
  else g_GameCommand.DELDENYACCOUNTLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelDenyAccountLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelDenyAccountLogon', g_GameCommand.DELDENYACCOUNTLOGON.nPermissionMin)
  else g_GameCommand.DELDENYACCOUNTLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'DelDenyCharNameLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'DelDenyCharNameLogon', g_GameCommand.DELDENYCHARNAMELOGON.sCmd)
  else g_GameCommand.DELDENYCHARNAMELOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'DelDenyCharNameLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'DelDenyCharNameLogon', g_GameCommand.DELDENYCHARNAMELOGON.nPermissionMin)
  else g_GameCommand.DELDENYCHARNAMELOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShowDenyIPLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShowDenyIPLogon', g_GameCommand.SHOWDENYIPLOGON.sCmd)
  else g_GameCommand.SHOWDENYIPLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShowDenyIPLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShowDenyIPLogon', g_GameCommand.SHOWDENYIPLOGON.nPermissionMin)
  else g_GameCommand.SHOWDENYIPLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShowDenyAccountLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShowDenyAccountLogon', g_GameCommand.SHOWDENYACCOUNTLOGON.sCmd)
  else g_GameCommand.SHOWDENYACCOUNTLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShowDenyAccountLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShowDenyAccountLogon', g_GameCommand.SHOWDENYACCOUNTLOGON.nPermissionMin)
  else g_GameCommand.SHOWDENYACCOUNTLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShowDenyCharNameLogon', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShowDenyCharNameLogon', g_GameCommand.SHOWDENYCHARNAMELOGON.sCmd)
  else g_GameCommand.SHOWDENYCHARNAMELOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShowDenyCharNameLogon', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShowDenyCharNameLogon', g_GameCommand.SHOWDENYCHARNAMELOGON.nPermissionMin)
  else g_GameCommand.SHOWDENYCHARNAMELOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ViewWhisper', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ViewWhisper', g_GameCommand.VIEWWHISPER.sCmd)
  else g_GameCommand.VIEWWHISPER.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ViewWhisper', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ViewWhisper', g_GameCommand.VIEWWHISPER.nPermissionMin)
  else g_GameCommand.VIEWWHISPER.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SpiritStart', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SpiritStart', g_GameCommand.SPIRIT.sCmd)
  else g_GameCommand.SPIRIT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SpiritStart', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SpiritStart', g_GameCommand.SPIRIT.nPermissionMin)
  else g_GameCommand.SPIRIT.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SpiritStop', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SpiritStop', g_GameCommand.SPIRITSTOP.sCmd)
  else g_GameCommand.SPIRITSTOP.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SpiritStop', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SpiritStop', g_GameCommand.SPIRITSTOP.nPermissionMin)
  else g_GameCommand.SPIRITSTOP.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SetMapMode', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SetMapMode', g_GameCommand.SetMapMode.sCmd)
  else g_GameCommand.SetMapMode.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SetMapMode', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SetMapMode', g_GameCommand.SetMapMode.nPermissionMin)
  else g_GameCommand.SetMapMode.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ShoweMapMode', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ShoweMapMode', g_GameCommand.SHOWMAPMODE.sCmd)
  else g_GameCommand.SHOWMAPMODE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ShoweMapMode', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ShoweMapMode', g_GameCommand.SHOWMAPMODE.nPermissionMin)
  else g_GameCommand.SHOWMAPMODE.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'ClearBag', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ClearBag', g_GameCommand.CLEARBAG.sCmd)
  else g_GameCommand.CLEARBAG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ClearBag', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ClearBag', g_GameCommand.CLEARBAG.nPermissionMin)
  else g_GameCommand.CLEARBAG.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RemoteMsg', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RemoteMsg', g_GameCommand.REMTEMSG.sCmd)
  else g_GameCommand.REMTEMSG.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RemoteMsg', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RemoteMsg', g_GameCommand.REMTEMSG.nPermissionMin)
  else g_GameCommand.REMTEMSG.nPermissionMin := nLoadInteger;


  LoadString := CommandConf.ReadString('Command', 'ColorSay', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'ColorSay', g_GameCommand.COLORSAY.sCmd)
  else g_GameCommand.COLORSAY.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'ColorSay', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'ColorSay', g_GameCommand.COLORSAY.nPermissionMin)
  else g_GameCommand.COLORSAY.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SETCOLORSAY', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SETCOLORSAY', g_GameCommand.SETCOLORSAY.sCmd)
  else g_GameCommand.SETCOLORSAY.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SETCOLORSAY', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SETCOLORSAY', g_GameCommand.SETCOLORSAY.nPermissionMin)
  else g_GameCommand.SETCOLORSAY.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'AllowRebirth', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'AllowReAlive', g_GameCommand.AllowReAlive.sCmd)
  else g_GameCommand.AllowReAlive.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'AllowReAlive', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'AllowReAlive', g_GameCommand.AllowReAlive.nPermissionMin)
  else g_GameCommand.AllowReAlive.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'USERITEM', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'USERITEM', g_GameCommand.UserItem.sCmd)
  else g_GameCommand.UserItem.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'USERITEM', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'USERITEM', g_GameCommand.UserItem.nPermissionMin)
  else g_GameCommand.UserItem.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'SIGNMOVE', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SIGNMOVE', g_GameCommand.SIGNMOVE.sCmd)
  else g_GameCommand.SIGNMOVE.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SIGNMOVE', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SIGNMOVE', g_GameCommand.SIGNMOVE.nPermissionMin)
  else g_GameCommand.SIGNMOVE.nPermissionMin := nLoadInteger;


  LoadString := CommandConf.ReadString('Command', 'SHOWEFFECT', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SHOWEFFECT', g_GameCommand.SHOWEFFECT.sCmd)
  else g_GameCommand.SHOWEFFECT.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SHOWEFFECT', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SHOWEFFECT', g_GameCommand.SHOWEFFECT.nPermissionMin)
  else g_GameCommand.SHOWEFFECT.nPermissionMin := nLoadInteger;


  LoadString := CommandConf.ReadString('Command', 'LockLogin', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'LockLogin', g_GameCommand.LOCKLOGON.sCmd)
  else g_GameCommand.LOCKLOGON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'LockLogin', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'LockLogin', g_GameCommand.LOCKLOGON.nPermissionMin)
  else g_GameCommand.LOCKLOGON.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'GMRedMsgCmd', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'GMRedMsgCmd', g_GMRedMsgCmd)
  else g_GMRedMsgCmd := LoadString[1];
  nLoadInteger := CommandConf.ReadInteger('Permission', 'GMRedMsgCmd', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'GMRedMsgCmd', g_nGMREDMSGCMD)
  else g_nGMREDMSGCMD := nLoadInteger;



  LoadString := CommandConf.ReadString('Command', 'SEARCHMON', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'SEARCHMON', g_GameCommand.SEARCHMON.sCmd)
  else g_GameCommand.SEARCHMON.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'SEARCHMON', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'SEARCHMON', g_GameCommand.SEARCHMON.nPermissionMin)
  else g_GameCommand.SEARCHMON.nPermissionMin := nLoadInteger;



  LoadString := CommandConf.ReadString('Command', 'CLEARCOPYITEM', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'CLEARCOPYITEM', g_GameCommand.CLEARCOPYITEM.sCmd)
  else g_GameCommand.CLEARCOPYITEM.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'CLEARCOPYITEM', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'CLEARCOPYITEM', g_GameCommand.CLEARCOPYITEM.nPermissionMin)
  else g_GameCommand.CLEARCOPYITEM.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RANGECLEARCOPYITEM', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RANGECLEARCOPYITEM', g_GameCommand.RANGECLEARCOPYITEM.sCmd)
  else g_GameCommand.RANGECLEARCOPYITEM.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RANGECLEARCOPYITEM', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RANGECLEARCOPYITEM', g_GameCommand.RANGECLEARCOPYITEM.nPermissionMin)
  else g_GameCommand.RANGECLEARCOPYITEM.nPermissionMin := nLoadInteger;

  LoadString := CommandConf.ReadString('Command', 'RestHero', '');
  if LoadString = '' then
    CommandConf.WriteString('Command', 'RestHero', g_GameCommand.RestHero.sCmd)
  else g_GameCommand.RestHero.sCmd := LoadString;
  nLoadInteger := CommandConf.ReadInteger('Permission', 'RestHero', -1);
  if nLoadInteger < 0 then
    CommandConf.WriteInteger('Permission', 'RestHero', g_GameCommand.RestHero.nPermissionMin)
  else g_GameCommand.RestHero.nPermissionMin := nLoadInteger;
end;

procedure LoadString();
  function LoadConfigString(sSection, sIdent, sDefault: string): string;
  var
    sString: string;
  begin
    sString := StringConf.ReadString(sSection, sIdent, '');
    if sString = '' then begin
      StringConf.WriteString(sSection, sIdent, sDefault);
      Result := sDefault;
    end else begin
      Result := sString;
    end;
  end;
var
  LoadString: string;
begin
  LoadString := StringConf.ReadString('String', 'ClientSoftVersionError', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ClientSoftVersionError', sClientSoftVersionError)
  else sClientSoftVersionError := LoadString;

  LoadString := StringConf.ReadString('String', 'DownLoadNewClientSoft', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DownLoadNewClientSoft', sDownLoadNewClientSoft)
  else sDownLoadNewClientSoft := LoadString;

  LoadString := StringConf.ReadString('String', 'ForceDisConnect', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ForceDisConnect', sForceDisConnect)
  else sForceDisConnect := LoadString;

  LoadString := StringConf.ReadString('String', 'ClientSoftVersionTooOld', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ClientSoftVersionTooOld', sClientSoftVersionTooOld)
  else sClientSoftVersionTooOld := LoadString;

  LoadString := StringConf.ReadString('String', 'DownLoadAndUseNewClient', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DownLoadAndUseNewClient', sDownLoadAndUseNewClient)
  else sDownLoadAndUseNewClient := LoadString;

  LoadString := StringConf.ReadString('String', 'OnlineUserFull', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'OnlineUserFull', sOnlineUserFull)
  else sOnlineUserFull := LoadString;

  LoadString := StringConf.ReadString('String', 'YouNowIsTryPlayMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouNowIsTryPlayMode', sYouNowIsTryPlayMode)
  else sYouNowIsTryPlayMode := LoadString;

  LoadString := StringConf.ReadString('String', 'NowIsFreePlayMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NowIsFreePlayMode', g_sNowIsFreePlayMode)
  else g_sNowIsFreePlayMode := LoadString;

  LoadString := StringConf.ReadString('String', 'AttackModeOfAll', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AttackModeOfAll', sAttackModeOfAll)
  else sAttackModeOfAll := LoadString;

  LoadString := StringConf.ReadString('String', 'AttackModeOfPeaceful', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AttackModeOfPeaceful', sAttackModeOfPeaceful)
  else sAttackModeOfPeaceful := LoadString;

  LoadString := StringConf.ReadString('String', 'AttackModeOfGroup', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AttackModeOfGroup', sAttackModeOfGroup)
  else sAttackModeOfGroup := LoadString;

  LoadString := StringConf.ReadString('String', 'AttackModeOfGuild', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AttackModeOfGuild', sAttackModeOfGuild)
  else sAttackModeOfGuild := LoadString;

  LoadString := StringConf.ReadString('String', 'AttackModeOfRedWhite', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AttackModeOfRedWhite', sAttackModeOfRedWhite)
  else sAttackModeOfRedWhite := LoadString;

  LoadString := StringConf.ReadString('String', 'StartChangeAttackModeHelp', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartChangeAttackModeHelp', sStartChangeAttackModeHelp)
  else sStartChangeAttackModeHelp := LoadString;

  LoadString := StringConf.ReadString('String', 'StartNoticeMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartNoticeMsg', sStartNoticeMsg)
  else sStartNoticeMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ThrustingOn', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ThrustingOn', sThrustingOn)
  else sThrustingOn := LoadString;

  LoadString := StringConf.ReadString('String', 'ThrustingOff', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ThrustingOff', sThrustingOff)
  else sThrustingOff := LoadString;

  LoadString := StringConf.ReadString('String', 'HalfMoonOn', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'HalfMoonOn', sHalfMoonOn)
  else sHalfMoonOn := LoadString;

  LoadString := StringConf.ReadString('String', 'HalfMoonOff', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'HalfMoonOff', sHalfMoonOff)
  else sHalfMoonOff := LoadString;

  sCrsHitOn := LoadConfigString('String', 'CrsHitOn', sCrsHitOn);
  sCrsHitOff := LoadConfigString('String', 'CrsHitOff', sCrsHitOff);

  LoadString := StringConf.ReadString('String', 'FireSpiritsSummoned', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'FireSpiritsSummoned', sFireSpiritsSummoned)
  else sFireSpiritsSummoned := LoadString;

  LoadString := StringConf.ReadString('String', 'FireSpiritsFail', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'FireSpiritsFail', sFireSpiritsFail)
  else sFireSpiritsFail := LoadString;

  LoadString := StringConf.ReadString('String', 'SpiritsGone', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SpiritsGone', sSpiritsGone)
  else sSpiritsGone := LoadString;



  LoadString := StringConf.ReadString('String', 'CidSpiritsSummoned', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CidSpiritsSummoned', sCidSpiritsSummoned)
  else sCidSpiritsSummoned := LoadString;


  LoadString := StringConf.ReadString('String', 'CidSpiritsFail', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CidSpiritsFail', sCidSpiritsFail)
  else sCidSpiritsFail := LoadString;

  LoadString := StringConf.ReadString('String', 'KTZSpiritsSummoned', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'KTZSpiritsSummoned', sKTZSpiritsSummoned)
  else sKTZSpiritsSummoned := LoadString;

  LoadString := StringConf.ReadString('String', 'KTZSpiritsFail', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'KTZSpiritsFail', sKTZSpiritsFail)
  else sKTZSpiritsFail := LoadString;

  LoadString := StringConf.ReadString('String', 'CIDSpiritsGone', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CIDSpiritsGone', sCIDSpiritsGone)
  else sCIDSpiritsGone := LoadString;

  LoadString := StringConf.ReadString('String', 'KTZSpiritsGone', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'KTZSpiritsGone', sKTZSpiritsGone)
  else sKTZSpiritsGone := LoadString;

  LoadString := StringConf.ReadString('String', 'MateDoTooweak', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MateDoTooweak', sMateDoTooweak)
  else sMateDoTooweak := LoadString;

  LoadString := StringConf.ReadString('String', 'TheWeaponBroke', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TheWeaponBroke', g_sTheWeaponBroke)
  else g_sTheWeaponBroke := LoadString;

  LoadString := StringConf.ReadString('String', 'TheWeaponRefineSuccessfull', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TheWeaponRefineSuccessfull', sTheWeaponRefineSuccessfull)
  else sTheWeaponRefineSuccessfull := LoadString;

  LoadString := StringConf.ReadString('String', 'YouPoisoned', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouPoisoned', sYouPoisoned)
  else sYouPoisoned := LoadString;

  LoadString := StringConf.ReadString('String', 'PetRest', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PetRest', sPetRest)
  else sPetRest := LoadString;

  LoadString := StringConf.ReadString('String', 'PetAttack', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PetAttack', sPetAttack)
  else sPetAttack := LoadString;

  LoadString := StringConf.ReadString('String', 'WearNotOfWoMan', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WearNotOfWoMan', sWearNotOfWoMan)
  else sWearNotOfWoMan := LoadString;

  LoadString := StringConf.ReadString('String', 'WearNotOfMan', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WearNotOfMan', sWearNotOfMan)
  else sWearNotOfMan := LoadString;

  LoadString := StringConf.ReadString('String', 'HandWeightNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'HandWeightNot', sHandWeightNot)
  else sHandWeightNot := LoadString;

  LoadString := StringConf.ReadString('String', 'WearWeightNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WearWeightNot', sWearWeightNot)
  else sWearWeightNot := LoadString;

  LoadString := StringConf.ReadString('String', 'ItemIsNotThisAccount', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ItemIsNotThisAccount', g_sItemIsNotThisAccount)
  else g_sItemIsNotThisAccount := LoadString;

  LoadString := StringConf.ReadString('String', 'ItemIsNotThisIPaddr', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ItemIsNotThisIPaddr', g_sItemIsNotThisIPaddr)
  else g_sItemIsNotThisIPaddr := LoadString;

  LoadString := StringConf.ReadString('String', 'ItemIsNotThisCharName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ItemIsNotThisCharName', g_sItemIsNotThisCharName)
  else g_sItemIsNotThisCharName := LoadString;

  LoadString := StringConf.ReadString('String', 'LevelNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'LevelNot', g_sLevelNot)
  else g_sLevelNot := LoadString;

  LoadString := StringConf.ReadString('String', 'JobOrLevelNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'JobOrLevelNot', g_sJobOrLevelNot)
  else g_sJobOrLevelNot := LoadString;

  LoadString := StringConf.ReadString('String', 'JobOrDCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'JobOrDCNot', g_sJobOrDCNot)
  else g_sJobOrDCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'JobOrMCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'JobOrMCNot', g_sJobOrMCNot)
  else g_sJobOrMCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'JobOrSCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'JobOrSCNot', g_sJobOrSCNot)
  else g_sJobOrSCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'DCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DCNot', g_sDCNot)
  else g_sDCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'MCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MCNot', g_sMCNot)
  else g_sMCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'SCNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SCNot', g_sSCNot)
  else g_sSCNot := LoadString;

  LoadString := StringConf.ReadString('String', 'CreditPointNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CreditPointNot', g_sCreditPointNot)
  else g_sCreditPointNot := LoadString;

  LoadString := StringConf.ReadString('String', 'ReNewLevelNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReNewLevelNot', g_sReNewLevelNot)
  else g_sReNewLevelNot := LoadString;

  LoadString := StringConf.ReadString('String', 'GuildNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GuildNot', g_sGuildNot)
  else g_sGuildNot := LoadString;

  LoadString := StringConf.ReadString('String', 'GuildMasterNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GuildMasterNot', g_sGuildMasterNot)
  else g_sGuildMasterNot := LoadString;

  LoadString := StringConf.ReadString('String', 'SabukHumanNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SabukHumanNot', g_sSabukHumanNot)
  else g_sSabukHumanNot := LoadString;

  LoadString := StringConf.ReadString('String', 'SabukMasterManNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SabukMasterManNot', g_sSabukMasterManNot)
  else g_sSabukMasterManNot := LoadString;

  LoadString := StringConf.ReadString('String', 'MemberNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MemberNot', g_sMemberNot)
  else g_sMemberNot := LoadString;

  LoadString := StringConf.ReadString('String', 'MemberTypeNot', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MemberTypeNot', g_sMemberTypeNot)
  else g_sMemberTypeNot := LoadString;

  LoadString := StringConf.ReadString('String', 'CanottWearIt', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanottWearIt', g_sCanottWearIt)
  else g_sCanottWearIt := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotUseDrugOnThisMap', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotUseDrugOnThisMap', sCanotUseDrugOnThisMap)
  else sCanotUseDrugOnThisMap := LoadString;

  LoadString := StringConf.ReadString('String', 'GameMasterMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GameMasterMode', sGameMasterMode)
  else sGameMasterMode := LoadString;

  LoadString := StringConf.ReadString('String', 'ReleaseGameMasterMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReleaseGameMasterMode', sReleaseGameMasterMode)
  else sReleaseGameMasterMode := LoadString;

  LoadString := StringConf.ReadString('String', 'ObserverMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ObserverMode', sObserverMode)
  else sObserverMode := LoadString;

  LoadString := StringConf.ReadString('String', 'ReleaseObserverMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReleaseObserverMode', g_sReleaseObserverMode)
  else g_sReleaseObserverMode := LoadString;

  LoadString := StringConf.ReadString('String', 'SupermanMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SupermanMode', sSupermanMode)
  else sSupermanMode := LoadString;

  LoadString := StringConf.ReadString('String', 'ReleaseSupermanMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReleaseSupermanMode', sReleaseSupermanMode)
  else sReleaseSupermanMode := LoadString;

  LoadString := StringConf.ReadString('String', 'YouFoundNothing', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouFoundNothing', sYouFoundNothing)
  else sYouFoundNothing := LoadString;

  LoadString := StringConf.ReadString('String', 'LineNoticePreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'LineNoticePreFix', g_Config.sLineNoticePreFix)
  else g_Config.sLineNoticePreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'SysMsgPreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SysMsgPreFix', g_Config.sSysMsgPreFix)
  else g_Config.sSysMsgPreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'GuildMsgPreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GuildMsgPreFix', g_Config.sGuildMsgPreFix)
  else g_Config.sGuildMsgPreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'GroupMsgPreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GroupMsgPreFix', g_Config.sGroupMsgPreFix)
  else g_Config.sGroupMsgPreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'HintMsgPreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'HintMsgPreFix', g_Config.sHintMsgPreFix)
  else g_Config.sHintMsgPreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'GMRedMsgpreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'GMRedMsgpreFix', g_Config.sGMRedMsgpreFix)
  else g_Config.sGMRedMsgpreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'MonSayMsgpreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MonSayMsgpreFix', g_Config.sMonSayMsgpreFix)
  else g_Config.sMonSayMsgpreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'CustMsgpreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CustMsgpreFix', g_Config.sCustMsgpreFix)
  else g_Config.sCustMsgpreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'CastleMsgpreFix', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CastleMsgpreFix', g_Config.sCastleMsgpreFix)
  else g_Config.sCastleMsgpreFix := LoadString;

  LoadString := StringConf.ReadString('String', 'NoPasswordLockSystemMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NoPasswordLockSystemMsg', g_sNoPasswordLockSystemMsg)
  else g_sNoPasswordLockSystemMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'AlreadySetPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'AlreadySetPassword', g_sAlreadySetPasswordMsg)
  else g_sAlreadySetPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ReSetPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReSetPassword', g_sReSetPasswordMsg)
  else g_sReSetPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PasswordOverLong', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PasswordOverLong', g_sPasswordOverLongMsg)
  else g_sPasswordOverLongMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ReSetPasswordOK', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReSetPasswordOK', g_sReSetPasswordOKMsg)
  else g_sReSetPasswordOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ReSetPasswordNotMatch', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ReSetPasswordNotMatch', g_sReSetPasswordNotMatchMsg)
  else g_sReSetPasswordNotMatchMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PleaseInputUnLockPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PleaseInputUnLockPassword', g_sPleaseInputUnLockPasswordMsg)
  else g_sPleaseInputUnLockPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageUnLockOK', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageUnLockOK', g_sStorageUnLockOKMsg)
  else g_sStorageUnLockOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageAlreadyUnLock', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageAlreadyUnLock', g_sStorageAlreadyUnLockMsg)
  else g_sStorageAlreadyUnLockMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageNoPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageNoPassword', g_sStorageNoPasswordMsg)
  else g_sStorageNoPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UnLockPasswordFail', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UnLockPasswordFail', g_sUnLockPasswordFailMsg)
  else g_sUnLockPasswordFailMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'LockStorageSuccess', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'LockStorageSuccess', g_sLockStorageSuccessMsg)
  else g_sLockStorageSuccessMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StoragePasswordClearMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StoragePasswordClearMsg', g_sStoragePasswordClearMsg)
  else g_sStoragePasswordClearMsg := LoadString;
  LoadString := StringConf.ReadString('String', 'PleaseUnloadStoragePasswordMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PleaseUnloadStoragePasswordMsg', g_sPleaseUnloadStoragePasswordMsg)
  else g_sPleaseUnloadStoragePasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageAlreadyLock', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageAlreadyLock', g_sStorageAlreadyLockMsg)
  else g_sStorageAlreadyLockMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StoragePasswordLocked', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StoragePasswordLocked', g_sStoragePasswordLockedMsg)
  else g_sStoragePasswordLockedMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageSetPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageSetPassword', g_sSetPasswordMsg)
  else g_sSetPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PleaseInputOldPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PleaseInputOldPassword', g_sPleaseInputOldPasswordMsg)
  else g_sPleaseInputOldPasswordMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PasswordIsClearMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PasswordIsClearMsg', g_sOldPasswordIsClearMsg)
  else g_sOldPasswordIsClearMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'NoPasswordSet', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NoPasswordSet', g_sNoPasswordSetMsg)
  else g_sNoPasswordSetMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'OldPasswordIncorrect', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'OldPasswordIncorrect', g_sOldPasswordIncorrectMsg)
  else g_sOldPasswordIncorrectMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StorageIsLocked', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StorageIsLocked', g_sStorageIsLockedMsg)
  else g_sStorageIsLockedMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PleaseTryDealLaterMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PleaseTryDealLaterMsg', g_sPleaseTryDealLaterMsg)
  else g_sPleaseTryDealLaterMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DealItemsDenyGetBackMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealItemsDenyGetBackMsg', g_sDealItemsDenyGetBackMsg)
  else g_sDealItemsDenyGetBackMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableDealItemsMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableDealItemsMsg', g_sDisableDealItemsMsg)
  else g_sDisableDealItemsMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotTryDealMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotTryDealMsg', g_sCanotTryDealMsg)
  else g_sCanotTryDealMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DealActionCancelMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealActionCancelMsg', g_sDealActionCancelMsg)
  else g_sDealActionCancelMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PoseDisableDealMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PoseDisableDealMsg', g_sPoseDisableDealMsg)
  else g_sPoseDisableDealMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DealSuccessMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealSuccessMsg', g_sDealSuccessMsg)
  else g_sDealSuccessMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DealOKTooFast', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealOKTooFast', g_sDealOKTooFast)
  else g_sDealOKTooFast := LoadString;

  LoadString := StringConf.ReadString('String', 'YourBagSizeTooSmall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourBagSizeTooSmall', g_sYourBagSizeTooSmall)
  else g_sYourBagSizeTooSmall := LoadString;

  LoadString := StringConf.ReadString('String', 'DealHumanBagSizeTooSmall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealHumanBagSizeTooSmall', g_sDealHumanBagSizeTooSmall)
  else g_sDealHumanBagSizeTooSmall := LoadString;

  LoadString := StringConf.ReadString('String', 'YourGoldLargeThenLimit', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourGoldLargeThenLimit', g_sYourGoldLargeThenLimit)
  else g_sYourGoldLargeThenLimit := LoadString;

  LoadString := StringConf.ReadString('String', 'DealHumanGoldLargeThenLimit', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DealHumanGoldLargeThenLimit', g_sDealHumanGoldLargeThenLimit)
  else g_sDealHumanGoldLargeThenLimit := LoadString;

  LoadString := StringConf.ReadString('String', 'YouDealOKMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouDealOKMsg', g_sYouDealOKMsg)
  else g_sYouDealOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PoseDealOKMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PoseDealOKMsg', g_sPoseDealOKMsg)
  else g_sPoseDealOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'KickClientUserMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'KickClientUserMsg', g_sKickClientUserMsg)
  else g_sKickClientUserMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ActionIsLockedMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ActionIsLockedMsg', g_sActionIsLockedMsg)
  else g_sActionIsLockedMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'PasswordNotSetMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PasswordNotSetMsg', g_sPasswordNotSetMsg)
  else g_sPasswordNotSetMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'NotPasswordProtectMode', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NotPasswordProtectMode', g_sNotPasswordProtectMode)
  else g_sNotPasswordProtectMode := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotDropGoldMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotDropGoldMsg', g_sCanotDropGoldMsg)
  else g_sCanotDropGoldMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotDropInSafeZoneMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotDropInSafeZoneMsg', g_sCanotDropInSafeZoneMsg)
  else g_sCanotDropInSafeZoneMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotDropItemMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotDropItemMsg', g_sCanotDropItemMsg)
  else g_sCanotDropItemMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotDropItemMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotDropItemMsg', g_sCanotDropItemMsg)
  else g_sCanotDropItemMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotUseItemMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotUseItemMsg', g_sCanotUseItemMsg)
  else g_sCanotUseItemMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StartMarryManMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartMarryManMsg', g_sStartMarryManMsg)
  else g_sStartMarryManMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StartMarryWoManMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartMarryWoManMsg', g_sStartMarryWoManMsg)
  else g_sStartMarryWoManMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StartMarryManAskQuestionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartMarryManAskQuestionMsg', g_sStartMarryManAskQuestionMsg)
  else g_sStartMarryManAskQuestionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'StartMarryWoManAskQuestionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'StartMarryWoManAskQuestionMsg', g_sStartMarryWoManAskQuestionMsg)
  else g_sStartMarryWoManAskQuestionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryManAnswerQuestionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryManAnswerQuestionMsg', g_sMarryManAnswerQuestionMsg)
  else g_sMarryManAnswerQuestionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryManAskQuestionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryManAskQuestionMsg', g_sMarryManAskQuestionMsg)
  else g_sMarryManAskQuestionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryWoManAnswerQuestionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryWoManAnswerQuestionMsg', g_sMarryWoManAnswerQuestionMsg)
  else g_sMarryWoManAnswerQuestionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryWoManGetMarryMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryWoManGetMarryMsg', g_sMarryWoManGetMarryMsg)
  else g_sMarryWoManGetMarryMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryWoManDenyMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryWoManDenyMsg', g_sMarryWoManDenyMsg)
  else g_sMarryWoManDenyMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MarryWoManCancelMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MarryWoManCancelMsg', g_sMarryWoManCancelMsg)
  else g_sMarryWoManCancelMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ForceUnMarryManLoginMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ForceUnMarryManLoginMsg', g_sfUnMarryManLoginMsg)
  else g_sfUnMarryManLoginMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ForceUnMarryWoManLoginMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ForceUnMarryWoManLoginMsg', g_sfUnMarryWoManLoginMsg)
  else g_sfUnMarryWoManLoginMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ManLoginDearOnlineSelfMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ManLoginDearOnlineSelfMsg', g_sManLoginDearOnlineSelfMsg)
  else g_sManLoginDearOnlineSelfMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ManLoginDearOnlineDearMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ManLoginDearOnlineDearMsg', g_sManLoginDearOnlineDearMsg)
  else g_sManLoginDearOnlineDearMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WoManLoginDearOnlineSelfMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WoManLoginDearOnlineSelfMsg', g_sWoManLoginDearOnlineSelfMsg)
  else g_sWoManLoginDearOnlineSelfMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WoManLoginDearOnlineDearMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WoManLoginDearOnlineDearMsg', g_sWoManLoginDearOnlineDearMsg)
  else g_sWoManLoginDearOnlineDearMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ManLoginDearNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ManLoginDearNotOnlineMsg', g_sManLoginDearNotOnlineMsg)
  else g_sManLoginDearNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WoManLoginDearNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WoManLoginDearNotOnlineMsg', g_sWoManLoginDearNotOnlineMsg)
  else g_sWoManLoginDearNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ManLongOutDearOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ManLongOutDearOnlineMsg', g_sManLongOutDearOnlineMsg)
  else g_sManLongOutDearOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WoManLongOutDearOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WoManLongOutDearOnlineMsg', g_sWoManLongOutDearOnlineMsg)
  else g_sWoManLongOutDearOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouAreNotMarryedMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouAreNotMarryedMsg', g_sYouAreNotMarryedMsg)
  else g_sYouAreNotMarryedMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourWifeNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourWifeNotOnlineMsg', g_sYourWifeNotOnlineMsg)
  else g_sYourWifeNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourHusbandNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourHusbandNotOnlineMsg', g_sYourHusbandNotOnlineMsg)
  else g_sYourHusbandNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourWifeNowLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourWifeNowLocateMsg', g_sYourWifeNowLocateMsg)
  else g_sYourWifeNowLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourHusbandSearchLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourHusbandSearchLocateMsg', g_sYourHusbandSearchLocateMsg)
  else g_sYourHusbandSearchLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourHusbandNowLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourHusbandNowLocateMsg', g_sYourHusbandNowLocateMsg)
  else g_sYourHusbandNowLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourWifeSearchLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourWifeSearchLocateMsg', g_sYourWifeSearchLocateMsg)
  else g_sYourWifeSearchLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'FUnMasterLoginMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'FUnMasterLoginMsg', g_sfUnMasterLoginMsg)
  else g_sfUnMasterLoginMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UnMasterListLoginMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UnMasterListLoginMsg', g_sfUnMasterListLoginMsg)
  else g_sfUnMasterListLoginMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterListOnlineSelfMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterListOnlineSelfMsg', g_sMasterListOnlineSelfMsg)
  else g_sMasterListOnlineSelfMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterListOnlineMasterMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterListOnlineMasterMsg', g_sMasterListOnlineMasterMsg)
  else g_sMasterListOnlineMasterMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterOnlineSelfMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterOnlineSelfMsg', g_sMasterOnlineSelfMsg)
  else g_sMasterOnlineSelfMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterOnlineMasterListMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterOnlineMasterListMsg', g_sMasterOnlineMasterListMsg)
  else g_sMasterOnlineMasterListMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterLongOutMasterListOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterLongOutMasterListOnlineMsg', g_sMasterLongOutMasterListOnlineMsg)
  else g_sMasterLongOutMasterListOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterListLongOutMasterOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterListLongOutMasterOnlineMsg', g_sMasterListLongOutMasterOnlineMsg)
  else g_sMasterListLongOutMasterOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterListNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterListNotOnlineMsg', g_sMasterListNotOnlineMsg)
  else g_sMasterListNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterNotOnlineMsg', g_sMasterNotOnlineMsg)
  else g_sMasterNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouAreNotMasterMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouAreNotMasterMsg', g_sYouAreNotMasterMsg)
  else g_sYouAreNotMasterMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterNotOnlineMsg', g_sYourMasterNotOnlineMsg)
  else g_sYourMasterNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterListNotOnlineMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterListNotOnlineMsg', g_sYourMasterListNotOnlineMsg)
  else g_sYourMasterListNotOnlineMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterNowLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterNowLocateMsg', g_sYourMasterNowLocateMsg)
  else g_sYourMasterNowLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterListSearchLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterListSearchLocateMsg', g_sYourMasterListSearchLocateMsg)
  else g_sYourMasterListSearchLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterListNowLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterListNowLocateMsg', g_sYourMasterListNowLocateMsg)
  else g_sYourMasterListNowLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterSearchLocateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterSearchLocateMsg', g_sYourMasterSearchLocateMsg)
  else g_sYourMasterSearchLocateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YourMasterListUnMasterOKMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourMasterListUnMasterOKMsg', g_sYourMasterListUnMasterOKMsg)
  else g_sYourMasterListUnMasterOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouAreUnMasterOKMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouAreUnMasterOKMsg', g_sYouAreUnMasterOKMsg)
  else g_sYouAreUnMasterOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UnMasterLoginMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UnMasterLoginMsg', g_sUnMasterLoginMsg)
  else g_sUnMasterLoginMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'NPCSayUnMasterOKMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NPCSayUnMasterOKMsg', g_sNPCSayUnMasterOKMsg)
  else g_sNPCSayUnMasterOKMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'NPCSayForceUnMasterMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NPCSayForceUnMasterMsg', g_sNPCSayForceUnMasterMsg)
  else g_sNPCSayForceUnMasterMsg := LoadString;




  LoadString := StringConf.ReadString('String', 'MyInfo', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MyInfo', g_sMyInfo)
  else g_sMyInfo := LoadString;

  LoadString := StringConf.ReadString('String', 'OpenedDealMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'OpenedDealMsg', g_sOpenedDealMsg)
  else g_sOpenedDealMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'SendCustMsgCanNotUseNowMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SendCustMsgCanNotUseNowMsg', g_sSendCustMsgCanNotUseNowMsg)
  else g_sSendCustMsgCanNotUseNowMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'SubkMasterMsgCanNotUseNowMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SubkMasterMsgCanNotUseNowMsg', g_sSubkMasterMsgCanNotUseNowMsg)
  else g_sSubkMasterMsgCanNotUseNowMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'SendOnlineCountMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'SendOnlineCountMsg', g_sSendOnlineCountMsg)
  else g_sSendOnlineCountMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WeaponRepairSuccess', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WeaponRepairSuccess', g_sWeaponRepairSuccess)
  else g_sWeaponRepairSuccess := LoadString;

  LoadString := StringConf.ReadString('String', 'DefenceUpTime', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DefenceUpTime', g_sDefenceUpTime)
  else g_sDefenceUpTime := LoadString;

  LoadString := StringConf.ReadString('String', 'MagDefenceUpTime', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MagDefenceUpTime', g_sMagDefenceUpTime)
  else g_sMagDefenceUpTime := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery1Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery1Msg', g_sWinLottery1Msg)
  else g_sWinLottery1Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery2Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery2Msg', g_sWinLottery2Msg)
  else g_sWinLottery2Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery3Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery3Msg', g_sWinLottery3Msg)
  else g_sWinLottery3Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery4Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery4Msg', g_sWinLottery4Msg)
  else g_sWinLottery4Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery5Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery5Msg', g_sWinLottery5Msg)
  else g_sWinLottery5Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'WinLottery6Msg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WinLottery6Msg', g_sWinLottery6Msg)
  else g_sWinLottery6Msg := LoadString;

  LoadString := StringConf.ReadString('String', 'NotWinLotteryMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NotWinLotteryMsg', g_sNotWinLotteryMsg)
  else g_sNotWinLotteryMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'WeaptonMakeLuck', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WeaptonMakeLuck', g_sWeaptonMakeLuck)
  else g_sWeaptonMakeLuck := LoadString;

  LoadString := StringConf.ReadString('String', 'WeaptonNotMakeLuck', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WeaptonNotMakeLuck', g_sWeaptonNotMakeLuck)
  else g_sWeaptonNotMakeLuck := LoadString;

  LoadString := StringConf.ReadString('String', 'TheWeaponIsCursed', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TheWeaponIsCursed', g_sTheWeaponIsCursed)
  else g_sTheWeaponIsCursed := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotTakeOffItem', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotTakeOffItem', g_sCanotTakeOffItem)
  else g_sCanotTakeOffItem := LoadString;

  LoadString := StringConf.ReadString('String', 'JoinGroupMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'JoinGroupMsg', g_sJoinGroup)
  else g_sJoinGroup := LoadString;

  LoadString := StringConf.ReadString('String', 'TryModeCanotUseStorage', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TryModeCanotUseStorage', g_sTryModeCanotUseStorage)
  else g_sTryModeCanotUseStorage := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotGetItemsMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotGetItemsMsg', g_sCanotGetItems)
  else g_sCanotGetItems := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableDearRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableDearRecall', g_sEnableDearRecall)
  else g_sEnableDearRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableDearRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableDearRecall', g_sDisableDearRecall)
  else g_sDisableDearRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableMasterRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableMasterRecall', g_sEnableMasterRecall)
  else g_sEnableMasterRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableMasterRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableMasterRecall', g_sDisableMasterRecall)
  else g_sDisableMasterRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'NowCurrDateTime', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NowCurrDateTime', g_sNowCurrDateTime)
  else g_sNowCurrDateTime := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableAllowRebirth', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableAllowRebirth', g_sEnableAllowRebirth)
  else g_sEnableAllowRebirth := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableAllowRebirth', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableAllowRebirth', g_sDisableAllowRebirth)
  else g_sDisableAllowRebirth := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableHearWhisper', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableHearWhisper', g_sEnableHearWhisper)
  else g_sEnableHearWhisper := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableHearWhisper', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableHearWhisper', g_sDisableHearWhisper)
  else g_sDisableHearWhisper := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableShoutMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableShoutMsg', g_sEnableShoutMsg)
  else g_sEnableShoutMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableShoutMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableShoutMsg', g_sDisableShoutMsg)
  else g_sDisableShoutMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableDealMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableDealMsg', g_sEnableDealMsg)
  else g_sEnableDealMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableDealMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableDealMsg', g_sDisableDealMsg)
  else g_sDisableDealMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableGuildChat', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableGuildChat', g_sEnableGuildChat)
  else g_sEnableGuildChat := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableGuildChat', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableGuildChat', g_sDisableGuildChat)
  else g_sDisableGuildChat := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableJoinGuild', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableJoinGuild', g_sEnableJoinGuild)
  else g_sEnableJoinGuild := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableJoinGuild', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableJoinGuild', g_sDisableJoinGuild)
  else g_sDisableJoinGuild := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableAuthAllyGuild', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableAuthAllyGuild', g_sEnableAuthAllyGuild)
  else g_sEnableAuthAllyGuild := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableAuthAllyGuild', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableAuthAllyGuild', g_sDisableAuthAllyGuild)
  else g_sDisableAuthAllyGuild := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableGroupRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableGroupRecall', g_sEnableGroupRecall)
  else g_sEnableGroupRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableGroupRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableGroupRecall', g_sDisableGroupRecall)
  else g_sDisableGroupRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'EnableGuildRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'EnableGuildRecall', g_sEnableGuildRecall)
  else g_sEnableGuildRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'DisableGuildRecall', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'DisableGuildRecall', g_sDisableGuildRecall)
  else g_sDisableGuildRecall := LoadString;

  LoadString := StringConf.ReadString('String', 'PleaseInputPassword', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'PleaseInputPassword', g_sPleaseInputPassword)
  else g_sPleaseInputPassword := LoadString;

  LoadString := StringConf.ReadString('String', 'TheMapDisableMove', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TheMapDisableMove', g_sTheMapDisableMove)
  else g_sTheMapDisableMove := LoadString;

  LoadString := StringConf.ReadString('String', 'TheMapNotFound', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TheMapNotFound', g_sTheMapNotFound)
  else g_sTheMapNotFound := LoadString;

  LoadString := StringConf.ReadString('String', 'YourIPaddrDenyLogon', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourIPaddrDenyLogon', g_sYourIPaddrDenyLogon)
  else g_sYourIPaddrDenyLogon := LoadString;

  LoadString := StringConf.ReadString('String', 'YourAccountDenyLogon', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourAccountDenyLogon', g_sYourAccountDenyLogon)
  else g_sYourAccountDenyLogon := LoadString;

  LoadString := StringConf.ReadString('String', 'YourCharNameDenyLogon', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YourCharNameDenyLogon', g_sYourCharNameDenyLogon)
  else g_sYourCharNameDenyLogon := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotPickUpItem', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotPickUpItem', g_sCanotPickUpItem)
  else g_sCanotPickUpItem := LoadString;

  LoadString := StringConf.ReadString('String', 'CanotSendmsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanotSendmsg', g_sCanotSendmsg)
  else g_sCanotSendmsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UserDenyWhisperMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UserDenyWhisperMsg', g_sUserDenyWhisperMsg)
  else g_sUserDenyWhisperMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UserNotOnLine', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UserNotOnLine', g_sUserNotOnLine)
  else g_sUserNotOnLine := LoadString;

  LoadString := StringConf.ReadString('String', 'RevivalRecoverMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'RevivalRecoverMsg', g_sRevivalRecoverMsg)
  else g_sRevivalRecoverMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ClientVersionTooOld', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ClientVersionTooOld', g_sClientVersionTooOld)
  else g_sClientVersionTooOld := LoadString;

  LoadString := StringConf.ReadString('String', 'CastleGuildName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CastleGuildName', g_sCastleGuildName)
  else g_sCastleGuildName := LoadString;

  LoadString := StringConf.ReadString('String', 'NoCastleGuildName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NoCastleGuildName', g_sNoCastleGuildName)
  else g_sNoCastleGuildName := LoadString;

  LoadString := StringConf.ReadString('String', 'WarrReNewName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WarrReNewName', g_sWarrReNewName)
  else g_sWarrReNewName := LoadString;

  LoadString := StringConf.ReadString('String', 'WizardReNewName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WizardReNewName', g_sWizardReNewName)
  else g_sWizardReNewName := LoadString;

  LoadString := StringConf.ReadString('String', 'TaosReNewName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TaosReNewName', g_sTaosReNewName)
  else g_sTaosReNewName := LoadString;

  LoadString := StringConf.ReadString('String', 'RankLevelName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'RankLevelName', g_sRankLevelName)
  else g_sRankLevelName := LoadString;

  LoadString := StringConf.ReadString('String', 'ManDearName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ManDearName', g_sManDearName)
  else g_sManDearName := LoadString;

  LoadString := StringConf.ReadString('String', 'WoManDearName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'WoManDearName', g_sWoManDearName)
  else g_sWoManDearName := LoadString;

  LoadString := StringConf.ReadString('String', 'MasterName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'MasterName', g_sMasterName)
  else g_sMasterName := LoadString;

  LoadString := StringConf.ReadString('String', 'NoMasterName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NoMasterName', g_sNoMasterName)
  else g_sNoMasterName := LoadString;

  LoadString := StringConf.ReadString('String', 'HumanShowName', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'HumanShowName', g_sHumanShowName)
  else g_sHumanShowName := LoadString;

  LoadString := StringConf.ReadString('String', 'ChangePermissionMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ChangePermissionMsg', g_sChangePermissionMsg)
  else g_sChangePermissionMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ChangeKillMonExpRateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ChangeKillMonExpRateMsg', g_sChangeKillMonExpRateMsg)
  else g_sChangeKillMonExpRateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ChangePowerRateMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ChangePowerRateMsg', g_sChangePowerRateMsg)
  else g_sChangePowerRateMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ChangeMemberLevelMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ChangeMemberLevelMsg', g_sChangeMemberLevelMsg)
  else g_sChangeMemberLevelMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ChangeMemberTypeMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ChangeMemberTypeMsg', g_sChangeMemberTypeMsg)
  else g_sChangeMemberTypeMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ScriptChangeHumanHPMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ScriptChangeHumanHPMsg', g_sScriptChangeHumanHPMsg)
  else g_sScriptChangeHumanHPMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ScriptChangeHumanMPMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ScriptChangeHumanMPMsg', g_sScriptChangeHumanMPMsg)
  else g_sScriptChangeHumanMPMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouCanotDisableSayMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouCanotDisableSayMsg', g_sDisableSayMsg)
  else g_sDisableSayMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'OnlineCountMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'OnlineCountMsg', g_sOnlineCountMsg)
  else g_sOnlineCountMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'TotalOnlineCountMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'TotalOnlineCountMsg', g_sTotalOnlineCountMsg)
  else g_sTotalOnlineCountMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouNeedLevelSendMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouNeedLevelSendMsg', g_sYouNeedLevelMsg)
  else g_sYouNeedLevelMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'ThisMapDisableSendCyCyMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'ThisMapDisableSendCyCyMsg', g_sThisMapDisableSendCyCyMsg)
  else g_sThisMapDisableSendCyCyMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouCanSendCyCyLaterMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouCanSendCyCyLaterMsg', g_sYouCanSendCyCyLaterMsg)
  else g_sYouCanSendCyCyLaterMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouIsDisableSendMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouIsDisableSendMsg', g_sYouIsDisableSendMsg)
  else g_sYouIsDisableSendMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouMurderedMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouMurderedMsg', g_sYouMurderedMsg)
  else g_sYouMurderedMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouKilledByMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouKilledByMsg', g_sYouKilledByMsg)
  else g_sYouKilledByMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'YouProtectedByLawOfDefense', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'YouProtectedByLawOfDefense', g_sYouProtectedByLawOfDefense)
  else g_sYouProtectedByLawOfDefense := LoadString;

  LoadString := StringConf.ReadString('String', 'NoRecallHero', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'NoRecallHero', g_sNoRecallHero)
  else g_sNoRecallHero := LoadString;


  LoadString := StringConf.ReadString('String', 'CanUseSerieMagicMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CanUseSerieMagicMsg', g_sCanUseSerieMagicMsg)
  else g_sCanUseSerieMagicMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'UseSerieMagicTimeMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UseSerieMagicTimeMsg', g_sUseSerieMagicTimeMsg)
  else g_sUseSerieMagicTimeMsg := LoadString;


  LoadString := StringConf.ReadString('String', 'UseSerieMagicBlasthitMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'UseSerieMagicBlasthitMsg', g_sUseSerieMagicBlasthitMsg)
  else g_sUseSerieMagicBlasthitMsg := LoadString;

  LoadString := StringConf.ReadString('String', 'CartMonsterNotCanMoveMsg', '');
  if LoadString = '' then
    StringConf.WriteString('String', 'CartMonsterNotCanMoveMsg', g_sCartMonsterNotCanMoveMsg)
  else g_sCartMonsterNotCanMoveMsg := LoadString;
end;

procedure LoadConfig();
var
  I, II: Integer;
  nLoadInteger: Integer;
  nLoadFloat: Double;
  sLoadString: string;
begin
  StartFixExp();
  LoadString();
  LoadGameCommand();
  LoadExp();
  //============================================================================
  if StringConf.ReadString('Guild', 'GuildNotice', '') = '' then
    StringConf.WriteString('Guild', 'GuildNotice', g_Config.sGuildNotice);
  g_Config.sGuildNotice := StringConf.ReadString('Guild', 'GuildNotice', g_Config.sGuildNotice);

  if StringConf.ReadString('Guild', 'GuildWar', '') = '' then
    StringConf.WriteString('Guild', 'GuildWar', g_Config.sGuildWar);
  g_Config.sGuildWar := StringConf.ReadString('Guild', 'GuildWar', g_Config.sGuildWar);

  if StringConf.ReadString('Guild', 'GuildAll', '') = '' then
    StringConf.WriteString('Guild', 'GuildAll', g_Config.sGuildAll);
  g_Config.sGuildAll := StringConf.ReadString('Guild', 'GuildAll', g_Config.sGuildAll);

  if StringConf.ReadString('Guild', 'GuildMember', '') = '' then
    StringConf.WriteString('Guild', 'GuildMember', g_Config.sGuildMember);
  g_Config.sGuildMember := StringConf.ReadString('Guild', 'GuildMember', g_Config.sGuildMember);

  if StringConf.ReadString('Guild', 'GuildMemberRank', '') = '' then
    StringConf.WriteString('Guild', 'GuildMemberRank', g_Config.sGuildMemberRank);
  g_Config.sGuildMemberRank := StringConf.ReadString('Guild', 'GuildMemberRank', g_Config.sGuildMemberRank);

  if StringConf.ReadString('Guild', 'GuildChief', '') = '' then
    StringConf.WriteString('Guild', 'GuildChief', g_Config.sGuildChief);
  g_Config.sGuildChief := StringConf.ReadString('Guild', 'GuildChief', g_Config.sGuildChief);

  //服务器设置
  if Config.ReadInteger('Server', 'ServerIndex', -1) < 0 then
    Config.WriteInteger('Server', 'ServerIndex', nServerIndex);
  nServerIndex := Config.ReadInteger('Server', 'ServerIndex', nServerIndex);

  if Config.ReadString('Server', 'ServerName', '') = '' then
    Config.WriteString('Server', 'ServerName', g_Config.sServerName);
  g_Config.sServerName := Config.ReadString('Server', 'ServerName', g_Config.sServerName);

  if StringConf.ReadString('Server', 'ServerIP', '') = '' then
    StringConf.WriteString('Server', 'ServerIP', g_Config.sServerIPaddr);
  g_Config.sServerIPaddr := StringConf.ReadString('Server', 'ServerIP', g_Config.sServerIPaddr);

  if Config.ReadInteger('Server', 'Minimize', -1) < 0 then
    Config.WriteBool('Server', 'Minimize', g_boMinimize);
  g_boMinimize := Config.ReadBool('Server', 'Minimize', g_boMinimize);

  if Config.ReadString('Reg', 'ServerAddr', '') = '' then
    Config.WriteString('Reg', 'ServerAddr', g_Config.sRegServerAddr);
  g_Config.sRegServerAddr := Config.ReadString('Reg', 'ServerAddr', g_Config.sRegServerAddr);

  if Config.ReadString('Reg', 'IP', '') = '' then
    Config.WriteString('Reg', 'IP', g_Config.sRegIP);
  g_Config.sRegIP := Config.ReadString('Reg', 'IP', g_Config.sRegIP);

  if Config.ReadInteger('Reg', 'ServerPort', -1) < 0 then
    Config.WriteInteger('Reg', 'ServerPort', g_Config.nRegServerPort);
  g_Config.nRegServerPort := Config.ReadInteger('Reg', 'ServerPort', g_Config.nRegServerPort);

  if StringConf.ReadString('Server', 'WebSite', '') = '' then
    StringConf.WriteString('Server', 'WebSite', g_Config.sWebSite);
  g_Config.sWebSite := StringConf.ReadString('Server', 'WebSite', g_Config.sWebSite);

  if StringConf.ReadString('Server', 'BbsSite', '') = '' then
    StringConf.WriteString('Server', 'BbsSite', g_Config.sBbsSite);
  g_Config.sBbsSite := StringConf.ReadString('Server', 'BbsSite', g_Config.sBbsSite);

  if StringConf.ReadString('Server', 'ClientDownload', '') = '' then
    StringConf.WriteString('Server', 'ClientDownload', g_Config.sClientDownload);
  g_Config.sClientDownload := StringConf.ReadString('Server', 'ClientDownload', g_Config.sClientDownload);

  if StringConf.ReadString('Server', 'QQ', '') = '' then
    StringConf.WriteString('Server', 'QQ', g_Config.sQQ);
  g_Config.sQQ := StringConf.ReadString('Server', 'QQ', g_Config.sQQ);

  if StringConf.ReadString('Server', 'Phone', '') = '' then
    StringConf.WriteString('Server', 'Phone', g_Config.sPhone);
  g_Config.sPhone := StringConf.ReadString('Server', 'Phone', g_Config.sPhone);

  if StringConf.ReadString('Server', 'BankAccount0', '') = '' then
    StringConf.WriteString('Server', 'BankAccount0', g_Config.sBankAccount0);
  g_Config.sBankAccount0 := StringConf.ReadString('Server', 'BankAccount0', g_Config.sBankAccount0);

  if StringConf.ReadString('Server', 'BankAccount1', '') = '' then
    StringConf.WriteString('Server', 'BankAccount1', g_Config.sBankAccount1);
  g_Config.sBankAccount1 := StringConf.ReadString('Server', 'BankAccount1', g_Config.sBankAccount1);

  if StringConf.ReadString('Server', 'BankAccount2', '') = '' then
    StringConf.WriteString('Server', 'BankAccount2', g_Config.sBankAccount2);
  g_Config.sBankAccount2 := StringConf.ReadString('Server', 'BankAccount2', g_Config.sBankAccount2);

  if StringConf.ReadString('Server', 'BankAccount3', '') = '' then
    StringConf.WriteString('Server', 'BankAccount3', g_Config.sBankAccount3);
  g_Config.sBankAccount3 := StringConf.ReadString('Server', 'BankAccount3', g_Config.sBankAccount3);

  if StringConf.ReadString('Server', 'BankAccount4', '') = '' then
    StringConf.WriteString('Server', 'BankAccount4', g_Config.sBankAccount4);
  g_Config.sBankAccount4 := StringConf.ReadString('Server', 'BankAccount4', g_Config.sBankAccount4);

  if StringConf.ReadString('Server', 'BankAccount5', '') = '' then
    StringConf.WriteString('Server', 'BankAccount5', g_Config.sBankAccount5);
  g_Config.sBankAccount5 := StringConf.ReadString('Server', 'BankAccount5', g_Config.sBankAccount5);

  if StringConf.ReadString('Server', 'BankAccount6', '') = '' then
    StringConf.WriteString('Server', 'BankAccount6', g_Config.sBankAccount6);
  g_Config.sBankAccount6 := StringConf.ReadString('Server', 'BankAccount6', g_Config.sBankAccount6);

  if StringConf.ReadString('Server', 'BankAccount7', '') = '' then
    StringConf.WriteString('Server', 'BankAccount7', g_Config.sBankAccount7);
  g_Config.sBankAccount7 := StringConf.ReadString('Server', 'BankAccount7', g_Config.sBankAccount7);

  if StringConf.ReadString('Server', 'BankAccount8', '') = '' then
    StringConf.WriteString('Server', 'BankAccount8', g_Config.sBankAccount8);
  g_Config.sBankAccount8 := StringConf.ReadString('Server', 'BankAccount8', g_Config.sBankAccount8);

  if StringConf.ReadString('Server', 'BankAccount9', '') = '' then
    StringConf.WriteString('Server', 'BankAccount9', g_Config.sBankAccount9);
  g_Config.sBankAccount9 := StringConf.ReadString('Server', 'BankAccount9', g_Config.sBankAccount9);

  if Config.ReadInteger('Server', 'ServerNumber', -1) < 0 then
    Config.WriteInteger('Server', 'ServerNumber', g_Config.nServerNumber);
  g_Config.nServerNumber := Config.ReadInteger('Server', 'ServerNumber', g_Config.nServerNumber);

  if Config.ReadString('Server', 'VentureServer', '') = '' then
    Config.WriteString('Server', 'VentureServer', BoolToStr(g_Config.boVentureServer));
  g_Config.boVentureServer := CompareText(Config.ReadString('Server', 'VentureServer', 'FALSE'), 'TRUE') = 0;

  if Config.ReadString('Server', 'TestServer', '') = '' then
    Config.WriteString('Server', 'TestServer', BoolToStr(g_Config.boTestServer));
  g_Config.boTestServer := CompareText(Config.ReadString('Server', 'TestServer', 'FALSE'), 'TRUE') = 0;

  if Config.ReadInteger('Server', 'TestLevel', -1) < 0 then
    Config.WriteInteger('Server', 'TestLevel', g_Config.nTestLevel);
  g_Config.nTestLevel := Config.ReadInteger('Server', 'TestLevel', g_Config.nTestLevel);

  if Config.ReadInteger('Server', 'TestGold', -1) < 0 then
    Config.WriteInteger('Server', 'TestGold', g_Config.nTestGold);
  g_Config.nTestGold := Config.ReadInteger('Server', 'TestGold', g_Config.nTestGold);

  if Config.ReadInteger('Server', 'TestServerUserLimit', -1) < 0 then
    Config.WriteInteger('Server', 'TestServerUserLimit', g_Config.nTestUserLimit);
  g_Config.nTestUserLimit := Config.ReadInteger('Server', 'TestServerUserLimit', g_Config.nTestUserLimit);

  if Config.ReadString('Server', 'ServiceMode', '') = '' then
    Config.WriteString('Server', 'ServiceMode', BoolToStr(g_Config.boServiceMode));
  g_Config.boServiceMode := CompareText(Config.ReadString('Server', 'ServiceMode', 'FALSE'), 'TRUE') = 0;

  if Config.ReadString('Server', 'NonPKServer', '') = '' then
    Config.WriteString('Server', 'NonPKServer', BoolToStr(g_Config.boNonPKServer));
  g_Config.boNonPKServer := CompareText(Config.ReadString('Server', 'NonPKServer', 'FALSE'), 'TRUE') = 0;

  if Config.ReadString('Server', 'ViewHackMessage', '') = '' then
    Config.WriteString('Server', 'ViewHackMessage', BoolToStr(g_Config.boViewHackMessage));
  g_Config.boViewHackMessage := CompareText(Config.ReadString('Server', 'ViewHackMessage', 'FALSE'), 'TRUE') = 0;

  if Config.ReadString('Server', 'ViewAdmissionFailure', '') = '' then
    Config.WriteString('Server', 'ViewAdmissionFailure', BoolToStr(g_Config.boViewAdmissionFailure));
  g_Config.boViewAdmissionFailure := CompareText(Config.ReadString('Server', 'ViewAdmissionFailure', 'FALSE'), 'TRUE') = 0;

  if Config.ReadString('Server', 'DBName', '') = '' then
    Config.WriteString('Server', 'DBName', sDBName);
  sDBName := Config.ReadString('Server', 'DBName', sDBName);

  if Config.ReadString('Server', 'GateAddr', '') = '' then
    Config.WriteString('Server', 'GateAddr', g_Config.sGateAddr);
  g_Config.sGateAddr := Config.ReadString('Server', 'GateAddr', g_Config.sGateAddr);

  if Config.ReadInteger('Server', 'GatePort', -1) < 0 then
    Config.WriteInteger('Server', 'GatePort', g_Config.nGatePort);
  g_Config.nGatePort := Config.ReadInteger('Server', 'GatePort', g_Config.nGatePort);

  if Config.ReadString('Server', 'DBAddr', '') = '' then
    Config.WriteString('Server', 'DBAddr', g_Config.sDBAddr);
  g_Config.sDBAddr := Config.ReadString('Server', 'DBAddr', g_Config.sDBAddr);

  if Config.ReadInteger('Server', 'DBPort', -1) < 0 then
    Config.WriteInteger('Server', 'DBPort', g_Config.nDBPort);
  g_Config.nDBPort := Config.ReadInteger('Server', 'DBPort', g_Config.nDBPort);

  if Config.ReadString('Server', 'IDSAddr', '') = '' then
    Config.WriteString('Server', 'IDSAddr', g_Config.sIDSAddr);
  g_Config.sIDSAddr := Config.ReadString('Server', 'IDSAddr', g_Config.sIDSAddr);

  if Config.ReadInteger('Server', 'IDSPort', -1) < 0 then
    Config.WriteInteger('Server', 'IDSPort', g_Config.nIDSPort);
  g_Config.nIDSPort := Config.ReadInteger('Server', 'IDSPort', g_Config.nIDSPort);

  if Config.ReadString('Server', 'MsgSrvAddr', '') = '' then
    Config.WriteString('Server', 'MsgSrvAddr', g_Config.sMsgSrvAddr);
  g_Config.sMsgSrvAddr := Config.ReadString('Server', 'MsgSrvAddr', g_Config.sMsgSrvAddr);

  if Config.ReadInteger('Server', 'MsgSrvPort', -1) < 0 then
    Config.WriteInteger('Server', 'MsgSrvPort', g_Config.nMsgSrvPort);
  g_Config.nMsgSrvPort := Config.ReadInteger('Server', 'MsgSrvPort', g_Config.nMsgSrvPort);

  if Config.ReadString('Server', 'LogServerAddr', '') = '' then
    Config.WriteString('Server', 'LogServerAddr', g_Config.sLogServerAddr);
  g_Config.sLogServerAddr := Config.ReadString('Server', 'LogServerAddr', g_Config.sLogServerAddr);

  if Config.ReadInteger('Server', 'LogServerPort', -1) < 0 then
    Config.WriteInteger('Server', 'LogServerPort', g_Config.nLogServerPort);
  g_Config.nLogServerPort := Config.ReadInteger('Server', 'LogServerPort', g_Config.nLogServerPort);

  if Config.ReadString('Server', 'DiscountForNightTime', '') = '' then
    Config.WriteString('Server', 'DiscountForNightTime', BoolToStr(g_Config.boDiscountForNightTime));
  g_Config.boDiscountForNightTime := CompareText(Config.ReadString('Server', 'DiscountForNightTime', 'FALSE'), 'TRUE') = 0;

  if Config.ReadInteger('Server', 'HalfFeeStart', -1) < 0 then
    Config.WriteInteger('Server', 'HalfFeeStart', g_Config.nHalfFeeStart);
  g_Config.nHalfFeeStart := Config.ReadInteger('Server', 'HalfFeeStart', g_Config.nHalfFeeStart);

  if Config.ReadInteger('Server', 'HalfFeeEnd', -1) < 0 then
    Config.WriteInteger('Server', 'HalfFeeEnd', g_Config.nHalfFeeEnd);
  g_Config.nHalfFeeEnd := Config.ReadInteger('Server', 'HalfFeeEnd', g_Config.nHalfFeeEnd);

  if Config.ReadInteger('Server', 'HumLimit', -1) < 0 then
    Config.WriteInteger('Server', 'HumLimit', g_dwHumLimit);
  g_dwHumLimit := Config.ReadInteger('Server', 'HumLimit', g_dwHumLimit);

  if Config.ReadInteger('Server', 'HeroLimit', -1) < 0 then
    Config.WriteInteger('Server', 'HeroLimit', g_dwHeroLimit);
  g_dwHeroLimit := Config.ReadInteger('Server', 'HeroLimit', g_dwHeroLimit);

  if Config.ReadInteger('Server', 'MonLimit', -1) < 0 then
    Config.WriteInteger('Server', 'MonLimit', g_dwMonLimit);
  g_dwMonLimit := Config.ReadInteger('Server', 'MonLimit', g_dwMonLimit);

  if Config.ReadInteger('Server', 'ZenLimit', -1) < 0 then
    Config.WriteInteger('Server', 'ZenLimit', g_dwZenLimit);
  g_dwZenLimit := Config.ReadInteger('Server', 'ZenLimit', g_dwZenLimit);

  if Config.ReadInteger('Server', 'NpcLimit', -1) < 0 then
    Config.WriteInteger('Server', 'NpcLimit', g_dwNpcLimit);
  g_dwNpcLimit := Config.ReadInteger('Server', 'NpcLimit', g_dwNpcLimit);

  if Config.ReadInteger('Server', 'SocLimit', -1) < 0 then
    Config.WriteInteger('Server', 'SocLimit', g_dwSocLimit);
  g_dwSocLimit := Config.ReadInteger('Server', 'SocLimit', g_dwSocLimit);

  if Config.ReadInteger('Server', 'DecLimit', -1) < 0 then
    Config.WriteInteger('Server', 'DecLimit', nDecLimit);
  nDecLimit := Config.ReadInteger('Server', 'DecLimit', nDecLimit);

  if Config.ReadInteger('Server', 'SendBlock', -1) < 0 then
    Config.WriteInteger('Server', 'SendBlock', g_Config.nSendBlock);
  g_Config.nSendBlock := Config.ReadInteger('Server', 'SendBlock', g_Config.nSendBlock);

  if Config.ReadInteger('Server', 'CheckBlock', -1) < 0 then
    Config.WriteInteger('Server', 'CheckBlock', g_Config.nCheckBlock);
  g_Config.nCheckBlock := Config.ReadInteger('Server', 'CheckBlock', g_Config.nCheckBlock);

//英雄版 自检数据块必须大于11000
  g_Config.nCheckBlock := _MAX(g_Config.nCheckBlock, 11000);


  if Config.ReadInteger('Server', 'SocCheckTimeOut', -1) < 0 then
    Config.WriteInteger('Server', 'SocCheckTimeOut', g_dwSocCheckTimeOut);
  g_dwSocCheckTimeOut := Config.ReadInteger('Server', 'SocCheckTimeOut', g_dwSocCheckTimeOut);

  if Config.ReadInteger('Server', 'AvailableBlock', -1) < 0 then
    Config.WriteInteger('Server', 'AvailableBlock', g_Config.nAvailableBlock);
  g_Config.nAvailableBlock := Config.ReadInteger('Server', 'AvailableBlock', g_Config.nAvailableBlock);

  if Config.ReadInteger('Server', 'GateLoad', -1) < 0 then
    Config.WriteInteger('Server', 'GateLoad', g_Config.nGateLoad);
  g_Config.nGateLoad := Config.ReadInteger('Server', 'GateLoad', g_Config.nGateLoad);

  if Config.ReadInteger('Server', 'UserFull', -1) < 0 then
    Config.WriteInteger('Server', 'UserFull', g_Config.nUserFull);
  g_Config.nUserFull := Config.ReadInteger('Server', 'UserFull', g_Config.nUserFull);

  if Config.ReadInteger('Server', 'ZenFastStep', -1) < 0 then
    Config.WriteInteger('Server', 'ZenFastStep', g_Config.nZenFastStep);
  g_Config.nZenFastStep := Config.ReadInteger('Server', 'ZenFastStep', g_Config.nZenFastStep);

  if Config.ReadInteger('Server', 'ProcessMonstersTime', -1) < 0 then
    Config.WriteInteger('Server', 'ProcessMonstersTime', g_Config.dwProcessMonstersTime);
  g_Config.dwProcessMonstersTime := Config.ReadInteger('Server', 'ProcessMonstersTime', g_Config.dwProcessMonstersTime);

  if Config.ReadInteger('Server', 'RegenMonstersTime', -1) < 0 then
    Config.WriteInteger('Server', 'RegenMonstersTime', g_Config.dwRegenMonstersTime);
  g_Config.dwRegenMonstersTime := Config.ReadInteger('Server', 'RegenMonstersTime', g_Config.dwRegenMonstersTime);


  if Config.ReadInteger('Server', 'HumanGetMsgTimeLimit', -1) < 0 then
    Config.WriteInteger('Server', 'HumanGetMsgTimeLimit', g_Config.dwHumanGetMsgTime);
  g_Config.dwHumanGetMsgTime := Config.ReadInteger('Server', 'HumanGetMsgTimeLimit', g_Config.dwHumanGetMsgTime);

  {if (MD5.EncryptString(g_sProductName) <> '82700a24a055c27073062735c233d6e5') or
     (MD5.EncryptString(g_sVersion) <> 'dfd2a178f1728b926f1c748cfb1dfd94') or
     (MD5.EncryptString(g_sProgram) <> 'eb8c6063b27da4f3906e96c4882a20ac') or
     (MD5.EncryptString(g_sWebSite) <> '98802f43ff881556bb02ad2ca116198b') or
     (MD5.EncryptString(g_sBbsSite) <> '34eacca1b042f154e6c8807aa6b11727') then begin
    g_Config.boCheckFail:=True;
  end; }


  //============================================================================
  //目录设置
  if Config.ReadString('Share', 'BaseDir', '') = '' then
    Config.WriteString('Share', 'BaseDir', g_Config.sBaseDir);
  g_Config.sBaseDir := Config.ReadString('Share', 'BaseDir', g_Config.sBaseDir);

  if Config.ReadString('Share', 'GuildDir', '') = '' then
    Config.WriteString('Share', 'GuildDir', g_Config.sGuildDir);
  g_Config.sGuildDir := Config.ReadString('Share', 'GuildDir', g_Config.sGuildDir);

  if Config.ReadString('Share', 'GuildFile', '') = '' then
    Config.WriteString('Share', 'GuildFile', g_Config.sGuildFile);
  g_Config.sGuildFile := Config.ReadString('Share', 'GuildFile', g_Config.sGuildFile);

  if Config.ReadString('Share', 'VentureDir', '') = '' then
    Config.WriteString('Share', 'VentureDir', g_Config.sVentureDir);
  g_Config.sVentureDir := Config.ReadString('Share', 'VentureDir', g_Config.sVentureDir);

  if Config.ReadString('Share', 'ConLogDir', '') = '' then
    Config.WriteString('Share', 'ConLogDir', g_Config.sConLogDir);
  g_Config.sConLogDir := Config.ReadString('Share', 'ConLogDir', g_Config.sConLogDir);

  if Config.ReadString('Share', 'CastleDir', '') = '' then
    Config.WriteString('Share', 'CastleDir', g_Config.sCastleDir);
  g_Config.sCastleDir := Config.ReadString('Share', 'CastleDir', g_Config.sCastleDir);

  if Config.ReadString('Share', 'CastleFile', '') = '' then
    //    Config.WriteString('Share','CastleFile',g_Config.sCastleFile);
    Config.WriteString('Share', 'CastleFile', g_Config.sCastleDir + 'List.txt');
  g_Config.sCastleFile := Config.ReadString('Share', 'CastleFile', g_Config.sCastleFile);

  if Config.ReadString('Share', 'EnvirDir', '') = '' then
    Config.WriteString('Share', 'EnvirDir', g_Config.sEnvirDir);
  g_Config.sEnvirDir := Config.ReadString('Share', 'EnvirDir', g_Config.sEnvirDir);

  if Config.ReadString('Share', 'MapDir', '') = '' then
    Config.WriteString('Share', 'MapDir', g_Config.sMapDir);
  g_Config.sMapDir := Config.ReadString('Share', 'MapDir', g_Config.sMapDir);

  if Config.ReadString('Share', 'NoticeDir', '') = '' then
    Config.WriteString('Share', 'NoticeDir', g_Config.sNoticeDir);
  g_Config.sNoticeDir := Config.ReadString('Share', 'NoticeDir', g_Config.sNoticeDir);

  sLoadString := Config.ReadString('Share', 'LogDir', '');
  if sLoadString = '' then
    Config.WriteString('Share', 'LogDir', g_Config.sLogDir)
  else g_Config.sLogDir := sLoadString;

  if Config.ReadString('Share', 'PlugDir', '') = '' then
    Config.WriteString('Share', 'PlugDir', g_Config.sPlugDir);
  g_Config.sPlugDir := Config.ReadString('Share', 'PlugDir', g_Config.sPlugDir);


  //============================================================================
  //名称设置
  if Config.ReadString('Names', 'HealSkill', '') = '' then
    Config.WriteString('Names', 'HealSkill', g_Config.sHealSkill);
  g_Config.sHealSkill := Config.ReadString('Names', 'HealSkill', g_Config.sHealSkill);

  if Config.ReadString('Names', 'FireBallSkill', '') = '' then
    Config.WriteString('Names', 'FireBallSkill', g_Config.sFireBallSkill);
  g_Config.sFireBallSkill := Config.ReadString('Names', 'FireBallSkill', g_Config.sFireBallSkill);

  if Config.ReadString('Names', 'ClothsMan', '') = '' then
    Config.WriteString('Names', 'ClothsMan', g_Config.sClothsMan);
  g_Config.sClothsMan := Config.ReadString('Names', 'ClothsMan', g_Config.sClothsMan);

  if Config.ReadString('Names', 'ClothsWoman', '') = '' then
    Config.WriteString('Names', 'ClothsWoman', g_Config.sClothsWoman);
  g_Config.sClothsWoman := Config.ReadString('Names', 'ClothsWoman', g_Config.sClothsWoman);

  if Config.ReadString('Names', 'WoodenSword', '') = '' then
    Config.WriteString('Names', 'WoodenSword', g_Config.sWoodenSword);
  g_Config.sWoodenSword := Config.ReadString('Names', 'WoodenSword', g_Config.sWoodenSword);

  if Config.ReadString('Names', 'Candle', '') = '' then
    Config.WriteString('Names', 'Candle', g_Config.sCandle);
  g_Config.sCandle := Config.ReadString('Names', 'Candle', g_Config.sCandle);

  if Config.ReadString('Names', 'BasicDrug', '') = '' then
    Config.WriteString('Names', 'BasicDrug', g_Config.sBasicDrug);
  g_Config.sBasicDrug := Config.ReadString('Names', 'BasicDrug', g_Config.sBasicDrug);

  if Config.ReadString('Names', 'GoldStone', '') = '' then
    Config.WriteString('Names', 'GoldStone', g_Config.sGoldStone);
  g_Config.sGoldStone := Config.ReadString('Names', 'GoldStone', g_Config.sGoldStone);

  if Config.ReadString('Names', 'SilverStone', '') = '' then
    Config.WriteString('Names', 'SilverStone', g_Config.sSilverStone);
  g_Config.sSilverStone := Config.ReadString('Names', 'SilverStone', g_Config.sSilverStone);

  if Config.ReadString('Names', 'SteelStone', '') = '' then
    Config.WriteString('Names', 'SteelStone', g_Config.sSteelStone);
  g_Config.sSteelStone := Config.ReadString('Names', 'SteelStone', g_Config.sSteelStone);

  if Config.ReadString('Names', 'CopperStone', '') = '' then
    Config.WriteString('Names', 'CopperStone', g_Config.sCopperStone);
  g_Config.sCopperStone := Config.ReadString('Names', 'CopperStone', g_Config.sCopperStone);

  if Config.ReadString('Names', 'BlackStone', '') = '' then
    Config.WriteString('Names', 'BlackStone', g_Config.sBlackStone);
  g_Config.sBlackStone := Config.ReadString('Names', 'BlackStone', g_Config.sBlackStone);

  if Config.ReadString('Names', 'Zuma1', '') = '' then
    Config.WriteString('Names', 'Zuma1', g_Config.sZuma[0]);
  g_Config.sZuma[0] := Config.ReadString('Names', 'Zuma1', g_Config.sZuma[0]);

  if Config.ReadString('Names', 'Zuma2', '') = '' then
    Config.WriteString('Names', 'Zuma2', g_Config.sZuma[1]);
  g_Config.sZuma[1] := Config.ReadString('Names', 'Zuma2', g_Config.sZuma[1]);

  if Config.ReadString('Names', 'Zuma3', '') = '' then
    Config.WriteString('Names', 'Zuma3', g_Config.sZuma[2]);
  g_Config.sZuma[2] := Config.ReadString('Names', 'Zuma3', g_Config.sZuma[2]);

  if Config.ReadString('Names', 'Zuma4', '') = '' then
    Config.WriteString('Names', 'Zuma4', g_Config.sZuma[3]);
  g_Config.sZuma[3] := Config.ReadString('Names', 'Zuma4', g_Config.sZuma[3]);

  if Config.ReadString('Names', 'Bee', '') = '' then
    Config.WriteString('Names', 'Bee', g_Config.sBee);
  g_Config.sBee := Config.ReadString('Names', 'Bee', g_Config.sBee);

  if Config.ReadString('Names', 'Spider', '') = '' then
    Config.WriteString('Names', 'Spider', g_Config.sSpider);
  g_Config.sSpider := Config.ReadString('Names', 'Spider', g_Config.sSpider);

  if Config.ReadString('Names', 'WomaHorn', '') = '' then
    Config.WriteString('Names', 'WomaHorn', g_Config.sWomaHorn);
  g_Config.sWomaHorn := Config.ReadString('Names', 'WomaHorn', g_Config.sWomaHorn);

  if Config.ReadString('Names', 'ZumaPiece', '') = '' then
    Config.WriteString('Names', 'ZumaPiece', g_Config.sZumaPiece);
  g_Config.sZumaPiece := Config.ReadString('Names', 'ZumaPiece', g_Config.sZumaPiece);

  if Config.ReadString('Names', 'Dogz', '') = '' then
    Config.WriteString('Names', 'Dogz', g_Config.sDogz);
  g_Config.sDogz := Config.ReadString('Names', 'Dogz', g_Config.sDogz);

  if Config.ReadString('Names', 'BoneFamm', '') = '' then
    Config.WriteString('Names', 'BoneFamm', g_Config.sBoneFamm);
  g_Config.sBoneFamm := Config.ReadString('Names', 'BoneFamm', g_Config.sBoneFamm);

  if Config.ReadString('Names', 'Deva', '') = '' then
    Config.WriteString('Names', 'Deva', g_Config.sMoon);
  g_Config.sMoon := Config.ReadString('Names', 'Deva', g_Config.sMoon);

  sLoadString := Config.ReadString('Names', 'GameGold', '');
  if sLoadString = '' then
    Config.WriteString('Names', 'GameGold', g_Config.sGameGoldName)
  else g_Config.sGameGoldName := sLoadString;

  sLoadString := Config.ReadString('Names', 'GamePoint', '');
  if sLoadString = '' then
    Config.WriteString('Names', 'GamePoint', g_Config.sGamePointName)
  else g_Config.sGamePointName := sLoadString;

  sLoadString := Config.ReadString('Names', 'PayMentPointName', '');
  if sLoadString = '' then
    Config.WriteString('Names', 'PayMentPointName', g_Config.sPayMentPointName)
  else g_Config.sPayMentPointName := sLoadString;

  g_Config.boCheckFail := False;
  //if g_Config.nAppIconCrc <> 1242102148 then
    //g_Config.boCheckFail := True;
  //============================================================================
  //游戏设置
  if Config.ReadInteger('Setup', 'ItemNumber', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemNumber', g_Config.nItemNumber);
  g_Config.nItemNumber := Config.ReadInteger('Setup', 'ItemNumber', g_Config.nItemNumber);

  if Config.ReadInteger('Setup', 'ItemNumberEx', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemNumberEx', g_Config.nItemNumberEx);
  g_Config.nItemNumberEx := Config.ReadInteger('Setup', 'ItemNumberEx', g_Config.nItemNumberEx);

  if Config.ReadString('Setup', 'ClientFile1', '') = '' then
    Config.WriteString('Setup', 'ClientFile1', g_Config.sClientFile1);
  g_Config.sClientFile1 := Config.ReadString('Setup', 'ClientFile1', g_Config.sClientFile1);

  if Config.ReadString('Setup', 'ClientFile2', '') = '' then
    Config.WriteString('Setup', 'ClientFile2', g_Config.sClientFile2);
  g_Config.sClientFile2 := Config.ReadString('Setup', 'ClientFile2', g_Config.sClientFile2);

  if Config.ReadString('Setup', 'ClientFile3', '') = '' then
    Config.WriteString('Setup', 'ClientFile3', g_Config.sClientFile3);
  g_Config.sClientFile3 := Config.ReadString('Setup', 'ClientFile3', g_Config.sClientFile3);

  if Config.ReadInteger('Setup', 'MonUpLvNeedKillBase', -1) < 0 then
    Config.WriteInteger('Setup', 'MonUpLvNeedKillBase', g_Config.nMonUpLvNeedKillBase);
  g_Config.nMonUpLvNeedKillBase := Config.ReadInteger('Setup', 'MonUpLvNeedKillBase', g_Config.nMonUpLvNeedKillBase);

  if Config.ReadInteger('Setup', 'MonUpLvRate', -1) < 0 then
    Config.WriteInteger('Setup', 'MonUpLvRate', g_Config.nMonUpLvRate);
  g_Config.nMonUpLvRate := Config.ReadInteger('Setup', 'MonUpLvRate', g_Config.nMonUpLvRate);

  for I := Low(g_Config.MonUpLvNeedKillCount) to High(g_Config.MonUpLvNeedKillCount) do begin
    if Config.ReadInteger('Setup', 'MonUpLvNeedKillCount' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'MonUpLvNeedKillCount' + IntToStr(I), g_Config.MonUpLvNeedKillCount[I]);
    g_Config.MonUpLvNeedKillCount[I] := Config.ReadInteger('Setup', 'MonUpLvNeedKillCount' + IntToStr(I), g_Config.MonUpLvNeedKillCount[I]);
  end;

  for I := Low(g_Config.SlaveColor) to High(g_Config.SlaveColor) do begin
    if Config.ReadInteger('Setup', 'SlaveColor' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'SlaveColor' + IntToStr(I), g_Config.SlaveColor[I]);
    g_Config.SlaveColor[I] := Config.ReadInteger('Setup', 'SlaveColor' + IntToStr(I), g_Config.SlaveColor[I]);
  end;


  if Config.ReadString('Setup', 'HomeMap', '') = '' then
    Config.WriteString('Setup', 'HomeMap', g_Config.sHomeMap);
  g_Config.sHomeMap := Config.ReadString('Setup', 'HomeMap', g_Config.sHomeMap);

  if Config.ReadInteger('Setup', 'HomeX', -1) < 0 then
    Config.WriteInteger('Setup', 'HomeX', g_Config.nHomeX);
  g_Config.nHomeX := Config.ReadInteger('Setup', 'HomeX', g_Config.nHomeX);

  if Config.ReadInteger('Setup', 'HomeY', -1) < 0 then
    Config.WriteInteger('Setup', 'HomeY', g_Config.nHomeY);
  g_Config.nHomeY := Config.ReadInteger('Setup', 'HomeY', g_Config.nHomeY);

  if Config.ReadString('Setup', 'RedHomeMap', '') = '' then
    Config.WriteString('Setup', 'RedHomeMap', g_Config.sRedHomeMap);
  g_Config.sRedHomeMap := Config.ReadString('Setup', 'RedHomeMap', g_Config.sRedHomeMap);

  if Config.ReadInteger('Setup', 'RedHomeX', -1) < 0 then
    Config.WriteInteger('Setup', 'RedHomeX', g_Config.nRedHomeX);
  g_Config.nRedHomeX := Config.ReadInteger('Setup', 'RedHomeX', g_Config.nRedHomeX);

  if Config.ReadInteger('Setup', 'RedHomeY', -1) < 0 then
    Config.WriteInteger('Setup', 'RedHomeY', g_Config.nRedHomeY);
  g_Config.nRedHomeY := Config.ReadInteger('Setup', 'RedHomeY', g_Config.nRedHomeY);

  if Config.ReadString('Setup', 'RedDieHomeMap', '') = '' then
    Config.WriteString('Setup', 'RedDieHomeMap', g_Config.sRedDieHomeMap);
  g_Config.sRedDieHomeMap := Config.ReadString('Setup', 'RedDieHomeMap', g_Config.sRedDieHomeMap);

  if Config.ReadInteger('Setup', 'RedDieHomeX', -1) < 0 then
    Config.WriteInteger('Setup', 'RedDieHomeX', g_Config.nRedDieHomeX);
  g_Config.nRedDieHomeX := Config.ReadInteger('Setup', 'RedDieHomeX', g_Config.nRedDieHomeX);

  if Config.ReadInteger('Setup', 'RedDieHomeY', -1) < 0 then
    Config.WriteInteger('Setup', 'RedDieHomeY', g_Config.nRedDieHomeY);
  g_Config.nRedDieHomeY := Config.ReadInteger('Setup', 'RedDieHomeY', g_Config.nRedDieHomeY);

  nLoadInteger := Config.ReadInteger('Setup', 'HealthFillTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HealthFillTime', g_Config.nHealthFillTime)
  else g_Config.nHealthFillTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'SpellFillTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SpellFillTime', g_Config.nSpellFillTime)
  else g_Config.nSpellFillTime := nLoadInteger;

  if Config.ReadInteger('Setup', 'DecPkPointTime', -1) < 0 then
    Config.WriteInteger('Setup', 'DecPkPointTime', g_Config.dwDecPkPointTime);
  g_Config.dwDecPkPointTime := Config.ReadInteger('Setup', 'DecPkPointTime', g_Config.dwDecPkPointTime);

  if Config.ReadInteger('Setup', 'DecPkPointCount', -1) < 0 then
    Config.WriteInteger('Setup', 'DecPkPointCount', g_Config.nDecPkPointCount);
  g_Config.nDecPkPointCount := Config.ReadInteger('Setup', 'DecPkPointCount', g_Config.nDecPkPointCount);

  if Config.ReadInteger('Setup', 'PKFlagTime', -1) < 0 then
    Config.WriteInteger('Setup', 'PKFlagTime', g_Config.dwPKFlagTime);
  g_Config.dwPKFlagTime := Config.ReadInteger('Setup', 'PKFlagTime', g_Config.dwPKFlagTime);

  if Config.ReadInteger('Setup', 'KillHumanAddPKPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KillHumanAddPKPoint', g_Config.nKillHumanAddPKPoint);
  g_Config.nKillHumanAddPKPoint := Config.ReadInteger('Setup', 'KillHumanAddPKPoint', g_Config.nKillHumanAddPKPoint);

  if Config.ReadInteger('Setup', 'KillHumanDecLuckPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KillHumanDecLuckPoint', g_Config.nKillHumanDecLuckPoint);
  g_Config.nKillHumanDecLuckPoint := Config.ReadInteger('Setup', 'KillHumanDecLuckPoint', g_Config.nKillHumanDecLuckPoint);

  if Config.ReadInteger('Setup', 'DecLightItemDrugTime', -1) < 0 then
    Config.WriteInteger('Setup', 'DecLightItemDrugTime', g_Config.dwDecLightItemDrugTime);
  g_Config.dwDecLightItemDrugTime := Config.ReadInteger('Setup', 'DecLightItemDrugTime', g_Config.dwDecLightItemDrugTime);


  if Config.ReadInteger('Setup', 'SafeZoneSize', -1) < 0 then
    Config.WriteInteger('Setup', 'SafeZoneSize', g_Config.nSafeZoneSize);
  g_Config.nSafeZoneSize := Config.ReadInteger('Setup', 'SafeZoneSize', g_Config.nSafeZoneSize);

  if Config.ReadInteger('Setup', 'StartPointSize', -1) < 0 then
    Config.WriteInteger('Setup', 'StartPointSize', g_Config.nStartPointSize);
  g_Config.nStartPointSize := Config.ReadInteger('Setup', 'StartPointSize', g_Config.nStartPointSize);

  for I := Low(g_Config.ReNewNameColor) to High(g_Config.ReNewNameColor) do begin
    if Config.ReadInteger('Setup', 'ReNewNameColor' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'ReNewNameColor' + IntToStr(I), g_Config.ReNewNameColor[I]);
    g_Config.ReNewNameColor[I] := Config.ReadInteger('Setup', 'ReNewNameColor' + IntToStr(I), g_Config.ReNewNameColor[I]);
  end;
  if Config.ReadInteger('Setup', 'ReNewNameColorTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ReNewNameColorTime', g_Config.dwReNewNameColorTime);
  g_Config.dwReNewNameColorTime := Config.ReadInteger('Setup', 'ReNewNameColorTime', g_Config.dwReNewNameColorTime);

  if Config.ReadInteger('Setup', 'ReNewChangeColor', -1) < 0 then
    Config.WriteBool('Setup', 'ReNewChangeColor', g_Config.boReNewChangeColor);
  g_Config.boReNewChangeColor := Config.ReadBool('Setup', 'ReNewChangeColor', g_Config.boReNewChangeColor);

  if Config.ReadInteger('Setup', 'ReNewLevelClearExp', -1) < 0 then
    Config.WriteBool('Setup', 'ReNewLevelClearExp', g_Config.boReNewLevelClearExp);
  g_Config.boReNewLevelClearExp := Config.ReadBool('Setup', 'ReNewLevelClearExp', g_Config.boReNewLevelClearExp);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrDC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrDC', g_Config.BonusAbilofWarr.DC);
  g_Config.BonusAbilofWarr.DC := Config.ReadInteger('Setup', 'BonusAbilofWarrDC', g_Config.BonusAbilofWarr.DC);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrMC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrMC', g_Config.BonusAbilofWarr.MC);
  g_Config.BonusAbilofWarr.MC := Config.ReadInteger('Setup', 'BonusAbilofWarrMC', g_Config.BonusAbilofWarr.MC);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrSC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrSC', g_Config.BonusAbilofWarr.SC);
  g_Config.BonusAbilofWarr.SC := Config.ReadInteger('Setup', 'BonusAbilofWarrSC', g_Config.BonusAbilofWarr.SC);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrAC', g_Config.BonusAbilofWarr.AC);
  g_Config.BonusAbilofWarr.AC := Config.ReadInteger('Setup', 'BonusAbilofWarrAC', g_Config.BonusAbilofWarr.AC);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrMAC', g_Config.BonusAbilofWarr.MAC);
  g_Config.BonusAbilofWarr.MAC := Config.ReadInteger('Setup', 'BonusAbilofWarrMAC', g_Config.BonusAbilofWarr.MAC);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrHP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrHP', g_Config.BonusAbilofWarr.HP);
  g_Config.BonusAbilofWarr.HP := Config.ReadInteger('Setup', 'BonusAbilofWarrHP', g_Config.BonusAbilofWarr.HP);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrMP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrMP', g_Config.BonusAbilofWarr.MP);
  g_Config.BonusAbilofWarr.MP := Config.ReadInteger('Setup', 'BonusAbilofWarrMP', g_Config.BonusAbilofWarr.MP);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrHit', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrHit', g_Config.BonusAbilofWarr.Hit);
  g_Config.BonusAbilofWarr.Hit := Config.ReadInteger('Setup', 'BonusAbilofWarrHit', g_Config.BonusAbilofWarr.Hit);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrSpeed', g_Config.BonusAbilofWarr.Speed);
  g_Config.BonusAbilofWarr.Speed := Config.ReadInteger('Setup', 'BonusAbilofWarrSpeed', g_Config.BonusAbilofWarr.Speed);

  if Config.ReadInteger('Setup', 'BonusAbilofWarrX2', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWarrX2', g_Config.BonusAbilofWarr.X2);
  g_Config.BonusAbilofWarr.X2 := Config.ReadInteger('Setup', 'BonusAbilofWarrX2', g_Config.BonusAbilofWarr.X2);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardDC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardDC', g_Config.BonusAbilofWizard.DC);
  g_Config.BonusAbilofWizard.DC := Config.ReadInteger('Setup', 'BonusAbilofWizardDC', g_Config.BonusAbilofWizard.DC);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardMC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardMC', g_Config.BonusAbilofWizard.MC);
  g_Config.BonusAbilofWizard.MC := Config.ReadInteger('Setup', 'BonusAbilofWizardMC', g_Config.BonusAbilofWizard.MC);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardSC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardSC', g_Config.BonusAbilofWizard.SC);
  g_Config.BonusAbilofWizard.SC := Config.ReadInteger('Setup', 'BonusAbilofWizardSC', g_Config.BonusAbilofWizard.SC);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardAC', g_Config.BonusAbilofWizard.AC);
  g_Config.BonusAbilofWizard.AC := Config.ReadInteger('Setup', 'BonusAbilofWizardAC', g_Config.BonusAbilofWizard.AC);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardMAC', g_Config.BonusAbilofWizard.MAC);
  g_Config.BonusAbilofWizard.MAC := Config.ReadInteger('Setup', 'BonusAbilofWizardMAC', g_Config.BonusAbilofWizard.MAC);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardHP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardHP', g_Config.BonusAbilofWizard.HP);
  g_Config.BonusAbilofWizard.HP := Config.ReadInteger('Setup', 'BonusAbilofWizardHP', g_Config.BonusAbilofWizard.HP);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardMP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardMP', g_Config.BonusAbilofWizard.MP);
  g_Config.BonusAbilofWizard.MP := Config.ReadInteger('Setup', 'BonusAbilofWizardMP', g_Config.BonusAbilofWizard.MP);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardHit', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardHit', g_Config.BonusAbilofWizard.Hit);
  g_Config.BonusAbilofWizard.Hit := Config.ReadInteger('Setup', 'BonusAbilofWizardHit', g_Config.BonusAbilofWizard.Hit);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardSpeed', g_Config.BonusAbilofWizard.Speed);
  g_Config.BonusAbilofWizard.Speed := Config.ReadInteger('Setup', 'BonusAbilofWizardSpeed', g_Config.BonusAbilofWizard.Speed);

  if Config.ReadInteger('Setup', 'BonusAbilofWizardX2', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofWizardX2', g_Config.BonusAbilofWizard.X2);
  g_Config.BonusAbilofWizard.X2 := Config.ReadInteger('Setup', 'BonusAbilofWizardX2', g_Config.BonusAbilofWizard.X2);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosDC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosDC', g_Config.BonusAbilofTaos.DC);
  g_Config.BonusAbilofTaos.DC := Config.ReadInteger('Setup', 'BonusAbilofTaosDC', g_Config.BonusAbilofTaos.DC);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosMC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosMC', g_Config.BonusAbilofTaos.MC);
  g_Config.BonusAbilofTaos.MC := Config.ReadInteger('Setup', 'BonusAbilofTaosMC', g_Config.BonusAbilofTaos.MC);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosSC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosSC', g_Config.BonusAbilofTaos.SC);
  g_Config.BonusAbilofTaos.SC := Config.ReadInteger('Setup', 'BonusAbilofTaosSC', g_Config.BonusAbilofTaos.SC);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosAC', g_Config.BonusAbilofTaos.AC);
  g_Config.BonusAbilofTaos.AC := Config.ReadInteger('Setup', 'BonusAbilofTaosAC', g_Config.BonusAbilofTaos.AC);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosMAC', g_Config.BonusAbilofTaos.MAC);
  g_Config.BonusAbilofTaos.MAC := Config.ReadInteger('Setup', 'BonusAbilofTaosMAC', g_Config.BonusAbilofTaos.MAC);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosHP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosHP', g_Config.BonusAbilofTaos.HP);
  g_Config.BonusAbilofTaos.HP := Config.ReadInteger('Setup', 'BonusAbilofTaosHP', g_Config.BonusAbilofTaos.HP);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosMP', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosMP', g_Config.BonusAbilofTaos.MP);
  g_Config.BonusAbilofTaos.MP := Config.ReadInteger('Setup', 'BonusAbilofTaosMP', g_Config.BonusAbilofTaos.MP);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosHit', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosHit', g_Config.BonusAbilofTaos.Hit);
  g_Config.BonusAbilofTaos.Hit := Config.ReadInteger('Setup', 'BonusAbilofTaosHit', g_Config.BonusAbilofTaos.Hit);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosSpeed', g_Config.BonusAbilofTaos.Speed);
  g_Config.BonusAbilofTaos.Speed := Config.ReadInteger('Setup', 'BonusAbilofTaosSpeed', g_Config.BonusAbilofTaos.Speed);

  if Config.ReadInteger('Setup', 'BonusAbilofTaosX2', -1) < 0 then
    Config.WriteInteger('Setup', 'BonusAbilofTaosX2', g_Config.BonusAbilofTaos.X2);
  g_Config.BonusAbilofTaos.X2 := Config.ReadInteger('Setup', 'BonusAbilofTaosX2', g_Config.BonusAbilofTaos.X2);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrDC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrDC', g_Config.NakedAbilofWarr.DC);
  g_Config.NakedAbilofWarr.DC := Config.ReadInteger('Setup', 'NakedAbilofWarrDC', g_Config.NakedAbilofWarr.DC);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrMC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrMC', g_Config.NakedAbilofWarr.MC);
  g_Config.NakedAbilofWarr.MC := Config.ReadInteger('Setup', 'NakedAbilofWarrMC', g_Config.NakedAbilofWarr.MC);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrSC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrSC', g_Config.NakedAbilofWarr.SC);
  g_Config.NakedAbilofWarr.SC := Config.ReadInteger('Setup', 'NakedAbilofWarrSC', g_Config.NakedAbilofWarr.SC);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrAC', g_Config.NakedAbilofWarr.AC);
  g_Config.NakedAbilofWarr.AC := Config.ReadInteger('Setup', 'NakedAbilofWarrAC', g_Config.NakedAbilofWarr.AC);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrMAC', g_Config.NakedAbilofWarr.MAC);
  g_Config.NakedAbilofWarr.MAC := Config.ReadInteger('Setup', 'NakedAbilofWarrMAC', g_Config.NakedAbilofWarr.MAC);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrHP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrHP', g_Config.NakedAbilofWarr.HP);
  g_Config.NakedAbilofWarr.HP := Config.ReadInteger('Setup', 'NakedAbilofWarrHP', g_Config.NakedAbilofWarr.HP);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrMP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrMP', g_Config.NakedAbilofWarr.MP);
  g_Config.NakedAbilofWarr.MP := Config.ReadInteger('Setup', 'NakedAbilofWarrMP', g_Config.NakedAbilofWarr.MP);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrHit', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrHit', g_Config.NakedAbilofWarr.Hit);
  g_Config.NakedAbilofWarr.Hit := Config.ReadInteger('Setup', 'NakedAbilofWarrHit', g_Config.NakedAbilofWarr.Hit);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrSpeed', g_Config.NakedAbilofWarr.Speed);
  g_Config.NakedAbilofWarr.Speed := Config.ReadInteger('Setup', 'NakedAbilofWarrSpeed', g_Config.NakedAbilofWarr.Speed);

  if Config.ReadInteger('Setup', 'NakedAbilofWarrX2', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWarrX2', g_Config.NakedAbilofWarr.X2);
  g_Config.NakedAbilofWarr.X2 := Config.ReadInteger('Setup', 'NakedAbilofWarrX2', g_Config.NakedAbilofWarr.X2);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardDC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardDC', g_Config.NakedAbilofWizard.DC);
  g_Config.NakedAbilofWizard.DC := Config.ReadInteger('Setup', 'NakedAbilofWizardDC', g_Config.NakedAbilofWizard.DC);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardMC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardMC', g_Config.NakedAbilofWizard.MC);
  g_Config.NakedAbilofWizard.MC := Config.ReadInteger('Setup', 'NakedAbilofWizardMC', g_Config.NakedAbilofWizard.MC);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardSC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardSC', g_Config.NakedAbilofWizard.SC);
  g_Config.NakedAbilofWizard.SC := Config.ReadInteger('Setup', 'NakedAbilofWizardSC', g_Config.NakedAbilofWizard.SC);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardAC', g_Config.NakedAbilofWizard.AC);
  g_Config.NakedAbilofWizard.AC := Config.ReadInteger('Setup', 'NakedAbilofWizardAC', g_Config.NakedAbilofWizard.AC);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardMAC', g_Config.NakedAbilofWizard.MAC);
  g_Config.NakedAbilofWizard.MAC := Config.ReadInteger('Setup', 'NakedAbilofWizardMAC', g_Config.NakedAbilofWizard.MAC);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardHP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardHP', g_Config.NakedAbilofWizard.HP);
  g_Config.NakedAbilofWizard.HP := Config.ReadInteger('Setup', 'NakedAbilofWizardHP', g_Config.NakedAbilofWizard.HP);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardMP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardMP', g_Config.NakedAbilofWizard.MP);
  g_Config.NakedAbilofWizard.MP := Config.ReadInteger('Setup', 'NakedAbilofWizardMP', g_Config.NakedAbilofWizard.MP);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardHit', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardHit', g_Config.NakedAbilofWizard.Hit);
  g_Config.NakedAbilofWizard.Hit := Config.ReadInteger('Setup', 'NakedAbilofWizardHit', g_Config.NakedAbilofWizard.Hit);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardSpeed', g_Config.NakedAbilofWizard.Speed);
  g_Config.NakedAbilofWizard.Speed := Config.ReadInteger('Setup', 'NakedAbilofWizardSpeed', g_Config.NakedAbilofWizard.Speed);

  if Config.ReadInteger('Setup', 'NakedAbilofWizardX2', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofWizardX2', g_Config.NakedAbilofWizard.X2);
  g_Config.NakedAbilofWizard.X2 := Config.ReadInteger('Setup', 'NakedAbilofWizardX2', g_Config.NakedAbilofWizard.X2);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosDC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosDC', g_Config.NakedAbilofTaos.DC);
  g_Config.NakedAbilofTaos.DC := Config.ReadInteger('Setup', 'NakedAbilofTaosDC', g_Config.NakedAbilofTaos.DC);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosMC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosMC', g_Config.NakedAbilofTaos.MC);
  g_Config.NakedAbilofTaos.MC := Config.ReadInteger('Setup', 'NakedAbilofTaosMC', g_Config.NakedAbilofTaos.MC);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosSC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosSC', g_Config.NakedAbilofTaos.SC);
  g_Config.NakedAbilofTaos.SC := Config.ReadInteger('Setup', 'NakedAbilofTaosSC', g_Config.NakedAbilofTaos.SC);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosAC', g_Config.NakedAbilofTaos.AC);
  g_Config.NakedAbilofTaos.AC := Config.ReadInteger('Setup', 'NakedAbilofTaosAC', g_Config.NakedAbilofTaos.AC);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosMAC', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosMAC', g_Config.NakedAbilofTaos.MAC);
  g_Config.NakedAbilofTaos.MAC := Config.ReadInteger('Setup', 'NakedAbilofTaosMAC', g_Config.NakedAbilofTaos.MAC);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosHP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosHP', g_Config.NakedAbilofTaos.HP);
  g_Config.NakedAbilofTaos.HP := Config.ReadInteger('Setup', 'NakedAbilofTaosHP', g_Config.NakedAbilofTaos.HP);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosMP', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosMP', g_Config.NakedAbilofTaos.MP);
  g_Config.NakedAbilofTaos.MP := Config.ReadInteger('Setup', 'NakedAbilofTaosMP', g_Config.NakedAbilofTaos.MP);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosHit', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosHit', g_Config.NakedAbilofTaos.Hit);
  g_Config.NakedAbilofTaos.Hit := Config.ReadInteger('Setup', 'NakedAbilofTaosHit', g_Config.NakedAbilofTaos.Hit);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosSpeed', g_Config.NakedAbilofTaos.Speed);
  g_Config.NakedAbilofTaos.Speed := Config.ReadInteger('Setup', 'NakedAbilofTaosSpeed', g_Config.NakedAbilofTaos.Speed);

  if Config.ReadInteger('Setup', 'NakedAbilofTaosX2', -1) < 0 then
    Config.WriteInteger('Setup', 'NakedAbilofTaosX2', g_Config.NakedAbilofTaos.X2);
  g_Config.NakedAbilofTaos.X2 := Config.ReadInteger('Setup', 'NakedAbilofTaosX2', g_Config.NakedAbilofTaos.X2);

  if Config.ReadInteger('Setup', 'GroupMembersMax', -1) < 0 then
    Config.WriteInteger('Setup', 'GroupMembersMax', g_Config.nGroupMembersMax);
  g_Config.nGroupMembersMax := Config.ReadInteger('Setup', 'GroupMembersMax', g_Config.nGroupMembersMax);


  if Config.ReadInteger('Setup', 'UPgradeWeaponGetBackTime', -1) < 0 then
    Config.WriteInteger('Setup', 'UPgradeWeaponGetBackTime', g_Config.dwUPgradeWeaponGetBackTime);
  g_Config.dwUPgradeWeaponGetBackTime := Config.ReadInteger('Setup', 'UPgradeWeaponGetBackTime', g_Config.dwUPgradeWeaponGetBackTime);

  if Config.ReadInteger('Setup', 'ClearExpireUpgradeWeaponDays', -1) < 0 then
    Config.WriteInteger('Setup', 'ClearExpireUpgradeWeaponDays', g_Config.nClearExpireUpgradeWeaponDays);
  g_Config.nClearExpireUpgradeWeaponDays := Config.ReadInteger('Setup', 'ClearExpireUpgradeWeaponDays', g_Config.nClearExpireUpgradeWeaponDays);

  if Config.ReadInteger('Setup', 'UpgradeWeaponPrice', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponPrice', g_Config.nUpgradeWeaponPrice);
  g_Config.nUpgradeWeaponPrice := Config.ReadInteger('Setup', 'UpgradeWeaponPrice', g_Config.nUpgradeWeaponPrice);

  if Config.ReadInteger('Setup', 'UpgradeWeaponMaxPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponMaxPoint', g_Config.nUpgradeWeaponMaxPoint);
  g_Config.nUpgradeWeaponMaxPoint := Config.ReadInteger('Setup', 'UpgradeWeaponMaxPoint', g_Config.nUpgradeWeaponMaxPoint);

  if Config.ReadInteger('Setup', 'UpgradeWeaponDCRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponDCRate', g_Config.nUpgradeWeaponDCRate);
  g_Config.nUpgradeWeaponDCRate := Config.ReadInteger('Setup', 'UpgradeWeaponDCRate', g_Config.nUpgradeWeaponDCRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponDCTwoPointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponDCTwoPointRate', g_Config.nUpgradeWeaponDCTwoPointRate);
  g_Config.nUpgradeWeaponDCTwoPointRate := Config.ReadInteger('Setup', 'UpgradeWeaponDCTwoPointRate', g_Config.nUpgradeWeaponDCTwoPointRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponDCThreePointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponDCThreePointRate', g_Config.nUpgradeWeaponDCThreePointRate);
  g_Config.nUpgradeWeaponDCThreePointRate := Config.ReadInteger('Setup', 'UpgradeWeaponDCThreePointRate', g_Config.nUpgradeWeaponDCThreePointRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponMCRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponMCRate', g_Config.nUpgradeWeaponMCRate);
  g_Config.nUpgradeWeaponMCRate := Config.ReadInteger('Setup', 'UpgradeWeaponMCRate', g_Config.nUpgradeWeaponMCRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponMCTwoPointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponMCTwoPointRate', g_Config.nUpgradeWeaponMCTwoPointRate);
  g_Config.nUpgradeWeaponMCTwoPointRate := Config.ReadInteger('Setup', 'UpgradeWeaponMCTwoPointRate', g_Config.nUpgradeWeaponMCTwoPointRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponMCThreePointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponMCThreePointRate', g_Config.nUpgradeWeaponMCThreePointRate);
  g_Config.nUpgradeWeaponMCThreePointRate := Config.ReadInteger('Setup', 'UpgradeWeaponMCThreePointRate', g_Config.nUpgradeWeaponMCThreePointRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponSCRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponSCRate', g_Config.nUpgradeWeaponSCRate);
  g_Config.nUpgradeWeaponSCRate := Config.ReadInteger('Setup', 'UpgradeWeaponSCRate', g_Config.nUpgradeWeaponSCRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponSCTwoPointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponSCTwoPointRate', g_Config.nUpgradeWeaponSCTwoPointRate);
  g_Config.nUpgradeWeaponSCTwoPointRate := Config.ReadInteger('Setup', 'UpgradeWeaponSCTwoPointRate', g_Config.nUpgradeWeaponSCTwoPointRate);

  if Config.ReadInteger('Setup', 'UpgradeWeaponSCThreePointRate', -1) < 0 then
    Config.WriteInteger('Setup', 'UpgradeWeaponSCThreePointRate', g_Config.nUpgradeWeaponSCThreePointRate);
  g_Config.nUpgradeWeaponSCThreePointRate := Config.ReadInteger('Setup', 'UpgradeWeaponSCThreePointRate', g_Config.nUpgradeWeaponSCThreePointRate);

  if Config.ReadInteger('Setup', 'DeleteUpgradeFailWeapon', -1) < 0 then
    Config.WriteBool('Setup', 'DeleteUpgradeFailWeapon', g_Config.boDeleteUpgradeFailWeapon);
  g_Config.boDeleteUpgradeFailWeapon := Config.ReadBool('Setup', 'DeleteUpgradeFailWeapon', g_Config.boDeleteUpgradeFailWeapon);

  if Config.ReadInteger('Setup', 'BuildGuild', -1) < 0 then
    Config.WriteInteger('Setup', 'BuildGuild', g_Config.nBuildGuildPrice);
  g_Config.nBuildGuildPrice := Config.ReadInteger('Setup', 'BuildGuild', g_Config.nBuildGuildPrice);

  if Config.ReadInteger('Setup', 'MakeDurg', -1) < 0 then
    Config.WriteInteger('Setup', 'MakeDurg', g_Config.nMakeDurgPrice);
  g_Config.nMakeDurgPrice := Config.ReadInteger('Setup', 'MakeDurg', g_Config.nMakeDurgPrice);

  if Config.ReadInteger('Setup', 'GuildWarFee', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildWarFee', g_Config.nGuildWarPrice);
  g_Config.nGuildWarPrice := Config.ReadInteger('Setup', 'GuildWarFee', g_Config.nGuildWarPrice);

  if Config.ReadInteger('Setup', 'HireGuard', -1) < 0 then
    Config.WriteInteger('Setup', 'HireGuard', g_Config.nHireGuardPrice);
  g_Config.nHireGuardPrice := Config.ReadInteger('Setup', 'HireGuard', g_Config.nHireGuardPrice);

  if Config.ReadInteger('Setup', 'HireArcher', -1) < 0 then
    Config.WriteInteger('Setup', 'HireArcher', g_Config.nHireArcherPrice);
  g_Config.nHireArcherPrice := Config.ReadInteger('Setup', 'HireArcher', g_Config.nHireArcherPrice);

  if Config.ReadInteger('Setup', 'RepairDoor', -1) < 0 then
    Config.WriteInteger('Setup', 'RepairDoor', g_Config.nRepairDoorPrice);
  g_Config.nRepairDoorPrice := Config.ReadInteger('Setup', 'RepairDoor', g_Config.nRepairDoorPrice);

  if Config.ReadInteger('Setup', 'RepairWall', -1) < 0 then
    Config.WriteInteger('Setup', 'RepairWall', g_Config.nRepairWallPrice);
  g_Config.nRepairWallPrice := Config.ReadInteger('Setup', 'RepairWall', g_Config.nRepairWallPrice);

  if Config.ReadInteger('Setup', 'CastleMemberPriceRate', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleMemberPriceRate', g_Config.nCastleMemberPriceRate);
  g_Config.nCastleMemberPriceRate := Config.ReadInteger('Setup', 'CastleMemberPriceRate', g_Config.nCastleMemberPriceRate);

  if Config.ReadInteger('Setup', 'CastleGoldMax', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleGoldMax', g_Config.nCastleGoldMax);
  g_Config.nCastleGoldMax := Config.ReadInteger('Setup', 'CastleGoldMax', g_Config.nCastleGoldMax);

  if Config.ReadInteger('Setup', 'CastleOneDayGold', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleOneDayGold', g_Config.nCastleOneDayGold);
  g_Config.nCastleOneDayGold := Config.ReadInteger('Setup', 'CastleOneDayGold', g_Config.nCastleOneDayGold);

  if Config.ReadString('Setup', 'CastleName', '') = '' then
    Config.WriteString('Setup', 'CastleName', g_Config.sCASTLENAME);
  g_Config.sCASTLENAME := Config.ReadString('Setup', 'CastleName', g_Config.sCASTLENAME);

  if Config.ReadString('Setup', 'CastleHomeMap', '') = '' then
    Config.WriteString('Setup', 'CastleHomeMap', g_Config.sCastleHomeMap);
  g_Config.sCastleHomeMap := Config.ReadString('Setup', 'CastleHomeMap', g_Config.sCastleHomeMap);

  if Config.ReadInteger('Setup', 'CastleHomeX', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleHomeX', g_Config.nCastleHomeX);
  g_Config.nCastleHomeX := Config.ReadInteger('Setup', 'CastleHomeX', g_Config.nCastleHomeX);

  if Config.ReadInteger('Setup', 'CastleHomeY', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleHomeY', g_Config.nCastleHomeY);
  g_Config.nCastleHomeY := Config.ReadInteger('Setup', 'CastleHomeY', g_Config.nCastleHomeY);

  if Config.ReadInteger('Setup', 'CastleWarRangeX', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleWarRangeX', g_Config.nCastleWarRangeX);
  g_Config.nCastleWarRangeX := Config.ReadInteger('Setup', 'CastleWarRangeX', g_Config.nCastleWarRangeX);

  if Config.ReadInteger('Setup', 'CastleWarRangeY', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleWarRangeY', g_Config.nCastleWarRangeY);
  g_Config.nCastleWarRangeY := Config.ReadInteger('Setup', 'CastleWarRangeY', g_Config.nCastleWarRangeY);

  if Config.ReadInteger('Setup', 'CastleTaxRate', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleTaxRate', g_Config.nCastleTaxRate);
  g_Config.nCastleTaxRate := Config.ReadInteger('Setup', 'CastleTaxRate', g_Config.nCastleTaxRate);

  if Config.ReadInteger('Setup', 'CastleGetAllNpcTax', -1) < 0 then
    Config.WriteBool('Setup', 'CastleGetAllNpcTax', g_Config.boGetAllNpcTax);
  g_Config.boGetAllNpcTax := Config.ReadBool('Setup', 'CastleGetAllNpcTax', g_Config.boGetAllNpcTax);

  nLoadInteger := Config.ReadInteger('Setup', 'GenMonRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GenMonRate', g_Config.nMonGenRate)
  else g_Config.nMonGenRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ProcessMonRandRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ProcessMonRandRate', g_Config.nProcessMonRandRate)
  else g_Config.nProcessMonRandRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ProcessMonLimitCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ProcessMonLimitCount', g_Config.nProcessMonLimitCount)
  else g_Config.nProcessMonLimitCount := nLoadInteger;

  if Config.ReadInteger('Setup', 'HumanMaxGold', -1) < 0 then
    Config.WriteInteger('Setup', 'HumanMaxGold', g_Config.nHumanMaxGold);
  g_Config.nHumanMaxGold := Config.ReadInteger('Setup', 'HumanMaxGold', g_Config.nHumanMaxGold);

  if Config.ReadInteger('Setup', 'HumanTryModeMaxGold', -1) < 0 then
    Config.WriteInteger('Setup', 'HumanTryModeMaxGold', g_Config.nHumanTryModeMaxGold);
  g_Config.nHumanTryModeMaxGold := Config.ReadInteger('Setup', 'HumanTryModeMaxGold', g_Config.nHumanTryModeMaxGold);

  if Config.ReadInteger('Setup', 'TryModeLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'TryModeLevel', g_Config.nTryModeLevel);
  g_Config.nTryModeLevel := Config.ReadInteger('Setup', 'TryModeLevel', g_Config.nTryModeLevel);

  if Config.ReadInteger('Setup', 'TryModeUseStorage', -1) < 0 then
    Config.WriteBool('Setup', 'TryModeUseStorage', g_Config.boTryModeUseStorage);
  g_Config.boTryModeUseStorage := Config.ReadBool('Setup', 'TryModeUseStorage', g_Config.boTryModeUseStorage);

  if Config.ReadInteger('Setup', 'ShutRedMsgShowGMName', -1) < 0 then
    Config.WriteBool('Setup', 'ShutRedMsgShowGMName', g_Config.boShutRedMsgShowGMName);
  g_Config.boShutRedMsgShowGMName := Config.ReadBool('Setup', 'ShutRedMsgShowGMName', g_Config.boShutRedMsgShowGMName);

  if Config.ReadInteger('Setup', 'ShowMakeItemMsg', -1) < 0 then
    Config.WriteBool('Setup', 'ShowMakeItemMsg', g_Config.boShowMakeItemMsg);
  g_Config.boShowMakeItemMsg := Config.ReadBool('Setup', 'ShowMakeItemMsg', g_Config.boShowMakeItemMsg);

  if Config.ReadInteger('Setup', 'ShowGuildName', -1) < 0 then
    Config.WriteBool('Setup', 'ShowGuildName', g_Config.boShowGuildName);
  g_Config.boShowGuildName := Config.ReadBool('Setup', 'ShowGuildName', g_Config.boShowGuildName);

  if Config.ReadInteger('Setup', 'ShowRankLevelName', -1) < 0 then
    Config.WriteBool('Setup', 'ShowRankLevelName', g_Config.boShowRankLevelName);
  g_Config.boShowRankLevelName := Config.ReadBool('Setup', 'ShowRankLevelName', g_Config.boShowRankLevelName);

  if Config.ReadInteger('Setup', 'MonSayMsg', -1) < 0 then
    Config.WriteBool('Setup', 'MonSayMsg', g_Config.boMonSayMsg);
  g_Config.boMonSayMsg := Config.ReadBool('Setup', 'MonSayMsg', g_Config.boMonSayMsg);

  if Config.ReadInteger('Setup', 'SayMsgMaxLen', -1) < 0 then
    Config.WriteInteger('Setup', 'SayMsgMaxLen', g_Config.nSayMsgMaxLen);
  g_Config.nSayMsgMaxLen := Config.ReadInteger('Setup', 'SayMsgMaxLen', g_Config.nSayMsgMaxLen);

  if Config.ReadInteger('Setup', 'SayMsgTime', -1) < 0 then
    Config.WriteInteger('Setup', 'SayMsgTime', g_Config.dwSayMsgTime);
  g_Config.dwSayMsgTime := Config.ReadInteger('Setup', 'SayMsgTime', g_Config.dwSayMsgTime);

  if Config.ReadInteger('Setup', 'SayMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'SayMsgCount', g_Config.nSayMsgCount);
  g_Config.nSayMsgCount := Config.ReadInteger('Setup', 'SayMsgCount', g_Config.nSayMsgCount);

  if Config.ReadInteger('Setup', 'DisableSayMsgTime', -1) < 0 then
    Config.WriteInteger('Setup', 'DisableSayMsgTime', g_Config.dwDisableSayMsgTime);
  g_Config.dwDisableSayMsgTime := Config.ReadInteger('Setup', 'DisableSayMsgTime', g_Config.dwDisableSayMsgTime);

  if Config.ReadInteger('Setup', 'SayRedMsgMaxLen', -1) < 0 then
    Config.WriteInteger('Setup', 'SayRedMsgMaxLen', g_Config.nSayRedMsgMaxLen);
  g_Config.nSayRedMsgMaxLen := Config.ReadInteger('Setup', 'SayRedMsgMaxLen', g_Config.nSayRedMsgMaxLen);

  if Config.ReadInteger('Setup', 'CanShoutMsgLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'CanShoutMsgLevel', g_Config.nCanShoutMsgLevel);
  g_Config.nCanShoutMsgLevel := Config.ReadInteger('Setup', 'CanShoutMsgLevel', g_Config.nCanShoutMsgLevel);

  if Config.ReadInteger('Setup', 'StartPermission', -1) < 0 then
    Config.WriteInteger('Setup', 'StartPermission', g_Config.nStartPermission);
  g_Config.nStartPermission := Config.ReadInteger('Setup', 'StartPermission', g_Config.nStartPermission);

  if Config.ReadInteger('Setup', 'SendRefMsgRange', -1) < 0 then
    Config.WriteInteger('Setup', 'SendRefMsgRange', g_Config.nSendRefMsgRange);
  g_Config.nSendRefMsgRange := Config.ReadInteger('Setup', 'SendRefMsgRange', g_Config.nSendRefMsgRange);

  if Config.ReadInteger('Setup', 'DecLampDura', -1) < 0 then
    Config.WriteBool('Setup', 'DecLampDura', g_Config.boDecLampDura);
  g_Config.boDecLampDura := Config.ReadBool('Setup', 'DecLampDura', g_Config.boDecLampDura);

  if Config.ReadInteger('Setup', 'HungerSystem', -1) < 0 then
    Config.WriteBool('Setup', 'HungerSystem', g_Config.boHungerSystem);
  g_Config.boHungerSystem := Config.ReadBool('Setup', 'HungerSystem', g_Config.boHungerSystem);

  if Config.ReadInteger('Setup', 'HungerDecHP', -1) < 0 then
    Config.WriteBool('Setup', 'HungerDecHP', g_Config.boHungerDecHP);
  g_Config.boHungerDecHP := Config.ReadBool('Setup', 'HungerDecHP', g_Config.boHungerDecHP);

  if Config.ReadInteger('Setup', 'HungerDecPower', -1) < 0 then
    Config.WriteBool('Setup', 'HungerDecPower', g_Config.boHungerDecPower);
  g_Config.boHungerDecPower := Config.ReadBool('Setup', 'HungerDecPower', g_Config.boHungerDecPower);

  if Config.ReadInteger('Setup', 'DiableHumanRun', -1) < 0 then
    Config.WriteBool('Setup', 'DiableHumanRun', g_Config.boDiableHumanRun);
  g_Config.boDiableHumanRun := Config.ReadBool('Setup', 'DiableHumanRun', g_Config.boDiableHumanRun);

  if Config.ReadInteger('Setup', 'RunHuman', -1) < 0 then
    Config.WriteBool('Setup', 'RunHuman', g_Config.boRUNHUMAN);
  g_Config.boRUNHUMAN := Config.ReadBool('Setup', 'RunHuman', g_Config.boRUNHUMAN);

  if Config.ReadInteger('Setup', 'RunMon', -1) < 0 then
    Config.WriteBool('Setup', 'RunMon', g_Config.boRUNMON);
  g_Config.boRUNMON := Config.ReadBool('Setup', 'RunMon', g_Config.boRUNMON);

  if Config.ReadInteger('Setup', 'RunNpc', -1) < 0 then
    Config.WriteBool('Setup', 'RunNpc', g_Config.boRunNpc);
  g_Config.boRunNpc := Config.ReadBool('Setup', 'RunNpc', g_Config.boRunNpc);

  nLoadInteger := Config.ReadInteger('Setup', 'RunGuard', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'RunGuard', g_Config.boRunGuard)
  else g_Config.boRunGuard := nLoadInteger = 1;

  if Config.ReadInteger('Setup', 'WarDisableHumanRun', -1) < 0 then
    Config.WriteBool('Setup', 'WarDisableHumanRun', g_Config.boWarDisHumRun);
  g_Config.boWarDisHumRun := Config.ReadBool('Setup', 'WarDisableHumanRun', g_Config.boWarDisHumRun);

  if Config.ReadInteger('Setup', 'GMRunAll', -1) < 0 then
    Config.WriteBool('Setup', 'GMRunAll', g_Config.boGMRunAll);
  g_Config.boGMRunAll := Config.ReadBool('Setup', 'GMRunAll', g_Config.boGMRunAll);

  if Config.ReadInteger('Setup', 'SafeAreaLimitedRun', -1) < 0 then
    Config.WriteBool('Setup', 'SafeAreaLimitedRun', g_Config.boSafeAreaLimited);
  g_Config.boSafeAreaLimited := Config.ReadBool('Setup', 'SafeAreaLimitedRun', g_Config.boSafeAreaLimited);


  if Config.ReadInteger('Setup', 'BoneFammCount', -1) < 0 then
    Config.WriteInteger('Setup', 'BoneFammCount', g_Config.nBoneFammCount);
  g_Config.nBoneFammCount := Config.ReadInteger('Setup', 'BoneFammCount', g_Config.nBoneFammCount);

  for I := Low(g_Config.BoneFammArray) to High(g_Config.BoneFammArray) do begin
    if Config.ReadInteger('Setup', 'BoneFammHumLevel' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'BoneFammHumLevel' + IntToStr(I), g_Config.BoneFammArray[I].nHumLevel);
    g_Config.BoneFammArray[I].nHumLevel := Config.ReadInteger('Setup', 'BoneFammHumLevel' + IntToStr(I), g_Config.BoneFammArray[I].nHumLevel);

    if Config.ReadString('Names', 'BoneFamm' + IntToStr(I), '') = '' then
      Config.WriteString('Names', 'BoneFamm' + IntToStr(I), g_Config.BoneFammArray[I].sMonName);
    g_Config.BoneFammArray[I].sMonName := Config.ReadString('Names', 'BoneFamm' + IntToStr(I), g_Config.BoneFammArray[I].sMonName);

    if Config.ReadInteger('Setup', 'BoneFammCount' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'BoneFammCount' + IntToStr(I), g_Config.BoneFammArray[I].nCount);
    g_Config.BoneFammArray[I].nCount := Config.ReadInteger('Setup', 'BoneFammCount' + IntToStr(I), g_Config.BoneFammArray[I].nCount);

    if Config.ReadInteger('Setup', 'BoneFammLevel' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'BoneFammLevel' + IntToStr(I), g_Config.BoneFammArray[I].nLevel);
    g_Config.BoneFammArray[I].nLevel := Config.ReadInteger('Setup', 'BoneFammLevel' + IntToStr(I), g_Config.BoneFammArray[I].nLevel);
  end;

  if Config.ReadInteger('Setup', 'DogzCount', -1) < 0 then
    Config.WriteInteger('Setup', 'DogzCount', g_Config.nDogzCount);
  g_Config.nDogzCount := Config.ReadInteger('Setup', 'DogzCount', g_Config.nDogzCount);

  for I := Low(g_Config.DogzArray) to High(g_Config.DogzArray) do begin
    if Config.ReadInteger('Setup', 'DogzHumLevel' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'DogzHumLevel' + IntToStr(I), g_Config.DogzArray[I].nHumLevel);
    g_Config.DogzArray[I].nHumLevel := Config.ReadInteger('Setup', 'DogzHumLevel' + IntToStr(I), g_Config.DogzArray[I].nHumLevel);

    if Config.ReadString('Names', 'Dogz' + IntToStr(I), '') = '' then
      Config.WriteString('Names', 'Dogz' + IntToStr(I), g_Config.DogzArray[I].sMonName);
    g_Config.DogzArray[I].sMonName := Config.ReadString('Names', 'Dogz' + IntToStr(I), g_Config.DogzArray[I].sMonName);

    if Config.ReadInteger('Setup', 'DogzCount' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'DogzCount' + IntToStr(I), g_Config.DogzArray[I].nCount);
    g_Config.DogzArray[I].nCount := Config.ReadInteger('Setup', 'DogzCount' + IntToStr(I), g_Config.DogzArray[I].nCount);

    if Config.ReadInteger('Setup', 'DogzLevel' + IntToStr(I), -1) < 0 then
      Config.WriteInteger('Setup', 'DogzLevel' + IntToStr(I), g_Config.DogzArray[I].nLevel);
    g_Config.DogzArray[I].nLevel := Config.ReadInteger('Setup', 'DogzLevel' + IntToStr(I), g_Config.DogzArray[I].nLevel);
  end;

  if Config.ReadInteger('Setup', 'TryDealTime', -1) < 0 then
    Config.WriteInteger('Setup', 'TryDealTime', g_Config.dwTryDealTime);
  g_Config.dwTryDealTime := Config.ReadInteger('Setup', 'TryDealTime', g_Config.dwTryDealTime);

  if Config.ReadInteger('Setup', 'DealOKTime', -1) < 0 then
    Config.WriteInteger('Setup', 'DealOKTime', g_Config.dwDealOKTime);
  g_Config.dwDealOKTime := Config.ReadInteger('Setup', 'DealOKTime', g_Config.dwDealOKTime);

  if Config.ReadInteger('Setup', 'CanNotGetBackDeal', -1) < 0 then
    Config.WriteBool('Setup', 'CanNotGetBackDeal', g_Config.boCanNotGetBackDeal);
  g_Config.boCanNotGetBackDeal := Config.ReadBool('Setup', 'CanNotGetBackDeal', g_Config.boCanNotGetBackDeal);

  if Config.ReadInteger('Setup', 'DisableDeal', -1) < 0 then
    Config.WriteBool('Setup', 'DisableDeal', g_Config.boDisableDeal);
  g_Config.boDisableDeal := Config.ReadBool('Setup', 'DisableDeal', g_Config.boDisableDeal);

  if Config.ReadInteger('Setup', 'MasterOKLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterOKLevel', g_Config.nMasterOKLevel);
  g_Config.nMasterOKLevel := Config.ReadInteger('Setup', 'MasterOKLevel', g_Config.nMasterOKLevel);

  if Config.ReadInteger('Setup', 'MasterOKCreditPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterOKCreditPoint', g_Config.nMasterOKCreditPoint);
  g_Config.nMasterOKCreditPoint := Config.ReadInteger('Setup', 'MasterOKCreditPoint', g_Config.nMasterOKCreditPoint);

  if Config.ReadInteger('Setup', 'MasterOKBonusPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterOKBonusPoint', g_Config.nMasterOKBonusPoint);
  g_Config.nMasterOKBonusPoint := Config.ReadInteger('Setup', 'MasterOKBonusPoint', g_Config.nMasterOKBonusPoint);

  if Config.ReadInteger('Setup', 'PKProtect', -1) < 0 then
    Config.WriteBool('Setup', 'PKProtect', g_Config.boPKLevelProtect);
  g_Config.boPKLevelProtect := Config.ReadBool('Setup', 'PKProtect', g_Config.boPKLevelProtect);

  if Config.ReadInteger('Setup', 'PKProtectLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'PKProtectLevel', g_Config.nPKProtectLevel);
  g_Config.nPKProtectLevel := Config.ReadInteger('Setup', 'PKProtectLevel', g_Config.nPKProtectLevel);

  if Config.ReadInteger('Setup', 'RedPKProtectLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'RedPKProtectLevel', g_Config.nRedPKProtectLevel);
  g_Config.nRedPKProtectLevel := Config.ReadInteger('Setup', 'RedPKProtectLevel', g_Config.nRedPKProtectLevel);

  if Config.ReadInteger('Setup', 'ItemPowerRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemPowerRate', g_Config.nItemPowerRate);
  g_Config.nItemPowerRate := Config.ReadInteger('Setup', 'ItemPowerRate', g_Config.nItemPowerRate);

  if Config.ReadInteger('Setup', 'ItemExpRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemExpRate', g_Config.nItemExpRate);
  g_Config.nItemExpRate := Config.ReadInteger('Setup', 'ItemExpRate', g_Config.nItemExpRate);

  if Config.ReadInteger('Setup', 'ScriptGotoCountLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'ScriptGotoCountLimit', g_Config.nScriptGotoCountLimit);
  g_Config.nScriptGotoCountLimit := Config.ReadInteger('Setup', 'ScriptGotoCountLimit', g_Config.nScriptGotoCountLimit);

  if Config.ReadInteger('Setup', 'HearMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'HearMsgFColor', g_Config.btHearMsgFColor);
  g_Config.btHearMsgFColor := Config.ReadInteger('Setup', 'HearMsgFColor', g_Config.btHearMsgFColor);

  if Config.ReadInteger('Setup', 'HearMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'HearMsgBColor', g_Config.btHearMsgBColor);
  g_Config.btHearMsgBColor := Config.ReadInteger('Setup', 'HearMsgBColor', g_Config.btHearMsgBColor);

  if Config.ReadInteger('Setup', 'WhisperMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'WhisperMsgFColor', g_Config.btWhisperMsgFColor);
  g_Config.btWhisperMsgFColor := Config.ReadInteger('Setup', 'WhisperMsgFColor', g_Config.btWhisperMsgFColor);

  if Config.ReadInteger('Setup', 'WhisperMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'WhisperMsgBColor', g_Config.btWhisperMsgBColor);
  g_Config.btWhisperMsgBColor := Config.ReadInteger('Setup', 'WhisperMsgBColor', g_Config.btWhisperMsgBColor);

  if Config.ReadInteger('Setup', 'GMWhisperMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GMWhisperMsgFColor', g_Config.btGMWhisperMsgFColor);
  g_Config.btGMWhisperMsgFColor := Config.ReadInteger('Setup', 'GMWhisperMsgFColor', g_Config.btGMWhisperMsgFColor);

  if Config.ReadInteger('Setup', 'GMWhisperMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GMWhisperMsgBColor', g_Config.btGMWhisperMsgBColor);
  g_Config.btGMWhisperMsgBColor := Config.ReadInteger('Setup', 'GMWhisperMsgBColor', g_Config.btGMWhisperMsgBColor);

  if Config.ReadInteger('Setup', 'CryMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'CryMsgFColor', g_Config.btCryMsgFColor);
  g_Config.btCryMsgFColor := Config.ReadInteger('Setup', 'CryMsgFColor', g_Config.btCryMsgFColor);

  if Config.ReadInteger('Setup', 'CryMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'CryMsgBColor', g_Config.btCryMsgBColor);
  g_Config.btCryMsgBColor := Config.ReadInteger('Setup', 'CryMsgBColor', g_Config.btCryMsgBColor);

  if Config.ReadInteger('Setup', 'GreenMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GreenMsgFColor', g_Config.btGreenMsgFColor);
  g_Config.btGreenMsgFColor := Config.ReadInteger('Setup', 'GreenMsgFColor', g_Config.btGreenMsgFColor);

  if Config.ReadInteger('Setup', 'GreenMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GreenMsgBColor', g_Config.btGreenMsgBColor);
  g_Config.btGreenMsgBColor := Config.ReadInteger('Setup', 'GreenMsgBColor', g_Config.btGreenMsgBColor);

  if Config.ReadInteger('Setup', 'BlueMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'BlueMsgFColor', g_Config.btBlueMsgFColor);
  g_Config.btBlueMsgFColor := Config.ReadInteger('Setup', 'BlueMsgFColor', g_Config.btBlueMsgFColor);

  if Config.ReadInteger('Setup', 'BlueMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'BlueMsgBColor', g_Config.btBlueMsgBColor);
  g_Config.btBlueMsgBColor := Config.ReadInteger('Setup', 'BlueMsgBColor', g_Config.btBlueMsgBColor);

  if Config.ReadInteger('Setup', 'RedMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'RedMsgFColor', g_Config.btRedMsgFColor);
  g_Config.btRedMsgFColor := Config.ReadInteger('Setup', 'RedMsgFColor', g_Config.btRedMsgFColor);

  if Config.ReadInteger('Setup', 'RedMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'RedMsgBColor', g_Config.btRedMsgBColor);
  g_Config.btRedMsgBColor := Config.ReadInteger('Setup', 'RedMsgBColor', g_Config.btRedMsgBColor);

  if Config.ReadInteger('Setup', 'GuildMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildMsgFColor', g_Config.btGuildMsgFColor);
  g_Config.btGuildMsgFColor := Config.ReadInteger('Setup', 'GuildMsgFColor', g_Config.btGuildMsgFColor);

  if Config.ReadInteger('Setup', 'GuildMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildMsgBColor', g_Config.btGuildMsgBColor);
  g_Config.btGuildMsgBColor := Config.ReadInteger('Setup', 'GuildMsgBColor', g_Config.btGuildMsgBColor);

  if Config.ReadInteger('Setup', 'GroupMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GroupMsgFColor', g_Config.btGroupMsgFColor);
  g_Config.btGroupMsgFColor := Config.ReadInteger('Setup', 'GroupMsgFColor', g_Config.btGroupMsgFColor);

  if Config.ReadInteger('Setup', 'GroupMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'GroupMsgBColor', g_Config.btGroupMsgBColor);
  g_Config.btGroupMsgBColor := Config.ReadInteger('Setup', 'GroupMsgBColor', g_Config.btGroupMsgBColor);

  if Config.ReadInteger('Setup', 'CustMsgFColor', -1) < 0 then
    Config.WriteInteger('Setup', 'CustMsgFColor', g_Config.btCustMsgFColor);
  g_Config.btCustMsgFColor := Config.ReadInteger('Setup', 'CustMsgFColor', g_Config.btCustMsgFColor);

  if Config.ReadInteger('Setup', 'CustMsgBColor', -1) < 0 then
    Config.WriteInteger('Setup', 'CustMsgBColor', g_Config.btCustMsgBColor);
  g_Config.btCustMsgBColor := Config.ReadInteger('Setup', 'CustMsgBColor', g_Config.btCustMsgBColor);

  if Config.ReadInteger('Setup', 'MonRandomAddValue', -1) < 0 then
    Config.WriteInteger('Setup', 'MonRandomAddValue', g_Config.nMonRandomAddValue);
  g_Config.nMonRandomAddValue := Config.ReadInteger('Setup', 'MonRandomAddValue', g_Config.nMonRandomAddValue);

  if Config.ReadInteger('Setup', 'MakeRandomAddValue', -1) < 0 then
    Config.WriteInteger('Setup', 'MakeRandomAddValue', g_Config.nMakeRandomAddValue);
  g_Config.nMakeRandomAddValue := Config.ReadInteger('Setup', 'MakeRandomAddValue', g_Config.nMakeRandomAddValue);

  if Config.ReadInteger('Setup', 'ScriptRandomAddValue', -1) < 0 then
    Config.WriteInteger('Setup', 'ScriptRandomAddValue', g_Config.nScriptRandomAddValue);
  g_Config.nScriptRandomAddValue := Config.ReadInteger('Setup', 'ScriptRandomAddValue', g_Config.nScriptRandomAddValue);

  if Config.ReadInteger('Setup', 'WeaponDCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponDCAddValueMaxLimit', g_Config.nWeaponDCAddValueMaxLimit);
  g_Config.nWeaponDCAddValueMaxLimit := Config.ReadInteger('Setup', 'WeaponDCAddValueMaxLimit', g_Config.nWeaponDCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'WeaponDCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponDCAddValueRate', g_Config.nWeaponDCAddValueRate);
  g_Config.nWeaponDCAddValueRate := Config.ReadInteger('Setup', 'WeaponDCAddValueRate', g_Config.nWeaponDCAddValueRate);

  if Config.ReadInteger('Setup', 'WeaponMCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponMCAddValueMaxLimit', g_Config.nWeaponMCAddValueMaxLimit);
  g_Config.nWeaponMCAddValueMaxLimit := Config.ReadInteger('Setup', 'WeaponMCAddValueMaxLimit', g_Config.nWeaponMCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'WeaponMCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponMCAddValueRate', g_Config.nWeaponMCAddValueRate);
  g_Config.nWeaponMCAddValueRate := Config.ReadInteger('Setup', 'WeaponMCAddValueRate', g_Config.nWeaponMCAddValueRate);

  if Config.ReadInteger('Setup', 'WeaponSCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponSCAddValueMaxLimit', g_Config.nWeaponSCAddValueMaxLimit);
  g_Config.nWeaponSCAddValueMaxLimit := Config.ReadInteger('Setup', 'WeaponSCAddValueMaxLimit', g_Config.nWeaponSCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'WeaponSCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponSCAddValueRate', g_Config.nWeaponSCAddValueRate);
  g_Config.nWeaponSCAddValueRate := Config.ReadInteger('Setup', 'WeaponSCAddValueRate', g_Config.nWeaponSCAddValueRate);

  if Config.ReadInteger('Setup', 'DressDCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'DressDCAddValueMaxLimit', g_Config.nDressDCAddValueMaxLimit);
  g_Config.nDressDCAddValueMaxLimit := Config.ReadInteger('Setup', 'DressDCAddValueMaxLimit', g_Config.nDressDCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'DressDCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressDCAddValueRate', g_Config.nDressDCAddValueRate);
  g_Config.nDressDCAddValueRate := Config.ReadInteger('Setup', 'DressDCAddValueRate', g_Config.nDressDCAddValueRate);

  if Config.ReadInteger('Setup', 'DressDCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressDCAddRate', g_Config.nDressDCAddRate);
  g_Config.nDressDCAddRate := Config.ReadInteger('Setup', 'DressDCAddRate', g_Config.nDressDCAddRate);

  if Config.ReadInteger('Setup', 'DressMCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'DressMCAddValueMaxLimit', g_Config.nDressMCAddValueMaxLimit);
  g_Config.nDressMCAddValueMaxLimit := Config.ReadInteger('Setup', 'DressMCAddValueMaxLimit', g_Config.nDressMCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'DressMCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressMCAddValueRate', g_Config.nDressMCAddValueRate);
  g_Config.nDressMCAddValueRate := Config.ReadInteger('Setup', 'DressMCAddValueRate', g_Config.nDressMCAddValueRate);

  if Config.ReadInteger('Setup', 'DressMCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressMCAddRate', g_Config.nDressMCAddRate);
  g_Config.nDressMCAddRate := Config.ReadInteger('Setup', 'DressMCAddRate', g_Config.nDressMCAddRate);

  if Config.ReadInteger('Setup', 'DressSCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'DressSCAddValueMaxLimit', g_Config.nDressSCAddValueMaxLimit);
  g_Config.nDressSCAddValueMaxLimit := Config.ReadInteger('Setup', 'DressSCAddValueMaxLimit', g_Config.nDressSCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'DressSCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressSCAddValueRate', g_Config.nDressSCAddValueRate);
  g_Config.nDressSCAddValueRate := Config.ReadInteger('Setup', 'DressSCAddValueRate', g_Config.nDressSCAddValueRate);

  if Config.ReadInteger('Setup', 'DressSCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressSCAddRate', g_Config.nDressSCAddRate);
  g_Config.nDressSCAddRate := Config.ReadInteger('Setup', 'DressSCAddRate', g_Config.nDressSCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace19DCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19DCAddValueMaxLimit', g_Config.nNeckLace19DCAddValueMaxLimit);
  g_Config.nNeckLace19DCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace19DCAddValueMaxLimit', g_Config.nNeckLace19DCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace19DCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19DCAddValueRate', g_Config.nNeckLace19DCAddValueRate);
  g_Config.nNeckLace19DCAddValueRate := Config.ReadInteger('Setup', 'NeckLace19DCAddValueRate', g_Config.nNeckLace19DCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace19DCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19DCAddRate', g_Config.nNeckLace19DCAddRate);
  g_Config.nNeckLace19DCAddRate := Config.ReadInteger('Setup', 'NeckLace19DCAddRate', g_Config.nNeckLace19DCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace19MCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19MCAddValueMaxLimit', g_Config.nNeckLace19MCAddValueMaxLimit);
  g_Config.nNeckLace19MCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace19MCAddValueMaxLimit', g_Config.nNeckLace19MCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace19MCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19MCAddValueRate', g_Config.nNeckLace19MCAddValueRate);
  g_Config.nNeckLace19MCAddValueRate := Config.ReadInteger('Setup', 'NeckLace19MCAddValueRate', g_Config.nNeckLace19MCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace19MCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19MCAddRate', g_Config.nNeckLace19MCAddRate);
  g_Config.nNeckLace19MCAddRate := Config.ReadInteger('Setup', 'NeckLace19MCAddRate', g_Config.nNeckLace19MCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace19SCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19SCAddValueMaxLimit', g_Config.nNeckLace19SCAddValueMaxLimit);
  g_Config.nNeckLace19SCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace19SCAddValueMaxLimit', g_Config.nNeckLace19SCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace19SCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19SCAddValueRate', g_Config.nNeckLace19SCAddValueRate);
  g_Config.nNeckLace19SCAddValueRate := Config.ReadInteger('Setup', 'NeckLace19SCAddValueRate', g_Config.nNeckLace19SCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace19SCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19SCAddRate', g_Config.nNeckLace19SCAddRate);
  g_Config.nNeckLace19SCAddRate := Config.ReadInteger('Setup', 'NeckLace19SCAddRate', g_Config.nNeckLace19SCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace202124DCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124DCAddValueMaxLimit', g_Config.nNeckLace202124DCAddValueMaxLimit);
  g_Config.nNeckLace202124DCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace202124DCAddValueMaxLimit', g_Config.nNeckLace202124DCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace202124DCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124DCAddValueRate', g_Config.nNeckLace202124DCAddValueRate);
  g_Config.nNeckLace202124DCAddValueRate := Config.ReadInteger('Setup', 'NeckLace202124DCAddValueRate', g_Config.nNeckLace202124DCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace202124DCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124DCAddRate', g_Config.nNeckLace202124DCAddRate);
  g_Config.nNeckLace202124DCAddRate := Config.ReadInteger('Setup', 'NeckLace202124DCAddRate', g_Config.nNeckLace202124DCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace202124MCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124MCAddValueMaxLimit', g_Config.nNeckLace202124MCAddValueMaxLimit);
  g_Config.nNeckLace202124MCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace202124MCAddValueMaxLimit', g_Config.nNeckLace202124MCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace202124MCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124MCAddValueRate', g_Config.nNeckLace202124MCAddValueRate);
  g_Config.nNeckLace202124MCAddValueRate := Config.ReadInteger('Setup', 'NeckLace202124MCAddValueRate', g_Config.nNeckLace202124MCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace202124MCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124MCAddRate', g_Config.nNeckLace202124MCAddRate);
  g_Config.nNeckLace202124MCAddRate := Config.ReadInteger('Setup', 'NeckLace202124MCAddRate', g_Config.nNeckLace202124MCAddRate);

  if Config.ReadInteger('Setup', 'NeckLace202124SCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124SCAddValueMaxLimit', g_Config.nNeckLace202124SCAddValueMaxLimit);
  g_Config.nNeckLace202124SCAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace202124SCAddValueMaxLimit', g_Config.nNeckLace202124SCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace202124SCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124SCAddValueRate', g_Config.nNeckLace202124SCAddValueRate);
  g_Config.nNeckLace202124SCAddValueRate := Config.ReadInteger('Setup', 'NeckLace202124SCAddValueRate', g_Config.nNeckLace202124SCAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace202124SCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124SCAddRate', g_Config.nNeckLace202124SCAddRate);
  g_Config.nNeckLace202124SCAddRate := Config.ReadInteger('Setup', 'NeckLace202124SCAddRate', g_Config.nNeckLace202124SCAddRate);


  if Config.ReadInteger('Setup', 'ArmRing26DCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26DCAddValueMaxLimit', g_Config.nArmRing26DCAddValueMaxLimit);
  g_Config.nArmRing26DCAddValueMaxLimit := Config.ReadInteger('Setup', 'ArmRing26DCAddValueMaxLimit', g_Config.nArmRing26DCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'ArmRing26DCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26DCAddValueRate', g_Config.nArmRing26DCAddValueRate);
  g_Config.nArmRing26DCAddValueRate := Config.ReadInteger('Setup', 'ArmRing26DCAddValueRate', g_Config.nArmRing26DCAddValueRate);

  if Config.ReadInteger('Setup', 'ArmRing26DCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26DCAddRate', g_Config.nArmRing26DCAddRate);
  g_Config.nArmRing26DCAddRate := Config.ReadInteger('Setup', 'ArmRing26DCAddRate', g_Config.nArmRing26DCAddRate);

  if Config.ReadInteger('Setup', 'ArmRing26MCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26MCAddValueMaxLimit', g_Config.nArmRing26MCAddValueMaxLimit);
  g_Config.nArmRing26MCAddValueMaxLimit := Config.ReadInteger('Setup', 'ArmRing26MCAddValueMaxLimit', g_Config.nArmRing26MCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'ArmRing26MCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26MCAddValueRate', g_Config.nArmRing26MCAddValueRate);
  g_Config.nArmRing26MCAddValueRate := Config.ReadInteger('Setup', 'ArmRing26MCAddValueRate', g_Config.nArmRing26MCAddValueRate);

  if Config.ReadInteger('Setup', 'ArmRing26MCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26MCAddRate', g_Config.nArmRing26MCAddRate);
  g_Config.nArmRing26MCAddRate := Config.ReadInteger('Setup', 'ArmRing26MCAddRate', g_Config.nArmRing26MCAddRate);

  if Config.ReadInteger('Setup', 'ArmRing26SCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26SCAddValueMaxLimit', g_Config.nArmRing26SCAddValueMaxLimit);
  g_Config.nArmRing26SCAddValueMaxLimit := Config.ReadInteger('Setup', 'ArmRing26SCAddValueMaxLimit', g_Config.nArmRing26SCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'ArmRing26SCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26SCAddValueRate', g_Config.nArmRing26SCAddValueRate);
  g_Config.nArmRing26SCAddValueRate := Config.ReadInteger('Setup', 'ArmRing26SCAddValueRate', g_Config.nArmRing26SCAddValueRate);

  if Config.ReadInteger('Setup', 'ArmRing26SCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26SCAddRate', g_Config.nArmRing26SCAddRate);
  g_Config.nArmRing26SCAddRate := Config.ReadInteger('Setup', 'ArmRing26SCAddRate', g_Config.nArmRing26SCAddRate);

  if Config.ReadInteger('Setup', 'Ring22DCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22DCAddValueMaxLimit', g_Config.nRing22DCAddValueMaxLimit);
  g_Config.nRing22DCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring22DCAddValueMaxLimit', g_Config.nRing22DCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring22DCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22DCAddValueRate', g_Config.nRing22DCAddValueRate);
  g_Config.nRing22DCAddValueRate := Config.ReadInteger('Setup', 'Ring22DCAddValueRate', g_Config.nRing22DCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring22DCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22DCAddRate', g_Config.nRing22DCAddRate);
  g_Config.nRing22DCAddRate := Config.ReadInteger('Setup', 'Ring22DCAddRate', g_Config.nRing22DCAddRate);

  if Config.ReadInteger('Setup', 'Ring22MCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22MCAddValueMaxLimit', g_Config.nRing22MCAddValueMaxLimit);
  g_Config.nRing22MCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring22MCAddValueMaxLimit', g_Config.nRing22MCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring22MCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22MCAddValueRate', g_Config.nRing22MCAddValueRate);
  g_Config.nRing22MCAddValueRate := Config.ReadInteger('Setup', 'Ring22MCAddValueRate', g_Config.nRing22MCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring22MCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22MCAddRate', g_Config.nRing22MCAddRate);
  g_Config.nRing22MCAddRate := Config.ReadInteger('Setup', 'Ring22MCAddRate', g_Config.nRing22MCAddRate);

  if Config.ReadInteger('Setup', 'Ring22SCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22SCAddValueMaxLimit', g_Config.nRing22SCAddValueMaxLimit);
  g_Config.nRing22SCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring22SCAddValueMaxLimit', g_Config.nRing22SCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring22SCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22SCAddValueRate', g_Config.nRing22SCAddValueRate);
  g_Config.nRing22SCAddValueRate := Config.ReadInteger('Setup', 'Ring22SCAddValueRate', g_Config.nRing22SCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring22SCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22SCAddRate', g_Config.nRing22SCAddRate);
  g_Config.nRing22SCAddRate := Config.ReadInteger('Setup', 'Ring22SCAddRate', g_Config.nRing22SCAddRate);


  if Config.ReadInteger('Setup', 'Ring23DCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23DCAddValueMaxLimit', g_Config.nRing23DCAddValueMaxLimit);
  g_Config.nRing23DCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring23DCAddValueMaxLimit', g_Config.nRing23DCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring23DCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23DCAddValueRate', g_Config.nRing23DCAddValueRate);
  g_Config.nRing23DCAddValueRate := Config.ReadInteger('Setup', 'Ring23DCAddValueRate', g_Config.nRing23DCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring23DCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23DCAddRate', g_Config.nRing23DCAddRate);
  g_Config.nRing23DCAddRate := Config.ReadInteger('Setup', 'Ring23DCAddRate', g_Config.nRing23DCAddRate);

  if Config.ReadInteger('Setup', 'Ring23MCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23MCAddValueMaxLimit', g_Config.nRing23MCAddValueMaxLimit);
  g_Config.nRing23MCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring23MCAddValueMaxLimit', g_Config.nRing23MCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring23MCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23MCAddValueRate', g_Config.nRing23MCAddValueRate);
  g_Config.nRing23MCAddValueRate := Config.ReadInteger('Setup', 'Ring23MCAddValueRate', g_Config.nRing23MCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring23MCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23MCAddRate', g_Config.nRing23MCAddRate);
  g_Config.nRing23MCAddRate := Config.ReadInteger('Setup', 'Ring23MCAddRate', g_Config.nRing23MCAddRate);

  if Config.ReadInteger('Setup', 'Ring23SCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23SCAddValueMaxLimit', g_Config.nRing23SCAddValueMaxLimit);
  g_Config.nRing23SCAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring23SCAddValueMaxLimit', g_Config.nRing23SCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring23SCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23SCAddValueRate', g_Config.nRing23SCAddValueRate);
  g_Config.nRing23SCAddValueRate := Config.ReadInteger('Setup', 'Ring23SCAddValueRate', g_Config.nRing23SCAddValueRate);

  if Config.ReadInteger('Setup', 'Ring23SCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23SCAddRate', g_Config.nRing23SCAddRate);
  g_Config.nRing23SCAddRate := Config.ReadInteger('Setup', 'Ring23SCAddRate', g_Config.nRing23SCAddRate);

  if Config.ReadInteger('Setup', 'HelMetDCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetDCAddValueMaxLimit', g_Config.nHelMetDCAddValueMaxLimit);
  g_Config.nHelMetDCAddValueMaxLimit := Config.ReadInteger('Setup', 'HelMetDCAddValueMaxLimit', g_Config.nHelMetDCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'HelMetDCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetDCAddValueRate', g_Config.nHelMetDCAddValueRate);
  g_Config.nHelMetDCAddValueRate := Config.ReadInteger('Setup', 'HelMetDCAddValueRate', g_Config.nHelMetDCAddValueRate);

  if Config.ReadInteger('Setup', 'HelMetDCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetDCAddRate', g_Config.nHelMetDCAddRate);
  g_Config.nHelMetDCAddRate := Config.ReadInteger('Setup', 'HelMetDCAddRate', g_Config.nHelMetDCAddRate);

  if Config.ReadInteger('Setup', 'HelMetMCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetMCAddValueMaxLimit', g_Config.nHelMetMCAddValueMaxLimit);
  g_Config.nHelMetMCAddValueMaxLimit := Config.ReadInteger('Setup', 'HelMetMCAddValueMaxLimit', g_Config.nHelMetMCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'HelMetMCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetMCAddValueRate', g_Config.nHelMetMCAddValueRate);
  g_Config.nHelMetMCAddValueRate := Config.ReadInteger('Setup', 'HelMetMCAddValueRate', g_Config.nHelMetMCAddValueRate);

  if Config.ReadInteger('Setup', 'HelMetMCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetMCAddRate', g_Config.nHelMetMCAddRate);
  g_Config.nHelMetMCAddRate := Config.ReadInteger('Setup', 'HelMetMCAddRate', g_Config.nHelMetMCAddRate);

  if Config.ReadInteger('Setup', 'HelMetSCAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetSCAddValueMaxLimit', g_Config.nHelMetSCAddValueMaxLimit);
  g_Config.nHelMetSCAddValueMaxLimit := Config.ReadInteger('Setup', 'HelMetSCAddValueMaxLimit', g_Config.nHelMetSCAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'HelMetSCAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetSCAddValueRate', g_Config.nHelMetSCAddValueRate);
  g_Config.nHelMetSCAddValueRate := Config.ReadInteger('Setup', 'HelMetSCAddValueRate', g_Config.nHelMetSCAddValueRate);

  if Config.ReadInteger('Setup', 'HelMetSCAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetSCAddRate', g_Config.nHelMetSCAddRate);
  g_Config.nHelMetSCAddRate := Config.ReadInteger('Setup', 'HelMetSCAddRate', g_Config.nHelMetSCAddRate);

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetACAddRate', g_Config.nUnknowHelMetACAddRate)
  else g_Config.nUnknowHelMetACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetACAddValueMaxLimit', g_Config.nUnknowHelMetACAddValueMaxLimit)
  else g_Config.nUnknowHelMetACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetMACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetMACAddRate', g_Config.nUnknowHelMetMACAddRate)
  else g_Config.nUnknowHelMetMACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetMACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetMACAddValueMaxLimit', g_Config.nUnknowHelMetMACAddValueMaxLimit)
  else g_Config.nUnknowHelMetMACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetDCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetDCAddRate', g_Config.nUnknowHelMetDCAddRate)
  else g_Config.nUnknowHelMetDCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetDCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetDCAddValueMaxLimit', g_Config.nUnknowHelMetDCAddValueMaxLimit)
  else g_Config.nUnknowHelMetDCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetMCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetMCAddRate', g_Config.nUnknowHelMetMCAddRate)
  else g_Config.nUnknowHelMetMCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetMCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetMCAddValueMaxLimit', g_Config.nUnknowHelMetMCAddValueMaxLimit)
  else g_Config.nUnknowHelMetMCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetSCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetSCAddRate', g_Config.nUnknowHelMetSCAddRate)
  else g_Config.nUnknowHelMetSCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetSCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetSCAddValueMaxLimit', g_Config.nUnknowHelMetSCAddValueMaxLimit)
  else g_Config.nUnknowHelMetSCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceACAddRate', g_Config.nUnknowNecklaceACAddRate)
  else g_Config.nUnknowNecklaceACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceACAddValueMaxLimit', g_Config.nUnknowNecklaceACAddValueMaxLimit)
  else g_Config.nUnknowNecklaceACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceMACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceMACAddRate', g_Config.nUnknowNecklaceMACAddRate)
  else g_Config.nUnknowNecklaceMACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceMACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceMACAddValueMaxLimit', g_Config.nUnknowNecklaceMACAddValueMaxLimit)
  else g_Config.nUnknowNecklaceMACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceDCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceDCAddRate', g_Config.nUnknowNecklaceDCAddRate)
  else g_Config.nUnknowNecklaceDCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceDCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceDCAddValueMaxLimit', g_Config.nUnknowNecklaceDCAddValueMaxLimit)
  else g_Config.nUnknowNecklaceDCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceMCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceMCAddRate', g_Config.nUnknowNecklaceMCAddRate)
  else g_Config.nUnknowNecklaceMCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceMCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceMCAddValueMaxLimit', g_Config.nUnknowNecklaceMCAddValueMaxLimit)
  else g_Config.nUnknowNecklaceMCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceSCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceSCAddRate', g_Config.nUnknowNecklaceSCAddRate)
  else g_Config.nUnknowNecklaceSCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceSCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceSCAddValueMaxLimit', g_Config.nUnknowNecklaceSCAddValueMaxLimit)
  else g_Config.nUnknowNecklaceSCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingACAddRate', g_Config.nUnknowRingACAddRate)
  else g_Config.nUnknowRingACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingACAddValueMaxLimit', g_Config.nUnknowRingACAddValueMaxLimit)
  else g_Config.nUnknowRingACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingMACAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingMACAddRate', g_Config.nUnknowRingMACAddRate)
  else g_Config.nUnknowRingMACAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingMACAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingMACAddValueMaxLimit', g_Config.nUnknowRingMACAddValueMaxLimit)
  else g_Config.nUnknowRingMACAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingDCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingDCAddRate', g_Config.nUnknowRingDCAddRate)
  else g_Config.nUnknowRingDCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingDCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingDCAddValueMaxLimit', g_Config.nUnknowRingDCAddValueMaxLimit)
  else g_Config.nUnknowRingDCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingMCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingMCAddRate', g_Config.nUnknowRingMCAddRate)
  else g_Config.nUnknowRingMCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingMCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingMCAddValueMaxLimit', g_Config.nUnknowRingMCAddValueMaxLimit)
  else g_Config.nUnknowRingMCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingSCAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingSCAddRate', g_Config.nUnknowRingSCAddRate)
  else g_Config.nUnknowRingSCAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingSCAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingSCAddValueMaxLimit', g_Config.nUnknowRingSCAddValueMaxLimit)
  else g_Config.nUnknowRingSCAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MonOneDropGoldCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MonOneDropGoldCount', g_Config.nMonOneDropGoldCount)
  else g_Config.nMonOneDropGoldCount := nLoadInteger;

  if Config.ReadInteger('Setup', 'MakeMineHitRate', -1) < 0 then
    Config.WriteInteger('Setup', 'MakeMineHitRate', g_Config.nMakeMineHitRate);
  g_Config.nMakeMineHitRate := Config.ReadInteger('Setup', 'MakeMineHitRate', g_Config.nMakeMineHitRate);

  if Config.ReadInteger('Setup', 'MakeMineRate', -1) < 0 then
    Config.WriteInteger('Setup', 'MakeMineRate', g_Config.nMakeMineRate);
  g_Config.nMakeMineRate := Config.ReadInteger('Setup', 'MakeMineRate', g_Config.nMakeMineRate);

  if Config.ReadInteger('Setup', 'StoneTypeRate', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneTypeRate', g_Config.nStoneTypeRate);
  g_Config.nStoneTypeRate := Config.ReadInteger('Setup', 'StoneTypeRate', g_Config.nStoneTypeRate);

  if Config.ReadInteger('Setup', 'StoneTypeRateMin', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneTypeRateMin', g_Config.nStoneTypeRateMin);
  g_Config.nStoneTypeRateMin := Config.ReadInteger('Setup', 'StoneTypeRateMin', g_Config.nStoneTypeRateMin);

  if Config.ReadInteger('Setup', 'GoldStoneMin', -1) < 0 then
    Config.WriteInteger('Setup', 'GoldStoneMin', g_Config.nGoldStoneMin);
  g_Config.nGoldStoneMin := Config.ReadInteger('Setup', 'GoldStoneMin', g_Config.nGoldStoneMin);

  if Config.ReadInteger('Setup', 'GoldStoneMax', -1) < 0 then
    Config.WriteInteger('Setup', 'GoldStoneMax', g_Config.nGoldStoneMax);
  g_Config.nGoldStoneMax := Config.ReadInteger('Setup', 'GoldStoneMax', g_Config.nGoldStoneMax);

  if Config.ReadInteger('Setup', 'SilverStoneMin', -1) < 0 then
    Config.WriteInteger('Setup', 'SilverStoneMin', g_Config.nSilverStoneMin);
  g_Config.nSilverStoneMin := Config.ReadInteger('Setup', 'SilverStoneMin', g_Config.nSilverStoneMin);

  if Config.ReadInteger('Setup', 'SilverStoneMax', -1) < 0 then
    Config.WriteInteger('Setup', 'SilverStoneMax', g_Config.nSilverStoneMax);
  g_Config.nSilverStoneMax := Config.ReadInteger('Setup', 'SilverStoneMax', g_Config.nSilverStoneMax);

  if Config.ReadInteger('Setup', 'SteelStoneMin', -1) < 0 then
    Config.WriteInteger('Setup', 'SteelStoneMin', g_Config.nSteelStoneMin);
  g_Config.nSteelStoneMin := Config.ReadInteger('Setup', 'SteelStoneMin', g_Config.nSteelStoneMin);

  if Config.ReadInteger('Setup', 'SteelStoneMax', -1) < 0 then
    Config.WriteInteger('Setup', 'SteelStoneMax', g_Config.nSteelStoneMax);
  g_Config.nSteelStoneMax := Config.ReadInteger('Setup', 'SteelStoneMax', g_Config.nSteelStoneMax);

  if Config.ReadInteger('Setup', 'BlackStoneMin', -1) < 0 then
    Config.WriteInteger('Setup', 'BlackStoneMin', g_Config.nBlackStoneMin);
  g_Config.nBlackStoneMin := Config.ReadInteger('Setup', 'BlackStoneMin', g_Config.nBlackStoneMin);

  if Config.ReadInteger('Setup', 'BlackStoneMax', -1) < 0 then
    Config.WriteInteger('Setup', 'BlackStoneMax', g_Config.nBlackStoneMax);
  g_Config.nBlackStoneMax := Config.ReadInteger('Setup', 'BlackStoneMax', g_Config.nBlackStoneMax);

  if Config.ReadInteger('Setup', 'StoneMinDura', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneMinDura', g_Config.nStoneMinDura);
  g_Config.nStoneMinDura := Config.ReadInteger('Setup', 'StoneMinDura', g_Config.nStoneMinDura);

  if Config.ReadInteger('Setup', 'StoneGeneralDuraRate', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneGeneralDuraRate', g_Config.nStoneGeneralDuraRate);
  g_Config.nStoneGeneralDuraRate := Config.ReadInteger('Setup', 'StoneGeneralDuraRate', g_Config.nStoneGeneralDuraRate);

  if Config.ReadInteger('Setup', 'StoneAddDuraRate', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneAddDuraRate', g_Config.nStoneAddDuraRate);
  g_Config.nStoneAddDuraRate := Config.ReadInteger('Setup', 'StoneAddDuraRate', g_Config.nStoneAddDuraRate);

  if Config.ReadInteger('Setup', 'StoneAddDuraMax', -1) < 0 then
    Config.WriteInteger('Setup', 'StoneAddDuraMax', g_Config.nStoneAddDuraMax);
  g_Config.nStoneAddDuraMax := Config.ReadInteger('Setup', 'StoneAddDuraMax', g_Config.nStoneAddDuraMax);

  if Config.ReadInteger('Setup', 'WinLottery1Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery1Min', g_Config.nWinLottery1Min);
  g_Config.nWinLottery1Min := Config.ReadInteger('Setup', 'WinLottery1Min', g_Config.nWinLottery1Min);

  if Config.ReadInteger('Setup', 'WinLottery1Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery1Max', g_Config.nWinLottery1Max);
  g_Config.nWinLottery1Max := Config.ReadInteger('Setup', 'WinLottery1Max', g_Config.nWinLottery1Max);

  if Config.ReadInteger('Setup', 'WinLottery2Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery2Min', g_Config.nWinLottery2Min);
  g_Config.nWinLottery2Min := Config.ReadInteger('Setup', 'WinLottery2Min', g_Config.nWinLottery2Min);

  if Config.ReadInteger('Setup', 'WinLottery2Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery2Max', g_Config.nWinLottery2Max);
  g_Config.nWinLottery2Max := Config.ReadInteger('Setup', 'WinLottery2Max', g_Config.nWinLottery2Max);

  if Config.ReadInteger('Setup', 'WinLottery3Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery3Min', g_Config.nWinLottery3Min);
  g_Config.nWinLottery3Min := Config.ReadInteger('Setup', 'WinLottery3Min', g_Config.nWinLottery3Min);

  if Config.ReadInteger('Setup', 'WinLottery3Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery3Max', g_Config.nWinLottery3Max);
  g_Config.nWinLottery3Max := Config.ReadInteger('Setup', 'WinLottery3Max', g_Config.nWinLottery3Max);

  if Config.ReadInteger('Setup', 'WinLottery4Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery4Min', g_Config.nWinLottery4Min);
  g_Config.nWinLottery4Min := Config.ReadInteger('Setup', 'WinLottery4Min', g_Config.nWinLottery4Min);

  if Config.ReadInteger('Setup', 'WinLottery4Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery4Max', g_Config.nWinLottery4Max);
  g_Config.nWinLottery4Max := Config.ReadInteger('Setup', 'WinLottery4Max', g_Config.nWinLottery4Max);

  if Config.ReadInteger('Setup', 'WinLottery5Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery5Min', g_Config.nWinLottery5Min);
  g_Config.nWinLottery5Min := Config.ReadInteger('Setup', 'WinLottery5Min', g_Config.nWinLottery5Min);

  if Config.ReadInteger('Setup', 'WinLottery5Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery5Max', g_Config.nWinLottery5Max);
  g_Config.nWinLottery5Max := Config.ReadInteger('Setup', 'WinLottery5Max', g_Config.nWinLottery5Max);

  if Config.ReadInteger('Setup', 'WinLottery6Min', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery6Min', g_Config.nWinLottery6Min);
  g_Config.nWinLottery6Min := Config.ReadInteger('Setup', 'WinLottery6Min', g_Config.nWinLottery6Min);

  if Config.ReadInteger('Setup', 'WinLottery6Max', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery6Max', g_Config.nWinLottery6Max);
  g_Config.nWinLottery6Max := Config.ReadInteger('Setup', 'WinLottery6Max', g_Config.nWinLottery6Max);

  if Config.ReadInteger('Setup', 'WinLotteryRate', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLotteryRate', g_Config.nWinLotteryRate);
  g_Config.nWinLotteryRate := Config.ReadInteger('Setup', 'WinLotteryRate', g_Config.nWinLotteryRate);

  if Config.ReadInteger('Setup', 'WinLottery1Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery1Gold', g_Config.nWinLottery1Gold);
  g_Config.nWinLottery1Gold := Config.ReadInteger('Setup', 'WinLottery1Gold', g_Config.nWinLottery1Gold);

  if Config.ReadInteger('Setup', 'WinLottery2Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery2Gold', g_Config.nWinLottery2Gold);
  g_Config.nWinLottery2Gold := Config.ReadInteger('Setup', 'WinLottery2Gold', g_Config.nWinLottery2Gold);

  if Config.ReadInteger('Setup', 'WinLottery3Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery3Gold', g_Config.nWinLottery3Gold);
  g_Config.nWinLottery3Gold := Config.ReadInteger('Setup', 'WinLottery3Gold', g_Config.nWinLottery3Gold);

  if Config.ReadInteger('Setup', 'WinLottery4Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery4Gold', g_Config.nWinLottery4Gold);
  g_Config.nWinLottery4Gold := Config.ReadInteger('Setup', 'WinLottery4Gold', g_Config.nWinLottery4Gold);

  if Config.ReadInteger('Setup', 'WinLottery5Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery5Gold', g_Config.nWinLottery5Gold);
  g_Config.nWinLottery5Gold := Config.ReadInteger('Setup', 'WinLottery5Gold', g_Config.nWinLottery5Gold);

  if Config.ReadInteger('Setup', 'WinLottery6Gold', -1) < 0 then
    Config.WriteInteger('Setup', 'WinLottery6Gold', g_Config.nWinLottery6Gold);
  g_Config.nWinLottery6Gold := Config.ReadInteger('Setup', 'WinLottery6Gold', g_Config.nWinLottery6Gold);

  if Config.ReadInteger('Setup', 'GuildRecallTime', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildRecallTime', g_Config.nGuildRecallTime);
  g_Config.nGuildRecallTime := Config.ReadInteger('Setup', 'GuildRecallTime', g_Config.nGuildRecallTime);

  if Config.ReadInteger('Setup', 'GroupRecallTime', -1) < 0 then
    Config.WriteInteger('Setup', 'GroupRecallTime', g_Config.nGroupRecallTime);
  g_Config.nGroupRecallTime := Config.ReadInteger('Setup', 'GroupRecallTime', g_Config.nGroupRecallTime);

  if Config.ReadInteger('Setup', 'ControlDropItem', -1) < 0 then
    Config.WriteBool('Setup', 'ControlDropItem', g_Config.boControlDropItem);
  g_Config.boControlDropItem := Config.ReadBool('Setup', 'ControlDropItem', g_Config.boControlDropItem);

  if Config.ReadInteger('Setup', 'InSafeDisableDrop', -1) < 0 then
    Config.WriteBool('Setup', 'InSafeDisableDrop', g_Config.boInSafeDisableDrop);
  g_Config.boInSafeDisableDrop := Config.ReadBool('Setup', 'InSafeDisableDrop', g_Config.boInSafeDisableDrop);

  if Config.ReadInteger('Setup', 'CanDropGold', -1) < 0 then
    Config.WriteInteger('Setup', 'CanDropGold', g_Config.nCanDropGold);
  g_Config.nCanDropGold := Config.ReadInteger('Setup', 'CanDropGold', g_Config.nCanDropGold);

  if Config.ReadInteger('Setup', 'CanDropPrice', -1) < 0 then
    Config.WriteInteger('Setup', 'CanDropPrice', g_Config.nCanDropPrice);
  g_Config.nCanDropPrice := Config.ReadInteger('Setup', 'CanDropPrice', g_Config.nCanDropPrice);

  nLoadInteger := Config.ReadInteger('Setup', 'SendCustemMsg', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'SendCustemMsg', g_Config.boSendCustemMsg)
  else g_Config.boSendCustemMsg := nLoadInteger = 1;

  nLoadInteger := Config.ReadInteger('Setup', 'SubkMasterSendMsg', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'SubkMasterSendMsg', g_Config.boSubkMasterSendMsg)
  else g_Config.boSubkMasterSendMsg := nLoadInteger = 1;

  if Config.ReadInteger('Setup', 'SuperRepairPriceRate', -1) < 0 then
    Config.WriteInteger('Setup', 'SuperRepairPriceRate', g_Config.nSuperRepairPriceRate);
  g_Config.nSuperRepairPriceRate := Config.ReadInteger('Setup', 'SuperRepairPriceRate', g_Config.nSuperRepairPriceRate);

  if Config.ReadInteger('Setup', 'RepairItemDecDura', -1) < 0 then
    Config.WriteInteger('Setup', 'RepairItemDecDura', g_Config.nRepairItemDecDura);
  g_Config.nRepairItemDecDura := Config.ReadInteger('Setup', 'RepairItemDecDura', g_Config.nRepairItemDecDura);

  if Config.ReadInteger('Setup', 'DieScatterBag', -1) < 0 then
    Config.WriteBool('Setup', 'DieScatterBag', g_Config.boDieScatterBag);
  g_Config.boDieScatterBag := Config.ReadBool('Setup', 'DieScatterBag', g_Config.boDieScatterBag);

  if Config.ReadInteger('Setup', 'DieScatterBagRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DieScatterBagRate', g_Config.nDieScatterBagRate);
  g_Config.nDieScatterBagRate := Config.ReadInteger('Setup', 'DieScatterBagRate', g_Config.nDieScatterBagRate);

  if Config.ReadInteger('Setup', 'DieRedScatterBagAll', -1) < 0 then
    Config.WriteBool('Setup', 'DieRedScatterBagAll', g_Config.boDieRedScatterBagAll);
  g_Config.boDieRedScatterBagAll := Config.ReadBool('Setup', 'DieRedScatterBagAll', g_Config.boDieRedScatterBagAll);

  if Config.ReadInteger('Setup', 'DieDropUseItemRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DieDropUseItemRate', g_Config.nDieDropUseItemRate);
  g_Config.nDieDropUseItemRate := Config.ReadInteger('Setup', 'DieDropUseItemRate', g_Config.nDieDropUseItemRate);

  if Config.ReadInteger('Setup', 'DieRedDropUseItemRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DieRedDropUseItemRate', g_Config.nDieRedDropUseItemRate);
  g_Config.nDieRedDropUseItemRate := Config.ReadInteger('Setup', 'DieRedDropUseItemRate', g_Config.nDieRedDropUseItemRate);

  if Config.ReadInteger('Setup', 'DieDropGold', -1) < 0 then
    Config.WriteBool('Setup', 'DieDropGold', g_Config.boDieDropGold);
  g_Config.boDieDropGold := Config.ReadBool('Setup', 'DieDropGold', g_Config.boDieDropGold);

  if Config.ReadInteger('Setup', 'KillByHumanDropUseItem', -1) < 0 then
    Config.WriteBool('Setup', 'KillByHumanDropUseItem', g_Config.boKillByHumanDropUseItem);
  g_Config.boKillByHumanDropUseItem := Config.ReadBool('Setup', 'KillByHumanDropUseItem', g_Config.boKillByHumanDropUseItem);

  if Config.ReadInteger('Setup', 'KillByMonstDropUseItem', -1) < 0 then
    Config.WriteBool('Setup', 'KillByMonstDropUseItem', g_Config.boKillByMonstDropUseItem);
  g_Config.boKillByMonstDropUseItem := Config.ReadBool('Setup', 'KillByMonstDropUseItem', g_Config.boKillByMonstDropUseItem);

  if Config.ReadInteger('Setup', 'KickExpireHuman', -1) < 0 then
    Config.WriteBool('Setup', 'KickExpireHuman', g_Config.boKickExpireHuman);
  g_Config.boKickExpireHuman := Config.ReadBool('Setup', 'KickExpireHuman', g_Config.boKickExpireHuman);

  if Config.ReadInteger('Setup', 'GuildRankNameLen', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildRankNameLen', g_Config.nGuildRankNameLen);
  g_Config.nGuildRankNameLen := Config.ReadInteger('Setup', 'GuildRankNameLen', g_Config.nGuildRankNameLen);

  if Config.ReadInteger('Setup', 'GuildNameLen', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildNameLen', g_Config.nGuildNameLen);
  g_Config.nGuildNameLen := Config.ReadInteger('Setup', 'GuildNameLen', g_Config.nGuildNameLen);

  if Config.ReadInteger('Setup', 'GuildMemberMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'GuildMemberMaxLimit', g_Config.nGuildMemberMaxLimit);
  g_Config.nGuildMemberMaxLimit := Config.ReadInteger('Setup', 'GuildMemberMaxLimit', g_Config.nGuildMemberMaxLimit);


  if Config.ReadInteger('Setup', 'AttackPosionRate', -1) < 0 then
    Config.WriteInteger('Setup', 'AttackPosionRate', g_Config.nAttackPosionRate);
  g_Config.nAttackPosionRate := Config.ReadInteger('Setup', 'AttackPosionRate', g_Config.nAttackPosionRate);

  if Config.ReadInteger('Setup', 'AttackPosionTime', -1) < 0 then
    Config.WriteInteger('Setup', 'AttackPosionTime', g_Config.nAttackPosionTime);
  g_Config.nAttackPosionTime := Config.ReadInteger('Setup', 'AttackPosionTime', g_Config.nAttackPosionTime);

  if Config.ReadInteger('Setup', 'RevivalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'RevivalTime', g_Config.dwRevivalTime);
  g_Config.dwRevivalTime := Config.ReadInteger('Setup', 'RevivalTime', g_Config.dwRevivalTime);

  nLoadInteger := Config.ReadInteger('Setup', 'UserMoveCanDupObj', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'UserMoveCanDupObj', g_Config.boUserMoveCanDupObj)
  else g_Config.boUserMoveCanDupObj := nLoadInteger = 1;

  nLoadInteger := Config.ReadInteger('Setup', 'UserMoveCanOnItem', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'UserMoveCanOnItem', g_Config.boUserMoveCanOnItem)
  else g_Config.boUserMoveCanOnItem := nLoadInteger = 1;

  nLoadInteger := Config.ReadInteger('Setup', 'UserMoveTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UserMoveTime', g_Config.dwUserMoveTime)
  else g_Config.dwUserMoveTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'PKDieLostExpRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'PKDieLostExpRate', g_Config.dwPKDieLostExpRate)
  else g_Config.dwPKDieLostExpRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'PKDieLostLevelRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'PKDieLostLevelRate', g_Config.nPKDieLostLevelRate)
  else g_Config.nPKDieLostLevelRate := nLoadInteger;

  if Config.ReadInteger('Setup', 'PKFlagNameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'PKFlagNameColor', g_Config.btPKFlagNameColor);
  g_Config.btPKFlagNameColor := Config.ReadInteger('Setup', 'PKFlagNameColor', g_Config.btPKFlagNameColor);

  if Config.ReadInteger('Setup', 'AllyAndGuildNameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'AllyAndGuildNameColor', g_Config.btAllyAndGuildNameColor);
  g_Config.btAllyAndGuildNameColor := Config.ReadInteger('Setup', 'AllyAndGuildNameColor', g_Config.btAllyAndGuildNameColor);

  if Config.ReadInteger('Setup', 'WarGuildNameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'WarGuildNameColor', g_Config.btWarGuildNameColor);
  g_Config.btWarGuildNameColor := Config.ReadInteger('Setup', 'WarGuildNameColor', g_Config.btWarGuildNameColor);

  if Config.ReadInteger('Setup', 'InFreePKAreaNameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'InFreePKAreaNameColor', g_Config.btInFreePKAreaNameColor);
  g_Config.btInFreePKAreaNameColor := Config.ReadInteger('Setup', 'InFreePKAreaNameColor', g_Config.btInFreePKAreaNameColor);

  if Config.ReadInteger('Setup', 'PKLevel1NameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'PKLevel1NameColor', g_Config.btPKLevel1NameColor);
  g_Config.btPKLevel1NameColor := Config.ReadInteger('Setup', 'PKLevel1NameColor', g_Config.btPKLevel1NameColor);

  if Config.ReadInteger('Setup', 'PKLevel2NameColor', -1) < 0 then
    Config.WriteInteger('Setup', 'PKLevel2NameColor', g_Config.btPKLevel2NameColor);
  g_Config.btPKLevel2NameColor := Config.ReadInteger('Setup', 'PKLevel2NameColor', g_Config.btPKLevel2NameColor);

  if Config.ReadInteger('Setup', 'SpiritMutiny', -1) < 0 then
    Config.WriteBool('Setup', 'SpiritMutiny', g_Config.boSpiritMutiny);
  g_Config.boSpiritMutiny := Config.ReadBool('Setup', 'SpiritMutiny', g_Config.boSpiritMutiny);

  if Config.ReadInteger('Setup', 'SpiritMutinyTime', -1) < 0 then
    Config.WriteInteger('Setup', 'SpiritMutinyTime', g_Config.dwSpiritMutinyTime);
  g_Config.dwSpiritMutinyTime := Config.ReadInteger('Setup', 'SpiritMutinyTime', g_Config.dwSpiritMutinyTime);

  if Config.ReadInteger('Setup', 'SpiritPowerRate', -1) < 0 then
    Config.WriteInteger('Setup', 'SpiritPowerRate', g_Config.nSpiritPowerRate);
  g_Config.nSpiritPowerRate := Config.ReadInteger('Setup', 'SpiritPowerRate', g_Config.nSpiritPowerRate);

  if Config.ReadInteger('Setup', 'MasterDieMutiny', -1) < 0 then
    Config.WriteBool('Setup', 'MasterDieMutiny', g_Config.boMasterDieMutiny);
  g_Config.boMasterDieMutiny := Config.ReadBool('Setup', 'MasterDieMutiny', g_Config.boMasterDieMutiny);

  if Config.ReadInteger('Setup', 'MasterDieMutinyRate', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterDieMutinyRate', g_Config.nMasterDieMutinyRate);
  g_Config.nMasterDieMutinyRate := Config.ReadInteger('Setup', 'MasterDieMutinyRate', g_Config.nMasterDieMutinyRate);

  if Config.ReadInteger('Setup', 'MasterDieMutinyPower', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterDieMutinyPower', g_Config.nMasterDieMutinyPower);
  g_Config.nMasterDieMutinyPower := Config.ReadInteger('Setup', 'MasterDieMutinyPower', g_Config.nMasterDieMutinyPower);

  if Config.ReadInteger('Setup', 'MasterDieMutinyPower', -1) < 0 then
    Config.WriteInteger('Setup', 'MasterDieMutinyPower', g_Config.nMasterDieMutinySpeed);
  g_Config.nMasterDieMutinySpeed := Config.ReadInteger('Setup', 'MasterDieMutinyPower', g_Config.nMasterDieMutinySpeed);

  nLoadInteger := Config.ReadInteger('Setup', 'BBMonAutoChangeColor', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'BBMonAutoChangeColor', g_Config.boBBMonAutoChangeColor)
  else g_Config.boBBMonAutoChangeColor := nLoadInteger = 1;

  nLoadInteger := Config.ReadInteger('Setup', 'BBMonAutoChangeColorTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BBMonAutoChangeColorTime', g_Config.dwBBMonAutoChangeColorTime)
  else g_Config.dwBBMonAutoChangeColorTime := nLoadInteger;


  if Config.ReadInteger('Setup', 'OldClientShowHiLevel', -1) < 0 then
    Config.WriteBool('Setup', 'OldClientShowHiLevel', g_Config.boOldClientShowHiLevel);
  g_Config.boOldClientShowHiLevel := Config.ReadBool('Setup', 'OldClientShowHiLevel', g_Config.boOldClientShowHiLevel);

  if Config.ReadInteger('Setup', 'ShowScriptActionMsg', -1) < 0 then
    Config.WriteBool('Setup', 'ShowScriptActionMsg', g_Config.boShowScriptActionMsg);
  g_Config.boShowScriptActionMsg := Config.ReadBool('Setup', 'ShowScriptActionMsg', g_Config.boShowScriptActionMsg);

  if Config.ReadInteger('Setup', 'RunSocketDieLoopLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'RunSocketDieLoopLimit', g_Config.nRunSocketDieLoopLimit);
  g_Config.nRunSocketDieLoopLimit := Config.ReadInteger('Setup', 'RunSocketDieLoopLimit', g_Config.nRunSocketDieLoopLimit);

  if Config.ReadInteger('Setup', 'ThreadRun', -1) < 0 then
    Config.WriteBool('Setup', 'ThreadRun', g_Config.boThreadRun);
  g_Config.boThreadRun := Config.ReadBool('Setup', 'ThreadRun', g_Config.boThreadRun);

  if Config.ReadInteger('Setup', 'DeathColorEffect', -1) < 0 then
    Config.WriteInteger('Setup', 'DeathColorEffect', g_Config.ClientConf.btDieColor);
  g_Config.ClientConf.btDieColor := Config.ReadInteger('Setup', 'DeathColorEffect', g_Config.ClientConf.btDieColor);

  if Config.ReadInteger('Setup', 'ParalyCanRun', -1) < 0 then
    Config.WriteBool('Setup', 'ParalyCanRun', g_Config.ClientConf.boParalyCanRun);
  g_Config.ClientConf.boParalyCanRun := Config.ReadBool('Setup', 'ParalyCanRun', g_Config.ClientConf.boParalyCanRun);

  if Config.ReadInteger('Setup', 'ParalyCanWalk', -1) < 0 then
    Config.WriteBool('Setup', 'ParalyCanWalk', g_Config.ClientConf.boParalyCanWalk);
  g_Config.ClientConf.boParalyCanWalk := Config.ReadBool('Setup', 'ParalyCanWalk', g_Config.ClientConf.boParalyCanWalk);

  if Config.ReadInteger('Setup', 'ParalyCanHit', -1) < 0 then
    Config.WriteBool('Setup', 'ParalyCanHit', g_Config.ClientConf.boParalyCanHit);
  g_Config.ClientConf.boParalyCanHit := Config.ReadBool('Setup', 'ParalyCanHit', g_Config.ClientConf.boParalyCanHit);

  if Config.ReadInteger('Setup', 'ParalyCanSpell', -1) < 0 then
    Config.WriteBool('Setup', 'ParalyCanSpell', g_Config.ClientConf.boParalyCanSpell);
  g_Config.ClientConf.boParalyCanSpell := Config.ReadBool('Setup', 'ParalyCanSpell', g_Config.ClientConf.boParalyCanSpell);

  if Config.ReadInteger('Setup', 'ShowExceptionMsg', -1) < 0 then
    Config.WriteBool('Setup', 'ShowExceptionMsg', g_Config.boShowExceptionMsg);
  g_Config.boShowExceptionMsg := Config.ReadBool('Setup', 'ShowExceptionMsg', g_Config.boShowExceptionMsg);

  if Config.ReadInteger('Setup', 'ShowPreFixMsg', -1) < 0 then
    Config.WriteBool('Setup', 'ShowPreFixMsg', g_Config.boShowPreFixMsg);
  g_Config.boShowPreFixMsg := Config.ReadBool('Setup', 'ShowPreFixMsg', g_Config.boShowPreFixMsg);

  if Config.ReadInteger('Setup', 'MagTurnUndeadLevel', -1) < 0 then
    Config.WriteInteger('Setup', 'MagTurnUndeadLevel', g_Config.nMagTurnUndeadLevel);
  g_Config.nMagTurnUndeadLevel := Config.ReadInteger('Setup', 'MagTurnUndeadLevel', g_Config.nMagTurnUndeadLevel);

  nLoadInteger := Config.ReadInteger('Setup', 'MagTammingLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagTammingLevel', g_Config.nMagTammingLevel)
  else g_Config.nMagTammingLevel := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagTammingTargetLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagTammingTargetLevel', g_Config.nMagTammingTargetLevel)
  else g_Config.nMagTammingTargetLevel := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagTammingTargetHPRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagTammingTargetHPRate', g_Config.nMagTammingHPRate)
  else g_Config.nMagTammingHPRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagTammingCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagTammingCount', g_Config.nMagTammingCount)
  else g_Config.nMagTammingCount := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MabMabeHitRandRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MabMabeHitRandRate', g_Config.nMabMabeHitRandRate)
  else g_Config.nMabMabeHitRandRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MabMabeHitMinLvLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MabMabeHitMinLvLimit', g_Config.nMabMabeHitMinLvLimit)
  else g_Config.nMabMabeHitMinLvLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MabMabeHitSucessRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MabMabeHitSucessRate', g_Config.nMabMabeHitSucessRate)
  else g_Config.nMabMabeHitSucessRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MabMabeHitMabeTimeRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MabMabeHitMabeTimeRate', g_Config.nMabMabeHitMabeTimeRate)
  else g_Config.nMabMabeHitMabeTimeRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagicAttackRage', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicAttackRage', g_Config.nMagicAttackRage)
  else g_Config.nMagicAttackRage := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'AmyOunsulPoint', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'AmyOunsulPoint', g_Config.nAmyOunsulPoint)
  else g_Config.nAmyOunsulPoint := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'DisableInSafeZoneFireCross', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'DisableInSafeZoneFireCross', g_Config.boDisableInSafeZoneFireCross)
  else g_Config.boDisableInSafeZoneFireCross := nLoadInteger = 1;

  nLoadInteger := Config.ReadInteger('Setup', 'GroupMbAttackPlayObject', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'GroupMbAttackPlayObject', g_Config.boGroupMbAttackPlayObject)
  else g_Config.boGroupMbAttackPlayObject := nLoadInteger = 1;


  nLoadInteger := Config.ReadInteger('Setup', 'PosionDecHealthTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'PosionDecHealthTime', g_Config.dwPosionDecHealthTime)
  else g_Config.dwPosionDecHealthTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'PosionDamagarmor', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'PosionDamagarmor', g_Config.nPosionDamagarmor)
  else g_Config.nPosionDamagarmor := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'LimitSwordLong', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'LimitSwordLong', g_Config.boLimitSwordLong)
  else g_Config.boLimitSwordLong := not (nLoadInteger = 0);

  nLoadInteger := Config.ReadInteger('Setup', 'SwordLongPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SwordLongPowerRate', g_Config.nSwordLongPowerRate)
  else g_Config.nSwordLongPowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'FireBoomRage', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'FireBoomRage', g_Config.nFireBoomRage)
  else g_Config.nFireBoomRage := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'SnowWindRange', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SnowWindRange', g_Config.nSnowWindRange)
  else g_Config.nSnowWindRange := nLoadInteger;



  if Config.ReadInteger('Setup', 'ElecBlizzardRange', -1) < 0 then
    Config.WriteInteger('Setup', 'ElecBlizzardRange', g_Config.nElecBlizzardRange);
  g_Config.nElecBlizzardRange := Config.ReadInteger('Setup', 'ElecBlizzardRange', g_Config.nElecBlizzardRange);

  if Config.ReadInteger('Setup', 'HumanLevelDiffer', -1) < 0 then
    Config.WriteInteger('Setup', 'HumanLevelDiffer', g_Config.nHumanLevelDiffer);
  g_Config.nHumanLevelDiffer := Config.ReadInteger('Setup', 'HumanLevelDiffer', g_Config.nHumanLevelDiffer);

  if Config.ReadInteger('Setup', 'KillHumanWinLevel', -1) < 0 then
    Config.WriteBool('Setup', 'KillHumanWinLevel', g_Config.boKillHumanWinLevel);
  g_Config.boKillHumanWinLevel := Config.ReadBool('Setup', 'KillHumanWinLevel', g_Config.boKillHumanWinLevel);

  if Config.ReadInteger('Setup', 'KilledLostLevel', -1) < 0 then
    Config.WriteBool('Setup', 'KilledLostLevel', g_Config.boKilledLostLevel);
  g_Config.boKilledLostLevel := Config.ReadBool('Setup', 'KilledLostLevel', g_Config.boKilledLostLevel);

  if Config.ReadInteger('Setup', 'KillHumanWinLevelPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KillHumanWinLevelPoint', g_Config.nKillHumanWinLevel);
  g_Config.nKillHumanWinLevel := Config.ReadInteger('Setup', 'KillHumanWinLevelPoint', g_Config.nKillHumanWinLevel);

  if Config.ReadInteger('Setup', 'KilledLostLevelPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KilledLostLevelPoint', g_Config.nKilledLostLevel);
  g_Config.nKilledLostLevel := Config.ReadInteger('Setup', 'KilledLostLevelPoint', g_Config.nKilledLostLevel);

  if Config.ReadInteger('Setup', 'KillHumanWinExp', -1) < 0 then
    Config.WriteBool('Setup', 'KillHumanWinExp', g_Config.boKillHumanWinExp);
  g_Config.boKillHumanWinExp := Config.ReadBool('Setup', 'KillHumanWinExp', g_Config.boKillHumanWinExp);

  if Config.ReadInteger('Setup', 'KilledLostExp', -1) < 0 then
    Config.WriteBool('Setup', 'KilledLostExp', g_Config.boKilledLostExp);
  g_Config.boKilledLostExp := Config.ReadBool('Setup', 'KilledLostExp', g_Config.boKilledLostExp);

  if Config.ReadInteger('Setup', 'KillHumanWinExpPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KillHumanWinExpPoint', g_Config.nKillHumanWinExp);
  g_Config.nKillHumanWinExp := Config.ReadInteger('Setup', 'KillHumanWinExpPoint', g_Config.nKillHumanWinExp);

  if Config.ReadInteger('Setup', 'KillHumanLostExpPoint', -1) < 0 then
    Config.WriteInteger('Setup', 'KillHumanLostExpPoint', g_Config.nKillHumanLostExp);
  g_Config.nKillHumanLostExp := Config.ReadInteger('Setup', 'KillHumanLostExpPoint', g_Config.nKillHumanLostExp);

  if Config.ReadInteger('Setup', 'MonsterPowerRate', -1) < 0 then
    Config.WriteInteger('Setup', 'MonsterPowerRate', g_Config.nMonsterPowerRate);
  g_Config.nMonsterPowerRate := Config.ReadInteger('Setup', 'MonsterPowerRate', g_Config.nMonsterPowerRate);

  if Config.ReadInteger('Setup', 'ItemsPowerRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemsPowerRate', g_Config.nItemsPowerRate);
  g_Config.nItemsPowerRate := Config.ReadInteger('Setup', 'ItemsPowerRate', g_Config.nItemsPowerRate);

  if Config.ReadInteger('Setup', 'ItemsACPowerRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemsACPowerRate', g_Config.nItemsACPowerRate);
  g_Config.nItemsACPowerRate := Config.ReadInteger('Setup', 'ItemsACPowerRate', g_Config.nItemsACPowerRate);

  if Config.ReadInteger('Setup', 'SendOnlineCount', -1) < 0 then
    Config.WriteBool('Setup', 'SendOnlineCount', g_Config.boSendOnlineCount);
  g_Config.boSendOnlineCount := Config.ReadBool('Setup', 'SendOnlineCount', g_Config.boSendOnlineCount);

  if Config.ReadInteger('Setup', 'SendOnlineCountRate', -1) < 0 then
    Config.WriteInteger('Setup', 'SendOnlineCountRate', g_Config.nSendOnlineCountRate);
  g_Config.nSendOnlineCountRate := Config.ReadInteger('Setup', 'SendOnlineCountRate', g_Config.nSendOnlineCountRate);

  if Config.ReadInteger('Setup', 'SendOnlineTime', -1) < 0 then
    Config.WriteInteger('Setup', 'SendOnlineTime', g_Config.dwSendOnlineTime);
  g_Config.dwSendOnlineTime := Config.ReadInteger('Setup', 'SendOnlineTime', g_Config.dwSendOnlineTime);


  if Config.ReadInteger('Setup', 'SaveHumanRcdTime', -1) < 0 then
    Config.WriteInteger('Setup', 'SaveHumanRcdTime', g_Config.dwSaveHumanRcdTime);
  g_Config.dwSaveHumanRcdTime := Config.ReadInteger('Setup', 'SaveHumanRcdTime', g_Config.dwSaveHumanRcdTime);

  if Config.ReadInteger('Setup', 'HumanFreeDelayTime', -1) < 0 then
    Config.WriteInteger('Setup', 'HumanFreeDelayTime', g_Config.dwHumanFreeDelayTime);
  //g_Config.dwHumanFreeDelayTime:=Config.ReadInteger('Setup','HumanFreeDelayTime',g_Config.dwHumanFreeDelayTime);

  if Config.ReadInteger('Setup', 'MakeGhostTime', -1) < 0 then
    Config.WriteInteger('Setup', 'MakeGhostTime', g_Config.dwMakeGhostTime);
  g_Config.dwMakeGhostTime := Config.ReadInteger('Setup', 'MakeGhostTime', g_Config.dwMakeGhostTime);

  if Config.ReadInteger('Setup', 'ClearDropOnFloorItemTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ClearDropOnFloorItemTime', g_Config.dwClearDropOnFloorItemTime);
  g_Config.dwClearDropOnFloorItemTime := Config.ReadInteger('Setup', 'ClearDropOnFloorItemTime', g_Config.dwClearDropOnFloorItemTime);

  if Config.ReadInteger('Setup', 'FloorItemCanPickUpTime', -1) < 0 then
    Config.WriteInteger('Setup', 'FloorItemCanPickUpTime', g_Config.dwFloorItemCanPickUpTime);
  g_Config.dwFloorItemCanPickUpTime := Config.ReadInteger('Setup', 'FloorItemCanPickUpTime', g_Config.dwFloorItemCanPickUpTime);

  if Config.ReadInteger('Setup', 'PasswordLockSystem', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockSystem', g_Config.boPasswordLockSystem);
  g_Config.boPasswordLockSystem := Config.ReadBool('Setup', 'PasswordLockSystem', g_Config.boPasswordLockSystem);

  if Config.ReadInteger('Setup', 'PasswordLockDealAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockDealAction', g_Config.boLockDealAction);
  g_Config.boLockDealAction := Config.ReadBool('Setup', 'PasswordLockDealAction', g_Config.boLockDealAction);

  if Config.ReadInteger('Setup', 'PasswordLockDropAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockDropAction', g_Config.boLockDropAction);
  g_Config.boLockDropAction := Config.ReadBool('Setup', 'PasswordLockDropAction', g_Config.boLockDropAction);

  if Config.ReadInteger('Setup', 'PasswordLockGetBackItemAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockGetBackItemAction', g_Config.boLockGetBackItemAction);
  g_Config.boLockGetBackItemAction := Config.ReadBool('Setup', 'PasswordLockGetBackItemAction', g_Config.boLockGetBackItemAction);

  if Config.ReadInteger('Setup', 'PasswordLockHumanLogin', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockHumanLogin', g_Config.boLockHumanLogin);
  g_Config.boLockHumanLogin := Config.ReadBool('Setup', 'PasswordLockHumanLogin', g_Config.boLockHumanLogin);

  if Config.ReadInteger('Setup', 'PasswordLockWalkAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockWalkAction', g_Config.boLockWalkAction);
  g_Config.boLockWalkAction := Config.ReadBool('Setup', 'PasswordLockWalkAction', g_Config.boLockWalkAction);

  if Config.ReadInteger('Setup', 'PasswordLockRunAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockRunAction', g_Config.boLockRunAction);
  g_Config.boLockRunAction := Config.ReadBool('Setup', 'PasswordLockRunAction', g_Config.boLockRunAction);

  if Config.ReadInteger('Setup', 'PasswordLockHitAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockHitAction', g_Config.boLockHitAction);
  g_Config.boLockHitAction := Config.ReadBool('Setup', 'PasswordLockHitAction', g_Config.boLockHitAction);

  if Config.ReadInteger('Setup', 'PasswordLockSpellAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockSpellAction', g_Config.boLockSpellAction);
  g_Config.boLockSpellAction := Config.ReadBool('Setup', 'PasswordLockSpellAction', g_Config.boLockSpellAction);

  if Config.ReadInteger('Setup', 'PasswordLockSendMsgAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockSendMsgAction', g_Config.boLockSendMsgAction);
  g_Config.boLockSendMsgAction := Config.ReadBool('Setup', 'PasswordLockSendMsgAction', g_Config.boLockSendMsgAction);

  if Config.ReadInteger('Setup', 'PasswordLockUserItemAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockUserItemAction', g_Config.boLockUserItemAction);
  g_Config.boLockUserItemAction := Config.ReadBool('Setup', 'PasswordLockUserItemAction', g_Config.boLockUserItemAction);

  if Config.ReadInteger('Setup', 'PasswordLockInObModeAction', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordLockInObModeAction', g_Config.boLockInObModeAction);
  g_Config.boLockInObModeAction := Config.ReadBool('Setup', 'PasswordLockInObModeAction', g_Config.boLockInObModeAction);

  if Config.ReadInteger('Setup', 'PasswordErrorKick', -1) < 0 then
    Config.WriteBool('Setup', 'PasswordErrorKick', g_Config.boPasswordErrorKick);
  g_Config.boPasswordErrorKick := Config.ReadBool('Setup', 'PasswordErrorKick', g_Config.boPasswordErrorKick);

  if Config.ReadInteger('Setup', 'PasswordErrorCountLock', -1) < 0 then
    Config.WriteInteger('Setup', 'PasswordErrorCountLock', g_Config.nPasswordErrorCountLock);
  g_Config.nPasswordErrorCountLock := Config.ReadInteger('Setup', 'PasswordErrorCountLock', g_Config.nPasswordErrorCountLock);

  if Config.ReadInteger('Setup', 'SoftVersionDate', -1) < 0 then
    Config.WriteInteger('Setup', 'SoftVersionDate', g_Config.nSoftVersionDate);
  g_Config.nSoftVersionDate := Config.ReadInteger('Setup', 'SoftVersionDate', g_Config.nSoftVersionDate);

  nLoadInteger := Config.ReadInteger('Setup', 'CanOldClientLogon', -1);
  if nLoadInteger < 0 then
    Config.WriteBool('Setup', 'CanOldClientLogon', g_Config.boCanOldClientLogon)
  else g_Config.boCanOldClientLogon := nLoadInteger = 1;

  if Config.ReadInteger('Setup', 'ConsoleShowUserCountTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ConsoleShowUserCountTime', g_Config.dwConsoleShowUserCountTime);
  g_Config.dwConsoleShowUserCountTime := Config.ReadInteger('Setup', 'ConsoleShowUserCountTime', g_Config.dwConsoleShowUserCountTime);

  if Config.ReadInteger('Setup', 'ShowLineNoticeTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ShowLineNoticeTime', g_Config.dwShowLineNoticeTime);
  g_Config.dwShowLineNoticeTime := Config.ReadInteger('Setup', 'ShowLineNoticeTime', g_Config.dwShowLineNoticeTime);

  if Config.ReadInteger('Setup', 'LineNoticeColor', -1) < 0 then
    Config.WriteInteger('Setup', 'LineNoticeColor', g_Config.nLineNoticeColor);
  g_Config.nLineNoticeColor := Config.ReadInteger('Setup', 'LineNoticeColor', g_Config.nLineNoticeColor);

  if Config.ReadInteger('Setup', 'ItemSpeedTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemSpeedTime', g_Config.ClientConf.btItemSpeed);
  g_Config.ClientConf.btItemSpeed := Config.ReadInteger('Setup', 'ItemSpeedTime', g_Config.ClientConf.btItemSpeed);

  if Config.ReadInteger('Setup', 'MaxHitMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxHitMsgCount', g_Config.nMaxHitMsgCount);
  g_Config.nMaxHitMsgCount := Config.ReadInteger('Setup', 'MaxHitMsgCount', g_Config.nMaxHitMsgCount);

  if Config.ReadInteger('Setup', 'MaxSpellMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxSpellMsgCount', g_Config.nMaxSpellMsgCount);
  g_Config.nMaxSpellMsgCount := Config.ReadInteger('Setup', 'MaxSpellMsgCount', g_Config.nMaxSpellMsgCount);

  if Config.ReadInteger('Setup', 'MaxRunMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxRunMsgCount', g_Config.nMaxRunMsgCount);
  g_Config.nMaxRunMsgCount := Config.ReadInteger('Setup', 'MaxRunMsgCount', g_Config.nMaxRunMsgCount);

  if Config.ReadInteger('Setup', 'MaxWalkMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxWalkMsgCount', g_Config.nMaxWalkMsgCount);
  g_Config.nMaxWalkMsgCount := Config.ReadInteger('Setup', 'MaxWalkMsgCount', g_Config.nMaxWalkMsgCount);

  if Config.ReadInteger('Setup', 'MaxTurnMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxTurnMsgCount', g_Config.nMaxTurnMsgCount);
  g_Config.nMaxTurnMsgCount := Config.ReadInteger('Setup', 'MaxTurnMsgCount', g_Config.nMaxTurnMsgCount);

  if Config.ReadInteger('Setup', 'MaxSitDonwMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxSitDonwMsgCount', g_Config.nMaxSitDonwMsgCount);
  g_Config.nMaxSitDonwMsgCount := Config.ReadInteger('Setup', 'MaxSitDonwMsgCount', g_Config.nMaxSitDonwMsgCount);

  if Config.ReadInteger('Setup', 'MaxDigUpMsgCount', -1) < 0 then
    Config.WriteInteger('Setup', 'MaxDigUpMsgCount', g_Config.nMaxDigUpMsgCount);
  g_Config.nMaxDigUpMsgCount := Config.ReadInteger('Setup', 'MaxDigUpMsgCount', g_Config.nMaxDigUpMsgCount);


  if Config.ReadInteger('Setup', 'SpellSendUpdateMsg', -1) < 0 then
    Config.WriteBool('Setup', 'SpellSendUpdateMsg', g_Config.boSpellSendUpdateMsg);
  g_Config.boSpellSendUpdateMsg := Config.ReadBool('Setup', 'SpellSendUpdateMsg', g_Config.boSpellSendUpdateMsg);

  if Config.ReadInteger('Setup', 'ActionSendActionMsg', -1) < 0 then
    Config.WriteBool('Setup', 'ActionSendActionMsg', g_Config.boActionSendActionMsg);
  g_Config.boActionSendActionMsg := Config.ReadBool('Setup', 'ActionSendActionMsg', g_Config.boActionSendActionMsg);


  if Config.ReadInteger('Setup', 'OverSpeedKickCount', -1) < 0 then
    Config.WriteInteger('Setup', 'OverSpeedKickCount', g_Config.nOverSpeedKickCount);
  g_Config.nOverSpeedKickCount := Config.ReadInteger('Setup', 'OverSpeedKickCount', g_Config.nOverSpeedKickCount);

  if Config.ReadInteger('Setup', 'DropOverSpeed', -1) < 0 then
    Config.WriteInteger('Setup', 'DropOverSpeed', g_Config.dwDropOverSpeed);
  g_Config.dwDropOverSpeed := Config.ReadInteger('Setup', 'DropOverSpeed', g_Config.dwDropOverSpeed);

  if Config.ReadInteger('Setup', 'KickOverSpeed', -1) < 0 then
    Config.WriteBool('Setup', 'KickOverSpeed', g_Config.boKickOverSpeed);
  g_Config.boKickOverSpeed := Config.ReadBool('Setup', 'KickOverSpeed', g_Config.boKickOverSpeed);

  nLoadInteger := Config.ReadInteger('Setup', 'SpeedControlMode', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SpeedControlMode', g_Config.btSpeedControlMode)
  else g_Config.btSpeedControlMode := nLoadInteger;

  if Config.ReadInteger('Setup', 'HitIntervalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'HitIntervalTime', g_Config.dwHitIntervalTime);
  g_Config.dwHitIntervalTime := Config.ReadInteger('Setup', 'HitIntervalTime', g_Config.dwHitIntervalTime);

  if Config.ReadInteger('Setup', 'MagicHitIntervalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'MagicHitIntervalTime', g_Config.dwMagicHitIntervalTime);
  g_Config.dwMagicHitIntervalTime := Config.ReadInteger('Setup', 'MagicHitIntervalTime', g_Config.dwMagicHitIntervalTime);

  if Config.ReadInteger('Setup', 'RunIntervalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'RunIntervalTime', g_Config.dwRunIntervalTime);
  g_Config.dwRunIntervalTime := Config.ReadInteger('Setup', 'RunIntervalTime', g_Config.dwRunIntervalTime);

  if Config.ReadInteger('Setup', 'WalkIntervalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'WalkIntervalTime', g_Config.dwWalkIntervalTime);
  g_Config.dwWalkIntervalTime := Config.ReadInteger('Setup', 'WalkIntervalTime', g_Config.dwWalkIntervalTime);

  if Config.ReadInteger('Setup', 'TurnIntervalTime', -1) < 0 then
    Config.WriteInteger('Setup', 'TurnIntervalTime', g_Config.dwTurnIntervalTime);
  g_Config.dwTurnIntervalTime := Config.ReadInteger('Setup', 'TurnIntervalTime', g_Config.dwTurnIntervalTime);

  nLoadInteger := Config.ReadInteger('Setup', 'ControlActionInterval', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'ControlActionInterval', g_Config.boControlActionInterval);
  end else begin
    g_Config.boControlActionInterval := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'ControlWalkHit', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'ControlWalkHit', g_Config.boControlWalkHit);
  end else begin
    g_Config.boControlWalkHit := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'ControlRunLongHit', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'ControlRunLongHit', g_Config.boControlRunLongHit);
  end else begin
    g_Config.boControlRunLongHit := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'ControlRunHit', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'ControlRunHit', g_Config.boControlRunHit);
  end else begin
    g_Config.boControlRunHit := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'ControlRunMagic', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'ControlRunMagic', g_Config.boControlRunMagic);
  end else begin
    g_Config.boControlRunMagic := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'ActionIntervalTime', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'ActionIntervalTime', g_Config.dwActionIntervalTime);
  end else begin
    g_Config.dwActionIntervalTime := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'RunLongHitIntervalTime', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'RunLongHitIntervalTime', g_Config.dwRunLongHitIntervalTime);
  end else begin
    g_Config.dwRunLongHitIntervalTime := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'RunHitIntervalTime', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'RunHitIntervalTime', g_Config.dwRunHitIntervalTime);
  end else begin
    g_Config.dwRunHitIntervalTime := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'WalkHitIntervalTime', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WalkHitIntervalTime', g_Config.dwWalkHitIntervalTime);
  end else begin
    g_Config.dwWalkHitIntervalTime := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'RunMagicIntervalTime', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'RunMagicIntervalTime', g_Config.dwRunMagicIntervalTime);
  end else begin
    g_Config.dwRunMagicIntervalTime := nLoadInteger;
  end;

  if Config.ReadInteger('Setup', 'DisableStruck', -1) < 0 then
    Config.WriteBool('Setup', 'DisableStruck', g_Config.boDisableStruck);
  g_Config.boDisableStruck := Config.ReadBool('Setup', 'DisableStruck', g_Config.boDisableStruck);

  if Config.ReadInteger('Setup', 'DisableSelfStruck', -1) < 0 then
    Config.WriteBool('Setup', 'DisableSelfStruck', g_Config.boDisableSelfStruck);
  g_Config.boDisableSelfStruck := Config.ReadBool('Setup', 'DisableSelfStruck', g_Config.boDisableSelfStruck);

  if Config.ReadInteger('Setup', 'StruckTime', -1) < 0 then
    Config.WriteInteger('Setup', 'StruckTime', g_Config.dwStruckTime);
  g_Config.dwStruckTime := Config.ReadInteger('Setup', 'StruckTime', g_Config.dwStruckTime);

  nLoadInteger := Config.ReadInteger('Setup', 'AddUserItemNewValue', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'AddUserItemNewValue', g_Config.boAddUserItemNewValue);
  end else begin
    g_Config.boAddUserItemNewValue := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'TestSpeedMode', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'TestSpeedMode', g_Config.boTestSpeedMode);
  end else begin
    g_Config.boTestSpeedMode := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeUnLuckRate', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeUnLuckRate', g_Config.nWeaponMakeUnLuckRate);
  end else begin
    g_Config.nWeaponMakeUnLuckRate := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeLuckPoint1', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeLuckPoint1', g_Config.nWeaponMakeLuckPoint1);
  end else begin
    g_Config.nWeaponMakeLuckPoint1 := nLoadInteger;
  end;
  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeLuckPoint2', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeLuckPoint2', g_Config.nWeaponMakeLuckPoint2);
  end else begin
    g_Config.nWeaponMakeLuckPoint2 := nLoadInteger;
  end;
  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeLuckPoint3', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeLuckPoint3', g_Config.nWeaponMakeLuckPoint3);
  end else begin
    g_Config.nWeaponMakeLuckPoint3 := nLoadInteger;
  end;
  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeLuckPoint2Rate', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeLuckPoint2Rate', g_Config.nWeaponMakeLuckPoint2Rate);
  end else begin
    g_Config.nWeaponMakeLuckPoint2Rate := nLoadInteger;
  end;
  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMakeLuckPoint3Rate', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'WeaponMakeLuckPoint3Rate', g_Config.nWeaponMakeLuckPoint3Rate);
  end else begin
    g_Config.nWeaponMakeLuckPoint3Rate := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'CheckUserItemPlace', -1);
  if nLoadInteger < 0 then begin
    Config.WriteBool('Setup', 'CheckUserItemPlace', g_Config.boCheckUserItemPlace);
  end else begin
    g_Config.boCheckUserItemPlace := nLoadInteger = 1;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'LevelValueOfTaosHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'LevelValueOfTaosHP', g_Config.nLevelValueOfTaosHP);
  end else begin
    g_Config.nLevelValueOfTaosHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'LevelValueOfTaosHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'LevelValueOfTaosHPRate', g_Config.nLevelValueOfTaosHPRate);
  end else begin
    g_Config.nLevelValueOfTaosHPRate := nLoadFloat;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'LevelValueOfTaosMP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'LevelValueOfTaosMP', g_Config.nLevelValueOfTaosMP);
  end else begin
    g_Config.nLevelValueOfTaosMP := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'LevelValueOfWizardHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'LevelValueOfWizardHP', g_Config.nLevelValueOfWizardHP);
  end else begin
    g_Config.nLevelValueOfWizardHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'LevelValueOfWizardHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'LevelValueOfWizardHPRate', g_Config.nLevelValueOfWizardHPRate);
  end else begin
    g_Config.nLevelValueOfWizardHPRate := nLoadFloat;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'LevelValueOfWarrHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'LevelValueOfWarrHP', g_Config.nLevelValueOfWarrHP);
  end else begin
    g_Config.nLevelValueOfWarrHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'LevelValueOfWarrHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'LevelValueOfWarrHPRate', g_Config.nLevelValueOfWarrHPRate);
  end else begin
    g_Config.nLevelValueOfWarrHPRate := nLoadFloat;
  end;




  nLoadInteger := Config.ReadInteger('Setup', 'HeroLevelValueOfTaosHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'HeroLevelValueOfTaosHP', g_Config.nHeroLevelValueOfTaosHP);
  end else begin
    g_Config.nHeroLevelValueOfTaosHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'HeroLevelValueOfTaosHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'HeroLevelValueOfTaosHPRate', g_Config.nHeroLevelValueOfTaosHPRate);
  end else begin
    g_Config.nHeroLevelValueOfTaosHPRate := nLoadFloat;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'HeroLevelValueOfTaosMP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'HeroLevelValueOfTaosMP', g_Config.nHeroLevelValueOfTaosMP);
  end else begin
    g_Config.nHeroLevelValueOfTaosMP := nLoadInteger;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'HeroLevelValueOfWizardHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'HeroLevelValueOfWizardHP', g_Config.nHeroLevelValueOfWizardHP);
  end else begin
    g_Config.nHeroLevelValueOfWizardHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'HeroLevelValueOfWizardHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'HeroLevelValueOfWizardHPRate', g_Config.nHeroLevelValueOfWizardHPRate);
  end else begin
    g_Config.nHeroLevelValueOfWizardHPRate := nLoadFloat;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'HeroLevelValueOfWarrHP', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'HeroLevelValueOfWarrHP', g_Config.nHeroLevelValueOfWarrHP);
  end else begin
    g_Config.nHeroLevelValueOfWarrHP := nLoadInteger;
  end;

  nLoadFloat := Config.ReadFloat('Setup', 'HeroLevelValueOfWarrHPRate', 0);
  if nLoadFloat = 0 then begin
    Config.WriteFloat('Setup', 'HeroLevelValueOfWarrHPRate', g_Config.nHeroLevelValueOfWarrHPRate);
  end else begin
    g_Config.nHeroLevelValueOfWarrHPRate := nLoadFloat;
  end;






  nLoadInteger := Config.ReadInteger('Setup', 'ProcessMonsterInterval', -1);
  if nLoadInteger < 0 then begin
    Config.WriteInteger('Setup', 'ProcessMonsterInterval', g_Config.nProcessMonsterInterval);
  end else begin
    g_Config.nProcessMonsterInterval := nLoadInteger;
  end;

  if Config.ReadInteger('Setup', 'StartCastleWarDays', -1) < 0 then
    Config.WriteInteger('Setup', 'StartCastleWarDays', g_Config.nStartCastleWarDays);
  g_Config.nStartCastleWarDays := Config.ReadInteger('Setup', 'StartCastleWarDays', g_Config.nStartCastleWarDays);

  if Config.ReadInteger('Setup', 'StartCastlewarTime', -1) < 0 then
    Config.WriteInteger('Setup', 'StartCastlewarTime', g_Config.nStartCastlewarTime);
  g_Config.nStartCastlewarTime := Config.ReadInteger('Setup', 'StartCastlewarTime', g_Config.nStartCastlewarTime);

  if Config.ReadInteger('Setup', 'ShowCastleWarEndMsgTime', -1) < 0 then
    Config.WriteInteger('Setup', 'ShowCastleWarEndMsgTime', g_Config.dwShowCastleWarEndMsgTime);
  g_Config.dwShowCastleWarEndMsgTime := Config.ReadInteger('Setup', 'ShowCastleWarEndMsgTime', g_Config.dwShowCastleWarEndMsgTime);

  if Config.ReadInteger('Setup', 'CastleWarTime', -1) < 0 then
    Config.WriteInteger('Setup', 'CastleWarTime', g_Config.dwCastleWarTime);
  g_Config.dwCastleWarTime := Config.ReadInteger('Setup', 'CastleWarTime', g_Config.dwCastleWarTime);

  nLoadInteger := Config.ReadInteger('Setup', 'GetCastleTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GetCastleTime', g_Config.dwGetCastleTime)
  else g_Config.dwGetCastleTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'GuildWarTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GuildWarTime', g_Config.dwGuildWarTime)
  else g_Config.dwGuildWarTime := nLoadInteger;

  for I := Low(g_Config.GlobalVal) to High(g_Config.GlobalVal) do begin
    nLoadInteger := Config.ReadInteger('Setup', 'GlobalVal' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('Setup', 'GlobalVal' + IntToStr(I), g_Config.GlobalVal[I])
    else g_Config.GlobalVal[I] := nLoadInteger;
  end;

  for I := Low(g_Config.GlobalAVal) to High(g_Config.GlobalAVal) do begin
    sLoadString := Config.ReadString('Setup', 'GlobalStrVal' + IntToStr(I), '');
    if sLoadString = '' then
      Config.WriteString('Setup', 'GlobalStrVal' + IntToStr(I), '');
    g_Config.GlobalAVal[I] := sLoadString;
  end;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryCount', g_Config.nWinLotteryCount)
  else g_Config.nWinLotteryCount := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'NoWinLotteryCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NoWinLotteryCount', g_Config.nNoWinLotteryCount)
  else g_Config.nNoWinLotteryCount := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel1', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel1', g_Config.nWinLotteryLevel1)
  else g_Config.nWinLotteryLevel1 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel2', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel2', g_Config.nWinLotteryLevel2)
  else g_Config.nWinLotteryLevel2 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel3', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel3', g_Config.nWinLotteryLevel3)
  else g_Config.nWinLotteryLevel3 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel4', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel4', g_Config.nWinLotteryLevel4)
  else g_Config.nWinLotteryLevel4 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel5', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel5', g_Config.nWinLotteryLevel5)
  else g_Config.nWinLotteryLevel5 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WinLotteryLevel6', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WinLotteryLevel6', g_Config.nWinLotteryLevel6)
  else g_Config.nWinLotteryLevel6 := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'SellOffRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SellOffRate', g_Config.nUserSellOffTax)
  else g_Config.nUserSellOffTax := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'SellOffCountLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SellOffCountLimit', g_Config.nUserSellOffCount)
  else g_Config.nUserSellOffCount := nLoadInteger;


  if Config.ReadInteger('Setup', 'PullPlayObject', -1) < 0 then
    Config.WriteBool('Setup', 'PullPlayObject', g_Config.boPullPlayObject);
  g_Config.boPullPlayObject := Config.ReadBool('Setup', 'PullPlayObject', g_Config.boPullPlayObject);

  if Config.ReadInteger('Setup', 'GroupMbAttackPlayObject', -1) < 0 then
    Config.WriteBool('Setup', 'GroupMbAttackPlayObject', g_Config.boGroupMbAttackPlayObject);
  g_Config.boGroupMbAttackPlayObject := Config.ReadBool('Setup', 'GroupMbAttackPlayObject', g_Config.boGroupMbAttackPlayObject);


  nLoadInteger := Config.ReadInteger('Setup', 'MagicValidTimeRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicValidTimeRate', g_Config.nMagDelayTimeDoubly)
  else g_Config.nMagDelayTimeDoubly := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagicPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicPowerRate', g_Config.nMagPowerDoubly)
  else g_Config.nMagPowerDoubly := nLoadInteger;

  if Config.ReadInteger('Setup', 'DamageMP', -1) < 0 then
    Config.WriteBool('Setup', 'DamageMP', g_Config.boPlayObjectReduceMP);
  g_Config.boPlayObjectReduceMP := Config.ReadBool('Setup', 'DamageMP', g_Config.boPlayObjectReduceMP);

  if Config.ReadInteger('Setup', 'GroupMbAttackSlave', -1) < 0 then
    Config.WriteBool('Setup', 'GroupMbAttackSlave', g_Config.boGroupMbAttackSlave);
  g_Config.boGroupMbAttackSlave := Config.ReadBool('Setup', 'GroupMbAttackSlave', g_Config.boGroupMbAttackSlave);


  nLoadInteger := Config.ReadInteger('Setup', 'BigStorageLimitCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BigStorageLimitCount', g_Config.nBigStorageLimitCount)
  else g_Config.nBigStorageLimitCount := nLoadInteger;

  if Config.ReadInteger('Setup', 'DropGoldToPlayBag', -1) < 0 then
    Config.WriteBool('Setup', 'DropGoldToPlayBag', g_Config.boDropGoldToPlayBag);
  g_Config.boDropGoldToPlayBag := Config.ReadBool('Setup', 'DropGoldToPlayBag', g_Config.boDropGoldToPlayBag);

  if Config.ReadInteger('Setup', 'ChangeUseItemNameByPlayName', -1) < 0 then
    Config.WriteBool('Setup', 'ChangeUseItemNameByPlayName', g_Config.boChangeUseItemNameByPlayName);
  g_Config.boChangeUseItemNameByPlayName := Config.ReadBool('Setup', 'ChangeUseItemNameByPlayName', g_Config.boChangeUseItemNameByPlayName);

  if Config.ReadString('Setup', 'ChangeUseItemName', '') = '' then
    Config.WriteString('Setup', 'ChangeUseItemName', g_Config.sChangeUseItemName);
  g_Config.sChangeUseItemName := Config.ReadString('Setup', 'ChangeUseItemName', g_Config.sChangeUseItemName);

  nLoadInteger := Config.ReadInteger('Setup', 'MagicDedingUseTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicDedingUseTime', g_Config.nDedingUseTime)
  else g_Config.nDedingUseTime := nLoadInteger;


  if Config.ReadInteger('Setup', 'DedingAllowPK', -1) < 0 then
    Config.WriteBool('Setup', 'DedingAllowPK', g_Config.boDedingAllowPK);
  g_Config.boDedingAllowPK := Config.ReadBool('Setup', 'DedingAllowPK', g_Config.boDedingAllowPK);

  {分身术设置}
  nLoadInteger := Config.ReadInteger('Setup', 'CopyHumanBagCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'CopyHumanBagCount', g_Config.nCopyHumanBagCount)
  else g_Config.nCopyHumanBagCount := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'AllowCopyHumanCount', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'AllowCopyHumanCount', g_Config.nAllowCopyHumanCount)
  else g_Config.nAllowCopyHumanCount := nLoadInteger;

  if Config.ReadInteger('Setup', 'AddMasterName', -1) < 0 then
    Config.WriteBool('Setup', 'AddMasterName', g_Config.boAddMasterName);
  g_Config.boAddMasterName := Config.ReadBool('Setup', 'AddMasterName', g_Config.boAddMasterName);

  {if Config.ReadString('Setup', 'CopyHumName', '') = '' then
    Config.WriteString('Setup', 'CopyHumName', g_Config.sCopyHumName); }
  g_Config.sCopyHumName := Config.ReadString('Setup', 'CopyHumName', g_Config.sCopyHumName);

  nLoadInteger := Config.ReadInteger('Setup', 'CopyHumAddHPRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'CopyHumAddHPRate', g_Config.nCopyHumAddHPRate)
  else g_Config.nCopyHumAddHPRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'CopyHumAddMPRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'CopyHumAddMPRate', g_Config.nCopyHumAddMPRate)
  else g_Config.nCopyHumAddMPRate := nLoadInteger;

  if Config.ReadString('Setup', 'CopyHumBagItems1', '') = '' then
    Config.WriteString('Setup', 'CopyHumBagItems1', g_Config.sCopyHumBagItems1);
  g_Config.sCopyHumBagItems1 := Config.ReadString('Setup', 'CopyHumBagItems1', g_Config.sCopyHumBagItems1);

  if Config.ReadString('Setup', 'CopyHumBagItems2', '') = '' then
    Config.WriteString('Setup', 'CopyHumBagItems2', g_Config.sCopyHumBagItems2);
  g_Config.sCopyHumBagItems2 := Config.ReadString('Setup', 'CopyHumBagItems1', g_Config.sCopyHumBagItems2);

  if Config.ReadString('Setup', 'CopyHumBagItems3', '') = '' then
    Config.WriteString('Setup', 'CopyHumBagItems3', g_Config.sCopyHumBagItems3);
  g_Config.sCopyHumBagItems3 := Config.ReadString('Setup', 'CopyHumBagItems3', g_Config.sCopyHumBagItems3);

  if Config.ReadInteger('Setup', 'AllowGuardAttack', -1) < 0 then
    Config.WriteBool('Setup', 'AllowGuardAttack', g_Config.boAllowGuardAttack);
  g_Config.boAllowGuardAttack := Config.ReadBool('Setup', 'AllowGuardAttack', g_Config.boAllowGuardAttack);


  nLoadInteger := Config.ReadInteger('Setup', 'WarrorAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WarrorAttackTime', g_Config.dwWarrorAttackTime)
  else g_Config.dwWarrorAttackTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WizardAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WizardAttackTime', g_Config.dwWizardAttackTime)
  else g_Config.dwWizardAttackTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'TaoistAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'TaoistAttackTime', g_Config.dwTaoistAttackTime)
  else g_Config.dwTaoistAttackTime := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'WarrorWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WarrorWalkTime', g_Config.dwWarrorWalkTime)
  else g_Config.dwWarrorWalkTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WizardWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WizardWalkTime', g_Config.dwWizardWalkTime)
  else g_Config.dwWizardWalkTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'TaoistWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'TaoistWalkTime', g_Config.dwTaoistWalkTime)
  else g_Config.dwTaoistWalkTime := nLoadInteger;


  if Config.ReadInteger('Setup', 'AllowReCallMobOtherHum', -1) < 0 then
    Config.WriteBool('Setup', 'AllowReCallMobOtherHum', g_Config.boAllowReCallMobOtherHum);
  g_Config.boAllowReCallMobOtherHum := Config.ReadBool('Setup', 'AllowReCallMobOtherHum', g_Config.boAllowReCallMobOtherHum);

  if Config.ReadInteger('Setup', 'NeedLevelHighTarget', -1) < 0 then
    Config.WriteBool('Setup', 'NeedLevelHighTarget', g_Config.boNeedLevelHighTarget);
  g_Config.boNeedLevelHighTarget := Config.ReadBool('Setup', 'NeedLevelHighTarget', g_Config.boNeedLevelHighTarget);

  ///////////////////数据读取和保存等待时间 //////////////////////////////////////
  nLoadInteger := Config.ReadInteger('Setup', 'GetDBSockMsgTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GetDBSockMsgTime', g_Config.dwGetDBSockMsgTime)
  else g_Config.dwGetDBSockMsgTime := nLoadInteger;
  ///////////////////数据读取和保存等待时间 //////////////////////////////////////

  if Config.ReadInteger('Setup', 'PullCrossInSafeZone', -1) < 0 then
    Config.WriteBool('Setup', 'PullCrossInSafeZone', g_Config.boPullCrossInSafeZone);
  g_Config.boPullCrossInSafeZone := Config.ReadBool('Setup', 'PullCrossInSafeZone', g_Config.boPullCrossInSafeZone);

  if Config.ReadInteger('Exp', 'HighLevelGroupFixExp', -1) < 0 then
    Config.WriteBool('Exp', 'HighLevelGroupFixExp', g_Config.boHighLevelGroupFixExp);
  g_Config.boHighLevelGroupFixExp := Config.ReadBool('Exp', 'HighLevelGroupFixExp', g_Config.boHighLevelGroupFixExp);


  if Config.ReadInteger('Setup', 'StartMapEvent', -1) < 0 then
    Config.WriteBool('Setup', 'StartMapEvent', g_Config.boStartMapEvent);
  g_Config.boStartMapEvent := Config.ReadBool('Setup', 'StartMapEvent', g_Config.boStartMapEvent);


  nLoadInteger := Config.ReadInteger('Exp', 'LimitExpLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Exp', 'LimitExpLevel', g_Config.nLimitExpLevel)
  else g_Config.nLimitExpLevel := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Exp', 'LimitExpValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Exp', 'LimitExpValue', g_Config.nLimitExpValue)
  else g_Config.nLimitExpValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'FireDelayTimeRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'FireDelayTimeRate', g_Config.nFireDelayTimeRate)
  else g_Config.nFireDelayTimeRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'FirePowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'FirePowerRate', g_Config.nFirePowerRate)
  else g_Config.nFirePowerRate := nLoadInteger;

  if Config.ReadInteger('Setup', 'ChangeMapFireExtinguish', -1) < 0 then
    Config.WriteBool('Setup', 'ChangeMapFireExtinguish', g_Config.boChangeMapFireExtinguish);
  g_Config.boChangeMapFireExtinguish := Config.ReadBool('Setup', 'ChangeMapFireExtinguish', g_Config.boChangeMapFireExtinguish);

  nLoadInteger := Config.ReadInteger('Setup', 'DidingPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DidingPowerRate', g_Config.nDidingPowerRate)
  else g_Config.nDidingPowerRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('HeroSetup', 'StartLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'StartLevel', g_Config.nHeroStartLevel)
  else g_Config.nHeroStartLevel := nLoadInteger;
  nLoadInteger := Config.ReadInteger('HeroSetup', 'KillMonExpRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'KillMonExpRate', g_Config.nHeroKillMonExpRate)
  else g_Config.nHeroKillMonExpRate := nLoadInteger;

  for I := Low(g_Config.HeroBagItemCounts) to High(g_Config.HeroBagItemCounts) do begin
    nLoadInteger := Config.ReadInteger('HeroSetup', 'BagItemCount' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('HeroSetup', 'BagItemCount' + IntToStr(I), g_Config.HeroBagItemCounts[I])
    else g_Config.HeroBagItemCounts[I] := nLoadInteger;
  end;
  nLoadInteger := Config.ReadInteger('HeroSetup', 'WarrorAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'WarrorAttackTime', g_Config.dwHeroWarrorAttackTime)
  else g_Config.dwHeroWarrorAttackTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'WizardAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'WizardAttackTime', g_Config.dwHeroWizardAttackTime)
  else g_Config.dwHeroWizardAttackTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'TaoistAttackTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'TaoistAttackTime', g_Config.dwHeroTaoistAttackTime)
  else g_Config.dwHeroTaoistAttackTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'WarrorWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'WarrorWalkTime', g_Config.dwHeroWarrorWalkTime)
  else g_Config.dwHeroWarrorWalkTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'WizardWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'WizardWalkTime', g_Config.dwHeroWizardWalkTime)
  else g_Config.dwHeroWizardWalkTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'TaoistWalkTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'TaoistWalkTime', g_Config.dwHeroTaoistWalkTime)
  else g_Config.dwHeroTaoistWalkTime := nLoadInteger;



  if Config.ReadInteger('HeroSetup', 'KillByMonstDropUseItem', -1) < 0 then
    Config.WriteBool('HeroSetup', 'KillByMonstDropUseItem', g_Config.boHeroKillByMonstDropUseItem);
  g_Config.boHeroKillByMonstDropUseItem := Config.ReadBool('HeroSetup', 'KillByMonstDropUseItem', g_Config.boHeroKillByMonstDropUseItem);

  if Config.ReadInteger('HeroSetup', 'KillByHumanDropUseItem', -1) < 0 then
    Config.WriteBool('HeroSetup', 'KillByHumanDropUseItem', g_Config.boHeroKillByHumanDropUseItem);
  g_Config.boHeroKillByHumanDropUseItem := Config.ReadBool('HeroSetup', 'KillByHumanDropUseItem', g_Config.boHeroKillByHumanDropUseItem);

  if Config.ReadInteger('HeroSetup', 'DieScatterBag', -1) < 0 then
    Config.WriteBool('HeroSetup', 'DieScatterBag', g_Config.boHeroDieScatterBag);
  g_Config.boHeroDieScatterBag := Config.ReadBool('HeroSetup', 'DieScatterBag', g_Config.boHeroDieScatterBag);

  if Config.ReadInteger('HeroSetup', 'DieRedScatterBagAll', -1) < 0 then
    Config.WriteBool('HeroSetup', 'DieRedScatterBagAll', g_Config.boHeroDieRedScatterBagAll);
  g_Config.boHeroDieRedScatterBagAll := Config.ReadBool('HeroSetup', 'DieRedScatterBagAll', g_Config.boHeroDieRedScatterBagAll);

  nLoadInteger := Config.ReadInteger('HeroSetup', 'DieDropUseItemRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'DieDropUseItemRate', g_Config.nHeroDieDropUseItemRate)
  else g_Config.nHeroDieDropUseItemRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'DieRedDropUseItemRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'DieRedDropUseItemRate', g_Config.nHeroDieRedDropUseItemRate)
  else g_Config.nHeroDieRedDropUseItemRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'DieScatterBagRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'DieScatterBagRate', g_Config.nHeroDieScatterBagRate)
  else g_Config.nHeroDieScatterBagRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'HeroAddHPRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'HeroAddHPRate', g_Config.nHeroAddHPRate)
  else g_Config.nHeroAddHPRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'HeroAddMPRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'HeroAddMPRate', g_Config.nHeroAddMPRate)
  else g_Config.nHeroAddMPRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('HeroSetup', 'MaxAngryValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'MaxAngryValue', g_Config.nMaxAngryValue)
  else g_Config.nMaxAngryValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'AddAngryValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'AddAngryValue', g_Config.nAddAngryValue)
  else g_Config.nAddAngryValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'DecAngryValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'DecAngryValue', g_Config.nDecAngryValue)
  else g_Config.nDecAngryValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill60Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill60Rate', g_Config.nSkill60Rate)
  else g_Config.nSkill60Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill61Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill61Rate', g_Config.nSkill61Rate)
  else g_Config.nSkill61Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill62Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill62Rate', g_Config.nSkill62Rate)
  else g_Config.nSkill62Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill63Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill63Rate', g_Config.nSkill63Rate)
  else g_Config.nSkill63Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill64Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill64Rate', g_Config.nSkill64Rate)
  else g_Config.nSkill64Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'Skill65Rate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'Skill65Rate', g_Config.nSkill65Rate)
  else g_Config.nSkill65Rate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('HeroSetup', 'RecallHeroTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'RecallHeroTime', g_Config.nRecallHeroTime)
  else g_Config.nRecallHeroTime := nLoadInteger;

  if Config.ReadString('HeroSetup', 'RecallHeroHint', '') = '' then
    Config.WriteString('HeroSetup', 'RecallHeroHint', g_Config.sRecallHeroHint);
  g_Config.sRecallHeroHint := Config.ReadString('HeroSetup', 'RecallHeroHint', g_Config.sRecallHeroHint);


  if Config.ReadString('HeroNames', 'ClothsMan', '') = '' then
    Config.WriteString('HeroNames', 'ClothsMan', g_Config.sHeroClothsMan);
  g_Config.sHeroClothsMan := Config.ReadString('HeroNames', 'ClothsMan', g_Config.sHeroClothsMan);

  if Config.ReadString('HeroNames', 'ClothsWoman', '') = '' then
    Config.WriteString('HeroNames', 'ClothsWoman', g_Config.sClothsWoman);
  g_Config.sHeroClothsWoman := Config.ReadString('HeroNames', 'ClothsWoman', g_Config.sHeroClothsWoman);

  if Config.ReadString('HeroNames', 'WoodenSword', '') = '' then
    Config.WriteString('HeroNames', 'WoodenSword', g_Config.sHeroWoodenSword);
  g_Config.sHeroWoodenSword := Config.ReadString('HeroNames', 'WoodenSword', g_Config.sHeroWoodenSword);

  if Config.ReadString('HeroNames', 'BasicDrug', '') = '' then
    Config.WriteString('HeroNames', 'BasicDrug', g_Config.sBasicDrug);
  g_Config.sHeroBasicDrug := Config.ReadString('HeroNames', 'BasicDrug', g_Config.sHeroBasicDrug);

  nLoadInteger := Config.ReadInteger('HeroSetup', 'HeroNameColor', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('HeroSetup', 'HeroNameColor', g_Config.btHeroNameColor)
  else g_Config.btHeroNameColor := nLoadInteger;


  if Config.ReadInteger('HeroSetup', 'HeroUseBagItem', -1) < 0 then
    Config.WriteBool('HeroSetup', 'HeroUseBagItem', g_Config.boHeroUseBagItem);
  g_Config.boHeroUseBagItem := Config.ReadBool('Setup', 'HeroUseBagItem', g_Config.boHeroUseBagItem);


  nLoadInteger := Config.ReadInteger('Setup', 'Skill43DelayTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill43DelayTime', g_Config.nSkill43DelayTime)
  else g_Config.nSkill43DelayTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill50DelayTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill50DelayTime', g_Config.nSkill50DelayTime)
  else g_Config.nSkill50DelayTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill58DelayTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill58DelayTime', g_Config.nSkill58DelayTime)
  else g_Config.nSkill58DelayTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill43PowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill43PowerRate', g_Config.nSkill43PowerRate)
  else g_Config.nSkill43PowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill58PowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill58PowerRate', g_Config.nSkill58PowerRate)
  else g_Config.nSkill58PowerRate := nLoadInteger;

  if Config.ReadInteger('Setup', 'CheckClientVersion', -1) < 0 then
    Config.WriteBool('Setup', 'CheckClientVersion', g_Config.boCheckClientVersion);
  g_Config.boCheckClientVersion := Config.ReadBool('Setup', 'CheckClientVersion', g_Config.boCheckClientVersion);

  if Config.ReadInteger('Setup', 'AllowRecallSelf', -1) < 0 then
    Config.WriteBool('Setup', 'AllowRecallSelf', g_Config.boAllowRecallSelf);
  g_Config.boAllowRecallSelf := Config.ReadBool('Setup', 'AllowRecallSelf', g_Config.boAllowRecallSelf);

  if Config.ReadInteger('Setup', 'AllowRecallDogz', -1) < 0 then
    Config.WriteBool('Setup', 'AllowRecallDogz', g_Config.boAllowRecallDogz);
  g_Config.boAllowRecallDogz := Config.ReadBool('Setup', 'AllowRecallDogz', g_Config.boAllowRecallDogz);

  if Config.ReadInteger('Setup', 'AllowRecallMoon', -1) < 0 then
    Config.WriteBool('Setup', 'AllowRecallMoon', g_Config.boAllowRecallMoon);
  g_Config.boAllowRecallMoon := Config.ReadBool('Setup', 'AllowRecallMoon', g_Config.boAllowRecallMoon);

  if Config.ReadInteger('Setup', 'AllowRecallAll', -1) < 0 then
    Config.WriteBool('Setup', 'AllowRecallAll', g_Config.boAllowRecallAll);
  g_Config.boAllowRecallAll := Config.ReadBool('Setup', 'AllowRecallAll', g_Config.boAllowRecallAll);

  if Config.ReadInteger('Setup', 'RobotAttack', -1) < 0 then
    Config.WriteBool('Setup', 'RobotAttack', g_Config.boRobotAttack);
  g_Config.boRobotAttack := Config.ReadBool('Setup', 'RobotAttack', g_Config.boRobotAttack);

  nLoadInteger := Config.ReadInteger('Setup', 'LimitLoginTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'LimitLoginTime', g_Config.nLimitLoginTime)
  else g_Config.nLimitLoginTime := nLoadInteger;




  if Config.ReadInteger('Setup', 'AllowClientChgSpeed', -1) < 0 then
    Config.WriteBool('Setup', 'AllowClientChgSpeed', g_Config.boAllowClientChgSpeed);
  g_Config.boAllowClientChgSpeed := Config.ReadBool('Setup', 'AllowClientChgSpeed', g_Config.boAllowClientChgSpeed);

  {nLoadInteger := Config.ReadInteger('Setup', 'ClientGameOptionType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ClientGameOptionType', g_Config.nClientGameOptionType)
  else g_Config.nClientGameOptionType := nLoadInteger; }


  if Config.ReadInteger('HeroSetup', 'SafeNoAllowTargetBB', -1) < 0 then
    Config.WriteBool('HeroSetup', 'SafeNoAllowTargetBB', g_Config.boSafeNoAllowTargetBB);
  g_Config.boSafeNoAllowTargetBB := Config.ReadBool('HeroSetup', 'SafeNoAllowTargetBB', g_Config.boSafeNoAllowTargetBB);



  nLoadInteger := Config.ReadInteger('Setup', 'MonRandomNewAddValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MonRandomNewAddValue', g_Config.nMonRandomNewAddValue)
  else g_Config.nMonRandomNewAddValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MakeRandomNewAddValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MakeRandomNewAddValue', g_Config.nMakeRandomNewAddValue)
  else g_Config.nMakeRandomNewAddValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ScriptRandomNewAddValue', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ScriptRandomNewAddValue', g_Config.nScriptRandomNewAddValue)
  else g_Config.nScriptRandomNewAddValue := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MonRandomNotLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MonRandomNotLimit', g_Config.nMonRandomNotLimit)
  else g_Config.nMonRandomNotLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MakeRandomNotLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MakeRandomNotLimit', g_Config.nMakeRandomNotLimit)
  else g_Config.nMakeRandomNotLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ScriptRandomNotLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ScriptRandomNotLimit', g_Config.nScriptRandomNotLimit)
  else g_Config.nScriptRandomNotLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ItemMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ItemMaxLimitDay', g_Config.nItemMaxLimitDay)
  else g_Config.nItemMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ItemLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ItemLimitDayRate', g_Config.nItemLimitDayRate)
  else g_Config.nItemLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponMaxLimitDay', g_Config.nWeaponMaxLimitDay)
  else g_Config.nWeaponMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponLimitDayRate', g_Config.nWeaponLimitDayRate)
  else g_Config.nWeaponLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponNotLimitRate', g_Config.nWeaponNotLimitRate)
  else g_Config.nWeaponNotLimitRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'DressMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressMaxLimitDay', g_Config.nDressMaxLimitDay)
  else g_Config.nDressMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'DressLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressLimitDayRate', g_Config.nDressLimitDayRate)
  else g_Config.nDressLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'DressNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressNotLimitRate', g_Config.nDressNotLimitRate)
  else g_Config.nDressNotLimitRate := nLoadInteger;




  nLoadInteger := Config.ReadInteger('Setup', 'NeckLaceMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLaceMaxLimitDay', g_Config.nNeckLaceMaxLimitDay)
  else g_Config.nNeckLaceMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'NeckLaceLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLaceLimitDayRate', g_Config.nNeckLaceLimitDayRate)
  else g_Config.nNeckLaceLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'NeckLaceNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLaceNotLimitRate', g_Config.nNeckLaceNotLimitRate)
  else g_Config.nNeckLaceNotLimitRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingMaxLimitDay', g_Config.nArmRingMaxLimitDay)
  else g_Config.nArmRingMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingLimitDayRate', g_Config.nArmRingLimitDayRate)
  else g_Config.nArmRingLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingNotLimitRate', g_Config.nArmRingNotLimitRate)
  else g_Config.nArmRingNotLimitRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'RingMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingMaxLimitDay', g_Config.nRingMaxLimitDay)
  else g_Config.nRingMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'RingLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingLimitDayRate', g_Config.nRingLimitDayRate)
  else g_Config.nRingLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'RingNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingNotLimitRate', g_Config.nRingNotLimitRate)
  else g_Config.nRingNotLimitRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'HelMetMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetMaxLimitDay', g_Config.nHelMetMaxLimitDay)
  else g_Config.nHelMetMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'HelMetLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetLimitDayRate', g_Config.nHelMetLimitDayRate)
  else g_Config.nHelMetLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'HelMetNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetNotLimitRate', g_Config.nHelMetNotLimitRate)
  else g_Config.nHelMetNotLimitRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'OtherMaxLimitDay', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'OtherMaxLimitDay', g_Config.nOtherMaxLimitDay)
  else g_Config.nOtherMaxLimitDay := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'OtherLimitDayRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'OtherLimitDayRate', g_Config.nOtherLimitDayRate)
  else g_Config.nOtherLimitDayRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'OtherNotLimitRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'OtherNotLimitRate', g_Config.nOtherNotLimitRate)
  else g_Config.nOtherNotLimitRate := nLoadInteger;




  if Config.ReadInteger('Setup', 'WeaponNewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponNewAddValueMaxLimit', g_Config.nWeaponNewAddValueMaxLimit);
  g_Config.nWeaponNewAddValueMaxLimit := Config.ReadInteger('Setup', 'WeaponNewAddValueMaxLimit', g_Config.nWeaponNewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'WeaponNewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'WeaponNewAddValueRate', g_Config.nWeaponNewAddValueRate);
  g_Config.nWeaponNewAddValueRate := Config.ReadInteger('Setup', 'WeaponNewAddValueRate', g_Config.nWeaponNewAddValueRate);

  if Config.ReadInteger('Setup', 'DressNewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'DressNewAddValueMaxLimit', g_Config.nDressNewAddValueMaxLimit);
  g_Config.nDressNewAddValueMaxLimit := Config.ReadInteger('Setup', 'DressNewAddValueMaxLimit', g_Config.nDressNewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'DressNewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressNewAddValueRate', g_Config.nDressNewAddValueRate);
  g_Config.nDressNewAddValueRate := Config.ReadInteger('Setup', 'DressNewAddValueRate', g_Config.nDressNewAddValueRate);

  if Config.ReadInteger('Setup', 'DressNewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'DressNewAddRate', g_Config.nDressNewAddRate);
  g_Config.nDressNewAddRate := Config.ReadInteger('Setup', 'DressNewAddRate', g_Config.nDressNewAddRate);

  if Config.ReadInteger('Setup', 'NeckLace19NewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19NewAddValueMaxLimit', g_Config.nNeckLace19NewAddValueMaxLimit);
  g_Config.nNeckLace19NewAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace19NewAddValueMaxLimit', g_Config.nNeckLace19NewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace19NewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19NewAddValueRate', g_Config.nNeckLace19NewAddValueRate);
  g_Config.nNeckLace19NewAddValueRate := Config.ReadInteger('Setup', 'NeckLace19NewAddValueRate', g_Config.nNeckLace19NewAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace19NewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace19NewAddRate', g_Config.nNeckLace19NewAddRate);
  g_Config.nNeckLace19NewAddRate := Config.ReadInteger('Setup', 'NeckLace19NewAddRate', g_Config.nNeckLace19NewAddRate);

  if Config.ReadInteger('Setup', 'NeckLace202124NewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124NewAddValueMaxLimit', g_Config.nNeckLace202124NewAddValueMaxLimit);
  g_Config.nNeckLace202124NewAddValueMaxLimit := Config.ReadInteger('Setup', 'NeckLace202124NewAddValueMaxLimit', g_Config.nNeckLace202124NewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'NeckLace202124NewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124NewAddValueRate', g_Config.nNeckLace202124NewAddValueRate);
  g_Config.nNeckLace202124NewAddValueRate := Config.ReadInteger('Setup', 'NeckLace202124NewAddValueRate', g_Config.nNeckLace202124NewAddValueRate);

  if Config.ReadInteger('Setup', 'NeckLace202124NewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'NeckLace202124NewAddRate', g_Config.nNeckLace202124NewAddRate);
  g_Config.nNeckLace202124NewAddRate := Config.ReadInteger('Setup', 'NeckLace202124NewAddRate', g_Config.nNeckLace202124NewAddRate);

  if Config.ReadInteger('Setup', 'ArmRing26NewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26NewAddValueMaxLimit', g_Config.nArmRing26NewAddValueMaxLimit);
  g_Config.nArmRing26NewAddValueMaxLimit := Config.ReadInteger('Setup', 'ArmRing26NewAddValueMaxLimit', g_Config.nArmRing26NewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'ArmRing26NewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26NewAddValueRate', g_Config.nArmRing26NewAddValueRate);
  g_Config.nArmRing26NewAddValueRate := Config.ReadInteger('Setup', 'ArmRing26NewAddValueRate', g_Config.nArmRing26NewAddValueRate);

  if Config.ReadInteger('Setup', 'ArmRing26NewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'ArmRing26NewAddRate', g_Config.nArmRing26NewAddRate);
  g_Config.nArmRing26NewAddRate := Config.ReadInteger('Setup', 'ArmRing26NewAddRate', g_Config.nArmRing26NewAddRate);

  if Config.ReadInteger('Setup', 'Ring22NewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22NewAddValueMaxLimit', g_Config.nRing22NewAddValueMaxLimit);
  g_Config.nRing22NewAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring22NewAddValueMaxLimit', g_Config.nRing22NewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring22NewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22NewAddValueRate', g_Config.nRing22NewAddValueRate);
  g_Config.nRing22NewAddValueRate := Config.ReadInteger('Setup', 'Ring22NewAddValueRate', g_Config.nRing22NewAddValueRate);

  if Config.ReadInteger('Setup', 'Ring22NewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring22NewAddRate', g_Config.nRing22NewAddRate);
  g_Config.nRing22NewAddRate := Config.ReadInteger('Setup', 'Ring22NewAddRate', g_Config.nRing22NewAddRate);

  if Config.ReadInteger('Setup', 'Ring23NewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23NewAddValueMaxLimit', g_Config.nRing23NewAddValueMaxLimit);
  g_Config.nRing23NewAddValueMaxLimit := Config.ReadInteger('Setup', 'Ring23NewAddValueMaxLimit', g_Config.nRing23NewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'Ring23NewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23NewAddValueRate', g_Config.nRing23NewAddValueRate);
  g_Config.nRing23NewAddValueRate := Config.ReadInteger('Setup', 'Ring23NewAddValueRate', g_Config.nRing23NewAddValueRate);

  if Config.ReadInteger('Setup', 'Ring23NewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'Ring23NewAddRate', g_Config.nRing23NewAddRate);
  g_Config.nRing23NewAddRate := Config.ReadInteger('Setup', 'Ring23NewAddRate', g_Config.nRing23NewAddRate);

  if Config.ReadInteger('Setup', 'HelMetNewAddValueMaxLimit', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetNewAddValueMaxLimit', g_Config.nHelMetNewAddValueMaxLimit);
  g_Config.nHelMetNewAddValueMaxLimit := Config.ReadInteger('Setup', 'HelMetNewAddValueMaxLimit', g_Config.nHelMetNewAddValueMaxLimit);

  if Config.ReadInteger('Setup', 'HelMetNewAddValueRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetNewAddValueRate', g_Config.nHelMetNewAddValueRate);
  g_Config.nHelMetNewAddValueRate := Config.ReadInteger('Setup', 'HelMetNewAddValueRate', g_Config.nHelMetNewAddValueRate);

  if Config.ReadInteger('Setup', 'HelMetNewAddRate', -1) < 0 then
    Config.WriteInteger('Setup', 'HelMetNewAddRate', g_Config.nHelMetNewAddRate);
  g_Config.nHelMetNewAddRate := Config.ReadInteger('Setup', 'HelMetNewAddRate', g_Config.nHelMetNewAddRate);

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetNewAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetNewAddRate', g_Config.nUnknowHelMetNewAddRate)
  else g_Config.nUnknowHelMetNewAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowHelMetNewAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowHelMetNewAddValueMaxLimit', g_Config.nUnknowHelMetNewAddValueMaxLimit)
  else g_Config.nUnknowHelMetNewAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceNewAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceNewAddRate', g_Config.nUnknowNecklaceNewAddRate)
  else g_Config.nUnknowNecklaceNewAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowNecklaceNewAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowNecklaceNewAddValueMaxLimit', g_Config.nUnknowNecklaceNewAddValueMaxLimit)
  else g_Config.nUnknowNecklaceNewAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingNewAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingNewAddRate', g_Config.nUnknowRingNewAddRate)
  else g_Config.nUnknowRingNewAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UnknowRingNewAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UnknowRingNewAddValueMaxLimit', g_Config.nUnknowRingNewAddValueMaxLimit)
  else g_Config.nUnknowRingNewAddValueMaxLimit := nLoadInteger;














  nLoadInteger := Config.ReadInteger('Setup', 'MonRandomAddPoint', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MonRandomAddPoint', g_Config.nMonRandomAddPoint)
  else g_Config.nMonRandomAddPoint := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'MakeRandomAddPoint', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MakeRandomAddPoint', g_Config.nMakeRandomAddPoint)
  else g_Config.nMakeRandomAddPoint := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ScriptRandomAddPoint', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ScriptRandomAddPoint', g_Config.nScriptRandomAddPoint)
  else g_Config.nScriptRandomAddPoint := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponPointType', g_Config.nWeaponPointType)
  else g_Config.nWeaponPointType := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponPointAddRate', g_Config.nWeaponPointAddRate)
  else g_Config.nWeaponPointAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'WeaponPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponPointAddValueMaxLimit', g_Config.nWeaponPointAddValueMaxLimit)
  else g_Config.nWeaponPointAddValueMaxLimit := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'WeaponPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WeaponPointAddValueRate', g_Config.nWeaponPointAddValueRate)
  else g_Config.nWeaponPointAddValueRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'DressPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressPointType', g_Config.nDressPointType)
  else g_Config.nDressPointType := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'DressPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressPointAddRate', g_Config.nDressPointAddRate)
  else g_Config.nDressPointAddRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'DressPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressPointAddValueMaxLimit', g_Config.nDressPointAddValueMaxLimit)
  else g_Config.nDressPointAddValueMaxLimit := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'DressPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'DressPointAddValueRate', g_Config.nDressPointAddValueRate)
  else g_Config.nDressPointAddValueRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'NeckLacePointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLacePointType', g_Config.nNeckLacePointType)
  else g_Config.nNeckLacePointType := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'NeckLacePointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLacePointAddRate', g_Config.nNeckLacePointAddRate)
  else g_Config.nNeckLacePointAddRate := nLoadInteger;




  nLoadInteger := Config.ReadInteger('Setup', 'NeckLacePointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLacePointAddValueMaxLimit', g_Config.nNeckLacePointAddValueMaxLimit)
  else g_Config.nNeckLacePointAddValueMaxLimit := nLoadInteger;





  nLoadInteger := Config.ReadInteger('Setup', 'NeckLacePointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NeckLacePointAddValueRate', g_Config.nNeckLacePointAddValueRate)
  else g_Config.nNeckLacePointAddValueRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingPointType', g_Config.nArmRingPointType)
  else g_Config.nArmRingPointType := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingPointAddRate', g_Config.nArmRingPointAddRate)
  else g_Config.nArmRingPointAddRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingPointAddValueMaxLimit', g_Config.nArmRingPointAddValueMaxLimit)
  else g_Config.nArmRingPointAddValueMaxLimit := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'ArmRingPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ArmRingPointAddValueRate', g_Config.nArmRingPointAddValueRate)
  else g_Config.nArmRingPointAddValueRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'RingPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingPointType', g_Config.nRingPointType)
  else g_Config.nRingPointType := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'RingPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingPointAddRate', g_Config.nRingPointAddRate)
  else g_Config.nRingPointAddRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'RingPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingPointAddValueMaxLimit', g_Config.nRingPointAddValueMaxLimit)
  else g_Config.nRingPointAddValueMaxLimit := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'RingPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'RingPointAddValueRate', g_Config.nRingPointAddValueRate)
  else g_Config.nRingPointAddValueRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'HelMetPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetPointType', g_Config.nHelMetPointType)
  else g_Config.nHelMetPointType := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'HelMetPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetPointAddRate', g_Config.nHelMetPointAddRate)
  else g_Config.nHelMetPointAddRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'HelMetPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetPointAddValueMaxLimit', g_Config.nHelMetPointAddValueMaxLimit)
  else g_Config.nHelMetPointAddValueMaxLimit := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'HelMetPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'HelMetPointAddValueRate', g_Config.nHelMetPointAddValueRate)
  else g_Config.nHelMetPointAddValueRate := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ShoesPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ShoesPointType', g_Config.nShoesPointType)
  else g_Config.nShoesPointType := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ShoesPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ShoesPointAddRate', g_Config.nShoesPointAddRate)
  else g_Config.nShoesPointAddRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'ShoesPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ShoesPointAddValueMaxLimit', g_Config.nShoesPointAddValueMaxLimit)
  else g_Config.nShoesPointAddValueMaxLimit := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'ShoesPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ShoesPointAddValueRate', g_Config.nShoesPointAddValueRate)
  else g_Config.nShoesPointAddValueRate := nLoadInteger;



  nLoadInteger := Config.ReadInteger('Setup', 'BeltPointType', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BeltPointType', g_Config.nBeltPointType)
  else g_Config.nBeltPointType := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'BeltPointAddRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BeltPointAddRate', g_Config.nBeltPointAddRate)
  else g_Config.nBeltPointAddRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'BeltPointAddValueMaxLimit', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BeltPointAddValueMaxLimit', g_Config.nBeltPointAddValueMaxLimit)
  else g_Config.nBeltPointAddValueMaxLimit := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'BeltPointAddValueRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'BeltPointAddValueRate', g_Config.nBeltPointAddValueRate)
  else g_Config.nBeltPointAddValueRate := nLoadInteger;


  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'WeaponNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'WeaponNewAbil' + IntToStr(I), g_Config.WeaponNewAbil[I]);
    g_Config.WeaponNewAbil[I] := Config.ReadBool('Setup', 'WeaponNewAbil' + IntToStr(I), g_Config.WeaponNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'DressNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'DressNewAbil' + IntToStr(I), g_Config.DressNewAbil[I]);
    g_Config.DressNewAbil[I] := Config.ReadBool('Setup', 'DressNewAbil' + IntToStr(I), g_Config.DressNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'NeckLaceNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'NeckLaceNewAbil' + IntToStr(I), g_Config.NeckLaceNewAbil[I]);
    g_Config.NeckLaceNewAbil[I] := Config.ReadBool('Setup', 'NeckLaceNewAbil' + IntToStr(I), g_Config.NeckLaceNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'ArmRingNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'ArmRingNewAbil' + IntToStr(I), g_Config.ArmRingNewAbil[I]);
    g_Config.ArmRingNewAbil[I] := Config.ReadBool('Setup', 'ArmRingNewAbil' + IntToStr(I), g_Config.ArmRingNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'RingNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'RingNewAbil' + IntToStr(I), g_Config.RingNewAbil[I]);
    g_Config.RingNewAbil[I] := Config.ReadBool('Setup', 'RingNewAbil' + IntToStr(I), g_Config.RingNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'HelMetNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'HelMetNewAbil' + IntToStr(I), g_Config.HelMetNewAbil[I]);
    g_Config.HelMetNewAbil[I] := Config.ReadBool('Setup', 'HelMetNewAbil' + IntToStr(I), g_Config.HelMetNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'ShoesNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'ShoesNewAbil' + IntToStr(I), g_Config.ShoesNewAbil[I]);
    g_Config.ShoesNewAbil[I] := Config.ReadBool('Setup', 'ShoesNewAbil' + IntToStr(I), g_Config.ShoesNewAbil[I]);
  end;
  for I := 0 to 10 do begin
    if Config.ReadInteger('Setup', 'BeltNewAbil' + IntToStr(I), -1) < 0 then
      Config.WriteBool('Setup', 'BeltNewAbil' + IntToStr(I), g_Config.BeltNewAbil[I]);
    g_Config.BeltNewAbil[I] := Config.ReadBool('Setup', 'BeltNewAbil' + IntToStr(I), g_Config.BeltNewAbil[I]);
  end;

  if Config.ReadInteger('Setup', 'AllowItemAddValue', -1) < 0 then
    Config.WriteBool('Setup', 'AllowItemAddValue', g_Config.boAllowItemAddValue);
  g_Config.boAllowItemAddValue := Config.ReadBool('Setup', 'AllowItemAddValue', g_Config.boAllowItemAddValue);

  if Config.ReadInteger('Setup', 'AllowItemAddPoint', -1) < 0 then
    Config.WriteBool('Setup', 'AllowItemAddPoint', g_Config.boAllowItemAddPoint);
  g_Config.boAllowItemAddPoint := Config.ReadBool('Setup', 'AllowItemAddPoint', g_Config.boAllowItemAddPoint);

  if Config.ReadInteger('Setup', 'AllowItemTime', -1) < 0 then
    Config.WriteBool('Setup', 'AllowItemTime', g_Config.boAllowItemTime);
  g_Config.boAllowItemTime := Config.ReadBool('Setup', 'AllowItemTime', g_Config.boAllowItemTime);


  if Config.ReadInteger('Setup', 'BindItemNoDeal', -1) < 0 then
    Config.WriteBool('Setup', 'BindItemNoDeal', g_Config.boBindItemNoDeal);
  g_Config.boBindItemNoDeal := Config.ReadBool('Setup', 'BindItemNoDeal', g_Config.boBindItemNoDeal);

  if Config.ReadInteger('Setup', 'BindItemNoScatter', -1) < 0 then
    Config.WriteBool('Setup', 'BindItemNoScatter', g_Config.boBindItemNoScatter);
  g_Config.boBindItemNoScatter := Config.ReadBool('Setup', 'BindItemNoScatter', g_Config.boBindItemNoScatter);

  if Config.ReadInteger('Setup', 'BindItemNoDrop', -1) < 0 then
    Config.WriteBool('Setup', 'BindItemNoDrop', g_Config.boBindItemNoDeal);
  g_Config.boBindItemNoDrop := Config.ReadBool('Setup', 'BindItemNoDrop', g_Config.boBindItemNoDrop);

  if Config.ReadInteger('Setup', 'BindItemNoSellOff', -1) < 0 then
    Config.WriteBool('Setup', 'BindItemNoSellOff', g_Config.boBindItemNoSellOff);
  g_Config.boBindItemNoSellOff := Config.ReadBool('Setup', 'BindItemNoSellOff', g_Config.boBindItemNoSellOff);


  if Config.ReadInteger('Setup', 'BindItemNoPickUp', -1) < 0 then
    Config.WriteBool('Setup', 'BindItemNoPickUp', g_Config.boBindItemNoPickUp);
  g_Config.boBindItemNoPickUp := Config.ReadBool('Setup', 'BindItemNoPickUp', g_Config.boBindItemNoPickUp);



  if Config.ReadInteger('Setup', 'CopyItemClear', -1) < 0 then
    Config.WriteBool('Setup', 'CopyItemClear', g_Config.boCopyItemClear);
  g_Config.boCopyItemClear := Config.ReadBool('Setup', 'CopyItemClear', g_Config.boCopyItemClear);

  if Config.ReadInteger('Setup', 'MonUseBagItem', -1) < 0 then
    Config.WriteBool('Setup', 'MonUseBagItem', g_Config.boMonUseBagItem);
  g_Config.boMonUseBagItem := Config.ReadBool('Setup', 'MonUseBagItem', g_Config.boMonUseBagItem);

  if Config.ReadInteger('Setup', 'HumUseBagItem', -1) < 0 then
    Config.WriteBool('Setup', 'HumUseBagItem', g_Config.boHumUseBagItem);
  g_Config.boHumUseBagItem := Config.ReadBool('Setup', 'HumUseBagItem', g_Config.boHumUseBagItem);


  nLoadInteger := Config.ReadInteger('Setup', 'NewShieldUseRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NewShieldUseRate', g_Config.nNewShieldUseRate)
  else g_Config.nNewShieldUseRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'NewShieldDamageRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NewShieldDamageRate', g_Config.nNewShieldDamageRate)
  else g_Config.nNewShieldDamageRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'NewShieldWaitTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'NewShieldWaitTime', g_Config.nNewShieldWaitTime)
  else g_Config.nNewShieldWaitTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'ShowClientItemStyle', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'ShowClientItemStyle', g_Config.nShowClientItemStyle)
  else g_Config.nShowClientItemStyle := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'SpaceSkillDelayTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SpaceSkillDelayTime', g_Config.nSpaceSkillDelayTime)
  else g_Config.nSpaceSkillDelayTime := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'SpaceSkillKeepTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SpaceSkillKeepTime', g_Config.nSpaceSkillKeepTime)
  else g_Config.nSpaceSkillKeepTime := nLoadInteger;


  if Config.ReadInteger('Setup', 'NoAllowWarRangeUseSpaceSkill', -1) < 0 then
    Config.WriteBool('Setup', 'NoAllowWarRangeUseSpaceSkill', g_Config.boNoAllowWarRangeUseSpaceSkill);
  g_Config.boNoAllowWarRangeUseSpaceSkill := Config.ReadBool('Setup', 'NoAllowWarRangeUseSpaceSkill', g_Config.boNoAllowWarRangeUseSpaceSkill);

  if Config.ReadInteger('Setup', 'AllowSpaceOutAttack', -1) < 0 then
    Config.WriteBool('Setup', 'AllowSpaceOutAttack', g_Config.boAllowSpaceOutAttack);
  g_Config.boAllowSpaceOutAttack := Config.ReadBool('Setup', 'AllowSpaceOutAttack', g_Config.boAllowSpaceOutAttack);


  nLoadInteger := Config.ReadInteger('Setup', 'GroupFireCharmPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GroupFireCharmPowerRate', g_Config.nGroupFireCharmPowerRate)
  else g_Config.nGroupFireCharmPowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'UseItemSpeed', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'UseItemSpeed', g_Config.nUseItemSpeed)
  else g_Config.nUseItemSpeed := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'MagicMovePositionTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicMovePositionTime', g_Config.nMagicMovePositionTime)
  else g_Config.nMagicMovePositionTime := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MagicMovePositionRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MagicMovePositionRate', g_Config.nMagicMovePositionRate)
  else g_Config.nMagicMovePositionRate := nLoadInteger;


  if Config.ReadInteger('Setup', 'NoHintMagicFail', -1) < 0 then
    Config.WriteBool('Setup', 'NoHintMagicFail', g_Config.boNoHintMagicFail);
  g_Config.boNoHintMagicFail := Config.ReadBool('Setup', 'NoHintMagicFail', g_Config.boNoHintMagicFail);

  if Config.ReadInteger('Setup', 'NoHintMagicOK', -1) < 0 then
    Config.WriteBool('Setup', 'NoHintMagicOK', g_Config.boNoHintMagicOK);
  g_Config.boNoHintMagicOK := Config.ReadBool('Setup', 'NoHintMagicOK', g_Config.boNoHintMagicOK);

  if Config.ReadInteger('Setup', 'NoHintMagicClose', -1) < 0 then
    Config.WriteBool('Setup', 'NoHintMagicClose', g_Config.boNoHintMagicClose);
  g_Config.boNoHintMagicClose := Config.ReadBool('Setup', 'NoHintMagicClose', g_Config.boNoHintMagicClose);

  nLoadInteger := Config.ReadInteger('Setup', 'SkillZRJFDelayTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SkillZRJFDelayTime', g_Config.nSkillZRJFDelayTime)
  else g_Config.nSkillZRJFDelayTime := nLoadInteger;


  nLoadInteger := Config.ReadInteger('Setup', 'Skill75PowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill75PowerRate', g_Config.nSkill75PowerRate)
  else g_Config.nSkill75PowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill76PowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill76PowerRate', g_Config.nSkill76PowerRate)
  else g_Config.nSkill76PowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'Skill77PowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'Skill77PowerRate', g_Config.nSkill77PowerRate)
  else g_Config.nSkill77PowerRate := nLoadInteger;







  if Config.ReadInteger('Setup', 'SafeCanStore', -1) < 0 then
    Config.WriteBool('Setup', 'SafeCanStore', g_Config.boSafeCanStore);
  g_Config.boSafeCanStore := Config.ReadBool('Setup', 'SafeCanStore', g_Config.boSafeCanStore);

  if Config.ReadInteger('Setup', 'OpenStoreGMMode', -1) < 0 then
    Config.WriteBool('Setup', 'OpenStoreGMMode', g_Config.boOpenStoreGMMode);
  g_Config.boOpenStoreGMMode := Config.ReadBool('Setup', 'OpenStoreGMMode', g_Config.boOpenStoreGMMode);

  if Config.ReadInteger('Setup', 'OpenStoreCheckLevel', -1) < 0 then
    Config.WriteBool('Setup', 'OpenStoreCheckLevel', g_Config.boOpenStoreCheckLevel);
  g_Config.boOpenStoreCheckLevel := Config.ReadBool('Setup', 'OpenStoreCheckLevel',
    g_Config.boOpenStoreCheckLevel);

  nLoadInteger := Config.ReadInteger('Setup', 'OpenStoreNeedCheckLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'OpenStoreNeedCheckLevel', g_Config.nOpenStoreCheckLevel)
  else g_Config.nOpenStoreCheckLevel := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MaxLevel', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MaxLevel', g_Config.nMaxLevel)
  else g_Config.nMaxLevel := MinLong(High(LongInt), nLoadInteger);




  if Config.ReadString('Setup', 'UnKnowName', '') = '' then
    Config.WriteString('Setup', 'UnKnowName', g_Config.sUnKnowName);
  g_Config.sUnKnowName := Config.ReadString('Setup', 'UnKnowName', g_Config.sUnKnowName);
  if g_Config.sUnKnowName = '' then g_Config.sUnKnowName := '神秘人';


  nLoadInteger := Config.ReadInteger('Setup', 'MoonLowPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MoonLowPowerRate', g_Config.nMoonLowPowerRate)
  else g_Config.nMoonLowPowerRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'MoonHighPowerRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'MoonHighPowerRate', g_Config.nMoonHighPowerRate)
  else g_Config.nMoonHighPowerRate := nLoadInteger;

  for I := 1 to 2 do begin
    nLoadInteger := Config.ReadInteger('Setup', 'StatusDelayTime' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('Setup', 'StatusDelayTime' + IntToStr(I), g_Config.StatusDelayTime[I])
    else g_Config.StatusDelayTime[I] := nLoadInteger;
  end;


  nLoadInteger := Config.ReadInteger('Setup', 'GreenNumber', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'GreenNumber', g_Config.nGreenNumber)
  else g_Config.nGreenNumber := nLoadInteger;

  if Config.ReadInteger('Setup', 'ChangeMapReleasePoison', -1) < 0 then
    Config.WriteBool('Setup', 'ChangeMapReleasePoison', g_Config.boChangeMapReleasePoison);
  g_Config.boChangeMapReleasePoison := Config.ReadBool('Setup', 'ChangeMapReleasePoison', g_Config.boChangeMapReleasePoison);

  if Config.ReadInteger('Setup', 'GetRandomHomePoint', -1) < 0 then
    Config.WriteBool('Setup', 'GetRandomHomePoint', g_Config.boGetRandomHomePoint);
  g_Config.boGetRandomHomePoint := Config.ReadBool('Setup', 'GetRandomHomePoint', g_Config.boGetRandomHomePoint);






  nLoadInteger := Config.ReadInteger('Setup', 'WalkSpeedRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'WalkSpeedRate', g_Config.nWalkSpeedRate)
  else g_Config.nWalkSpeedRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'AttackSpeedRate', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'AttackSpeedRate', g_Config.nAttackSpeedRate)
  else g_Config.nAttackSpeedRate := nLoadInteger;

  nLoadInteger := Config.ReadInteger('Setup', 'SerieMagicTime', -1);
  if nLoadInteger < 0 then
    Config.WriteInteger('Setup', 'SerieMagicTime', g_Config.nSerieMagicTime)
  else g_Config.nSerieMagicTime := nLoadInteger;

  for I := 0 to Length(g_Config.SerieMagicPowerRate) - 1 do begin
    nLoadInteger := Config.ReadInteger('Setup', 'SerieMagicPowerRate' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('Setup', 'SerieMagicPowerRate' + IntToStr(I), g_Config.SerieMagicPowerRate[I])
    else g_Config.SerieMagicPowerRate[I] := nLoadInteger;
  end;

  for I := 0 to Length(g_Config.SerieMagicBlasthitPowerRate) - 1 do begin
    nLoadInteger := Config.ReadInteger('Setup', 'SerieMagicBlasthitPowerRate' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('Setup', 'SerieMagicBlasthitPowerRate' + IntToStr(I), g_Config.SerieMagicBlasthitPowerRate[I])
    else g_Config.SerieMagicBlasthitPowerRate[I] := nLoadInteger;
  end;

  for I := 0 to Length(g_Config.SerieMagicAttackRange) - 1 do begin
    nLoadInteger := Config.ReadInteger('Setup', 'SerieMagicAttackRange' + IntToStr(I), -1);
    if nLoadInteger < 0 then
      Config.WriteInteger('Setup', 'SerieMagicAttackRange' + IntToStr(I), g_Config.SerieMagicAttackRange[I])
    else g_Config.SerieMagicAttackRange[I] := nLoadInteger;
  end;

  for I := 0 to 11 do begin
    for II := 0 to 3 do begin
      nLoadInteger := Config.ReadInteger('Setup', 'SerieMagicBlasthitRate' + IntToStr(I) + '-' + IntToStr(II), -1);
      if nLoadInteger < 0 then
        Config.WriteInteger('Setup', 'SerieMagicBlasthitRate' + IntToStr(I) + '-' + IntToStr(II), g_Config.SerieMagicBlasthitRate[I, II])
      else g_Config.SerieMagicBlasthitRate[I, II] := nLoadInteger;
    end;
  end;


  if Config.ReadString('Setup', 'AIHomeMap', '') = '' then
    Config.WriteString('Setup', 'AIHomeMap', g_Config.sAIHomeMap);
  g_Config.sAIHomeMap := Config.ReadString('Setup', 'AIHomeMap', g_Config.sAIHomeMap);

  if Config.ReadInteger('Setup', 'AIHomeX', -1) < 0 then
    Config.WriteInteger('Setup', 'AIHomeX', g_Config.nAIHomeX);
  g_Config.nAIHomeX := Config.ReadInteger('Setup', 'AIHomeX', g_Config.nAIHomeX);

  if Config.ReadInteger('Setup', 'AIHomeY', -1) < 0 then
    Config.WriteInteger('Setup', 'AIHomeY', g_Config.nAIHomeY);
  g_Config.nAIHomeY := Config.ReadInteger('Setup', 'AIHomeY', g_Config.nAIHomeY);

  if Config.ReadInteger('Setup', 'ItemMaxStarCount', -1) < 0 then
    Config.WriteInteger('Setup', 'ItemMaxStarCount', g_Config.nItemMaxStarCount);
  g_Config.nItemMaxStarCount := Config.ReadInteger('Setup', 'ItemMaxStarCount', g_Config.nItemMaxStarCount);
  g_Config.nItemMaxStarCount := _MIN(g_Config.nItemMaxStarCount, 255);
  g_Config.nItemMaxStarCount := _MAX(g_Config.nItemMaxStarCount, 0);



  if Config.ReadInteger('Setup', 'CheckSpeedHack', -1) < 0 then
    Config.WriteBool('Setup', 'CheckSpeedHack', g_Config.boCheckSpeedHack);
  g_Config.boCheckSpeedHack := Config.ReadBool('Setup', 'CheckSpeedHack', g_Config.boCheckSpeedHack);


  if Config.ReadInteger('Setup', 'AutoRepairItem', -1) < 0 then
    Config.WriteBool('Setup', 'AutoRepairItem', g_Config.boAutoRepairItem);
  g_Config.boAutoRepairItem := Config.ReadBool('Setup', 'AutoRepairItem', g_Config.boAutoRepairItem);

  if Config.ReadInteger('Setup', 'RenewHealth', -1) < 0 then
    Config.WriteBool('Setup', 'RenewHealth', g_Config.boRenewHealth);
  g_Config.boRenewHealth := Config.ReadBool('Setup', 'RenewHealth', g_Config.boRenewHealth);

  if Config.ReadInteger('Setup', 'RenewPercent', -1) < 0 then
    Config.WriteInteger('Setup', 'RenewPercent', g_Config.nRenewPercent);
  g_Config.nRenewPercent := Config.ReadInteger('Setup', 'RenewPercent', g_Config.nRenewPercent);


  if Config.ReadString('Setup', 'AIConfigListFileName', '') = '' then
    Config.WriteString('Setup', 'AIConfigListFileName', g_Config.sAIConfigListFileName);
  g_Config.sAIConfigListFileName := Config.ReadString('Setup', 'AIConfigListFileName', g_Config.sAIConfigListFileName);


  if Config.ReadInteger('Setup', 'CheckCanUpgradeStarItem', -1) < 0 then
    Config.WriteBool('Setup', 'CheckCanUpgradeStarItem', g_Config.boCheckCanUpgradeStarItem);
  g_Config.boCheckCanUpgradeStarItem := Config.ReadBool('Setup', 'CheckCanUpgradeStarItem', g_Config.boCheckCanUpgradeStarItem);
end;

function GetRGB(c256: Byte): TColor;
begin
  Result := RGB(ColorTable[c256].rgbRed, ColorTable[c256].rgbGreen, ColorTable[c256].rgbBlue);
end;

procedure SendGameCenterMsg(wIdent: Word; sSENDMSG: string);
var
  SendData: TCopyDataStruct;
  nParam: Integer;
begin
  nParam := MakeLong(Word(tM2Server), wIdent);
  SendData.cbData := Length(sSENDMSG) + 1;
  GetMem(SendData.lpData, SendData.cbData);
  StrCopy(SendData.lpData, PChar(sSENDMSG));
  SendMessage(g_dwGameCenterHandle, WM_COPYDATA, nParam, Cardinal(@SendData));
  FreeMem(SendData.lpData);
end;

function GetIPAddr: string;
var
  A, B, C, D: Byte;
begin
  while True do begin
    A := Random(High(Byte));
    B := Random(High(Byte));
    C := Random(High(Byte));
    D := Random(High(Byte));
    if (A = 0) then Continue;
    if (A = 127) and (B = 0) and (C = 0) and (D = 1) then Continue;
    if (A = 192) and (B = 168) then Continue;
    if (A = 255) and (B = 255) then Continue;
    Result := Format('%d.%d.%d.%d', [A, B, C, D]);
    break;
  end;
end;

function GetIPLocal(sIPaddr: string): string;
var
  sLocal: array[0..254] of Char;
begin
  try
    if Assigned(PlugInEngine.IPLocal) then begin
      FillChar(sLocal, SizeOf(sLocal), 0);
      PlugInEngine.IPLocal(@sIPaddr[1], @sLocal, SizeOf(sLocal));
      Result := StrPas(@sLocal);
      Exit;
    end;
    Result := '未知！！！';
  except
    Result := '未知！！！';
  end;
end;

procedure LoadKernelFunction();
var
  DllModule: THandle;
begin
  DllModule := LoadLibrary('kernel32.dll');
  IsDebuggerPresent := GetProcAddress(DllModule, PChar(DeCodeString('NSI@UREqUrYaXa=nUSIaWcL'))); //'IsDebuggerPresent'
end;

//是否记录物品日志
//返回 FALSE 为记录
//返回 TRUE  为不记录

function IsCheapStuff(tByte: Byte): Boolean;
begin
  Result := tByte = 0;
end;
//sIPaddr 为当前IP
//dIPaddr 为要比较的IP
//* 号为通配符

function CompareIPaddr(sIPaddr, dIPaddr: string): Boolean;
var
  nPos: Integer;
begin
  Result := False;
  if (sIPaddr = '') or (dIPaddr = '') then Exit;

  if (dIPaddr[1] = '*') then begin
    Result := True;
    Exit;
  end;

  nPos := Pos('*', dIPaddr);
  if nPos > 0 then begin
    Result := CompareLStr(sIPaddr, dIPaddr, nPos - 1);
  end else begin
    Result := CompareText(sIPaddr, dIPaddr) = 0;
  end;
end;

initialization
  begin
    Config := TIniFile.Create(sConfigFileName);
    CommandConf := TIniFile.Create(sCommandFileName);
    StringConf := TIniFile.Create(sStringFileName);
    Move(ColorArray, ColorTable, SizeOf(ColorArray));
    LoadKernelFunction();
    //g_BaseObjectList:=TStringList.Create;
    //g_ActorObjectList:=TStringList.Create;
  end;

finalization
  begin
    Config.Free;
    CommandConf.Free;
    StringConf.Free;
  end;
end.

