version 1.60 | | version 1.61 |
---|
| | |
/* | | /* |
* static char *rcsid_c_misc_c = | | * static char *rcsid_c_misc_c = |
* "$Id: c_misc.c,v 1.60 2005/07/14 16:21:33 ryo_saeba Exp $"; | | * "$Id: c_misc.c,v 1.61 2005/07/16 19:03:01 qal21 Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
int command_petmode(object *op, char *params) | | int command_petmode(object *op, char *params) |
{ | | { |
petmode_t oldtype=op->contr->petmode; | | petmode_t oldtype=op->contr->petmode; |
static char *types[]={"normal", "sad", "defend"}; | | static char *types[]={"normal", "sad", "defend", "arena"}; |
| | |
if (!params) { | | if (!params) { |
new_draw_info_format(NDI_UNIQUE, 0, op, "petmode is set to %s", | | new_draw_info_format(NDI_UNIQUE, 0, op, "petmode is set to %s", |
| | |
op->contr->petmode=pet_sad; | | op->contr->petmode=pet_sad; |
else if (!strcmp(params,"defend")) | | else if (!strcmp(params,"defend")) |
op->contr->petmode=pet_defend; | | op->contr->petmode=pet_defend; |
| | else if (!strcmp(params,"arena")) |
| | op->contr->petmode=pet_arena; |
else { | | else { |
new_draw_info_format(NDI_UNIQUE, 0, op, | | new_draw_info_format(NDI_UNIQUE, 0, op, |
"petmode: Unknown options %s, valid options are normal," | | "petmode: Unknown options %s, valid options are normal," |
"sad (seek and destroy), defend", params); | | "sad (seek and destroy), defend, arena", params); |
return 0; | | return 0; |
} | | } |
new_draw_info_format(NDI_UNIQUE, 0, op, "petmode %s set to %s", | | new_draw_info_format(NDI_UNIQUE, 0, op, "petmode %s set to %s", |