• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NPC_Util_GetStrFromStrWithDelim函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NPC_Util_GetStrFromStrWithDelim函数的典型用法代码示例。如果您正苦于以下问题:C++ NPC_Util_GetStrFromStrWithDelim函数的具体用法?C++ NPC_Util_GetStrFromStrWithDelim怎么用?C++ NPC_Util_GetStrFromStrWithDelim使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NPC_Util_GetStrFromStrWithDelim函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NPC_FmLetterInit

/*********************************
* 賡渝質  
*********************************/
BOOL NPC_FmLetterInit( int meindex )
{
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buf[1024];
	//int		i;
	//char	secondToken[1024];
	
	// Robin test
	// print(" fmleter_Init ");	
	
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	
	if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf))
		== NULL )
	{
		print( "fmletter:沒有指定設定的檔案 。\n");
		return FALSE;
	}
	/* 賡渝凜卞澀爛犯□正毛民尼永弁仄化支月 */
	if( !NPC_FmLetter_readData( meindex, -1, TRUE) ) {
		return FALSE;
	}
	
	CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN );
	
	return TRUE;
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:31,代码来源:npc_fmletter.c


示例2: strlen

/*------------------------------------------------------------------------
 * 婁醒井日丟永本□斥毛潸  允月
 *----------------------------------------------------------------------*/
static char *NPC_Sysinfo_GetMsg( int meindex, char *msgindexstr,
								char *out,int outlen, int num )
{

	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	*work;
	char	*buff;
	char	*cret = NULL;
	int 	worklen;

	worklen = strlen( msgindexstr)+3;
	work = (char *)calloc( 1, worklen * sizeof( char));
	buff = (char *)calloc( 1, outlen  * sizeof( char));

	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));

	snprintf( work, worklen, "%s%d", msgindexstr, num);
	if( NPC_Util_GetStrFromStrWithDelim( argstr, work,
									buff, outlen) != NULL )
	{
		strcpy( out, buff);
		cret = out;
	}

	free( work);
	free( buff);
	return( cret);
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:32,代码来源:npc_sysinfo.c


示例3: NPC_LuckyDisp

void NPC_LuckyDisp(int meindex,int talker)
{
	char argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char buf[16];
	char token[1024];
	char buf2[512];
	int i = 1;

	/*--ÀßÄê¥Õ¥¡¥¤¥ë¤ò  ¤ß  ¤ß--*/
	if((argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1)))== NULL) {
		print("NPC_Savepoint.c Init: GetArgStrErr");
		return;
	}

	/*--±¿¤ò¸«¤ë--*/
	sprintf( buf, "luck%d", CHAR_getInt( talker, CHAR_LUCK));
	NPC_Util_GetStrFromStrWithDelim( argstr, buf, buf2, sizeof( buf2));

	while(getStringFromIndexWithDelim( buf2, ",", i, token, sizeof( token))
	!= FALSE)
	{
		i++;
	}
	i--;
	i = rand()%i + 1;

	/*--¥é¥ó¥À¥à¤Ç¥á¥Ã¥»¡¼¥¸¤ò  ¼¨¤µ¤»¤ë--*/
	getStringFromIndexWithDelim( buf2,",", i, token, sizeof( token));
	NPC_LuckyMan_selectWindow( meindex, talker, 1, token);
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:31,代码来源:npc_luckyman.c


示例4: NPC_WarpPointGet

/*
 *��������ëGET���£�
 */
void NPC_WarpPointGet(int meindex,int talker,int *fl,int *x,int *y,int judge)
{
   	char argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *strbuf[2] = {"WinWarp","LoseWarp"};
	char buf[64];
	char buf2[32];

	/*--ɬ�ð����̻�ë  ��  ��--*/
	if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){
		print("NPC_janken Init: GetArgStrErr");
		return ;
	}


	/*--���������  --*/
	NPC_Util_GetStrFromStrWithDelim( argstr, strbuf[judge], buf, sizeof( buf));
	getStringFromIndexWithDelim(buf,",",1,buf2,sizeof(buf2));
	*fl=atoi(buf2);
	getStringFromIndexWithDelim(buf,",",2,buf2,sizeof(buf2));
	*x=atoi(buf2);
	getStringFromIndexWithDelim(buf,",",3,buf2,sizeof(buf2));
	*y=atoi(buf2);
	
	
}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:28,代码来源:npc_janken.c


