bool spec_puff( CHAR_DATA *ch ) { char buf[MAX_STRING_LENGTH]; int rnd_social, sn, silliness; bool pc_found = TRUE; CHAR_DATA *v_next; CHAR_DATA *wch; CHAR_DATA *wch_next; CHAR_DATA *nch; CHAR_DATA *ch_next; CHAR_DATA *vch; CHAR_DATA *vch_next; CHAR_DATA *victim; extern social_count; if ( !IS_AWAKE(ch) ) return FALSE; victim = NULL; /* Here's Furey's aggress routine, with some surgery done to it. All it does is pick a potential victim for a social. (Thank you, Furey-- I screwed this up many times until I learned of your way of doing it) */ for ( wch = char_list; wch != NULL; wch = wch_next ) { wch_next = wch->next; if ( IS_NPC(wch) || wch->in_room == NULL ) continue; for ( nch = wch->in_room->people; nch != NULL; nch = ch_next ) { int count; ch_next = nch->next_in_room; if ( !IS_NPC(nch) || number_bits(1) == 0) continue; /* * Ok we have a 'wch' player character and a 'nch' npc aggressor. * Now make the aggressor fight a RANDOM pc victim in the room, * giving each 'vch' an equal chance of selection. */ count = 0; victim = NULL; for ( vch = wch->in_room->people; vch != NULL; vch = vch_next ) { vch_next = vch->next_in_room; if ( !IS_NPC(vch) ) { if ( number_range( 0, count ) == 0 ) victim = vch; count++; } } if (victim == NULL) return FALSE; } } rnd_social = (number_range (0, ( social_count - 1)) ); /* Choose some manner of silliness to perpetrate. */ silliness = number_range (1, 100); if ( silliness <= 15) return TRUE; else if ( silliness <= 20) { sprintf( buf, "Tongue-tied and twisted, just an earthbound misfit, ..."); do_say ( ch, buf); } else if ( silliness <= 25) { sprintf( buf, "Are you still here?"); do_say ( ch, buf); } else if ( silliness <= 30) { sprintf( buf, "Did you know, I am the real Implementor here."); do_say ( ch, buf); } else if ( silliness <= 35) { sprintf( buf, "Maybe you don't listen at me, maybe ... ."); do_say ( ch, buf); } else if ( silliness <= 40) { sprintf( buf, "Why you are useing so bad link?"); do_say ( ch, buf); } else if ( silliness <= 45) { sprintf( buf, "This mud seems to be quite a boring, isn't it?"); do_say ( ch, buf); } else if ( silliness <= 50) { sprintf( buf, "Maybe you have time to talk with me later."); do_say ( ch, buf); } else if ( silliness <= 55) { sprintf( buf, "Tell me about your sex life."); do_say ( ch, buf); } else if ( silliness <= 60) { sprintf( buf, "Did you know that I'm written in C?"); do_say ( ch, buf); } else if ( silliness <= 65) { sprintf( buf, "Perhaps you should stay in the hospital longer."); do_say ( ch, buf); } else if ( silliness <= 80) { act( social_table[rnd_social].others_no_arg, ch, NULL, NULL, TO_ROOM ); act( social_table[rnd_social].char_no_arg, ch, NULL, NULL, TO_CHAR ); } else if ( silliness <= 90) { if ( (!pc_found) || (victim != ch->in_room->people) ) return FALSE; act( social_table[rnd_social].others_found, ch, NULL, victim, TO_NOTVICT ); act( social_table[rnd_social].char_found, ch, NULL, victim, TO_CHAR ); act( social_table[rnd_social].vict_found, ch, NULL, victim, TO_VICT ); } else if ( silliness <= 97) { act( "For a moment, $n flickers and phases.", ch, NULL, NULL, TO_ROOM ); act( "For a moment, you flicker and phase.", ch, NULL, NULL, TO_CHAR ); } /* The Fractal Dragon sometimes teleports herself around, to check out new and stranger things. HOWEVER, to stave off some possible Puff repop problems, and to make it possible to play her as a mob without teleporting helplessly, Puff does NOT teleport if she's in Limbo, OR if she's not fighting or standing. If you're playing Puff and you want to talk with someone, just rest or sit! */ else{ if (ch->position < POS_FIGHTING) { act( "For a moment, $n seems lucid...", ch, NULL, NULL, TO_ROOM ); act( " ...but then $e returns to $s contemplations once again.", ch, NULL, NULL, TO_ROOM ); act( "For a moment, the world's mathematical beauty is lost to you!", ch, NULL, NULL, TO_CHAR ); act( " ...but joy! yet another novel phenomenon seizes your attention.", ch, NULL, NULL, TO_CHAR); return TRUE; } if ( ( sn = skill_lookup( "teleport" ) ) < 0 ) return FALSE; (*skill_table[sn].spell_fun) ( sn, ch->level, ch, ch ); } /* Puff has only one spell, and it's the most annoying one, of course. (excepting energy drain, natch) But to a bemused mathematician, what could possibly be a better resolution to conflict? ;) Oh-- and notice that Puff casts her one spell VERY well. */ if ( ch->position != POS_FIGHTING ) return FALSE; for ( victim = ch->in_room->people; victim != NULL; victim = v_next ) { v_next = victim->next_in_room; if ( victim->fighting == ch && number_bits( 2 ) == 0 ) break; } if ( victim == NULL ) return FALSE; if ( ( sn = skill_lookup( "teleport" ) ) < 0 ) return FALSE; (*skill_table[sn].spell_fun) ( sn, 50, ch, victim ); return TRUE; }