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

C++ NPC_Util_GetArgStr函数代码示例

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

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



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

示例1: NPC_LuckyManTalked

/*********************************
*   ¤·¤«¤±¤é¤ì¤¿»þ¤Î½è  
*********************************/
void NPC_LuckyManTalked( int meindex , int talkerindex , char *szMes ,int color )
{

	char argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char buf[256];
	char token[512];
	int cost;



	/*--  ¤ÎÁ°¤Ë¤¤¤ë¤«¤É¤¦¤«¡ª--*/
	if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2) == FALSE) {
		/* £±¥°¥ê¥Ã¥É°Ê  ¤Î¤ß */
		if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return;
	}
	
	/*--ÀßÄê¥Õ¥¡¥¤¥ë¤ò  ¤ß  ¤ß--*/
	if((argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1)))== NULL) {
		print("NPC_ExChange.c TypeCheck: GetArgStrErr\n");
		print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME));
		return;
	}


	NPC_Util_GetStrFromStrWithDelim( argstr,"Stone", buf, sizeof( buf));
	cost = NPC_GetMoney( meindex, talkerindex, buf);

	NPC_Util_GetStrFromStrWithDelim( argstr,"main_msg", buf, sizeof( buf));
	sprintf( token, buf, cost);
	
	NPC_LuckyMan_selectWindow( meindex, talkerindex, 2, token);

}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:37,代码来源:npc_luckyman.c


示例2: NPC_DoormanInit

BOOL NPC_DoormanInit( int meindex )
{
	char	arg1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *arg;
    char dname[1024];

	/* ¥¤¥Ù¥ó¥È¤Î¥¿¥¤¥×ÀßÄê */
	CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE,CHAR_EVENT_NPC);

    CHAR_setInt( meindex , CHAR_HP , 0 );
    CHAR_setInt( meindex , CHAR_MP , 0 );
    CHAR_setInt( meindex , CHAR_MAXMP , 0 );
    CHAR_setInt( meindex , CHAR_STR , 0 );
    CHAR_setInt( meindex , CHAR_TOUGH, 0 );
    CHAR_setInt( meindex , CHAR_LV , 0 );

    CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE );
    CHAR_setFlg( meindex , CHAR_ISOVERED , 0 );
    CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 );  /*   ·â¤µ¤ì¤Ê¤¤¤è¤ó */

	arg = NPC_Util_GetArgStr( meindex, arg1, sizeof( arg1));

    if(!getStringFromIndexWithDelim( arg, "|", 3, dname, sizeof(dname ))){
        print("RINGO: ³]©w¬ÝªùªÌ®É»Ý­nªùªº¦W¦r­ò¡I:%s:\n",
              arg );
        return FALSE;
    }
    print( "RINGO: Doorman create: arg: %s dname: %s\n",arg,dname);
    CHAR_setWorkChar( meindex , CHAR_WORKDOORMANDOORNAME , dname );

    return TRUE;
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:32,代码来源:npc_doorman.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_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


示例5: NPC_DoormanInit

int NPC_DoormanInit( int meindex )
{
	char	arg[NPC_UTIL_GETARGSTR_BUFSIZE];
    char dname[1024];

	/* 奶矛件玄及正奶皿涩烂 */
	CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE,CHAR_EVENT_NPC);

    CHAR_setInt( meindex , CHAR_HP , 0 );
    CHAR_setInt( meindex , CHAR_MP , 0 );
    CHAR_setInt( meindex , CHAR_MAXMP , 0 );
    CHAR_setInt( meindex , CHAR_STR , 0 );
    CHAR_setInt( meindex , CHAR_TOUGH, 0 );
    CHAR_setInt( meindex , CHAR_LV , 0 );

    CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE );
    CHAR_setFlg( meindex , CHAR_ISOVERED , 0 );
    CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 );  /*   猾今木卅中方氏 */

	NPC_Util_GetArgStr( meindex, arg, sizeof( arg));

    if(!getStringFromIndexWithDelim( arg, "|", 3, dname, sizeof(dname ))){
        print("RINGO: 设定看门者时需要门的名字唷!:%s:\n",
              arg );
        return FALSE;
    }
    print( "RINGO: Doorman create: arg: %s dname: %s\n",arg,dname);
    CHAR_setWorkChar( meindex , CHAR_WORKDOORMANDOORNAME , dname );

    return TRUE;
}
开发者ID:beijunyi,项目名称:custom-sa,代码行数:31,代码来源:npc_doorman.c