示例5: NPC_QuizItemFullCheck

BOOL NPC_QuizItemFullCheck(int meindex,int talker)
{
    int i;
    int itemindex;
    char argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
    char buf2[32];


    for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) {
        itemindex = CHAR_getItemIndex( talker , i );
        if( !ITEM_CHECKINDEX( itemindex) ) {
            return TRUE;
        }
    }

    if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL)
    {
        print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME));
    }

    if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryItem",	buf2, sizeof( buf2)) != NULL)
    {
        if(NPC_EntryItemCheck( talker, buf2) == FALSE) {
            NPC_Quiz_selectWindow( meindex, talker, 3);
            return  FALSE;

        } else {
            return TRUE;
        }
    }


    return FALSE;

}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:35,代码来源:npc_quiz.c


示例6: NPC_PetSkillShopInit

BOOL NPC_PetSkillShopInit( int meindex )
{
	char argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
	char msg[256];

    CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESTONESHOP );
	if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){
		print("GetArgStrErr");
		return FALSE;
	}
	if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", msg, sizeof( msg)) != NULL){
		char buf[256], filename[256];
		int k=1, skillID, skillarray;
		while( getStringFromIndexWithDelim( msg, ",", k, buf, sizeof( buf) ) ){
			k++;
			skillID=atoi(buf);
			skillarray = PETSKILL_getPetskillArray( skillID);
			if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) continue;
			if( PETSKILL_getInt( skillarray, PETSKILL_ILLEGAL) == 1){
				if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL ){
					print("PetSkillShop illegal skill:[%d-%s] ->file:%s",
						skillID,
						PETSKILL_getChar( skillarray, PETSKILL_NAME),
						filename );
				}
			}
		}
	}else{
		return FALSE;
	}

    return TRUE;
}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:33,代码来源:npc_petskillshop.c


示例7: NPC_BusSetPoint

/**************************************
 * �ݼ�����ë����������
 **************************************/
static int NPC_BusSetPoint( int meindex, char *argstr)
{
	char	buf[4096];
	char	buf2[256];
	char	buf3[256];
	int ret;
	char routetostring[64];
	
	snprintf( routetostring, sizeof( routetostring), "routeto%d", 
				CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE));
	
	if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf))
		== NULL ) 
	{
		print( "npcbus:nothing route \n");
		return FALSE;
	}
	ret = getStringFromIndexWithDelim( buf, ";", 
								CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT),
								buf2, sizeof(buf2));
		
	if( ret == FALSE ) return FALSE;

	ret = getStringFromIndexWithDelim( buf2, ",", 1,
								buf3, sizeof(buf3));
	if( ret == FALSE) return FALSE;
	CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, atoi( buf3));
	
	ret = getStringFromIndexWithDelim( buf2, ",", 2,
								buf3, sizeof(buf3));
	if( ret == FALSE) return FALSE;
	CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, atoi( buf3));
	return TRUE;
}
开发者ID:ChowZenki,项目名称:Long-Sa-Source,代码行数:37,代码来源:npc_bus.c


示例8: NPC_RidermanInit

BOOL NPC_RidermanInit( int meindex )
{
    char	argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
    char	buf[1024];
    //int		i;
    //char	secondToken[1024];

    // Robin test
    // print(" riderman_Init ");

    NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr));

    if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf))== NULL )
    {
        print( "riderman:没有指定设定的档案 。\n");
        return FALSE;
    }
    /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */
    if( !NPC_Riderman_readData( meindex, -1, TRUE) ) {
        return FALSE;
    }

    CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN );

    return TRUE;
}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:26,代码来源:npc_riderman.c


示例9: NPC_ActionTalked

