815 lines
24 KiB
C
815 lines
24 KiB
C
![]() |
#include "version.h"
|
|||
|
#include <unistd.h>
|
|||
|
#include <stdio.h>
|
|||
|
#include <strings.h>
|
|||
|
#include <unistd.h>
|
|||
|
|
|||
|
|
|||
|
#include "configfile.h"
|
|||
|
#include "util.h"
|
|||
|
#include "net.h"
|
|||
|
#include "msignal.h"
|
|||
|
#include "buf.h"
|
|||
|
#include "object.h"
|
|||
|
#include "char.h"
|
|||
|
#include "char_data.h"
|
|||
|
#include "item.h"
|
|||
|
#include "readmap.h"
|
|||
|
#include "function.h"
|
|||
|
#include "saacproto_cli.h"
|
|||
|
#include "lssproto_serv.h"
|
|||
|
#include "readnpc.h"
|
|||
|
#include "log.h"
|
|||
|
#include "handletime.h"
|
|||
|
#include "title.h"
|
|||
|
#include "encount.h"
|
|||
|
#include "enemy.h"
|
|||
|
#include "battle.h"
|
|||
|
#include "magic_base.h"
|
|||
|
#include "pet_skill.h"
|
|||
|
#include "item_gen.h"
|
|||
|
#include "petmail.h"
|
|||
|
#include "npc_quiz.h"
|
|||
|
#ifdef _ALLBLUES_LUA
|
|||
|
#include "mylua/mylua.h"
|
|||
|
#endif
|
|||
|
#ifdef _PROFESSION_SKILL // WON ADD <20><><EFBFBD><EFBFBD>ְҵ<D6B0><D2B5><EFBFBD><EFBFBD>
|
|||
|
#include "profession_skill.h"
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _ITEM_QUITPARTY
|
|||
|
#include "init.h"
|
|||
|
//int itemquitparty_num = 0;
|
|||
|
//static DisappearItem *Disappear_Item;
|
|||
|
#endif
|
|||
|
|
|||
|
#define MESSAGEFILE "hoge.txt"
|
|||
|
|
|||
|
#define OPTIONSTRING "d:f:h"
|
|||
|
#define usage() print( "Usage: %s ["OPTIONSTRING"]\n", getProgname() );
|
|||
|
extern int yzflg;
|
|||
|
void printUsage( void )
|
|||
|
{
|
|||
|
usage();
|
|||
|
/*print( "Usage: %s ["OPTIONSTRING"]\n", progname );*/
|
|||
|
print( " [-d debuglevel] default value is 0\n" );
|
|||
|
print( " [-f configfilename] default value is setup.cf\n"
|
|||
|
);
|
|||
|
}
|
|||
|
|
|||
|
/*
|
|||
|
*
|
|||
|
* ¦<EFBFBD><EFBFBD>
|
|||
|
* ߯Ի<EFBFBD><EFBFBD>
|
|||
|
* TRUE(1) <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ئ<EFBFBD><EFBFBD>Ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>¦<EFBFBD>ѷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* FALSE(0) <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ئ<EFBFBD><EFBFBD>Ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>¦<EFBFBD>ѷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
BOOL parseCommandLine( int argc , char** argv )
|
|||
|
{
|
|||
|
int c; /* getopt ƥ<><C6A5><EFBFBD><EFBFBD> */
|
|||
|
extern char* optarg; /* getopt ƥ<><C6A5><EFBFBD><EFBFBD> */
|
|||
|
|
|||
|
|
|||
|
while( ( c = getopt( argc, argv ,OPTIONSTRING )) != -1 ){
|
|||
|
switch( c ){
|
|||
|
case 'd':
|
|||
|
{
|
|||
|
int debuglevel;
|
|||
|
if( !strtolchecknum( optarg, (int*)&debuglevel, 10,
|
|||
|
INT)){
|
|||
|
print( "Specify digit number\n" );
|
|||
|
return FALSE;
|
|||
|
}
|
|||
|
setDebuglevel( debuglevel );
|
|||
|
break;
|
|||
|
}
|
|||
|
case 'f':
|
|||
|
setConfigfilename( optarg );
|
|||
|
break;
|
|||
|
case 'h':
|
|||
|
printUsage();
|
|||
|
return FALSE;
|
|||
|
break;
|
|||
|
|
|||
|
default:
|
|||
|
printUsage();
|
|||
|
return FALSE;
|
|||
|
break;
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
return TRUE;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/*
|
|||
|
* ¦<EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* <EFBFBD>ἰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ئ<EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
BOOL parseEnvironment( char** env )
|
|||
|
{
|
|||
|
if( getDebuglevel() >= 3 ){
|
|||
|
int index=0;
|
|||
|
while( env[index] != NULL )print( "%s " , env[index++] );
|
|||
|
print( "\n" );
|
|||
|
}
|
|||
|
return TRUE;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#define LSGENWORKINGBUFFER 65536*4
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#define GOTORETURNFALSEIFFALSE(x) if(!(x))goto RETURNFALSE
|
|||
|
/*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* ¦<EFBFBD><EFBFBD>
|
|||
|
* argc argv<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* argv <EFBFBD><EFBFBD>Ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>¦<EFBFBD><EFBFBD>
|
|||
|
* ߯Ի<EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
BOOL init(int argc , char** argv , char** env )
|
|||
|
{
|
|||
|
#ifdef _ITEM_QUITPARTY
|
|||
|
FILE *f;
|
|||
|
int i;
|
|||
|
char line[256];
|
|||
|
#endif
|
|||
|
srand( getpid());
|
|||
|
print( "This Program is compiled at %s %s by gcc %s\n",
|
|||
|
__DATE__ , __TIME__ , __VERSION__ );
|
|||
|
|
|||
|
defaultConfig( argv[0] );
|
|||
|
signalset();
|
|||
|
|
|||
|
GOTORETURNFALSEIFFALSE(parseCommandLine( argc , argv ));
|
|||
|
GOTORETURNFALSEIFFALSE(parseEnvironment( env ));
|
|||
|
|
|||
|
{
|
|||
|
Char aho;
|
|||
|
debug( sizeof( aho ), d);
|
|||
|
debug( sizeof( aho.data ), d);
|
|||
|
debug( sizeof( aho.string ), d);
|
|||
|
debug( sizeof( aho.flg ),d);
|
|||
|
debug( sizeof( aho.indexOfExistItems ), d);
|
|||
|
debug( sizeof( aho.haveSkill ), d);
|
|||
|
debug( sizeof( aho.indexOfHaveTitle ), d);
|
|||
|
debug( sizeof( aho.addressBook ),d);
|
|||
|
debug( sizeof( aho.workint ),d);
|
|||
|
debug( sizeof( aho.workchar ),d);
|
|||
|
}
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n" , getConfigfilename() );
|
|||
|
|
|||
|
GOTORETURNFALSEIFFALSE(readconfigfile( getConfigfilename() ) );
|
|||
|
|
|||
|
nice(getrunlevel());
|
|||
|
//ttom start
|
|||
|
{ int iWork = setEncodeKey();
|
|||
|
if( iWork == 0 ){
|
|||
|
// <20><EFBFBD><DEBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD>ëɬ<C3AB><C9AC>
|
|||
|
printf( "----------------------------------------\n" );
|
|||
|
printf( "-------------[<5B><><EFBFBD><EFBFBD>] <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD> %s\n", getConfigfilename() );
|
|||
|
printf( "----------------------------------------\n" );
|
|||
|
exit( 1 );
|
|||
|
}else{
|
|||
|
// <20><EFBFBD><DEBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD>ëɬ<C3AB><C9AC>
|
|||
|
printf( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = %d\n", iWork );
|
|||
|
}
|
|||
|
}
|
|||
|
// AcWBuffëɬ<C3AB><C9AC>
|
|||
|
{ int iWork = setAcWBSize();
|
|||
|
if( iWork == 0 ){
|
|||
|
printf( "----------------------------------------\n" );
|
|||
|
printf( "-------------[AC<41><43><EFBFBD><EFBFBD>] <20><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD> %s\n", getConfigfilename() );
|
|||
|
printf( "----------------------------------------\n" );
|
|||
|
exit( 1 );
|
|||
|
}else{
|
|||
|
printf( "AC<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = %d\n", iWork );
|
|||
|
}
|
|||
|
}
|
|||
|
//ttom end
|
|||
|
|
|||
|
if( getDebuglevel() >= 1 ){
|
|||
|
// print("ServerType: %d\n", getServerType() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>Եȼ<EFBFBD>: %d\n", getDebuglevel() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>еȼ<EFBFBD>: %d\n", getrunlevel() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ջ<EFBFBD><EFBFBD><EFBFBD>: %d\n", getrecvbuffer()*1024);
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD>: %d\n", getsendbuffer()*1024);
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ջ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getrecvlowatbuffer());
|
|||
|
print("<EFBFBD>ڴ浥Ԫ<EFBFBD><EFBFBD>С: %d\n", getMemoryunit() );
|
|||
|
print("<EFBFBD>ڴ浥Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getMemoryunitnum() );
|
|||
|
|
|||
|
print("<EFBFBD>˺ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ: %s\n", getAccountservername() );
|
|||
|
print("<EFBFBD>˺ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>: %d\n", getAccountserverport() );
|
|||
|
print("<EFBFBD><EFBFBD>½<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s\n",
|
|||
|
getGameservername());
|
|||
|
print("<EFBFBD><EFBFBD>½<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s\n", getAccountserverpasswd());
|
|||
|
|
|||
|
print("<EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ˿<EFBFBD>: %d\n", getPortnumber() );
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>: %d\n", getServernumber() );
|
|||
|
|
|||
|
print("<EFBFBD>ظ<EFBFBD><EFBFBD><EFBFBD>ַʹ<EFBFBD><EFBFBD>: %d\n", getReuseaddr() );
|
|||
|
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getFdnum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><EFBFBD><EFBFBD>: %d\n", getPetcharnum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ: %d\n", getOtherscharnum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ: %d\n", getObjnum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD>Ŀ: %d\n", getItemnum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ: %d\n", getBattlenum() );
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>Ŀ¼: %s\n", getTopdir());
|
|||
|
print("<EFBFBD><EFBFBD>ͼ<EFBFBD>ļ<EFBFBD>Ŀ¼: %s\n", getMapdir());
|
|||
|
print("<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>ʶ<EFBFBD>ļ<EFBFBD>: %s\n", getMaptilefile());
|
|||
|
print("<EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getItemfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getInvfile());
|
|||
|
print("<EFBFBD><EFBFBD>ʾλ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getAppearfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getEffectfile());
|
|||
|
print("ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getTitleNamefile());
|
|||
|
print("ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getTitleConfigfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getEncountfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD>ļ<EFBFBD>: %s\n", getGroupfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getEnemyBasefile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getEnemyfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ħ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getMagicfile());
|
|||
|
|
|||
|
#ifdef _ATTACK_MAGIC
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ħ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getAttMagicfileName() );
|
|||
|
#endif
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>\<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getPetskillfile());
|
|||
|
|
|||
|
#ifdef _PROFESSION_SKILL // WON ADD <20><><EFBFBD><EFBFBD>ְҵ<D6B0><D2B5><EFBFBD><EFBFBD>
|
|||
|
print("ְҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getProfession());
|
|||
|
#endif
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD>Ʒ<EFBFBD>ɷ<EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getItematomfile());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getQuizfile());
|
|||
|
#ifdef _GMRELOAD
|
|||
|
print("G M <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getGMSetfile());
|
|||
|
#endif
|
|||
|
print("<EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>¼<EFBFBD>ļ<EFBFBD>: %s\n", getLsgenlogfilename() );
|
|||
|
print("<EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼: %s\n", getStoredir());
|
|||
|
print("NPC <20><><EFBFBD><EFBFBD>Ŀ¼: %s\n", getNpcdir());
|
|||
|
print("<EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getLogdir());
|
|||
|
print("<EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>: %s\n", getLogconffile() );
|
|||
|
print("GM<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s\n", getChatMagicPasswd() );
|
|||
|
print("ʹ<EFBFBD><EFBFBD>GM<EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>: %d\n", getChatMagicCDKeyCheck() );
|
|||
|
|
|||
|
print("NPC ģ<><C4A3><EFBFBD><EFBFBD>Ŀ: %d\n", getNpctemplatenum() );
|
|||
|
print("NPC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ: %d\n", getNpccreatenum() );
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD>·ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getWalksendinterval());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD>: %d\n", getCAsendinterval_ms());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getCDsendinterval_ms());
|
|||
|
print("ִ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>: %d\n", getOnelooptime_ms());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>: %d\n", getPetdeletetime());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>: %d\n", getItemdeletetime());
|
|||
|
#ifdef _DEL_DROP_GOLD
|
|||
|
print("ʯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>: %d\n", getGolddeletetime());
|
|||
|
#endif
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getCharSavesendinterval());
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ: %d\n", getAddressbookoffmsgnum());
|
|||
|
print("<EFBFBD><EFBFBD>ȡƵ<EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD>: %d\n" ,getProtocolreadfrequency());
|
|||
|
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", getAllowerrornum());
|
|||
|
#ifdef _GET_BATTLE_EXP
|
|||
|
print("ս<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鱶<EFBFBD><EFBFBD>: %d<><64>\n", getBattleexp() );
|
|||
|
#endif
|
|||
|
#ifdef _NEW_PLAYER_CF
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>: %dת\n", getNewplayertrans());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>: %d<><64>\n", getNewplayerlv());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǯ: %d S\n", getNewplayergivegold());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>: %d<><64>\n", getNewplayerpetlv());
|
|||
|
#ifdef _VIP_SERVER
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n", getNewplayergivevip());
|
|||
|
#endif
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>: %d\n", getRidePetLevel());
|
|||
|
#ifdef _NEW_PLAYER_RIDE
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s\n", getPlayerRide());
|
|||
|
#endif
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>г<EFBFBD><EFBFBD><EFBFBD>: NO1:%d NO2:%d NO3:%d NO4:%d NO5:%d\n",getNewplayergivepet(0),
|
|||
|
getNewplayergivepet(1),
|
|||
|
getNewplayergivepet(2),
|
|||
|
getNewplayergivepet(3),
|
|||
|
getNewplayergivepet(4));
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ: ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n"
|
|||
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n"
|
|||
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n"
|
|||
|
,getNewplayergiveitem(0)
|
|||
|
,getNewplayergiveitem(1)
|
|||
|
,getNewplayergiveitem(2)
|
|||
|
,getNewplayergiveitem(3)
|
|||
|
,getNewplayergiveitem(4)
|
|||
|
,getNewplayergiveitem(5)
|
|||
|
,getNewplayergiveitem(6)
|
|||
|
,getNewplayergiveitem(7)
|
|||
|
,getNewplayergiveitem(8)
|
|||
|
,getNewplayergiveitem(9)
|
|||
|
,getNewplayergiveitem(10)
|
|||
|
,getNewplayergiveitem(11)
|
|||
|
,getNewplayergiveitem(12)
|
|||
|
,getNewplayergiveitem(13)
|
|||
|
,getNewplayergiveitem(14));
|
|||
|
#endif
|
|||
|
#ifdef _UNREG_NEMA
|
|||
|
print("<EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>1:%s <20><><EFBFBD><EFBFBD>2:%s <20><><EFBFBD><EFBFBD>3:%s <20><><EFBFBD><EFBFBD>4:%s <20><><EFBFBD><EFBFBD>5:%s\n",getUnregname(0),
|
|||
|
getUnregname(1),
|
|||
|
getUnregname(2),
|
|||
|
getUnregname(3),
|
|||
|
getUnregname(4));
|
|||
|
#endif
|
|||
|
#ifdef _UNLAW_WARP_FLOOR
|
|||
|
print("<EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ͼ: <20><>ͼ1:%d <20><>ͼ2:%d <20><>ͼ3:%d <20><>ͼ4:%d <20><>ͼ5:%d\n"
|
|||
|
" <20><>ͼ1:%d <20><>ͼ2:%d <20><>ͼ3:%d <20><>ͼ4:%d <20><>ͼ5:%d\n",getUnlawwarpfloor(0),
|
|||
|
getUnlawwarpfloor(1),
|
|||
|
getUnlawwarpfloor(2),
|
|||
|
getUnlawwarpfloor(3),
|
|||
|
getUnlawwarpfloor(4),
|
|||
|
getUnlawwarpfloor(5),
|
|||
|
getUnlawwarpfloor(6),
|
|||
|
getUnlawwarpfloor(7),
|
|||
|
getUnlawwarpfloor(8),
|
|||
|
getUnlawwarpfloor(9));
|
|||
|
#endif
|
|||
|
#ifdef _WATCH_FLOOR
|
|||
|
print("<EFBFBD>Ƿ<EFBFBD>ȫͼ<EFBFBD><EFBFBD>ս: %s\n",getWatchFloorCF());
|
|||
|
if(strcmp(getWatchFloorCF(),"<EFBFBD><EFBFBD>"))
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD>ͼ: <20><>ͼ1:%d <20><>ͼ2:%d <20><>ͼ3:%d <20><>ͼ4:%d <20><>ͼ5:%d\n",getWatchFloor(1),
|
|||
|
getWatchFloor(2),
|
|||
|
getWatchFloor(3),
|
|||
|
getWatchFloor(4),
|
|||
|
getWatchFloor(5));
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _BATTLE_FLOOR
|
|||
|
print("<EFBFBD>Ƿ<EFBFBD>ǿ<EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD>: %s\n",getBattleFloorCF());
|
|||
|
if(strcmp(getBattleFloorCF(),"<EFBFBD><EFBFBD>"))
|
|||
|
print("ǿ<EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ: <20><>ͼ1:%d <20><>ͼ2:%d <20><>ͼ3:%d <20><>ͼ4:%d <20><>ͼ5:%d\n",getBattleFloor(1),
|
|||
|
getBattleFloor(2),
|
|||
|
getBattleFloor(3),
|
|||
|
getBattleFloor(4),
|
|||
|
getBattleFloor(5));
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _TRANS_LEVEL_CF
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>ת<EFBFBD><EFBFBD>: %d<><64>\n",getChartrans());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>ת<EFBFBD><EFBFBD>: %d<><64>\n",getPettrans());
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _POINT
|
|||
|
print("<EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s\n",getPoint());
|
|||
|
if(strcmp(getPoint(),"<EFBFBD><EFBFBD>"))
|
|||
|
print("ÿת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0ת:%d 1ת:%d 2ת:%d 3ת:%d 4ת:%d 5ת:%d 6ת:%d\n",getTransPoint(0),
|
|||
|
getTransPoint(1),
|
|||
|
getTransPoint(2),
|
|||
|
getTransPoint(3),
|
|||
|
getTransPoint(4),
|
|||
|
getTransPoint(5),
|
|||
|
getTransPoint(6));
|
|||
|
#endif
|
|||
|
//#ifdef _PET_UP
|
|||
|
// print("<22><><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD>: %s\n",getPetup());
|
|||
|
//#endif
|
|||
|
#ifdef _LOOP_ANNOUNCE
|
|||
|
print("ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>: %s\n",getLoopAnnouncePath());
|
|||
|
print("ѭ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d<><64><EFBFBD><EFBFBD>\n",getLoopAnnounceTime());
|
|||
|
#endif
|
|||
|
#ifdef _SKILLUPPOINT_CF
|
|||
|
print("ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n",getSkup());
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _RIDELEVEL
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getRideLevel());
|
|||
|
#endif
|
|||
|
#ifdef _REVLEVEL
|
|||
|
print("<EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>: %s<><73>\n",getRevLevel());
|
|||
|
#endif
|
|||
|
#ifdef _TRANS_LEVEL_CF
|
|||
|
print("һ<EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getYBLevel());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ߵȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getMaxLevel());
|
|||
|
#endif
|
|||
|
#ifdef _FIX_CHARLOOPS
|
|||
|
print("<EFBFBD><EFBFBD>ħʱ<EFBFBD>䱶<EFBFBD><EFBFBD>: %d<><64>\n",getCharloops());
|
|||
|
#endif
|
|||
|
#ifdef _PLAYER_ANNOUNCE
|
|||
|
if(getPAnnounce()==-1)
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>: <20>ر<EFBFBD>ʹ<EFBFBD><CAB9>\n");
|
|||
|
else
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getPAnnounce());
|
|||
|
#endif
|
|||
|
#ifdef _PLAYER_MOVE
|
|||
|
if(getPMove()==-1)
|
|||
|
print("˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>: <20>ر<EFBFBD>ʹ<EFBFBD><CAB9>\n");
|
|||
|
else
|
|||
|
print("˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getPMove());
|
|||
|
#endif
|
|||
|
#ifdef _BATTLE_GOLD
|
|||
|
print("ս<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD>Ǯ: %d%\n",getBattleGold());
|
|||
|
#endif
|
|||
|
#ifdef _ANGEL_TIME
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٻ<EFBFBD>ʱ<EFBFBD><EFBFBD>: (%d<><64>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><>\n",getAngelPlayerTime());
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d<><64>\n",getAngelPlayerMun());
|
|||
|
#endif
|
|||
|
#ifdef _RIDEMODE_20
|
|||
|
print("2.0 <20><><EFBFBD><EFBFBD>ģʽ: %d\n",getRideMode());
|
|||
|
#endif
|
|||
|
#ifdef _FM_POINT_PK
|
|||
|
print("ׯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ: %s\n",getFmPointPK());
|
|||
|
#endif
|
|||
|
#ifdef _CAX_ESC_REPORT
|
|||
|
print("<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>Աǩ<EFBFBD><EFBFBD>: ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n"
|
|||
|
,getReportItem(0)
|
|||
|
,getReportItem(1)
|
|||
|
,getReportItem(2)
|
|||
|
,getReportItem(3)
|
|||
|
,getReportItem(4));
|
|||
|
print("VIP <20><>Աǩ<D4B1><C7A9>: ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n"
|
|||
|
,getVipReportItem(0)
|
|||
|
,getVipReportItem(1)
|
|||
|
,getVipReportItem(2)
|
|||
|
,getVipReportItem(3)
|
|||
|
,getVipReportItem(4));
|
|||
|
#endif
|
|||
|
}
|
|||
|
|
|||
|
{ //andy_add 2003/05/05 check GameServer Name
|
|||
|
char *GameServerName;
|
|||
|
GameServerName = getGameserverID();
|
|||
|
if( GameServerName == NULL || strlen( GameServerName) <= 0 )
|
|||
|
return FALSE;
|
|||
|
print("\n<EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID: %s\n", GameServerName );
|
|||
|
}
|
|||
|
print("<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>\n" );
|
|||
|
#ifdef _TRANS_7_COLOR
|
|||
|
if(getping())
|
|||
|
{
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
system("echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all");
|
|||
|
}else
|
|||
|
{
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
system("echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all");
|
|||
|
}
|
|||
|
#endif
|
|||
|
//#define DEBUG1( arg... ) if( getDebuglevel()>1 ){##arg}
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD>ռ<EFBFBD>..." );
|
|||
|
GOTORETURNFALSEIFFALSE(configmem( getMemoryunit(),
|
|||
|
getMemoryunitnum() ) );
|
|||
|
GOTORETURNFALSEIFFALSE(memInit());
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "ʼ<EFBFBD>ջ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿռ<EFBFBD>..." );
|
|||
|
if( !initConnect(getFdnum()) )
|
|||
|
goto MEMEND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
while( 1 ){
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض˿<EFBFBD> %d... " , getPortnumber());
|
|||
|
bindedfd = bindlocalhost( getPortnumber() );
|
|||
|
if( bindedfd == -1 )
|
|||
|
sleep( 10 );
|
|||
|
else
|
|||
|
break;
|
|||
|
}
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..." );
|
|||
|
if( !initObjectArray( getObjnum()) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..." );
|
|||
|
#ifdef _OFFLINE_SYSTEM
|
|||
|
if(!CHAR_initCharArray( getPlayercharnum(), getPetcharnum(),getOtherscharnum()) )
|
|||
|
#else
|
|||
|
if(!CHAR_initCharArray( getFdnum(), getPetcharnum(),getOtherscharnum()) )
|
|||
|
#endif
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ...");
|
|||
|
if(!ITEM_readItemConfFile( getItemfile()) )
|
|||
|
goto CLOSEBIND;
|
|||
|
if(!ITEM_initExistItemsArray( getItemnum() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD>..." );
|
|||
|
if(!BATTLE_initBattleArray( getBattlenum() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>..." );
|
|||
|
if( !initFunctionTable() )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
// print("<22><>ʼ<EFBFBD><CABC><EFBFBD>˺Ű<CBBA>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>...");
|
|||
|
// if( !cdkeyinit() )
|
|||
|
// goto CLOSEBIND;
|
|||
|
// print( "<22><><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD>..." );
|
|||
|
if( !PETMAIL_initOffmsgBuffer( getAddressbookoffmsgnum() ))
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !CHAR_initInvinciblePlace( getInvfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ʾλ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !CHAR_initAppearPosition( getAppearfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !TITLE_initTitleName( getTitleNamefile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !TITLE_initTitleConfig( getTitleConfigfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !ENCOUNT_initEncount( getEncountfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !ENEMYTEMP_initEnemy( getEnemyBasefile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !ENEMY_initEnemy( getEnemyfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !GROUP_initGroup( getGroupfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD>ȡħ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !MAGIC_initMagic( getMagicfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
#ifdef _ATTACK_MAGIC
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
|
|||
|
if( !ATTMAGIC_initMagic( getAttMagicfileName() ) )
|
|||
|
// if( !ATTMAGIC_initMagic( getMagicfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
|
|||
|
print( "ħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> -->%s..." , getAttMagicfileName());
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>\<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !PETSKILL_initPetskill( getPetskillfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
#ifdef _PROFESSION_SKILL // WON ADD <20><><EFBFBD><EFBFBD>ְҵ<D6B0><D2B5><EFBFBD><EFBFBD>
|
|||
|
print( "<EFBFBD><EFBFBD>ȡְҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !PROFESSION_initSkill( getProfession() ) ){
|
|||
|
goto CLOSEBIND;
|
|||
|
}
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
#endif
|
|||
|
|
|||
|
/* ʧ<><CAA7> ة<><D8A9><EFBFBD><EFBFBD> ë <20><> */
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Ʒ<EFBFBD>ɷ<EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !ITEM_initItemAtom( getItematomfile()) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD><EFBFBD><EFBFBD>Ʒ..." );
|
|||
|
if( !ITEM_initItemIngCache() )
|
|||
|
goto CLOSEBIND;
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨..." );
|
|||
|
if( !ITEM_initRandTable() )
|
|||
|
goto CLOSEBIND;
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !CHAR_initEffectSetting( getEffectfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !QUIZ_initQuiz( getQuizfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
#ifdef _GMRELOAD
|
|||
|
print( "<EFBFBD><EFBFBD>ȡGM<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if ( !LoadGMSet( getGMSetfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
#endif
|
|||
|
#ifdef _UNTEXT_TALK
|
|||
|
print("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ֹ<EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>...");
|
|||
|
if(!LoadUnText())
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
#endif
|
|||
|
#ifdef _USER_EXP_CF
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if ( !LoadEXP( getEXPfile() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD>ߵȼ<EFBFBD>: %d...",getMaxLevel());
|
|||
|
print("һ<EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD>: %d...",getYBLevel());
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _ANGEL_SUMMON
|
|||
|
print("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD>ļ<EFBFBD>...");
|
|||
|
if( !LoadMissionList( ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _JOBDAILY
|
|||
|
print("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>...");
|
|||
|
if(!LoadJobdailyfile())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
else
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _LOOP_ANNOUNCE
|
|||
|
print("<EFBFBD><EFBFBD>ȡѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>...");
|
|||
|
if(!loadLoopAnnounce())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
else
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
#ifdef _RIDE_CF
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if(!CHAR_Ride_CF_init())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
#ifdef _FM_LEADER_RIDE
|
|||
|
print( "<EFBFBD><EFBFBD>ȡׯ<EFBFBD>峤ר<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if(!CHAR_FmLeaderRide_init())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
#ifdef _RE_GM_COMMAND
|
|||
|
print( "<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>GM<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if(!re_gm_command())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
#ifdef _NEED_ITEM_ENEMY
|
|||
|
print( "<EFBFBD><EFBFBD>ȡץ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if(!need_item_eneny_init())
|
|||
|
print("...ʧ<><CAA7>\n");
|
|||
|
print("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
|||
|
#endif
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ..." );
|
|||
|
if( !MAP_initReadMap( getMaptilefile() , getMapdir() ))
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD>ȡNPC<EFBFBD>ļ<EFBFBD>..." );
|
|||
|
if( !NPC_readNPCSettingFiles( getNpcdir(), getNpctemplatenum(),
|
|||
|
getNpccreatenum() ) )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD> NPC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>... " );
|
|||
|
if( lssproto_InitServer( lsrpcClientWriteFunc, LSGENWORKINGBUFFER ) < 0 )
|
|||
|
goto CLOSEBIND;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>... " );
|
|||
|
acfd = connectHost( getAccountservername(), getAccountserverport());
|
|||
|
if(acfd == -1)
|
|||
|
goto CLOSEBIND;
|
|||
|
|
|||
|
/*
|
|||
|
{
|
|||
|
int errorcode;
|
|||
|
int errorcodelen;
|
|||
|
int qs;
|
|||
|
|
|||
|
errorcodelen = sizeof(errorcode);
|
|||
|
qs = getsockopt( acfd, SOL_SOCKET, SO_RCVBUF , &errorcode, &errorcodelen);
|
|||
|
//andy_log
|
|||
|
print("\n\n GETSOCKOPT SO_RCVBUF: [ %d, %d, %d] \n", qs, errorcode, errorcodelen);
|
|||
|
}
|
|||
|
*/
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
initConnectOne( acfd, NULL , 0 );
|
|||
|
if( !CONNECT_acfdInitRB( acfd)) goto CLOSEAC;
|
|||
|
if( !CONNECT_acfdInitWB( acfd)) goto CLOSEAC;
|
|||
|
CONNECT_setCtype( acfd, AC );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD> NPC <20>ͻ<EFBFBD><CDBB><EFBFBD> ... " );
|
|||
|
/* rpc(client)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
if( saacproto_InitClient( lsrpcClientWriteFunc,LSGENWORKINGBUFFER, acfd) < 0)
|
|||
|
goto CLOSEAC;
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD>˺ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>½<EFBFBD><EFBFBD><EFBFBD><EFBFBD>... " );
|
|||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>ۢ<EFBFBD><DBA2>ë<EFBFBD><C3AB><EFBFBD><EFBFBD> */
|
|||
|
{
|
|||
|
char buff[50];
|
|||
|
#ifdef _TEST_SERVER
|
|||
|
sprintf(buff,"ziyunjack8-%s-%d",getAccountserverpasswd(),987);
|
|||
|
saacproto_ACServerLogin_send(acfd, getGameservername(), buff);
|
|||
|
#else
|
|||
|
sprintf(buff,"ziyunjack8-%s-%d",getAccountserverpasswd(),789);
|
|||
|
saacproto_ACServerLogin_send(acfd, getGameservername(), buff);
|
|||
|
#endif
|
|||
|
}
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
// if (strcmp(getlocaltime(), TimeLimitLocal)>0)exit(0);
|
|||
|
if( isExistFile( getLsgenlogfilename() ) ){
|
|||
|
lssproto_SetServerLogFiles( getLsgenlogfilename(),
|
|||
|
getLsgenlogfilename() );
|
|||
|
saacproto_SetClientLogFiles( getLsgenlogfilename(),
|
|||
|
getLsgenlogfilename() );
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
|
|||
|
print( "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>־\n" );
|
|||
|
{
|
|||
|
char logconffile[512];
|
|||
|
snprintf( logconffile, sizeof( logconffile), "%s/%s" ,
|
|||
|
getLogdir(), getLogconffile() );
|
|||
|
if( !initLog( logconffile ) )
|
|||
|
goto CLOSEAC;
|
|||
|
}
|
|||
|
#ifdef _PET_ITEM
|
|||
|
restoreObjects( getStoredir() );
|
|||
|
#endif
|
|||
|
#ifdef _ITEM_QUITPARTY
|
|||
|
print( "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɢ<EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD>ʧ<EFBFBD>ļ<EFBFBD>..." );
|
|||
|
|
|||
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
f = fopen( getitemquitparty(), "r" );
|
|||
|
if( f != NULL ){
|
|||
|
while( fgets( line, sizeof( line ), f ) ){
|
|||
|
if( line[0] == '#' )continue;
|
|||
|
if( line[0] == '\n' )continue;
|
|||
|
chomp( line );
|
|||
|
itemquitparty_num++;
|
|||
|
}
|
|||
|
if( fseek( f, 0, SEEK_SET ) == -1 ){
|
|||
|
print( "<EFBFBD><EFBFBD>Ʒ¼<EFBFBD>Ҵ<EFBFBD><EFBFBD><EFBFBD>\n" );
|
|||
|
fclose(f);
|
|||
|
goto CLOSEAC;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
Disappear_Item = allocateMemory( sizeof(struct tagDisappearItem) * itemquitparty_num );
|
|||
|
if( Disappear_Item == NULL ){
|
|||
|
print( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> %d\n", sizeof(struct tagDisappearItem) * itemquitparty_num );
|
|||
|
fclose( f );
|
|||
|
goto CLOSEAC;
|
|||
|
}
|
|||
|
|
|||
|
i = 0;
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><DFB1>Ŵ<EFBFBD><C5B4><EFBFBD> Disappear_Item.string
|
|||
|
while( fgets( line, sizeof( line ), f ) ){
|
|||
|
if( line[0] == '#' )continue;
|
|||
|
if( line[0] == '\n' )continue;
|
|||
|
chomp( line );
|
|||
|
sprintf( Disappear_Item[i].string,"%s",line );
|
|||
|
print("\n<EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><EFBFBD><EFBFBD>:%s", Disappear_Item[i].string );
|
|||
|
i++;
|
|||
|
}
|
|||
|
fclose(f);
|
|||
|
}
|
|||
|
#endif
|
|||
|
|
|||
|
DEBUG_ADJUSTTIME = 0;
|
|||
|
print( "\n" );
|
|||
|
return TRUE;
|
|||
|
|
|||
|
CLOSEAC:
|
|||
|
close( acfd );
|
|||
|
CLOSEBIND:
|
|||
|
close( bindedfd );
|
|||
|
endConnect();
|
|||
|
MEMEND:
|
|||
|
memEnd();
|
|||
|
RETURNFALSE:
|
|||
|
return FALSE;
|
|||
|
}
|
|||
|
|