示例6: 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


示例7: NPC_LuckyManTalked

/*********************************
*   Øƾ®ØêÈÕľÐ×Áݼ°ÖÊ  
*********************************/
void NPC_LuckyManTalked( int meindex , int talkerindex , char *szMes ,int color )
{

	char argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
	char buf[256];
	char token[512];
	int cost;



	/*--  ¼°ó¡±åÖÐÔ¾®Éýµ¤¾®£¢--*/
	if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2) == FALSE) {
		/* ¨àºëØøÓÀÓñ¶¯  ¼°ÐÄ */
		if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return;
	}
	
	/*--ɬÀð×ÑëÄÌ»ïë  ÐÄ  ÐÄ--*/
	if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) {
		print("NPC_ExChange.c TypeCheck: GetArgStrErr\n");
		print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME));
		return;
	}


	NPC_Util_GetStrFromStrWithDelim( argstr,"Stone", buf, sizeof( buf));
	cost = NPC_GetMoney( meindex, talkerindex, buf);

	NPC_Util_GetStrFromStrWithDelim( argstr,"main_msg", buf, sizeof( buf));
	sprintf( token, buf, cost);
	
	NPC_LuckyMan_selectWindow( meindex, talkerindex, 2, token);

}
开发者ID:BlueKarl,项目名称:gmsv,代码行数:36,代码来源:npc_luckyman.c


示例8: NPC_WarpManInit

BOOL NPC_WarpManInit( int meindex )
{
	char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE - 1024 * 20];
	char buff2[256];
	char buf[1024];
	int fl,x,y;
		
	if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){
		print("WarpMan:GetArgStrErr");
		return FALSE;
	}
   	CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWARPMAN );
#ifdef _NEW_WARPMAN
	if( strstr( npcarg,"NEWWARPMAN") )      {
			//timeman 功能
			CHAR_setWorkInt( meindex, NPC_TIME_MODE, 1);
			if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buff2, sizeof( buff2)) != NULL ){
				CHAR_setInt( meindex, CHAR_LOOPINTERVAL, 60*1000);
			}
#ifdef _TREASURE_BOX
			CHAR_setWorkInt( meindex, NPC_TIME_EVENTMODE, NPC_EVENTMODE_NONE);
			if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_BOX", buff2, sizeof( buff2)) != NULL ){
				if( strstr( buff2, "ON") != NULL ){
					CHAR_setWorkInt( meindex, NPC_TIME_EVENTMODE, NPC_EVENTMODE_EVENT);
					CHAR_setWorkInt( meindex, NPC_TIME_EVENTTIME, NowTime.tv_sec);
					if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_ONBBI", buff2, sizeof( buff2)) != NULL )
						CHAR_setWorkInt( meindex, NPC_TIME_EVENONBBI, atoi( buff2));
					if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_OFFDBBI", buff2, sizeof( buff2)) != NULL )
						CHAR_setWorkInt( meindex, NPC_TIME_EVENOFFDBBI, atoi( buff2));
					CHAR_setWorkInt( meindex, NPC_TIME_EVENTNUM, 0 );
				}
			}

#endif
			return TRUE;
	}else{
#endif
		if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf))==NULL){
			char filename[256];
			 if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL )
				 print("\n Warpman Err -> file:%s", filename);
			return FALSE;
		}
		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);
		if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){
			char filename[256];
			NPC_Util_CheckAssignArgFile( meindex, filename);
			print( "\nWarp NPC: filename:%s\n 3.Invalid warpman ERR %d %d %d" , filename, fl , x , y );
			return FALSE;
		}
#ifdef _NEW_WARPMAN
	}
#endif
	return TRUE;
}
开发者ID:ChowZenki,项目名称:Long-Sa-Source,代码行数:60,代码来源:npc_warpman.c


示例9: NPC_SimpleShopTalked