/*********************************
*   �ƾ�����ľ���ݼ���  
*********************************/
void NPC_ActionTalked( int meindex , int talkerindex , char *szMes ,
                     int color )
{
	char	argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
	char	buf[64];

    /* �����������帲�ƻ�����  ɱ���� */
    if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) {
    	return;
    }
	/* ���������  ���� */
	if( !NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 1 )) return; 

	NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr));

	if( NPC_Util_GetStrFromStrWithDelim( argstr, 
										"normal",
										buf, sizeof( buf))
    	!= NULL )
	{
    	CHAR_talkToCli( talkerindex, meindex ,buf , 
    					CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR ));
	}
	
}
开发者ID:beijunyi,项目名称:longzoro-sa,代码行数:28,代码来源:npc_action.c


示例10: NPC_WindowmanInit

/*********************************
* ½é´ü½è  
*********************************/
BOOL NPC_WindowmanInit( int meindex )
{
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buf[1024];
	//int		i;
	//char	secondToken[1024];
	
	
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	
	if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf))
		== NULL ) 
	{
		print( "windowman:¨S¦³«ü©w³]©wªºÀÉ®× ¡C\n");
		return FALSE;
	}
	/* ½é´ü»þ¤ËÀßÄê¥Ç¡¼¥¿¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ä¤ë */
	if( !NPC_Windowman_readData( meindex, -1, TRUE) ) {
		return FALSE;
	}
	
	CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN );
	
	return TRUE;
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:29,代码来源:npc_windowman.c


示例11: NPC_LuckyDisp

void NPC_LuckyDisp(int meindex,int talker)
{
	char argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
	char buf[16];
	char token[1024];
	char buf2[512];
	int i = 1;

	/*--ɬÀð×ÑëÄÌ»ïë  ÐÄ  ÐÄ--*/
	if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) {
		print("NPC_Savepoint.c Init: GetArgStrErr");
		return;
	}

	/*--ÞÑëέÔÂ--*/
	sprintf( buf, "luck%d", CHAR_getInt( talker, CHAR_LUCK));
	NPC_Util_GetStrFromStrWithDelim( argstr, buf, buf2, sizeof( buf2));

	while(getStringFromIndexWithDelim( buf2, ",", i, token, sizeof( token))
	!= FALSE)
	{
		i++;
	}
	i--;
	i = rand()%i + 1;

	/*--·Â¼þĸةƥ¶ªÓÀ±¾¡õ³âë  Ô÷½ñÁùÔÂ--*/
	getStringFromIndexWithDelim( buf2,",", i, token, sizeof( token));
	NPC_LuckyMan_selectWindow( meindex, talker, 1, token);
}
开发者ID:BlueKarl,项目名称:gmsv,代码行数:30,代码来源:npc_luckyman.c


示例12: VipShop_GetMenuStr

BOOL VipShop_GetMenuStr( int meindex, int toindex, char *npcarg, char *token,int index )
{
	char buf1[1024], buf2[32], buf3[36];
	BOOL FINDS=FALSE;
	int talkNo=index*7+1;
	if( npcarg == NULL ) return FALSE;
	
	sprintf( token, "你当前的积分是:%d        %d/%d页\n",sasql_ampoint(CHAR_getUseID(toindex),0,0), index+1, page);
	while( getStringFromIndexWithDelim( npcarg,"}",talkNo, buf1, sizeof( buf1)) != FALSE )	{
		talkNo++;
		memset( buf2, 0, sizeof( buf2));
		if( NPC_Util_GetStrFromStrWithDelim( buf1, "MenuStr", buf2, sizeof( buf2)) == NULL  )
			continue;
		FINDS = TRUE;

		sprintf( buf3, "    %s", buf2);
		if(strlen(buf3)<10)
			strcat( buf3, "   \n");
		else
			strcat( buf3, "\n");
		strcat( token, buf3);
		if(talkNo>(index*7+8))return FINDS;
	}
	return FINDS;
}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:25,代码来源:npc_vipshop.c


示例13: NPC_BusCheckDeniedItem

/**************************************
 * ϶�ý�ľ��ʧ��  ةë  �Ȼ����¾�������������
 *   �Ȼ������շֻ�
 **************************************/
