73 lines
2.1 KiB
C
73 lines
2.1 KiB
C
![]() |
#include "version.h"
|
|||
|
#include "object.h"
|
|||
|
#include "char_base.h"
|
|||
|
#include "char.h"
|
|||
|
#include "util.h"
|
|||
|
#include "handletime.h"
|
|||
|
#include "anim_tbl.h"
|
|||
|
#include "npc_door.h"
|
|||
|
#include "lssproto_serv.h"
|
|||
|
#include "npcutil.h"
|
|||
|
|
|||
|
|
|||
|
/*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̫<EFBFBD><EFBFBD> by nakamura
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>TownPeople
|
|||
|
* <EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>NPCARGUMENT<EFBFBD><EFBFBD> ٯ ë <EFBFBD>ƾ<EFBFBD><EFBFBD>껯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD> <EFBFBD>ʣ<EFBFBD>
|
|||
|
*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ף<EFBFBD>npcarg<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD><EFBFBD>з<EFBFBD>,<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>廥<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѩë<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD> <EFBFBD>Ѽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë
|
|||
|
* ̤<EFBFBD>ʳ<EFBFBD><EFBFBD>绥ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>ĸةƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>
|
|||
|
* npcgen.perl ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> MANƥؤ<EFBFBD>£<EFBFBD> MSG<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ئԪ<EFBFBD><EFBFBD>ئؤ
|
|||
|
*
|
|||
|
*/
|
|||
|
|
|||
|
/*
|
|||
|
* <EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>巴NPCARGUMENTë<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʣ<EFBFBD>
|
|||
|
*/
|
|||
|
void NPC_TownPeopleTalked( int index, int talker, char *msg, int color )
|
|||
|
{
|
|||
|
char arg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX];
|
|||
|
int i, tokennum;
|
|||
|
|
|||
|
/* 3<><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߯<EFBFBD><DFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
|
|||
|
if( CHAR_getInt(talker,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER
|
|||
|
&& NPC_Util_charIsInFrontOfChar( talker, index, 3 ) ){
|
|||
|
|
|||
|
NPC_Util_GetArgStr( index, arg, sizeof( arg));
|
|||
|
|
|||
|
tokennum = 1;
|
|||
|
/* <20><><EFBFBD><EFBFBD>Ѩƥ<D1A8><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ϳ<EFBFBD>ؤ<EFBFBD>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
for( i=0;arg[i]!='\0';i++ ){
|
|||
|
if( arg[i] == ',' ) tokennum++;
|
|||
|
}
|
|||
|
|
|||
|
/* <20>¼<EFBFBD>ĸةƥ<D8A9><C6A5>ľë<C4BE><C3AB><EFBFBD>¾<EFBFBD>裻<EFBFBD><E8A3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD>ë<EFBFBD><C3AB>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD> */
|
|||
|
getStringFromIndexWithDelim( arg,",",
|
|||
|
rand()%tokennum+1,token, sizeof(token));
|
|||
|
|
|||
|
CHAR_talkToCli( talker, index, token, CHAR_COLORWHITE );
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>
|
|||
|
*/
|
|||
|
BOOL NPC_TownPeopleInit( int meindex )
|
|||
|
{
|
|||
|
|
|||
|
//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 , 1 );
|
|||
|
//CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); /* <20><><EFBFBD><EFBFBD>ľئ<C4BE>з<EFBFBD><D0B7><EFBFBD> */
|
|||
|
|
|||
|
return TRUE;
|
|||
|
}
|