… | |
… | |
483 | int |
483 | int |
484 | command_fix_me (object *op, char *params) |
484 | command_fix_me (object *op, char *params) |
485 | { |
485 | { |
486 | sum_weight (op); |
486 | sum_weight (op); |
487 | op->update_stats (); |
487 | op->update_stats (); |
|
|
488 | new_draw_info (NDI_UNIQUE, 0, op, "Your character was fixed."); |
|
|
489 | |
488 | return 1; |
490 | return 1; |
489 | } |
491 | } |
490 | |
492 | |
491 | int |
493 | int |
492 | command_logs (object *op, char *params) |
494 | command_logs (object *op, char *params) |
493 | { |
495 | { |
494 | new_draw_info (NDI_UNIQUE, 0, op, "Nobody is currently logging kills."); |
496 | new_draw_info (NDI_UNIQUE, 0, op, "Nobody is currently logging kills."); |
495 | |
497 | |
496 | return 1; |
|
|
497 | } |
|
|
498 | |
|
|
499 | int |
|
|
500 | command_applymode (object *op, char *params) |
|
|
501 | { |
|
|
502 | unapplymode unapply = op->contr->unapply; |
|
|
503 | static const char *const types[] = { "nochoice", "never", "always" }; |
|
|
504 | |
|
|
505 | if (!params) |
|
|
506 | { |
|
|
507 | new_draw_info_format (NDI_UNIQUE, 0, op, "applymode is set to %s", types[op->contr->unapply]); |
|
|
508 | return 1; |
|
|
509 | } |
|
|
510 | |
|
|
511 | if (!strcmp (params, "nochoice")) |
|
|
512 | op->contr->unapply = unapply_nochoice; |
|
|
513 | else if (!strcmp (params, "never")) |
|
|
514 | op->contr->unapply = unapply_never; |
|
|
515 | else if (!strcmp (params, "always")) |
|
|
516 | op->contr->unapply = unapply_always; |
|
|
517 | else |
|
|
518 | { |
|
|
519 | new_draw_info_format (NDI_UNIQUE, 0, op, "applymode: Unknown options %s, valid options are nochoice, never, always", params); |
|
|
520 | return 0; |
|
|
521 | } |
|
|
522 | |
|
|
523 | new_draw_info_format (NDI_UNIQUE, 0, op, "Applymode %s set to %s", |
|
|
524 | (unapply == op->contr->unapply ? "" : " now"), types[op->contr->unapply]); |
|
|
525 | return 1; |
498 | return 1; |
526 | } |
499 | } |
527 | |
500 | |
528 | int |
501 | int |
529 | command_bowmode (object *op, char *params) |
502 | command_bowmode (object *op, char *params) |
… | |
… | |
567 | new_draw_info_format (NDI_UNIQUE, 0, op, buf); |
540 | new_draw_info_format (NDI_UNIQUE, 0, op, buf); |
568 | return 0; |
541 | return 0; |
569 | } |
542 | } |
570 | |
543 | |
571 | new_draw_info_format (NDI_UNIQUE, 0, op, "bowmode %s set to %s", (oldtype == op->contr->bowtype ? "" : "now"), types[op->contr->bowtype]); |
544 | new_draw_info_format (NDI_UNIQUE, 0, op, "bowmode %s set to %s", (oldtype == op->contr->bowtype ? "" : "now"), types[op->contr->bowtype]); |
572 | return 1; |
|
|
573 | } |
|
|
574 | |
|
|
575 | int |
|
|
576 | command_petmode (object *op, char *params) |
|
|
577 | { |
|
|
578 | petmode_t oldtype = op->contr->petmode; |
|
|
579 | static const char *const types[] = { "normal", "sad", "defend", "arena" }; |
|
|
580 | |
|
|
581 | if (!params) |
|
|
582 | { |
|
|
583 | new_draw_info_format (NDI_UNIQUE, 0, op, "petmode is set to %s", types[op->contr->petmode]); |
|
|
584 | return 1; |
|
|
585 | } |
|
|
586 | |
|
|
587 | if (!strcmp (params, "normal")) |
|
|
588 | op->contr->petmode = pet_normal; |
|
|
589 | else if (!strcmp (params, "sad")) |
|
|
590 | op->contr->petmode = pet_sad; |
|
|
591 | else if (!strcmp (params, "defend")) |
|
|
592 | op->contr->petmode = pet_defend; |
|
|
593 | else if (!strcmp (params, "arena")) |
|
|
594 | op->contr->petmode = pet_arena; |
|
|
595 | else |
|
|
596 | { |
|
|
597 | new_draw_info_format (NDI_UNIQUE, 0, op, |
|
|
598 | "petmode: Unknown options %s, valid options are normal," "sad (seek and destroy), defend, arena", params); |
|
|
599 | return 0; |
|
|
600 | } |
|
|
601 | new_draw_info_format (NDI_UNIQUE, 0, op, "petmode %s set to %s", (oldtype == op->contr->petmode ? "" : "now"), types[op->contr->petmode]); |
|
|
602 | return 1; |
545 | return 1; |
603 | } |
546 | } |
604 | |
547 | |
605 | int |
548 | int |
606 | command_showpets (object *op, char *params) |
549 | command_showpets (object *op, char *params) |