static BOOL NPC_BusCheckDeniedItem( int meindex, int charaindex, char *argstr)
{
	char	buf[1024];
	BOOL	found = TRUE;

	if( NPC_Util_GetStrFromStrWithDelim( argstr, "denieditem", buf, sizeof( buf))
		!= NULL ) 
	{
		int	i;
		int ret;
		for( i = 1; ; i ++) {
			int itemid;
			char buf2[64];
			int j;
			ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2));
			if( ret == FALSE ) break;
			itemid = atoi( buf2);
			for( j = 0; j < CHAR_MAXITEMHAVE; j ++) {
				int itemindex = CHAR_getItemIndex( charaindex, j);
				if( ITEM_CHECKINDEX( itemindex)) {
					if( ITEM_getInt( itemindex, ITEM_ID) == itemid) {
						found = FALSE;
						break;
					}
				}
			}
		}
	}
	return found;
}
开发者ID:ChowZenki,项目名称:Long-Sa-Source,代码行数:34,代码来源:npc_bus.c


示例14: NPC_FreePetSkillShopInit

BOOL NPC_FreePetSkillShopInit( int meindex )
{
	char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE];
	char msg[256];
    CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_FREESKILLSHOP );
	CHAR_setWorkInt( meindex, CHAR_WORK_SKILLSELECT, 0);

	if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){
		print("GetArgStrErr NO arg !!");
		return FALSE;
	}

	if( NPC_Util_GetStrFromStrWithDelim( npcarg, "pet_skill", msg, sizeof( msg)) != NULL){
		char buf[256], filename[256];
		int k=1, skillID, skillarray;
		while( getStringFromIndexWithDelim( msg, ",", k, buf, sizeof( buf) ) ){
			k++;
			skillID=atoi(buf);
			skillarray = PETSKILL_getPetskillArray( skillID);
			if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) continue;
			if( PETSKILL_getInt( skillarray, PETSKILL_ILLEGAL) == 1){
				if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL ){
						print("\n宠物技能不规范:[%d-%s] ->文件:%s\n",
						skillID,
						PETSKILL_getChar( skillarray, PETSKILL_NAME),
						filename );
				}
			}
		}
	}else{
		return FALSE;
	}

    return TRUE;
}
开发者ID:ChowZenki,项目名称:Long-Sa-Source,代码行数:35,代码来源:npc_freepetskillshop.c


示例15: NPC_AirSetPoint

/**************************************
 * 戚及樺赭毛本永玄允月
 **************************************/
static int NPC_AirSetPoint( int meindex, char *argstr)
{
	char	buf[4096];
	char	buf2[256];
	char	buf3[256];
	int floor,warpx,warpy;
	int ret;
	char routetostring[64];
	
	snprintf( routetostring, sizeof( routetostring), "routeto%d", 
				CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE));
	
	if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf))
		== NULL ) 
	{
		print( "npcair:nothing route \n");
		return FALSE;
	}

	ret = getStringFromIndexWithDelim( buf, ";", 
		CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT),
		buf2, sizeof(buf2));
	if( ret == FALSE ) return FALSE;

	// Arminius: add floor
	
	ret = getStringFromIndexWithDelim( buf2, ",", 1,
		buf3, sizeof(buf3));
	if( ret == FALSE) return FALSE;
	floor = atoi(buf3);

	ret = getStringFromIndexWithDelim( buf2, ",", 2,
		buf3, sizeof(buf3));
	if( ret == FALSE) return FALSE;
	CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, atoi( buf3));
	warpx = atoi(buf3);
	
	ret = getStringFromIndexWithDelim( buf2, ",", 3,
		buf3, sizeof(buf3));
	if( ret == FALSE) return FALSE;
	CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, atoi( buf3));
	warpy = atoi(buf3);

	if (floor!=CHAR_getInt(meindex, CHAR_FLOOR)) {
		int	i;
		CHAR_warpToSpecificPoint(meindex, floor, warpx, warpy);

		for( i = 1; i < CHAR_PARTYMAX; i ++ ) {
			int toindex = CHAR_getWorkInt( meindex, i + CHAR_WORKPARTYINDEX1);
			if( CHAR_CHECKINDEX(toindex) ) {
				CHAR_warpToSpecificPoint(toindex, floor, warpx, warpy);
			}
		}
		CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, warpx);
		CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, warpy);
	}

	return TRUE;
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:62,代码来源:npc_airplane.c


