bool spec_executioner( CHAR_DATA *ch ) { char buf[MAX_STRING_LENGTH]; MOB_INDEX_DATA *cityguard; CHAR_DATA *victim; CHAR_DATA *v_next; char *crime; if ( !IS_AWAKE(ch) || ch->fighting ) return FALSE; crime = ""; for ( victim = ch->in_room->first_person; victim; victim = v_next ) { v_next = victim->next_in_room; if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_KILLER) ) { crime = "KILLER"; break; } if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_THIEF) ) { crime = "THIEF"; break; } } if ( !victim ) return FALSE; if ( xIS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) { sprintf( buf, "%s is a %s! As well as a COWARD!", victim->name, crime ); do_yell( ch, buf ); return TRUE; } sprintf( buf, "%s is a %s! PROTECT THE INNOCENT! MORE BLOOOOD!!!", victim->name, crime ); do_yell( ch, buf ); multi_hit( ch, victim, TYPE_UNDEFINED ); if ( char_died(ch) ) return TRUE; /* Added log in case of missing cityguard -- Tri */ cityguard = get_mob_index( MOB_VNUM_CITYGUARD ); if ( !cityguard ) { sprintf( buf, "Missing Cityguard - Vnum:[%d]", MOB_VNUM_CITYGUARD ); bug( buf, 0 ); return TRUE; } char_to_room( create_mobile( cityguard ), ch->in_room ); char_to_room( create_mobile( cityguard ), ch->in_room ); return TRUE; }
bool spec_guardian( CHAR_DATA * ch ) { char buf[MAX_STRING_LENGTH]; CHAR_DATA *victim = NULL; CHAR_DATA *v_next = NULL; CHAR_DATA *ech = NULL; const char *crime = ""; int max_evil = 300; if( !IS_AWAKE( ch ) || ch->fighting ) return FALSE; for( victim = ch->in_room->first_person; victim; victim = v_next ) { v_next = victim->next_in_room; if( victim->fighting && who_fighting( victim ) != ch && victim->alignment < max_evil ) { max_evil = victim->alignment; ech = victim; } } if( victim && IS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) { snprintf( buf, MAX_STRING_LENGTH, "%s is a %s! As well as a COWARD!", victim->name, crime ); do_yell( ch, buf ); return TRUE; } if( victim ) { snprintf( buf, MAX_STRING_LENGTH, "%s is a %s! PROTECT THE INNOCENT!!", victim->name, crime ); do_yell( ch, buf ); multi_hit( ch, victim, TYPE_UNDEFINED ); return TRUE; } if( ech ) { act( AT_YELL, "$n screams 'PROTECT THE INNOCENT!'", ch, NULL, NULL, TO_ROOM ); multi_hit( ch, ech, TYPE_UNDEFINED ); return TRUE; } return FALSE; }
bool spec_clan_guard(CHAR_DATA * ch) { CHAR_DATA *victim; CHAR_DATA *v_next; if (!IS_AWAKE(ch) || ch->fighting) return FALSE; for (victim = ch->in_room->first_person; victim; victim = v_next) { v_next = victim->next_in_room; if (!can_see(ch, victim)) continue; if (get_timer(victim, TIMER_RECENTFIGHT) > 0) continue; if (!IS_NPC(victim) && victim->pcdata && victim->pcdata->clan && IS_AWAKE(victim) && str_cmp(ch->name, victim->pcdata->clan->name)) { do_yell(ch, "Hey your not allowed in here!"); multi_hit(ch, victim, TYPE_UNDEFINED); return TRUE; } } return FALSE; }
bool spec_new_republic_trooper(CHAR_DATA * ch) { CHAR_DATA *victim; CHAR_DATA *v_next; if (!IS_AWAKE(ch) || ch->fighting) return FALSE; for (victim = ch->in_room->first_person; victim; victim = v_next) { v_next = victim->next_in_room; if (!can_see(ch, victim)) continue; if (get_timer(victim, TIMER_RECENTFIGHT) > 0) continue; if ((IS_NPC(victim) && nifty_is_name("imperial", victim->name) && victim->fighting && who_fighting(victim) != ch) || (!IS_NPC(victim) && victim->pcdata && victim->pcdata->clan && IS_AWAKE(victim) && nifty_is_name("empire", victim->pcdata->clan->name))) { do_yell(ch, "Long live the New Republic!"); multi_hit(ch, victim, TYPE_UNDEFINED); return TRUE; } } return FALSE; }
bool spec_clan_guard( CHAR_DATA * ch ) { CHAR_DATA *victim = NULL; CHAR_DATA *v_next = NULL; if( !IS_AWAKE( ch ) || ch->fighting || !ch->mob_clan ) return FALSE; for( victim = ch->in_room->first_person; victim; victim = v_next ) { v_next = victim->next_in_room; if( !can_see( ch, victim ) ) continue; if( get_timer( victim, TIMER_RECENTFIGHT ) > 0 ) continue; if( !IS_NPC( victim ) && victim->pcdata && victim->pcdata->clan && IS_AWAKE( victim ) && victim->pcdata->clan != ch->mob_clan && nifty_is_name( victim->pcdata->clan->name, ch->mob_clan->atwar ) ) { char buf[MAX_STRING_LENGTH]; snprintf( buf, MAX_STRING_LENGTH, "%s", "Hey you're not allowed in here!" ); do_yell( ch, buf ); multi_hit( ch, victim, TYPE_UNDEFINED ); return TRUE; } } return FALSE; }
void found_prey( CHAR_DATA * ch, CHAR_DATA * victim ) { char buf[MAX_STRING_LENGTH]; char victname[MAX_STRING_LENGTH]; if( victim == NULL ) { bug( "%s", "Found_prey: null victim" ); return; } if( victim->in_room == NULL ) { bug( "%s", "Found_prey: null victim->in_room" ); return; } mudstrlcpy( victname, IS_NPC( victim ) ? victim->short_descr : victim->name, MAX_STRING_LENGTH ); if( !can_see( ch, victim ) ) { if( number_percent( ) < 90 ) return; switch ( number_bits( 2 ) ) { case 0: snprintf( buf, MAX_STRING_LENGTH, "Don't make me find you, %s!", victname ); do_say( ch, buf ); break; case 1: act( AT_ACTION, "$n sniffs around the room for $N.", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You sniff around the room for $N.", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n sniffs around the room for you.", ch, NULL, victim, TO_VICT ); do_say( ch, "I can smell your blood!" ); break; case 2: snprintf( buf, MAX_STRING_LENGTH, "I'm going to tear %s apart!", victname ); do_yell( ch, buf ); break; case 3: do_say( ch, "Just wait until I find you..." ); break; } return; } if( xIS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) { if( number_percent( ) < 90 ) return; switch ( number_bits( 2 ) ) { case 0: do_say( ch, "C'mon out, you coward!" ); snprintf( buf, MAX_STRING_LENGTH, "%s is a bloody coward!", victname ); do_yell( ch, buf ); break; case 1: snprintf( buf, MAX_STRING_LENGTH, "Let's take this outside, %s", victname ); do_say( ch, buf ); break; case 2: snprintf( buf, MAX_STRING_LENGTH, "%s is a yellow-bellied wimp!", victname ); do_yell( ch, buf ); break; case 3: act( AT_ACTION, "$n takes a few swipes at $N.", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You try to take a few swipes $N.", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n takes a few swipes at you.", ch, NULL, victim, TO_VICT ); break; } return; } switch ( number_bits( 2 ) ) { case 0: snprintf( buf, MAX_STRING_LENGTH, "Your blood is mine, %s!", victname ); do_yell( ch, buf ); break; case 1: snprintf( buf, MAX_STRING_LENGTH, "Alas, we meet again, %s!", victname ); do_say( ch, buf ); break; case 2: snprintf( buf, MAX_STRING_LENGTH, "What do you want on your tombstone, %s?", victname ); do_say( ch, buf ); break; case 3: act( AT_ACTION, "$n lunges at $N from out of nowhere!", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You lunge at $N catching $M off guard!", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n lunges at you from out of nowhere!", ch, NULL, victim, TO_VICT ); } stop_hunting( ch ); set_fighting( ch, victim ); multi_hit( ch, victim, TYPE_UNDEFINED ); return; }
void found_prey( CHAR_DATA *ch, CHAR_DATA *victim ) { char buf[MAX_STRING_LENGTH]; char victname[MAX_STRING_LENGTH]; if (victim == NULL) { bug("Found_prey: null victim", 0); return; } if ( victim->in_room == NULL ) { bug( "Found_prey: null victim->in_room", 0 ); return; } sprintf( victname, IS_NPC( victim ) ? victim->short_descr : victim->nwol ); if ( !can_see(ch, victim) ) { if ( number_percent( ) < 90 ) return; switch( number_bits( 2 ) ) { case 0: sprintf( buf, "Nie kaz mi Cie szukac, %s!", victname ); do_say( ch, buf ); break; case 1: act( AT_ACTION, "$n sniffs around the room for $N.", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You sniff around the room for $N.", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n sniffs around the room for you.", ch, NULL, victim, TO_VICT ); sprintf( buf, "I can smell your blood!" ); do_say( ch, buf ); break; case 2: sprintf( buf, "I'm going to tear %s apart!", victname ); do_yell( ch, buf ); break; case 3: do_say( ch, "Just wait until I find you..."); break; } return; } if ( IS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) { if ( number_percent( ) < 90 ) return; switch( number_bits( 2 ) ) { case 0: do_say( ch, "C'mon out, you coward!" ); sprintf( buf, "%s is a bloody coward!", victname ); do_yell( ch, buf ); break; case 1: sprintf( buf, "Let's take this outside, %s", victname ); do_say( ch, buf ); break; case 2: sprintf( buf, "%s is a yellow-bellied wimp!", victname ); do_yell( ch, buf ); break; case 3: act( AT_ACTION, "$n takes a few swipes at $N.", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You try to take a few swipes $N.", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n takes a few swipes at you.", ch, NULL, victim, TO_VICT ); break; } return; } switch( number_bits( 2 ) ) { case 0: sprintf( buf, "Twoja krew jest moja, %s!", victname ); do_yell( ch, buf); break; case 1: sprintf( buf, "Ha, znow sie spotykamy, %s!", victname ); do_say( ch, buf ); break; case 2: sprintf( buf, "Co sobie zyczysz wypisac na nagrobku, %s?", victname ); do_say( ch, buf ); break; case 3: act( AT_ACTION, "$n lunges at $N from out of nowhere!", ch, NULL, victim, TO_NOTVICT ); act( AT_ACTION, "You lunge at $N catching $M off guard!", ch, NULL, victim, TO_CHAR ); act( AT_ACTION, "$n lunges at you from out of nowhere!", ch, NULL, victim, TO_VICT ); } stop_hunting( ch ); set_fighting( ch, victim ); multi_hit(ch, victim, TYPE_UNDEFINED); return; }