void NPC_SimpleShopTalked( int meindex, int talker, char *msg, int color )
{
#define SHOPRANGE 3
    char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX];
    if( CHAR_getInt( talker,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){
        return;
    }
    if( NPC_Util_charIsInFrontOfChar( talker, meindex, SHOPRANGE )
        && ! CHAR_getFlg( talker,CHAR_ISDIE )  ){
        NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg));
        getStringFromIndexWithDelim( npcarg,"|", OPENSHOPTOKEN,token, sizeof(token));
        if( NPC_SimpleShopOpenShopOrNot( msg, token )
           && NPC_Util_isFaceToFace( meindex, talker, SHOPRANGE ) ){
            CHAR_setWorkInt( meindex, CHAR_WORKSHOPCLIENTINDEX, talker );
            NPC_SimpleShopOpenShopWindow( meindex, talker, npcarg );
        }else{
            int tokennum;
            int i;
            char tmp[NPC_UTIL_GETARGSTR_LINEMAX];
            getStringFromIndexWithDelim( npcarg,"|", MSGTOKEN,token, sizeof(token));
            tokennum = 1;
            for( i=0;token[i]!='\0';i++ ){
                if( token[i] == ',' ) tokennum++;
            }
            getStringFromIndexWithDelim( token,",", rand()%tokennum+1,tmp, sizeof(tmp));
            CHAR_talkToCli( talker, meindex, tmp, CHAR_COLORWHITE );
        }
    }
}
开发者ID:darciusal,项目名称:stoneagecode,代码行数:29,代码来源:npc_simpleshop.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_NPCEnemyWatch

void NPC_NPCEnemyWatch( int meobjindex, int objindex, CHAR_ACTION act,
                    int x,int y,int dir, int* opt,int optlen )
{
	int born, dead;
	int meindex, index;
	char npcarg1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *npcarg;

	if( OBJECT_getType( objindex) != OBJTYPE_CHARA) return;
	index = OBJECT_getIndex( objindex);
	if( !CHAR_CHECKINDEX( index) ) return;
	if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return;
    meindex = OBJECT_getIndex( meobjindex);
	if( !CHAR_CHECKINDEX( meindex) ) return;

	if((npcarg = NPC_Util_GetArgStr( meindex, npcarg1, sizeof(npcarg1))) == NULL ){
		print("WarpMan:GetArgStrErr");
		return;
	}
	if( !strstr( npcarg,"NEWNPCENEMY") )
		return;
	if( NPC_getTimeData( meindex, npcarg, &born, &dead, 200) == FALSE )
		return;
	
	NPC_TimeDefineDo( meindex, born, dead, NPC_TIME_MODE);

	CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) );

}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:29,代码来源:npc_npcenemy.c


示例12: NPC_NPCEnemyTalked

void NPC_NPCEnemyTalked( int meindex , int talkerindex , char *szMes ,
					 int color )
{
	char	npcarg1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *npcarg;
	char	buf[256];

	if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) {
		return;
	}
	if((npcarg = NPC_Util_GetArgStr( meindex, npcarg1, sizeof( npcarg1))) == NULL )	{
		print("Can't GetArgStr !!");
		return;
	}
	if( NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buf, sizeof( buf)) != NULL ){
		if( CHAR_getWorkInt( meindex, NPC_TIME_MODE) <= 0 )	{
			if( NPC_Util_GetStrFromStrWithDelim( npcarg, "Time_Msg", buf, sizeof( buf) ) != NULL)	{
				CHAR_talkToCli( talkerindex, meindex, buf, CHAR_COLORYELLOW);
			}
			return;
		}
	}
	if( !NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 1 ))
		return; 
	if( CHAR_getWorkInt( meindex, CHAR_WORK_ENCOUNTTYPE) >= 1 ) {
		NPC_NPCEnemy_Encount( meindex, talkerindex, 1);
	}
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:28,代码来源:npc_npcenemy.c


示例13: NPC_DepotItem_Depot_printWindow

void NPC_DepotItem_Depot_printWindow( int meindex, int talkerindex)
{
	char	itemstring[65536-1024];
	char	sendstring[65536];
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buff[1024];
	char	buff2[1024];
	char	buff3[1024];
	int fd;
	
	if( (fd = getfdFromCharaIndex( talkerindex)) == -1 )return;
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	snprintf( sendstring, sizeof( sendstring), "1|%s|%s|%s|%s|",
			CHAR_getChar( meindex, CHAR_NAME),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_DRAW, argstr, buff2, sizeof( buff2)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_ITEMFULL, argstr, buff, sizeof( buff)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, argstr, buff3, sizeof( buff3))
			);
	NPC_DepotItem_MakeDepotString( meindex, talkerindex, itemstring, sizeof( itemstring));
	strcat( sendstring, itemstring);
	lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
				WINDOW_BUTTONTYPE_NONE, 
				CHAR_WINDOWTYPE_DEPOTITEMSHOP_GET,
				CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),
				sendstring);
	
	//print("\n NPC_DepotItem_Depot_printWindow:%s size:%d ", sendstring, strlen(sendstring));
}
开发者ID:ChowZenki,项目名称:SMO-Sa-Source,代码行数:29,代码来源:npc_poolitemshop.c