示例16: NPC_BusCheckAllowItem

/**************************************
 * »ØÄꤵ¤ì¤¿¥¢¥¤  ¥à¤ò  ¤Ã¤Æ¤¤¤ë¤«¥Á¥§¥Ã¥¯¤¹¤ë
 *   ¤Ã¤Æ¤¤¤Ê¤¤¤È¤À¤á
 **************************************/
BOOL NPC_BusCheckAllowItem( int meindex, int charaindex, BOOL pickupmode)
{
	char	buf[1024];
	BOOL	found = TRUE;
	BOOL	pickup = FALSE;
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	
	if( NPC_Util_GetStrFromStrWithDelim( argstr, "pickupitem", buf, sizeof( buf))!= NULL ){
		pickup = TRUE;
	}
	if( NPC_Util_GetStrFromStrWithDelim( argstr, "allowitem", buf, sizeof( buf))!= NULL ){
		int	i;
		int ret;
		for( i = 1; ; i ++) {
			int itemid;
			char buf2[64];
			int j;
			BOOL	getflg;
			ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2));
			if( ret == FALSE ) break;
			itemid = atoi( buf2);
			getflg = FALSE;
			for( j = 0; j < CHAR_MAXITEMHAVE; j ++) {
				int itemindex = CHAR_getItemIndex( charaindex, j);
				if( ITEM_CHECKINDEX( itemindex)) {
					if( ITEM_getInt( itemindex, ITEM_ID) == itemid) {
						if( pickupmode && pickup && !getflg) {
							CHAR_DelItem( charaindex, j);
							getflg = TRUE;
						}
						break;
					}
				}
			}
			if( j == CHAR_MAXITEMHAVE) {
				found = FALSE;
				break;
			}
		}
	}
	return found;
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:49,代码来源:npc_bus.c


示例17: NPC_FMPKManWindowTalked

/*-----------------------------------------
 * �ͷ���ʧ��������߯�Ȼ������ݱ���̫���ľ�£�
 *
-------------------------------------------*/
void NPC_FMPKManWindowTalked( int meindex, int talkerindex,
                              int seqno, int select, char *data)
{
    int datanum = -1, fl, x, y;
    char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE];
    char buf[1024], buff2[256];

    if (NPC_Util_GetArgStr(meindex, npcarg, sizeof(npcarg)) == NULL)
    {
        print("GetArgStrErr");
        return;
    }
    NPC_Util_GetStrFromStrWithDelim(npcarg, "WARP", buf, sizeof(buf));
    getStringFromIndexWithDelim(buf, ",", 1, buff2, sizeof(buff2));
    fl = atoi(buff2);
    getStringFromIndexWithDelim(buf, ",", 2, buff2, sizeof(buff2));
    x = atoi(buff2);
    getStringFromIndexWithDelim(buf, ",", 3, buff2, sizeof(buff2));
    y = atoi(buff2);

    makeStringFromEscaped( data);

//	print("meindex:%d seqno:%d select:%d data:%s\n", meindex, seqno, select, data);

    datanum = atoi( data);
    switch( seqno) {

    /*--��Ԫ��Ի��    --*/
    case CHAR_WINDOWTYPE_FMPKMAN_START:
        if (datanum == 1)
            NPC_FMPKMan_selectWindow(meindex, talkerindex, 1, -1);
        else if (datanum == 2)
            NPC_FMPKMan_selectWindow(meindex, talkerindex, 2, -1);
        break;
    case CHAR_WINDOWTYPE_FMPKMAN_VIEW:
        break;
    case CHAR_WINDOWTYPE_FMPKMAN_LEAVEPK:
        if (select == WINDOW_BUTTONTYPE_YES)
        {
            if (CHAR_getWorkInt(talkerindex, CHAR_WORKBATTLEMODE)
                    != BATTLE_CHARMODE_NONE)
                return;

            // shan add
            if(NPC_PARTY_CHAECK1( meindex, talkerindex)==FALSE) {
                NPC_ERR_DiSP1( meindex, talkerindex, 1);
                return;
            }

            CHAR_setWorkInt(talkerindex, CHAR_WORKWARPCHECK, FALSE);
            CHAR_warpToSpecificPoint(talkerindex, fl, x, y);
        }
        break;
    default:
        break;
    }
}
开发者ID:beijunyi,项目名称:longzoro-sa,代码行数:61,代码来源:npc_fmpkman.c


