version 1.82 | | version 1.83 |
---|
| | |
/* | | /* |
* static char *rcsid_monster_c = | | * static char *rcsid_monster_c = |
* "$Id: monster.c,v 1.82 2005/07/28 07:23:19 qal21 Exp $"; | | * "$Id: monster.c,v 1.83 2005/08/12 08:18:59 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* Returns NULL if no match is found. | | * Returns NULL if no match is found. |
* The player is passed too, so that quest-related messages can be checked too. | | * The player is passed too, so that quest-related messages can be checked too. |
*/ | | */ |
static char *find_matching_message(object* pl, char *msg, char *match) | | static char *find_matching_message(object* pl, const char *msg, const char *match) |
{ | | { |
char *cp=msg, *cp1, *cp2, regex[MAX_BUF], *cp3, gotmatch=0; | | const char *cp=msg, *cp1, *cp2; |
| | char *cp3, regex[MAX_BUF], gotmatch=0; |
| | |
while (1) { | | while (1) { |
if (strncmp(cp, "@match ", 7)) { | | if (strncmp(cp, "@match ", 7)) { |
| | |
} | | } |
} | | } |
| | |
int talk_to_npc(object *op, object *npc, char *txt) { | | int talk_to_npc(object *op, object *npc, const char *txt) { |
object *cobj; | | object *cobj; |
CFParm CFP; | | CFParm CFP; |
int k, l, m; | | int k, l, m; |
| | |
n = 0; | | n = 0; |
CFP.Value[0] = &k; | | CFP.Value[0] = &k; |
CFP.Value[1] = op; | | CFP.Value[1] = op; |
CFP.Value[4] = txt; | | CFP.Value[4] = (void*)txt; |
CFP.Value[5] = &n; | | CFP.Value[5] = &n; |
CFP.Value[6] = &m; | | CFP.Value[6] = &m; |
CFP.Value[7] = &m; | | CFP.Value[7] = &m; |
| | |
return 0; | | return 0; |
} | | } |
| | |
int talk_to_wall(object* pl, object *npc, char *txt) { | | int talk_to_wall(object* pl, object *npc, const char *txt) { |
char *cp; | | char *cp; |
| | |
if(npc->msg == NULL || *npc->msg != '@') | | if(npc->msg == NULL || *npc->msg != '@') |