#include <mudlib.h> #include <ansi.h> inherit ROOM; static object elf; void make_items(status arg); void reset(status arg) { reset_doors(arg); load_door(({ "file", "room/city/pub/pub", "direction", "east door", "key id", "city key", "long", "A large wooden door with a peep hole in the center.\n"+ "Above the door hangs a sign which reads: "+ BOLD+BLINK+"Skandle's Downfall"+OFF+"\n", })); if(!find_living("earothas") || !elf) { elf = clone_object(MONSTER); elf -> set_name("earothas"); elf -> set_short("Lieutenant Earothas of the city guard"); elf -> set_long( "The lieutenant is a strong, sturdy elf of about 22 human years, \n"+ "with the muscle many warriors would be jealous of. He is here \n"+ "to make sure that no one gets into any trouble.\n"); elf -> set_al(1000); /* what a nice guy */ elf -> set_race("elf"); elf -> set_wander(75, 120); elf -> add_spell_immunity("charm"); elf -> add_spell_immunity("fire"); elf -> set_gender(1); elf -> load_chat(10, ({ "Earothas says: Move along quietly then.\n", "Earothas asks: What are you doing here, fair stranger?\n", "Earothas polishes his longsword.\n", "Earothas polishes his breastplate.\n", "Earothas watches your movements closely.\n", "Earothas says: Make no trouble while you stay in Tempus.\n", "Earothas says: Hello fair traveller.\n", })); elf -> load_a_chat(8,({ "Earothas exclaims: Foul beast!\n", "Earothas frowns.\n", "Earothas you dare make me an enemy!\n", "Earothas says: You shall die, pittiful beast.\n", "Earothas defends against your blow.\n", "Earothas deflects your blow.\n", "Earothas parries your attack.\n", })); elf -> add_class("mage"); elf -> add_class("fighter"); elf -> load_spells(20,({ "fire shield", "burning hands", "comet", "chill touch", "ice storm", "stoneskin", "chain lightning", "death spell", "hold person", "pws", "pwk", "meteor swarm", })); elf -> set_level(30); elf -> set_hp(2500); elf -> add_money(100 + random(500)); elf -> set_magic_resist(25 + random(50)); elf -> set_heart_ob(this_object()); move_object(elf, this_object()); } make_items(arg); if(arg) return; set_short("Market Street"); set_long( "\tMarket Street\n"+ "Fine grey cobblestones line the way up and down the long \n"+ "busy market street; a place where all kinds of business \n"+ "takes place. The wall of the city gardens opens at its \n"+ "east gate here, and the city inn stands to the east. \n"); set_night_desc( "The light from the inn shines down on the grey cobblestones \n"+ "highlighting their excelent workmanship.\n"); set_day_desc( "The street is still a little messy from last nights drinking.\n"); set_night_items(({ "light", "A light from one of the inn's windows", "window", "There is a woman at the window, peering out into the street", "woman", "She is very beautiful", })); set_day_items(({ "mess", "A few bottles lie on the street, waiting to be cleaned up", })); set_items(({ "cobblestone#cobblestones", "The cobblestones are excelently chiseled, possibly from \n"+ "the dwarvish mines to the far north", "wall", "The walls to the city gardens are to the west", "inn", "Skandles Downfall; the city inn", })); set_weather(1,1,0); set_exits(({ "room/city/market3", "north", "room/city/market5", "south", "room/city/garden/e_gate", "west", })); } void monster_heart_beat() { int i; object *bandit; string tmp1, tmp2; if(!sscanf(file_name(environment(find_living("earothas"))), "%sroom/city%s", tmp1, tmp2)) { tell_room(environment(find_living("earothas")), "Earothas begins chanting in an ancient language...\n"+ "Earothas vanishes with a pop!\n"); move_object(find_living("earothas"), this_object()); tell_room(environment(find_living("earothas")), "Earothas appears in a puff of smoke!\n"); } bandit = all_inventory(environment(elf)); for(i=0; i<sizeof(bandit); i++) { /* this will be a little NPC combat fun */ if(bandit[i]->id("orc") && living(bandit[i]) && bandit[i]->query_class("thief") && /* snicker */ bandit[i]->query_level() > 5) { if(!bandit[i]->add_secondary_attacker(elf)) bandit[i]->hit_player(10); if(!random(5)) tell_room(environment(elf), "Earothas exclaims: Putrid orc!\n"); /* he hates orcs */ } if(bandit[i]) if(bandit[i] -> query_alignment() < -50) { if(!random(4)) tell_room(environment(elf), "Earothas exclaims: Evil scum!\n"); if(bandit[i]->query_level() > 5) bandit[i] -> hit_player(random(5)); /* ouch! */ } if(bandit[i]) /* just in case it is now dead or something */ if(bandit[i] ->id("corpse")) { tell_room(environment(elf), "Earothas takes the corpse.\n"); move_object(bandit[i], elf); } } } void make_items(status arg) { object obj, obj2; if(arg) return; if(!present("sword"), find_living("earothas")) move_object(clone_object("room/city/obj/lsword"),find_living("earothas")); if(!present("platemail"), find_living("earothas")) move_object(clone_object("room/city/obj/plate"),find_living("earothas")); if(!present("shield"),find_living("earothas")) { obj = clone_object(ARMOUR); obj -> set_name("shield"); obj -> set_type("shield"); obj -> set_ac(2); /* because he is so tough */ obj -> set_weight(2); obj -> set_value(600); obj -> set_short("A silver shield"); obj -> set_long( "This shield bears elvish designs across its middle.\n"+ "The crest on the front is the design of the Tempus \n"+ "city guards."); move_object(obj,elf); } find_living("earothas")->init_command("wear platemail"); find_living("earothas")->init_command("wear shield"); find_living("earothas")->init_command("wield sword"); elf -> set_wc(30); elf -> set_ac(20); }