示例18: NPC_getNextTitle

int NPC_getNextTitle( int meindex, int toindex, char *arg, int title, int select)
{
	char buf[NPC_UTIL_GETARGSTR_BUFSIZE], buf1[1024], buf2[256];
	int toID=0;
	memset( buf, 0, sizeof( buf));
	if( getStringFromIndexWithDelim( arg, "PSYCHOMETRICS", 2, buf, sizeof( buf)) == FALSE )
		return -1;
	if( getStringFromIndexWithDelim( buf , "}", title, buf1, sizeof( buf1)) == FALSE )
		return -1;
	if( select == WINDOW_BUTTONTYPE_YES ) {
		if( NPC_Util_GetStrFromStrWithDelim( buf1, "YESFOR", buf2, sizeof( buf2 )) == NULL)
			return -1;
	}else {
		if( NPC_Util_GetStrFromStrWithDelim( buf1, "NOFOR", buf2, sizeof( buf2) ) == NULL)
			return -1;
	}
	toID = atoi( buf2);
	return toID;
}
开发者ID:ChowZenki,项目名称:Long-Sa-Source,代码行数:19,代码来源:npc_makepair.c


示例19: NPC_PAItemShop_Main

BOOL NPC_PAItemShop_Main(int meindex,int talker, char *argstr,char *token, int sizes)
{
	char buff[256];
	//int fd = getfdFromCharaIndex( talker);
	memset( buff, 0, sizeof( buff));
    if( NPC_Util_GetStrFromStrWithDelim( argstr, "MAIN_MESS", buff, sizeof( buff)) == NULL )
		return FALSE;
	snprintf(token, sizes,"%s|%s", CHAR_getChar( meindex, CHAR_NAME), buff);
	return TRUE;
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:10,代码来源:npc_pauctionman.c


示例20: NPC_NPCEnemy_BattleIn

BOOL NPC_NPCEnemy_BattleIn(  int meindex, int charaindex)
{
	int		gym;
	int		ret;
	char	buf[256];
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;

	//memset( argstr, 0, sizeof( argstr));
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	gym = NPC_Util_GetNumFromStrWithDelim( argstr, "gym");

#ifdef _EMENY_CHANCEMAN
	{
		int masterindex=-1;
		masterindex = NPC_EmenyChanceCheck( meindex, charaindex, argstr);
		if( CHAR_CHECKINDEX( masterindex)){
			charaindex = masterindex;
		}else	{
			return TRUE;
		}
	}
#endif
	if( gym > 0 ){
		ret = BATTLE_CreateVsEnemy( charaindex, 2, meindex);
	}else{
		ret = BATTLE_CreateVsEnemy( charaindex, 1, meindex);
	}
	if( ret == 0 ) {
		BattleArray[CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX)].WinFunc	= NPC_NPCEnemy_Dying;
		if( NPC_Util_GetStrFromStrWithDelim( argstr, "startmsg", buf, sizeof( buf))	!= NULL ){
			CHAR_talkToCliAndParty( charaindex, meindex ,buf , CHAR_COLORYELLOW );
		}
		if( NPC_Util_GetStrFromStrWithDelim( argstr, "steal", buf, sizeof( buf))!= NULL ){
			if( atoi( buf) == 0 ) {
				NPC_NPCEnemy_StealItem( argstr, meindex, charaindex);
			}
		}
	}
	return ( ret == 0 ) ?TRUE:FALSE ;
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:41,代码来源:npc_npcenemy.c



注:本文中的NPC_Util_GetStrFromStrWithDelim函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NPT_CHECK_SEVERE函数代码示例发布时间:2022-05-30
下一篇:
C++ NPC_Util_GetArgStr函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap