Пример #1
0
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);
	}
}
Пример #2
0
static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y )
{
	return NPC_NPCEnemy_Encount( echaraindex, charaindex, 0);
}