eldhamud_2.3.3/clans/
eldhamud_2.3.3/councils/
eldhamud_2.3.3/doc/
eldhamud_2.3.3/doc/DIKU/
eldhamud_2.3.3/doc/DIKU/.svn/
eldhamud_2.3.3/doc/DIKU/.svn/prop-base/
eldhamud_2.3.3/doc/DIKU/.svn/text-base/
eldhamud_2.3.3/doc/MERC/
eldhamud_2.3.3/doc/MERC/.svn/
eldhamud_2.3.3/doc/SMAUG/.svn/
eldhamud_2.3.3/doc/SMAUG/mudprogs/
eldhamud_2.3.3/doc/SMAUG/mudprogs/.svn/
eldhamud_2.3.3/doc/mudprogs/
eldhamud_2.3.3/gods/
eldhamud_2.3.3/houses/
eldhamud_2.3.3/player/a/
/****************************************************************************
 *			Eldhamud Codebase V2.2				    *
 * ------------------------------------------------------------------------ *
 *          EldhaMUD code (C) 2003-2008 by Robert Powell (Tommi)            *
 * ------------------------------------------------------------------------ */

#include <string.h>
#include "./Headers/mud.h"
char *create_weather_string( CHAR_DATA * ch, char *weather_string )
{
   char *combo, *single;
   char buf[MAX_INPUT_LENGTH];
   int temp, precip, wind;
   temp = ( ch->in_room->area->weather->temp + 3 * weath_unit - 1 ) / weath_unit;
   precip = ( ch->in_room->area->weather->precip + 3 * weath_unit - 1 ) / weath_unit;
   wind = ( ch->in_room->area->weather->wind + 3 * weath_unit - 1 ) / weath_unit;
   if( xIS_OUTSIDE( ch ) || IS_PLR_FLAG( ch, PLR_ONMAP ) )
   {
      if( precip >= 3 )
      {
         combo = preciptemp_msg[precip][temp];
         single = wind_msg[wind];
      }
      else
      {
         combo = windtemp_msg[wind][temp];
         single = precip_msg[precip];
      }
      sprintf( buf, "%s and %s. ", combo, single );
   }
   else
      strcpy( buf, "" );
   weather_string = STRALLOC( buf );
   return weather_string;
}
char *create_time_string( CHAR_DATA * ch, char *time_string )
{
   char buf[MAX_INPUT_LENGTH];
   switch ( time_info.hour )
   {
      case 5:
      {
         strcpy( buf, "The fient yellow glow of the sun can be seen in the east, as the sun embarks on a new day. " );
         break;
      }
      case 6:
      {
         strcpy( buf, "The firey glow of the sun is clearly visible as the sun rises over the horizon. " );
         break;
      }
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      {
         strcpy( buf, "The sun moves ever so slowly towards its noonday zentih. " );
         break;
      }
      case 12:
      {
         strcpy( buf, "It's noon, shadows merge into nothingness as the full power of the sun can be felt beating down from above. " );
         break;
      }
      case 13:
      case 14:
      case 15:
      case 16:
      case 17:
      case 18:
      {
         strcpy( buf, "The sun continues on its westward journey accross the sky, increasing the length of shadows cast by its eternal warmth. " );
         break;
      }
      case 19:
      {
         strcpy( buf, "The sky turns a reddish orange as the sun ends its journey. " );
         break;
      }
      case 20:
      {
         strcpy( buf, "Day turns to night as twilight descends accross the lands. " );
      }
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      {
         strcpy( buf,
                 "The sky it lit with a multitude of stars and heavenly wonders. The moon's makes its way accross the night sky illuminating the lands with its gentle diffused glow. " );
      }
         break;
   }
   time_string = STRALLOC( buf );
   return time_string;
}
char *random_description( CHAR_DATA * ch, char *random_string )
{
   char desc_string[MAX_STRING_LENGTH];
   char temp[MAX_STRING_LENGTH];
   strcpy( desc_string, create_time_string( ch, temp ) );   //time specific
   strcat( desc_string, create_weather_string( ch, temp ) );   // wether specific
   random_string = STRALLOC( desc_string );
   return random_string;
}