예제 #1
0
파일: tflog.c 프로젝트: Jalakas/libgarmin
static int tf_add_log(struct log *log, char *name, int id, int type)
{
	struct tf_log *tfl;
	tfl = calloc(1, sizeof(tfl));
	if (!tfl) {
		return -1;
	}
	tfl->name = strdup(name);
	if (!tfl->name) {
		free(tfl);
		return -1;
	}
	tfl->log = log;
	tfl->sourceid = id;
	tfl->type = type;
	debug(5, "Added %s log\n", name);
	list_append(&tfl->l, &ltflogs);
	if (type != TFL_NMEA)
		listen_for(NOTIFY_GPS, GPS_DATA, tf_gps_data, tfl);
	else
		listen_for(NOTIFY_GPS, GPS_NMEA, tf_gps_data, tfl);
	return 1;
}
예제 #2
0
파일: rifrad.c 프로젝트: smokeless/eotl
void extra_create() 
{
    set_name( "Rifrad" );
    
    add_alias( "rifrad" );
    add_alias( "badgem" );
    add_alias( "doctor" );
    add_alias( "professor" );
    add_alias( "scientist" );
    add_alias( "doctor rifrad badgem" );
    
    set_short( "Doctor Rifrad Badgem" );
    
    set_long( "Rifrad stares dejectedly downwards. He barely "
      "acknowledges his own existence. His skin is old and wrinkled. "
      "He looks older than this building, older than time "
      "itself. His skin is extremely pale and his clothes are "
      "stained with sweat. He impatiently taps his fingers on the "
      "nearest table." );
    
    set_gender( "male" );
    set_race( "dwarf" );
    
    set_alignment( SAINTLY_AL );
    
    set_toughness( 45 );
    
    set_skill( "dodge", 65 );
    set_skill( "Darktongue", 25 );
    
    set( NoStealP, 1 );
    set( NoStunP, 1 );
    
    set_natural_ac( 3 );
    
    set_max_damage( 30 );
    
    set_chat_rate( 20 );
    set_chat_chance( 50 );
    
    add_phrase( "#shudder" );
    add_phrase( "#say So much has changed." );
    add_phrase( "#say What they do below, they will not say." );
    add_phrase( "#jitter" );
    
    listen_for( "shakes and rumbles", "AHAHAHAHA!!! THE "
	  "OLD ONE IS AWAKE!!!!!!" );
    
    ask_me_about( "change", "#say There was a time, "
      "when our work was new, and innocent. I "
      "fear that we may be overstepping the bounds." 
    );
    ask_me_about( "below", "#say This facility's location "
      "was carefully picked to be the most conducive to "
      "our needs. One of the things that enables us to "
      "delve so far into matters is the very earth itself. "
      "Our connection is through an ancient well that was dug "
      "here. It is older than time. Now I fear something "
      "sinister below. No one who works in that section "
      "will speak of it." 
    );
    ask_me_about( "experiments", "#say The screams... The screams..." );
    
    move_object( clone_object( FARMOR "pants" ), THISO );
    move_object( clone_object( FARMOR "shirt" ), THISO );
    command( "equip" );
  
    add_special_attack( "evasive", THISO, 10 );
    add_special_attack( "soulwell", THISO, 4 );
    add_special_attack( "banish", THISO, 1 );
}