-static int dndcount=0,dnditm=0;
-
-/* this is the data for the stuff in the dnd store */
-int maxitm=83; /* number of items in the dnd inventory table */
-struct _itm itm[90] = {
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 2, OLEATHER, 0, 3 },
-{ 10, OSTUDLEATHER, 0, 2 },
-{ 40, ORING, 0, 2 },
-{ 85, OCHAIN, 0, 2 },
-{ 220, OSPLINT, 0, 1 },
-{ 400, OPLATE, 0, 1 },
-{ 900, OPLATEARMOR, 0, 1 },
-{ 2600, OSSPLATE, 0, 1 },
-{ 150, OSHIELD, 0, 1 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 2, ODAGGER, 0, 3 },
-{ 20, OSPEAR, 0, 3 },
-{ 80, OFLAIL, 0, 2 },
-{ 150, OBATTLEAXE, 0, 2 },
-{ 450, OLONGSWORD, 0, 2 },
-{ 1000, O2SWORD, 0, 2 },
-{ 5000, OSWORD, 0, 1 },
-{ 16500, OLANCE, 0, 1 },
-{ 6000, OSWORDofSLASHING, 0, 0 },
-{ 10000, OHAMMER, 0, 0 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 150, OPROTRING, 1, 1 },
-{ 85, OSTRRING, 1, 1 },
-{ 120, ODEXRING, 1, 1 },
-{ 120, OCLEVERRING, 1, 1 },
-{ 180, OENERGYRING, 0, 1 },
-{ 125, ODAMRING, 0, 1 },
-{ 220, OREGENRING, 0, 1 },
-{ 1000, ORINGOFEXTRA, 0, 1 },
-
-{ 280, OBELT, 0, 1 },
-
-{ 400, OAMULET, 0, 1 },
-
-{ 6500, OORBOFDRAGON, 0, 0 },
-{ 5500, OSPIRITSCARAB, 0, 0 },
-{ 5000, OCUBEofUNDEAD, 0, 0 },
-{ 6000, ONOTHEFT, 0, 0 },
-
-{ 590, OCHEST, 6, 1 },
-{ 200, OBOOK, 8, 1 },
-{ 10, OCOOKIE, 0, 3 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 20, OPOTION, 0, 6 },
-{ 90, OPOTION, 1, 5 },
-{ 520, OPOTION, 2, 1 },
-{ 100, OPOTION, 3, 2 },
-{ 50, OPOTION, 4, 2 },
-{ 150, OPOTION, 5, 2 },
-{ 70, OPOTION, 6, 1 },
-{ 30, OPOTION, 7, 7 },
-{ 200, OPOTION, 8, 1 },
-{ 50, OPOTION, 9, 1 },
-{ 80, OPOTION, 10, 1 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 30, OPOTION, 11, 3 },
-{ 20, OPOTION, 12, 5 },
-{ 40, OPOTION, 13, 3 },
-{ 35, OPOTION, 14, 2 },
-{ 520, OPOTION, 15, 1 },
-{ 90, OPOTION, 16, 2 },
-{ 200, OPOTION, 17, 2 },
-{ 220, OPOTION, 18, 4 },
-{ 80, OPOTION, 19, 6 },
-{ 370, OPOTION, 20, 3 },
-{ 50, OPOTION, 22, 1 },
-{ 150, OPOTION, 23, 3 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 100, OSCROLL, 0, 2 },
-{ 125, OSCROLL, 1, 2 },
-{ 60, OSCROLL, 2, 4 },
-{ 10, OSCROLL, 3, 4 },
-{ 100, OSCROLL, 4, 3 },
-{ 200, OSCROLL, 5, 2 },
-{ 110, OSCROLL, 6, 1 },
-{ 500, OSCROLL, 7, 2 },
-{ 200, OSCROLL, 8, 2 },
-{ 250, OSCROLL, 9, 4 },
-{ 20, OSCROLL, 10, 5 },
-{ 30, OSCROLL, 11, 3 },
-
-/*cost iven name iven arg how
- gp iven[] ivenarg[] many */
-
-{ 340, OSCROLL, 12, 1 },
-{ 340, OSCROLL, 13, 1 },
-{ 300, OSCROLL, 14, 2 },
-{ 400, OSCROLL, 15, 2 },
-{ 500, OSCROLL, 16, 2 },
-{ 1000, OSCROLL, 17, 1 },
-{ 500, OSCROLL, 18, 1 },
-{ 340, OSCROLL, 19, 2 },
-{ 220, OSCROLL, 20, 3 },
-{ 3900, OSCROLL, 21, 0 },
-{ 610, OSCROLL, 22, 1 },
-{ 3000, OSCROLL, 23, 0 }
- };
+#include "extern.h"
+
+static void handsfull(void);
+static void outofstock(void);
+static void nogold(void);
+static void dnditem(int);
+static void banktitle(const char *);
+static void obanksub(void);
+static void otradhead(void);
+static void cnsitm(void);
+
+static int dndcount = 0, dnditm = 0;
+
+/* number of items in the dnd inventory table */
+#define MAXITM 83
+
+/* this is the data for the stuff in the dnd store */
+struct _itm itm[90] = {
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {2, OLEATHER, 0, 3},
+ {10, OSTUDLEATHER, 0, 2},
+ {40, ORING, 0, 2},
+ {85, OCHAIN, 0, 2},
+ {220, OSPLINT, 0, 1},
+ {400, OPLATE, 0, 1},
+ {900, OPLATEARMOR, 0, 1},
+ {2600, OSSPLATE, 0, 1},
+ {150, OSHIELD, 0, 1},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {2, ODAGGER, 0, 3},
+ {20, OSPEAR, 0, 3},
+ {80, OFLAIL, 0, 2},
+ {150, OBATTLEAXE, 0, 2},
+ {450, OLONGSWORD, 0, 2},
+ {1000, O2SWORD, 0, 2},
+ {5000, OSWORD, 0, 1},
+ {16500, OLANCE, 0, 1},
+ {6000, OSWORDofSLASHING, 0, 0},
+ {10000, OHAMMER, 0, 0},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {150, OPROTRING, 1, 1},
+ {85, OSTRRING, 1, 1},
+ {120, ODEXRING, 1, 1},
+ {120, OCLEVERRING, 1, 1},
+ {180, OENERGYRING, 0, 1},
+ {125, ODAMRING, 0, 1},
+ {220, OREGENRING, 0, 1},
+ {1000, ORINGOFEXTRA, 0, 1},
+
+ {280, OBELT, 0, 1},
+
+ {400, OAMULET, 0, 1},
+
+ {6500, OORBOFDRAGON, 0, 0},
+ {5500, OSPIRITSCARAB, 0, 0},
+ {5000, OCUBEofUNDEAD, 0, 0},
+ {6000, ONOTHEFT, 0, 0},
+
+ {590, OCHEST, 6, 1},
+ {200, OBOOK, 8, 1},
+ {10, OCOOKIE, 0, 3},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {20, OPOTION, 0, 6},
+ {90, OPOTION, 1, 5},
+ {520, OPOTION, 2, 1},
+ {100, OPOTION, 3, 2},
+ {50, OPOTION, 4, 2},
+ {150, OPOTION, 5, 2},
+ {70, OPOTION, 6, 1},
+ {30, OPOTION, 7, 7},
+ {200, OPOTION, 8, 1},
+ {50, OPOTION, 9, 1},
+ {80, OPOTION, 10, 1},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {30, OPOTION, 11, 3},
+ {20, OPOTION, 12, 5},
+ {40, OPOTION, 13, 3},
+ {35, OPOTION, 14, 2},
+ {520, OPOTION, 15, 1},
+ {90, OPOTION, 16, 2},
+ {200, OPOTION, 17, 2},
+ {220, OPOTION, 18, 4},
+ {80, OPOTION, 19, 6},
+ {370, OPOTION, 20, 3},
+ {50, OPOTION, 22, 1},
+ {150, OPOTION, 23, 3},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {100, OSCROLL, 0, 2},
+ {125, OSCROLL, 1, 2},
+ {60, OSCROLL, 2, 4},
+ {10, OSCROLL, 3, 4},
+ {100, OSCROLL, 4, 3},
+ {200, OSCROLL, 5, 2},
+ {110, OSCROLL, 6, 1},
+ {500, OSCROLL, 7, 2},
+ {200, OSCROLL, 8, 2},
+ {250, OSCROLL, 9, 4},
+ {20, OSCROLL, 10, 5},
+ {30, OSCROLL, 11, 3},
+
+ /*
+ * cost iven name iven arg how gp
+ * iven[] ivenarg[] many
+ */
+
+ {340, OSCROLL, 12, 1},
+ {340, OSCROLL, 13, 1},
+ {300, OSCROLL, 14, 2},
+ {400, OSCROLL, 15, 2},
+ {500, OSCROLL, 16, 2},
+ {1000, OSCROLL, 17, 1},
+ {500, OSCROLL, 18, 1},
+ {340, OSCROLL, 19, 2},
+ {220, OSCROLL, 20, 3},
+ {3900, OSCROLL, 21, 0},
+ {610, OSCROLL, 22, 1},
+ {3000, OSCROLL, 23, 0}
+};