int DeathSequence(object killer, string cause, status nocorpse) { tell_object(me,sprintf( "%s just tried to kill you. You exact revenge.", killer->query_name())); tell_room(ENV(me),sprintf( "Just as %s is about to die, a protective shield surrounds %s!" "%s has his revenge on %s!\n", me->query_name(),objective(me),subjective(me), killer->query_name()),({me}));
string living_description (object ob) { object *inv; int i; string a1, a2, tmp, reg, race, raceat, short, gender, genat; reg = (string)ob->query ("long"); if (!reg) reg = ""; race = (string)ob->query ("race"); raceat = article (race) + " " + race; gender = (string)ob->query ("gender"); genat = ((viewingOb == ob) ? "You are" : capitalize (subjective (gender)) + " is"); i = sizeof (inv = all_inventory(ob)); while (i--) if (tmp = inv[i]->query ("extra_look")) { while (sscanf(tmp, "%s$N%s", a1, a2) > 1) tmp = sprintf ("%s%s%s", a1, ob->query ("cap_name"), a2); reg += tmp; } if (stringp (race) && race != "") reg = sprintf ("%s%s %s.\n", reg, genat, raceat); #ifndef BLOCK_ATTACK if (!Attacking) { #endif inv = filter_array (inv, "can_see2", this_object(), viewingOb); i = sizeof (inv); if (i) { reg = sprintf ("%s %s carrying:\n", reg, genat); while (i--) { short = (string)inv[i]->query ("short"); if (short) reg = sprintf ("%s %s%s%s.\n", reg, short, (inv[i]->query ("equipped") ? " (equipped)" : ""), (inv[i]->query ("wielded") ? " (wielded)" : "")); } } else
void extra_create() { string race, name, lastname, rankfirst, ranksecond, rankthird, rankfourth, attk; int sex = random( 2 ); if( sex == 1 ) { set_gender( "male" ); switch( random( 15 ) ) { case 0 : name = "Gary"; break; case 1 : name = "Larry"; break; case 2 : name = "Sigmund"; break; case 3 : name = "Alfred"; break; case 4 : name = "Gregory"; break; case 5 : name = "Lester"; break; case 6 : name = "Arnold"; break; case 7 : name = "Homer"; break; case 8 : name = "James"; break; case 9 : name = "Atherton"; break; case 10 : name = "Eric"; break; case 11 : name = "Robert"; break; case 12 : name = "Mike"; break; case 13 : name = "Gabe"; break; case 14 : name = "Malcom"; break; } } if( sex == 0 ) { set_gender( "female" ); switch( random( 15 ) ) { case 0 : name = "Gale"; break; case 1 : name = "Edith"; break; case 2 : name = "Marilyn"; break; case 3 : name = "Margo"; break; case 4 : name = "Agnes"; break; case 5 : name = "Nelly"; break; case 6 : name = "Mildred"; break; case 7 : name = "Charlotte"; break; case 8 : name = "Eva"; break; case 9 : name = "Victoria"; break; case 10 : name = "Stella"; break; case 11 : name = "Vivian"; break; case 12 : name = "Ruth"; break; case 13 : name = "Sophronia"; break; case 14 : name = "Virginia"; break; } } switch( random( 15 ) ) { case 0 : lastname = "Masterson"; break; case 1 : lastname = "Laymon"; break; case 2 : lastname = "Wilson"; break; case 3 : lastname = "McCammon"; break; case 4 : lastname = "Bierce"; break; case 5 : lastname = "Blackwood"; break; case 6 : lastname = "Lovecraft"; break; case 7 : lastname = "Saul"; break; case 8 : lastname = "Poe"; break; case 9 : lastname = "Ketchum"; break; case 10 : lastname = "Koontz"; break; case 11 : lastname = "Lumley"; break; case 12 : lastname = "Lansdale"; break; case 13 : lastname = "Barker"; break; case 14 : lastname = "Bloch"; break; } switch( random( 4 ) ) { case 0 : race = "drow_elf"; break; case 1 : race = "dwarf"; break; case 2 : race = "human"; break; case 3 : race = "gnome"; break; } switch( random( 4 ) ) { case 0 : rankfirst = sprintf( "%s is tall and middle aged. %s " "shirt is wrinkled and %s looks dazed. ", name, CAP( possessive( THISO ) ), subjective( THISO ) ); break; case 1 : rankfirst = sprintf( "%s is a bit overweight. %s presence " "is chilling. There is something dark about %s. ", name, CAP( possessive( THISO ) ), objective( THISO ) ); break; case 2 : rankfirst = sprintf( "There is a silky shine to %s hair. %s " "looks clean and well groomed. Almost too well groomed. Like %s is " "hiding something. ", possessive( THISO ), CAP( subjective( THISO ) ), subjective( THISO ) ); break; case 3 : rankfirst = sprintf( "%s has taut skin and well toned muscles. %s " "looks to only be around thirty, though you know %s is much older. ", name, CAP( subjective( THISO ) ), subjective( THISO ) ); break; } switch( random( 4 ) ) { case 0 : ranksecond = sprintf( "%s dutifully concentrates on " "whatever %s task maybe. %s concentration is unwavering and intense. ", CAP( subjective( THISO ) ), possessive( THISO ), CAP( possessive( THISO ) ) ); break; case 1 : ranksecond = sprintf( "%s moves with great agility. %s speed " "and grace is almost supernatural. As if %s wasn't fully of this world. ", CAP( subjective( THISO ) ), CAP( possessive( THISO ) ), subjective( THISO ) ); break; case 2 : ranksecond = sprintf( "%s refuses to pause for a moment. %s " "rushes forward lost in thought. ", CAP( subjective( THISO ) ), CAP( subjective( THISO ) ) ); break; case 3 : ranksecond = sprintf( "%s shoes are scuffed and the soles are almost " "worn through. %s proceeds relentlessly forwards driven by an unknown goal. ", CAP( possessive( THISO ) ), CAP( subjective( THISO ) ) ); break; } switch( random( 4 ) ) { case 0 : rankthird = sprintf( "%s eyes are crisp and calculating. ", CAP( possessive( THISO ) ) ); break; case 1 : rankthird = sprintf( "%s eyes seem cold, yet relentless. ", CAP( possessive( THISO ) ) ); break; case 2 : rankthird = sprintf( "%s eyes are tireless and unyielding. ", CAP( possessive( THISO ) ) ); break; case 3 : rankthird = sprintf( "%s eyes intake the whole of the room, " "%s is searching for something. ", CAP( possessive( THISO ) ), subjective( THISO ) ); break; } switch( random( 4 ) ) { case 0 : rankfourth = sprintf( "%s only cares for work.", CAP( subjective( THISO ) ) ); break; case 1 : rankfourth = sprintf( "%s licks %s lips at the sight of you.", CAP( subjective( THISO ) ), possessive( THISO ) ); break; case 2 : rankfourth = sprintf( "%s is a tireless asset to this company.", CAP( subjective( THISO ) ) ); break; case 3 : rankfourth = sprintf( "%s has no fear. No worry.", CAP( subjective( THISO ) ) ); break; } switch( random( 100 ) ) { case 0..20 : attk = "sympathy"; break; case 21..70 : attk = "shove"; break; case 71..76 : attk = "panic"; break; case 77..99 : attk = "eyeclaw"; break; } set_name( sprintf( "%s %s", name, lastname ) ); add_alias( "researcher" ); add_alias( "res" ); add_alias( "doctor" ); add_alias( lower_case( name ) ); add_alias( lower_case( lastname ) ); add_alias( sprintf( "%s %s", lower_case( name ), lower_case( lastname ) ) ); set_short( sprintf( "%s %s, a high level researcher", name, lastname ) ); set_long( sprintf( "%s %s %s %s", rankfirst, ranksecond, rankthird, rankfourth ) ); set_race( race ); set_alignment( NEUTRAL_AL ); set_stat( "str", 120 + random( 30 ) ); set_stat( "con", 100 + random( 30 ) ); set_stat( "wil", 100 + random( 30 ) ); set_stat( "int", 100 + random( 30 ) ); set_stat( "dex", 100 + random( 30 ) ); set_avoid_props( ({ NoWanderRoomP }) );
int teleport_command(string cmd) { if (!cmd) { if (!this_player()->query_battleob()) { if(!environment(this_player())->query_no_teleport()) { object p = this_player(); switch (this_player()->query_home_town()) { case "vaerlon": htst = "Vaerlon"; destination = "/d/valkor/vaerlon/rooms/streets/h4.c"; break; case "graemor": htst = "Graemor"; destination = "/d/graemor/virtual/9,18.graemor-part1.c"; break; case "teladan": htst = "Teladan"; destination = "/u/t/tarak/areas/town/rooms/f8.c"; break; case "cenedoiss": htst = "Cenedoiss"; destination = "/u/b/belannaer/virtual/18,27.cenedoiss.c"; break; //case "mahrakc": ? case "atherton": htst = "Atherton"; destination = "/u/b/belannaer/virtual/14,13.atherton.c"; break; default: htst = "Vaerlon"; destination = "/d/valkor/vaerlon/rooms/streets/h4.c"; break; } message("teleport", "You rub the Ring of Teleportation while thinking "+ "of your hometown. The air around you shimmers and suddenly you find "+ "yourself standing in the central square of "+htst+".\n", p); message("teleport", ""+p->query_cap_name()+" rubs "+possessive(p)+" "+ "Ring of Teleportation. The air around "+objective(p)+" starts to "+ "distort, and suddenly in the blink of an eye "+subjective(p)+" "+ "disappears.\n", environment(p), p); p->move(destination); charges--; if (charges < 1) { call_out("destruct_me", 1); } } else { message("info", "Strange energy fluctuations in this room prevent "+ "you from teleporting...\n", this_player()); } } else { message("info", "You are too busy fighting to do that!\n", this_player()); } return 1; } }
int cmd_stat (string name) { string *coins, *list, *statnames ; object ob ; string *skillnames ; mapping skills ; int i, flag ; string spouse, tempstr ; string subj ; mapping stats ; int wealth; if (!name) { return help() ; } ob = get_object(name); if (!ob || !living(ob)) { notify_fail("No such living object exists.\n"); return 0 ; } subj = capitalize(subjective(ob->query("gender"))) ; tempstr = ob->query("race") ; if (tempstr) write (subj+" is " + article(tempstr) + " " + tempstr + ".\n") ; spouse = ob->query("spouse") ; if (spouse) { write (subj+" is married to "+spouse+".\n") ; } if ((int)ob->query("no_attack")) { write (subj+" is not an attackable object.\n") ; } flag = ob->query("drunk") ; switch (flag) { case 1..5 : { write (subj+" are a bit tispy.\n") ; break ; } case 6..10 : { write (subj+" are somewhat drunk.\n") ; break ; } case 11..15 : { write (subj+" are rather drunk.\n") ; break ; } case 16..20 : { write (subj+" are completely smashed.\n") ; break ; } case 21..25 : { write (subj+" are maximally drunk.\n") ; break ; } } write ("Hit points: "+ob->query("hit_points")+" of "+ ob->query("max_hp")+"\n") ; write ("Spell points: "+ob->query("spell_points")+" of "+ ob->query("max_sp")+"\n") ; write ("\n") ; stats = ob->query("stat") ; if (stats && sizeof(stats)) { statnames = keys(stats) ; for (i=0;i<sizeof(stats);i++) { write (sprintf("%12-s : %d\n",capitalize(statnames[i]),stats[statnames[i]])) ; } write ("\n") ; } wealth = ob->query("wealth") ; if (!wealth) { write (subj+" doesn't have any coins in "+ possessive(ob->query("gender"))+" purse.\n"); } else { write ("Wealth:"+wealth+" coins.\n"); } skills = ob->query_skills() ; if (skills && sizeof(skills)) { skillnames = keys(skills) ; write ("\n") ; write (capitalize(possessive(ob->query("gender"))) + " skills are:\n") ; list = sort_array(skillnames, "sort_skills", this_object()) ; for (i=0;i<sizeof(skills);i++) { write (sprintf("%24-s : %d\n",capitalize(list[i]),skills[list[i]])) ; } } return 1 ; }