⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lssproto_serv.c

📁 石器时代2.0完整版源代码.已经加入新功能. 在REDHAT9下GCC3.4编译成功.
💻 C
📖 第 1 页 / 共 4 页
字号:
void lssproto_R_send(int fd,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_R_SEND-data:%s\n",data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_R_SEND, buffer);}void lssproto_S_send(int fd,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_S_SEND-data:%s\n",data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_S_SEND, buffer);}void lssproto_D_send(int fd,int category,int dx,int dy,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_D_SEND-category:%d,dx:%d,dy:%d,data:%s\n",category,dx,dy,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, category);	checksum += util_mkint(buffer, dx);	checksum += util_mkint(buffer, dy);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_D_SEND, buffer);}void lssproto_FS_send(int fd,int flg){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_FS_SEND-flg:%d\n",flg);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, flg);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_FS_SEND, buffer);}void lssproto_HL_send(int fd,int flg){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_HL_SEND-flg:%d\n",flg);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, flg);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_HL_SEND, buffer);}void lssproto_PR_send(int fd,int request,int result){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_PR_SEND-request:%d,result:%d\n",request,result);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, request);	checksum += util_mkint(buffer, result);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_PR_SEND, buffer);}#ifdef _PETS_SELECTCONvoid lssproto_PETS_send(int fd,int petarray,int result){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_PETST_SEND-petarray:%d,result:%d\n",petarray,result);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, petarray);	checksum += util_mkint(buffer, result);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_PETST_SEND, buffer);}#endifvoid lssproto_KS_send(int fd,int petarray,int result){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_KS_SEND-petarray:%d,result:%d\n",petarray,result);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, petarray);	checksum += util_mkint(buffer, result);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_KS_SEND, buffer);}void lssproto_SPET_send(int fd, int standbypet, int result){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_SPET_SEND-standbypet:%d,result:%d\n",standbypet,result);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, standbypet);	checksum += util_mkint(buffer, result);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_SPET_SEND, buffer);}void lssproto_PS_send(int fd,int result,int havepetindex,int havepetskill,int toindex){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_PS_SEND-result:%d,havepetindex:%d,havepetskill:%d,toindex:%d\n",result,havepetindex,havepetskill,toindex);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, result);	checksum += util_mkint(buffer, havepetindex);	checksum += util_mkint(buffer, havepetskill);	checksum += util_mkint(buffer, toindex);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_PS_SEND, buffer);}void lssproto_SKUP_send(int fd,int point){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_SKUP_SEND-point:%d\n",point);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, point);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_SKUP_SEND, buffer);}void lssproto_WN_send(int fd,int windowtype,int buttontype,int seqno,int objindex,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_WN_SEND-windowtype:%d,buttontype:%d,seqno:%d,objindex:%s\n",windowtype,buttontype,seqno,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, windowtype);	checksum += util_mkint(buffer, buttontype);	checksum += util_mkint(buffer, seqno);	checksum += util_mkint(buffer, objindex);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_WN_SEND, buffer);	}void lssproto_EF_send(int fd,int effect,int level,char* option){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_EF_SEND-effect:%d,level:%d,char:%s\n",effect,level,option);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, effect);	checksum += util_mkint(buffer, level);	checksum += util_mkstring(buffer, option);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_EF_SEND, buffer);}void lssproto_SE_send(int fd,int x,int y,int senumber,int sw){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_SE_SEND-x:%d,y:%d,senumber:%d,sw:%d\n",x,y,senumber,sw);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, x);	checksum += util_mkint(buffer, y);	checksum += util_mkint(buffer, senumber);	checksum += util_mkint(buffer, sw);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_SE_SEND, buffer);}void lssproto_ClientLogin_send(int fd,char* result){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CLIENTLOGIN_SEND-result:%s\n",result);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	util_mkint(buffer, checksum);		util_SendMesg(fd, LSSPROTO_CLIENTLOGIN_SEND, buffer);	}void lssproto_CreateNewChar_send(int fd,char* result,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CREATENEWCHAR_SEND-result:%s,data:%s\n",result,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_CREATENEWCHAR_SEND, buffer);}void lssproto_CharDelete_send(int fd,char* result,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CHARDELETE_SEND-result:%s,data:%s\n",result,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_CHARDELETE_SEND, buffer);}void lssproto_CharLogin_send(int fd,char* result,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CHARLOGIN_SEND-result:%s,data:%s\n",result,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_CHARLOGIN_SEND, buffer);}void lssproto_CharList_send(int fd,char* result,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CHARLIST_SEND-result:%s,data:%s\n",result,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_CHARLIST_SEND, buffer);}void lssproto_CharLogout_send(int fd,char* result,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_CHARLOGOUT_SEND-result:%s,data:%s\n",result,data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, result);	checksum += util_mkstring(buffer, data);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_CHARLOGOUT_SEND, buffer);}void lssproto_ProcGet_send(int fd,char* data){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_PROCGET_SEND-data:%s\n",data);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");		CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, data);		util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_PROCGET_SEND, buffer);}void lssproto_PlayerNumGet_send(int fd,int logincount,int player){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_PLAYERNUMGET_SEND-logincount:%d,player:%d\n",logincount,player);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, logincount);	checksum += util_mkint(buffer, player);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_PLAYERNUMGET_SEND, buffer);}void lssproto_Echo_send(int fd,char* test){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_ECHO_SEND-test:%s\n",test);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, test);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_ECHO_SEND, buffer);}// CoolFish: Trade 2001/4/18void lssproto_TD_send(int fd, int index, char* message){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_TD_SEND-message:%s\n",message);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, message);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_TD_SEND, buffer);}void lssproto_NU_send(int fd, int nu){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_NU_SEND-nu:%d\n",nu);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, nu);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_NU_SEND, buffer);}void lssproto_FM_send(int fd, char* message){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_FM_SEND-message:%s\n",message);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkstring(buffer, message);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_FM_SEND, buffer);}void lssproto_WO_send(int fd,int effect){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_WO_SEND-effect:%d\n",effect);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, effect);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_WO_SEND, buffer);}#ifdef _ITEM_CRACKERvoid lssproto_IC_send(int fd, int x, int y){#ifdef _DEBUG_SEND_CLI	printf("[发送]lssproto_IC_send-x:%d,y:%d\n",x,y);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, x);	checksum += util_mkint(buffer, y);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_IC_SEND, buffer);}#endif#ifdef _MAGIC_NOCAST             // 精灵:沉默void lssproto_NC_send(int fd,int flg){#ifdef _DEBUG_SEND_CLI	printf("[发送]LSSPROTO_NC_SEND-flg:%d\n",flg);#endif	char buffer[1024 * 64];	int checksum=0;	strcpy(buffer,"");	CONNECT_getCdkey( fd, PersonalKey, 4096);	strcat(PersonalKey, _RUNNING_KEY);	checksum += util_mkint(buffer, flg);	util_mkint(buffer, checksum);	util_SendMesg(fd, LSSPROTO_NC_SEND, buffer);}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -