messages_d.c

gurba-0.40/lib/daemons/messages_d.c · 615 B

From the archive gurba.tgz

Download the archive   « Back to the archive contents

mapping state;

void create( void ) {
  state = ([ 
	    "hp100" : "$N $vare in perfect condition.",
	    "hp90" : "$N $vare fatigued.",
	    "hp80" : "$N $vare slightly hurt.",
	    "hp70" : "$N $vare hurt.",
	    "hp60" : "$N $vare bleeding.",
	    "hp50" : "$N $vare slightly wounded.",
	    "hp40" : "$N $vare wounded.",
	    "hp30" : "$N $vare heavily wounded.",
	    "hp20" : "$N $vare critically wounded.",
	    "hp10" : "$N $vare dying.",
	   ]);
}

string query_state( string which ) {
  if( state[which] == 0 ) {
    return( "Message '" + which + "' not in MESSAGES_D.");
  }
  return( state[which] );
}

Site Stats

Snippets: 1791
Codebases: 571