View Single Post
Old 03-16-2003, 11:39 PM   #6 (permalink)
stheno
Registered User
 
stheno's Avatar
 
Join Date: Mar 2003
Location: in my head
Posts: 7
stheno is on a distinguished road
object (amulet)

inherit STD_ARMOUR;

int cr_skull;
void reset(int arg) {
::reset(arg);
if(arg) return;
set_name("black lily brooch");
set_alias("amulet");
set_alias("brooch");
set_short("Black Lily Brooch");
set_long("A black lily is encased in clear quartz and mounted "+
"on a silver filigree backing. Black lilies are said to bloom "+
"from the dead bodies of evil beings and will bleed when picked. "+
"Being in possession of one is said to mark you as evil for the "+
"rest of your days.\n");
set_type("amulet");
set_ac(2);
set_weight(2);
set_value(550);
}
int query_no_lock() { return 1; }
int query_magic() { return 1; }

int extra_wear(object ob) **boosts certain class skill**
{
if("/obj/handlers/skill_handler"->get_tot_level("deathmail", ob))

{
if(cr_skull != 1 && ob->query_subclass_name()=="deathknight"){
"/obj/handlers/skill_handler"->adjust_skill("deathmail",5,ob,1);
tell_object(ob,"The aura of death surrounding you grows stronger.\n");
cr_skull = 1;
}
}
}
int extra_unwear(object ob)
{
if (cr_skull)
{
"/obj/handlers/skill_handler"->adjust_skill("deathmail",-5,ob,1);
tell_object(ob, "The aura of death surrounding you weakens slightly.\n");
cr_skull = 0;
}
}

**i will be posting the tutorials for LPC on the tutorials forum shortly so you can see some of the things this code does. sadly, to really learn it, you have to have a "hands on" experience in an LPC MUD**
stheno is offline   Reply With Quote