00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "interface.h"
00023 #include "mech.h"
00024 #include "create.h"
00025 #include "btechstats_global.h"
00026 #include "coolmenu.h"
00027 #include "mycool.h"
00028 #include "p.mech.utils.h"
00029 #include "p.glue.scode.h"
00030
00031 extern HASHTAB playervaluehash;
00032 extern HASHTAB playervaluehash2;
00033
00034 #define IsHCO(ref) WizP(ref)
00035
00036 void do_show(dbref player, dbref cause, int key, char *arg1, char *arg2)
00037 {
00038 int i;
00039 enum {
00040 CHAVA, CHVAL, CHSKI, CHADV, CHATT,
00041 MECHVALUES
00042 };
00043 char *cmds[] = { "allvalues",
00044 "values", "skills", "advantages",
00045 "attributes", "xcodevalues", NULL
00046 };
00047 char *cmds_help[] = { "[char_]allvalues", "[char_]values",
00048 "[char_]skills", "[char_]advantages", "[char_]attributes",
00049 "xcodevalues [scode]", NULL
00050 };
00051 char buf[MBUF_SIZE];
00052
00053 DOCHECK(!IsHCO(player), "You aren't cleared to know this stuff yet!");
00054
00055 if(!arg1 || !*arg1) {
00056 strcpy(buf, "Valid arguments:");
00057 for(i = 0; cmds_help[i]; i++)
00058 sprintf(buf + strlen(buf), "%c %s", i > 0 ? ',' : ' ',
00059 cmds_help[i]);
00060 notify(player, buf);
00061 return;
00062 }
00063 i = listmatch(cmds, arg1);
00064
00065 switch (i) {
00066 case MECHVALUES:
00067 list_xcodevalues(player);
00068 return;
00069 case CHAVA:
00070 list_charvaluestuff(player, -1);
00071 return;
00072 case CHVAL:
00073 list_charvaluestuff(player, CHAR_VALUE);
00074 return;
00075 case CHSKI:
00076 list_charvaluestuff(player, CHAR_SKILL);
00077 return;
00078 case CHADV:
00079 list_charvaluestuff(player, CHAR_ADVANTAGE);
00080 return;
00081 case CHATT:
00082 list_charvaluestuff(player, CHAR_ATTRIBUTE);
00083 return;
00084 }
00085 notify(player, "Invalid arguments to +show command!");
00086 return;
00087 }