|
Vwear command, cont. [by Christian Duvall] |
|
|
|
Posted Wednesday, August 12th @ 11:38:40 PM, by George Greer in the Wizard dept.
Updated Jun 23, 1997. Click the link below to read it or download it.
From: Christian Duvall <chris@dp.net>
Subject: Addition to vwear
I added this because I wanted to see keys, lights, etc. So while I was
at it I did the majority of item types :)
I give full credit to WarRat <warrat@erinet.com> and Chris Jacobson
<fear@athenet.net> I merely added a new option to the already wonderful
command.
Please email me if you use this, like or hate one way or the other.
Thank you.
chris@dp.net
in db.h
void vwear_obj(int type, struct char_data * ch);
in db.c
void vwear_obj(int type, struct char_data * ch)
{
int nr, found =0;
for (nr = 0; nr <= top_of_objt; nr++) {
if (GET_OBJ_TYPE(&obj_proto[nr]) == type) {
sprintf(buf, "%3d. [%5d] %s\r\n", ++found,
obj_index[nr].virtual, obj_proto[nr].short_description);
send_to_char(buf, ch);
}
}
}
in act.wizard.c replace do_vwear with or add what I remarked
ACMD(do_vwear)
{
one_argument(argument, buf);
if (!*buf) {
send_to_char("Usage: vwear <wear position>\r\n"
"Wear positions are:\r\n"
"finger neck body head legs feet hands\r\n"
"shield arms about waist wrist wield hold\r\n"
"------------------------------------------------------\r\n"
"Item types are:\r\n"
"light scroll wand staff treasure armour \r\n" /* show types
*/
"potion worn other trash container liquid \r\n"
"key food money pen boat fountain\r\n", ch);
return;
}
if (is_abbrev(buf, "finger"))
vwear_object(ITEM_WEAR_FINGER, ch);
else if (is_abbrev(buf, "neck"))
vwear_object(ITEM_WEAR_NECK, ch);
else if (is_abbrev(buf, "body"))
vwear_object(ITEM_WEAR_BODY, ch);
else if (is_abbrev(buf, "head"))
vwear_object(ITEM_WEAR_HEAD, ch);
else if (is_abbrev(buf, "legs"))
vwear_object(ITEM_WEAR_LEGS, ch);
else if (is_abbrev(buf, "feet"))
vwear_object(ITEM_WEAR_FEET, ch);
else if (is_abbrev(buf, "hands"))
vwear_object(ITEM_WEAR_HANDS, ch);
else if (is_abbrev(buf, "arms"))
vwear_object(ITEM_WEAR_ARMS, ch);
else if (is_abbrev(buf, "shield"))
vwear_object(ITEM_WEAR_SHIELD, ch);
else if (is_abbrev(buf, "about body"))
vwear_object(ITEM_WEAR_ABOUT, ch);
else if (is_abbrev(buf, "waist"))
vwear_object(ITEM_WEAR_WAIST, ch);
else if (is_abbrev(buf, "wrist"))
vwear_object(ITEM_WEAR_WRIST, ch);
else if (is_abbrev(buf, "wield"))
vwear_object(ITEM_WEAR_WIELD, ch);
else if (is_abbrev(buf, "hold"))
vwear_object(ITEM_WEAR_HOLD, ch);
else if (is_abbrev(buf, "light")) /* Start of new vwear- Item types */
vwear_obj(ITEM_LIGHT, ch);
else if (is_abbrev(buf, "scroll"))
vwear_obj(ITEM_SCROLL, ch);
else if (is_abbrev(buf, "wand"))
vwear_obj(ITEM_WAND, ch);
else if (is_abbrev(buf, "staff"))
vwear_obj(ITEM_STAFF, ch);
else if (is_abbrev(buf, "treasure"))
vwear_obj(ITEM_TREASURE, ch);
else if (is_abbrev(buf, "armor"))
vwear_obj(ITEM_ARMOR, ch);
else if (is_abbrev(buf, "potion"))
vwear_obj(ITEM_POTION, ch);
else if (is_abbrev(buf, "worn"))
vwear_obj(ITEM_WORN, ch);
else if (is_abbrev(buf, "other"))
vwear_obj(ITEM_OTHER, ch);
else if (is_abbrev(buf, "trash"))
vwear_obj(ITEM_TRASH, ch);
else if (is_abbrev(buf, "container"))
vwear_obj(ITEM_CONTAINER, ch);
else if (is_abbrev(buf, "liquid"))
vwear_obj(ITEM_DRINKCON, ch);
else if (is_abbrev(buf, "key"))
vwear_obj(ITEM_KEY, ch);
else if (is_abbrev(buf, "food"))
vwear_obj(ITEM_FOOD, ch);
else if (is_abbrev(buf, "money"))
vwear_obj(ITEM_MONEY, ch);
else if (is_abbrev(buf, "pen"))
vwear_obj(ITEM_PEN, ch);
else if (is_abbrev(buf, "boat"))
vwear_obj(ITEM_BOAT, ch);
else if (is_abbrev(buf, "fountain"))
vwear_obj(ITEM_FOUNTAIN, ch);
else
send_to_char("Possible positions are:\r\n"
"Wear positions are:\r\n"
"finger neck body head legs feet hands\r\n"
"shield arms about waist wrist wield hold\r\n"
"------------------------------------------------------\r\n" /* new t
ypes */
"Item types are:\r\n"
"light scroll wand staff treasure armour \r\n"
"potion worn other trash container liquid \r\n"
"key food money pen boat fountain\r\n", ch);
}
Christian Duvall
chris@dp.net
-take no responsibility for damage, crash, blah blah by use of this
snippet. Works perfect for my couple muds and it was cut and pasted.
<< Vwear command [by WarRat] | Reply | View as text | Flattened | Vwear command, cont. [by James A. Young] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|