示例14: 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


示例15: NPC_RoomAdminNew_DspNextAuction

/*-----------------------------------------------
 * ¼¡²ó³«ºÅ»þ´Ö¡¤Éô²°¤ò¸À¤¦
 *----------------------------------------------*/
static void NPC_RoomAdminNew_DspNextAuction( int meindex, int talkerindex)
{
	char    msgbuf[2048];
	time_t  closetime;
	
	closetime = CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME);
	/* ¼¡¤Î³«ºÅ»þ´Ö¤¬·è¤Þ¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¡Ö·è¤Þ¤Ã¤Æ¤Þ¤»¤ó¡£¡×¥á¥Ã¥»¡¼¥¸*/
	if( closetime == 0 ) {
		snprintf( msgbuf, sizeof( msgbuf),
					NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION_NONE
				);
		CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR);
	}
	else {
		int     doorindex;
		char    argstr[NPC_UTIL_GETARGSTR_BUFSIZE];
		char    explain[1024];      /*ÀâÌÀ*/
		char	buff[16];
		struct  tm tmwk;
		int     difftime;
		/* Éô²°¾ðÊó¤ò¼èÆÀ */
		doorindex = NPC_DoorSearchByName( 
					CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM));
		NPC_Util_GetArgStr( doorindex, argstr, sizeof( argstr));
		getStringFromIndexWithDelim(argstr, "|" , 9 , explain,sizeof(explain));
		/* Éô²°¾ðÊó*/
		if( strlen(CHAR_getChar( doorindex, CHAR_NAME) ) != 0 ) {
			strcpy( buff, "¸¹«Ç");
		}
		else {
			buff[0] = '\0';
		}
		snprintf( msgbuf, sizeof( msgbuf),
					NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION1,
					explain,
					CHAR_getChar( doorindex, CHAR_NAME),
					buff
				);
		CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR);
		/* Äù¤áÀÚ¤ê»þ´Ö */
		memcpy( &tmwk, localtime( &closetime), sizeof( tmwk));
		difftime = closetime - NowTime.tv_sec;
		snprintf( msgbuf, sizeof( msgbuf),
					NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION2,
					tmwk.tm_hour,
					tmwk.tm_min,
					difftime / 3600,
					(difftime % 3600) / 60
				);
		CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR);
		
		/* ²¼¸Â¶â³Û */
		snprintf( msgbuf, sizeof( msgbuf),
					NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION3,
					CHAR_getWorkChar( doorindex, CHAR_WORKDOORGOLDLIMIT)
				);
		CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR);
	}
	
}
开发者ID:fanminjian,项目名称:Original-Sa-Source,代码行数:63,代码来源:npc_roomadminnew.c


示例16: 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


示例17: NPC_NPCEnemy_BattleIn

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

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

	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:chinaSaber,项目名称:custom-sa,代码行数:29,代码来源:npc_npcenemy.c


示例18: 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


示例19: NPC_TownPeopleTalked

/*
 *   仄井仃日木凶午五反NPCARGUMENT毛公及引引  允〔
 */
void NPC_TownPeopleTalked( int index, int talker, char *msg, int color )
{
	char arg1[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX];
	char *arg;
    int i, tokennum;

    /* 3弘伉永玉動  及樺寧分仃忒蠶允月 */

	if( CHAR_getInt(talker,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER 
        && NPC_Util_charIsInFrontOfChar( talker, index, 3 ) ){

        arg = NPC_Util_GetArgStr( index, arg1, sizeof( arg1));

        tokennum = 1;
        /* 戊件穴匹嗉濠日木凶玄□弁件互窒仇丐月井醒尹月 */
        for( i=0;arg[i]!='\0';i++ ){
            if( arg[i] == ',' ) tokennum++;
        }

        /* 仿件母丞匹升木毛韻月井瑁戶化}公及玄□弁件毛潸曰分允 */
        getStringFromIndexWithDelim( arg,",",
                                     rand()%tokennum+1,token, sizeof(token));

        CHAR_talkToCli( talker, index, token, CHAR_COLORWHITE );
    }
}
开发者ID:Nurarihyo,项目名称:smo-sa,代码行数:29,代码来源:npc_townpeople.c


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ NPC_Util_GetStrFromStrWithDelim函数代码示例发布时间:2022-05-30
下一篇:
C++ NPC_UpdateAngles函数代码示例发布时间: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