GRANDBOM.C
LIB3/D/HOME/CITY/MONSTERS/GRANDBOM.C · 2.2 KB
From the archive nm4dos.zip
Download the archive « Back to the archive contents
#include "/d/home/city/monsters/path.h"
inherit DEFMONSTER;
object guard;
setup()
{
set_name("Lady Grandbom");
set_short("Lady Grandbom");
set_level(60+random(20));
set_long("Lady Granbom is a rich old lady.\n");
set_al(0);
set_gender(2);
set_race("human");
set_aggressive(0);
add_alias("lady");
add_alias("grandbom");
adjust_money(random(10),"silver");
add_move_zone("mid");
clone_object(ITEMS+"necklace.c")->move(this_object());
clone_object(WEAPONS+"grand.wep")->move(this_object());
clone_object(ARMOURS+"grand.arm")->move(this_object());
init_equip();
load_chat(20, ({
1, ":looks down on you, why not, you are a lower class.\n",
1, ":thinks you are beneath her.\n",
1, "'why are you here, get away from me you poor thing.\n",
1, ":takes pity on you and thinks about giving you money.\n",
1, ":hides her purse from you, you might be a lowlife thief.\n",
}));
load_a_chat(50, ({
1, "'get away from me.\n",
1, ":trys to run away but she is not quite as nimble as she used to be.\n",
1, "'if you leave me I will let you have my money.\n",
1, ":offers you a small pouch filled with coins.\n",
1, ":screams for help.\n",
}));
call_out("cloneguard",1);
}
attack_by(object attacker)
{
if(guard)
if(guard && environment(guard) == environment(this_object()))
{
if(attacker)
{
tell_room(environment(this_object()),"Lady Grandbom's body guard decides "+
"to do what he is paid for and attacks "+attacker->query_cap_name()+".\n",attacker);
tell_object((attacker),"The body guard decides to do what he is paid "+
"for and protects Lady Grandbom.\n");
guard->attack_ob(attacker);
}
else
tell_room(environment(this_object()), "Lady Grandbom's body guard looks about for somebody to attack.\n");
}
else
{
tell_room(environment(this_object()), "Lady Grandbom sreetches out: Help! Guards! GUARDS!\n");
call_out("cloneguard", 5);
}
return ::attack_by(attacker);
}
cloneguard()
{
if(!guard)
{
guard=clone_object(MONSTERS+"body_guard.c");
guard->move(environment(this_object()));
guard->command("follow "+query_name());
tell_room(environment(this_object()), "Lady Grandbom's personal security guard arrives to protect her.\n");
}
return;
}