TOOTHB.C

LIB3/D/HOME/CITY/ITEMS/MISC/TOOTHB.C · 866 B

From the archive nm4dos.zip

Download the archive   « Back to the archive contents

#include "/d/home/city/items/foods/path.h"
inherit "/std/object";
 
string colour;
 
setup()
{
set_name("Toothbrush");
set_short("Toothbrush");
set_main_plural("Toothbrushes");
set_value(20);
set_weight(6);
add_alias("brush");
add_alias("toothbrush");
 add_plural("brushes");
}
 
void init_static_arg(mixed arg)
{
colour=arg;
 set_long("You see a " +colour+ " toothbrush, it's bristles are very sensuous.\n");
}
 
mixed query_static_auto_load()
{
return colour;
}
 
void choose_colour()
{
switch(random(8))
{
case 0:
init_static_arg("red");
break;
case 1:
init_static_arg("blue");
break;
case 2:
init_static_arg("black");
break;
case 3:
init_static_arg("green");
break;
case 4:
init_static_arg("brown");
break;
case 5:
init_static_arg("yellow");
break;
case 6:
init_static_arg("subtly shaded purple");
break;
case 7:
init_static_arg("orange and green striped");
}
}

Site Stats

Snippets: 1791
Codebases: 571