extraexits.patch

extraexits.patch · 13.6 KB

From the archive extraexits.zip

Download the archive   « Back to the archive contents

*** act_info.c.orig	Thu Jul 18 11:43:13 1996
--- act_info.c	Thu Mar 19 23:31:11 1998
***************
*** 889,895 ****
     }
   
     if( !strcmp( argument, "all" ) )
!       strcpy( buf, "<%hhp %mm %vmv> ");
     else
     {
        if ( strlen(argument) > 50 )
--- 889,895 ----
     }
   
     if( !strcmp( argument, "all" ) )
!       strcpy( buf, "{c<%hhp %mm %vmv>{x " );
     else
     {
        if ( strlen(argument) > 50 )
***************
*** 1213,1218 ****
--- 1213,1222 ----
      else if ( !str_cmp( arg1, "w" ) || !str_cmp( arg1, "west"  ) ) door = 3;
      else if ( !str_cmp( arg1, "u" ) || !str_cmp( arg1, "up"    ) ) door = 4;
      else if ( !str_cmp( arg1, "d" ) || !str_cmp( arg1, "down"  ) ) door = 5;
+ else if ( !str_cmp( arg1, "ne" ) || !str_cmp( arg1, "northeast" ) ) door = 6;
+ else if ( !str_cmp( arg1, "se" ) || !str_cmp( arg1, "southeast" ) ) door = 7;
+ else if ( !str_cmp( arg1, "sw" ) || !str_cmp( arg1, "southwest" ) ) door= 8;
+ else if ( !str_cmp( arg1, "nw" ) || !str_cmp( arg1, "northwest" ) ) door = 9;
      else
      {
  	send_to_char( "You do not see that here.\n\r", ch );
***************
*** 1346,1352 ****
  	sprintf(buf,"Obvious exits:\n\r");
  
      found = FALSE;
!     for ( door = 0; door <= 5; door++ )
      {
  	if ( ( pexit = ch->in_room->exit[door] ) != NULL
  	&&   pexit->u1.to_room != NULL
--- 1350,1356 ----
  	sprintf(buf,"Obvious exits:\n\r");
  
      found = FALSE;
!     for ( door = 0; door <= 9; door++ )
      {
  	if ( ( pexit = ch->in_room->exit[door] ) != NULL
  	&&   pexit->u1.to_room != NULL
***************
*** 1421,1426 ****
--- 1425,1437 ----
  	ch->level, get_age(ch),
          ( ch->played + (int) (current_time - ch->logon) ) / 3600);
      send_to_char( buf, ch );
+ 
+     if ( is_clan(ch) )
+     {
+       sprintf( buf, "You are a %s of the %s\n\r",
+                player_rank(ch), player_clan(ch) );
+       send_to_char(buf, ch);
+     }
  
      if ( get_trust( ch ) != ch->level )
      {
*** act_move.c.orig	Thu Mar 19 15:33:21 1998
--- act_move.c	Thu Mar 19 23:20:16 1998
***************
*** 44,55 ****
  
  char *	const	dir_name	[]		=
  {
!     "north", "east", "south", "west", "up", "down"
  };
  
  const	sh_int	rev_dir		[]		=
  {
!     2, 3, 0, 1, 5, 4
  };
  
  const	sh_int	movement_loss	[SECT_MAX]	=
--- 44,56 ----
  
  char *	const	dir_name	[]		=
  {
!     "north", "east", "south", "west", "up", "down", "northeast",
! "southeast", "southwest", "northwest"
  };
  
  const	sh_int	rev_dir		[]		=
  {
!     2, 3, 0, 1, 5, 4, 6, 7, 8, 9
  };
  
  const	sh_int	movement_loss	[SECT_MAX]	=
***************
*** 75,81 ****
      ROOM_INDEX_DATA *to_room;
      EXIT_DATA *pexit;
  
!     if ( door < 0 || door > 5 )
      {
  	bug( "Do_move: bad door %d.", door );
  	return;
--- 76,82 ----
      ROOM_INDEX_DATA *to_room;
      EXIT_DATA *pexit;
  
!     if ( door < 0 || door > 9 )
      {
  	bug( "Do_move: bad door %d.", door );
  	return;
***************
*** 289,294 ****
--- 290,324 ----
  
  
  
+ void do_northeast( CHAR_DATA *ch, char *argument )
+ {
+     move_char( ch, DIR_NORTHEAST, FALSE );
+ return;
+ }
+ 
+ 
+ void do_southeast( CHAR_DATA *ch, char *argument )
+ {
+     move_char( ch, DIR_SOUTHEAST, FALSE );
+ return;
+ }
+ 
+ 
+ void do_southwest( CHAR_DATA *ch, char *argument )
+ {
+ move_char( ch, DIR_SOUTHWEST, FALSE );
+ return;
+ }
+ 
+ 
+ void do_northwest( CHAR_DATA *ch, char *argument )
+ {
+ move_char( ch, DIR_NORTHWEST, FALSE );
+ return;
+ }
+ 
+ 
+ 
  int find_door( CHAR_DATA *ch, char *arg )
  {
      EXIT_DATA *pexit;
***************
*** 300,308 ****
      else if ( !str_cmp( arg, "w" ) || !str_cmp( arg, "west"  ) ) door = 3;
      else if ( !str_cmp( arg, "u" ) || !str_cmp( arg, "up"    ) ) door = 4;
      else if ( !str_cmp( arg, "d" ) || !str_cmp( arg, "down"  ) ) door = 5;
      else
      {
! 	for ( door = 0; door <= 5; door++ )
  	{
  	    if ( ( pexit = ch->in_room->exit[door] ) != NULL
  	    &&   IS_SET(pexit->exit_info, EX_ISDOOR)
--- 330,342 ----
      else if ( !str_cmp( arg, "w" ) || !str_cmp( arg, "west"  ) ) door = 3;
      else if ( !str_cmp( arg, "u" ) || !str_cmp( arg, "up"    ) ) door = 4;
      else if ( !str_cmp( arg, "d" ) || !str_cmp( arg, "down"  ) ) door = 5;
+ else if ( !str_cmp( arg, "ne" ) || !str_cmp( arg, "northeast" ) ) door = 6;
+ else if ( !str_cmp( arg, "se" ) || !str_cmp( arg, "southeast" ) ) door = 7;
+ else if ( !str_cmp( arg, "sw" ) || !str_cmp( arg, "southwest" ) ) door = 8;
+ else if ( !str_cmp( arg, "nw" ) || !str_cmp( arg, "northwest" ) ) door = 9;
      else
      {
! 	for ( door = 0; door <= 9; door++ )
  	{
  	    if ( ( pexit = ch->in_room->exit[door] ) != NULL
  	    &&   IS_SET(pexit->exit_info, EX_ISDOOR)
*** act_wiz.c.orig	Fri Mar 20 00:20:44 1998
--- act_wiz.c	Thu Mar 19 18:43:06 1998
***************
*** 1146,1152 ****
      }
      send_to_char( ".\n\r", ch );
  
!     for ( door = 0; door <= 5; door++ )
      {
  	EXIT_DATA *pexit;
  
--- 1146,1152 ----
      }
      send_to_char( ".\n\r", ch );
  
!     for ( door = 0; door <= 9; door++ )
      {
  	EXIT_DATA *pexit;
  
*** comm.c.orig	Fri Mar 20 00:12:57 1998
--- comm.c	Thu Mar 19 18:54:14 1998
***************
*** 1413,1419 ****
  	case 'e':
  	    found = FALSE;
  	    doors[0] = '\0';
! 	    for (door = 0; door < 6; door++)
  	    {
  		if ((pexit = ch->in_room->exit[door]) != NULL
  		&&  pexit ->u1.to_room != NULL
--- 1413,1419 ----
  	case 'e':
  	    found = FALSE;
  	    doors[0] = '\0';
! 	    for (door = 0; door < 10; door++)
  	    {
  		if ((pexit = ch->in_room->exit[door]) != NULL
  		&&  pexit ->u1.to_room != NULL
*** db.c.orig	Fri Mar 20 00:05:34 1998
--- db.c	Thu Mar 19 22:29:20 1998
***************
*** 1132,1138 ****
  	   SET_BIT(pRoomIndex->room_flags,ROOM_LAW);
  	pRoomIndex->sector_type		= fread_number( fp );
  	pRoomIndex->light		= 0;
! 	for ( door = 0; door <= 5; door++ )
  	    pRoomIndex->exit[door] = NULL;
  
  	/* defaults */
--- 1132,1138 ----
  	   SET_BIT(pRoomIndex->room_flags,ROOM_LAW);
  	pRoomIndex->sector_type		= fread_number( fp );
  	pRoomIndex->light		= 0;
! 	for ( door = 0; door <= 9; door++ )
  	    pRoomIndex->exit[door] = NULL;
  
  	/* defaults */
***************
*** 1169,1175 ****
  		int locks;
  
  		door = fread_number( fp );
! 		if ( door < 0 || door > 5 )
  		{
  		    bug( "Fread_rooms: vnum %d has bad door number.", vnum );
  		    exit( 1 );
--- 1169,1175 ----
  		int locks;
  
  		door = fread_number( fp );
! 		if ( door < 0 || door > 9 )
  		{
  		    bug( "Fread_rooms: vnum %d has bad door number.", vnum );
  		    exit( 1 );
***************
*** 1348,1354 ****
  	    bool fexit;
  
  	    fexit = FALSE;
! 	    for ( door = 0; door <= 5; door++ )
  	    {
  		if ( ( pexit = pRoomIndex->exit[door] ) != NULL )
  		{
--- 1348,1354 ----
  	    bool fexit;
  
  	    fexit = FALSE;
! 	    for ( door = 0; door <= 9; door++ )
  	    {
  		if ( ( pexit = pRoomIndex->exit[door] ) != NULL )
  		{
***************
*** 1373,1379 ****
  	      pRoomIndex != NULL;
  	      pRoomIndex  = pRoomIndex->next )
  	{
! 	    for ( door = 0; door <= 5; door++ )
  	    {
  		if ( ( pexit     = pRoomIndex->exit[door]       ) != NULL
  		&&   ( to_room   = pexit->u1.to_room            ) != NULL
--- 1373,1379 ----
  	      pRoomIndex != NULL;
  	      pRoomIndex  = pRoomIndex->next )
  	{
! 	    for ( door = 0; door <= 9; door++ )
  	    {
  		if ( ( pexit     = pRoomIndex->exit[door]       ) != NULL
  		&&   ( to_room   = pexit->u1.to_room            ) != NULL
***************
*** 3276,3282 ****
  {
      int door;
  
!     while ( ( door = number_mm() & (8-1) ) > 5)
  	;
  
      return door;
--- 3276,3282 ----
  {
      int door;
  
!     while ( ( door = number_mm() & (12-1) ) > 9)
  	;
  
      return door;
*** fight.c.orig	Thu Mar 19 23:59:03 1998
--- fight.c	Thu Mar 19 22:25:17 1998
***************
*** 1981,1987 ****
  	msg = "You hear someone's death cry.";
  
      was_in_room = ch->in_room;
!     for ( door = 0; door <= 5; door++ )
      {
  	EXIT_DATA *pexit;
  
--- 1981,1987 ----
  	msg = "You hear someone's death cry.";
  
      was_in_room = ch->in_room;
!     for ( door = 0; door <= 9; door++ )
      {
  	EXIT_DATA *pexit;
  
*** interp.c.orig	Thu Mar 19 23:46:27 1998
--- interp.c	Thu Mar 19 22:46:59 1998
***************
*** 75,80 ****
--- 75,84 ----
      { "west",		do_west,	POS_STANDING,	 0,  LOG_NEVER, 0 },
      { "up",		do_up,		POS_STANDING,	 0,  LOG_NEVER, 0 },
      { "down",		do_down,	POS_STANDING,	 0,  LOG_NEVER, 0 },
+      { "northeast",     do_northeast,   POS_STANDING,    0,  LOG_NEVER, 0 },
+     { "southeast",      do_southeast,   POS_STANDING,    0,  LOG_NEVER, 0 },
+     { "southwest",      do_southwest,   POS_STANDING,    0,  LOG_NEVER, 0 },
+     { "northwest",      do_northwest,   POS_STANDING,    0,  LOG_NEVER, 0 },
  
      /*
       * Common other commands.
*** interp.h.orig	Thu Mar 19 18:14:51 1998
--- interp.h	Thu Mar 19 19:47:45 1998
***************
*** 177,182 ****
--- 177,184 ----
  DECLARE_DO_FUN( do_nofollow	);
  DECLARE_DO_FUN( do_noloot	);
  DECLARE_DO_FUN(	do_north	);
+ DECLARE_DO_FUN( do_northeast    );
+ DECLARE_DO_FUN( do_northwest   );
  DECLARE_DO_FUN(	do_noshout	);
  DECLARE_DO_FUN( do_nosummon	);
  DECLARE_DO_FUN(	do_note		);
***************
*** 254,259 ****
--- 256,263 ----
  DECLARE_DO_FUN(	do_snoop	);
  DECLARE_DO_FUN( do_socials	);
  DECLARE_DO_FUN(	do_south	);
+ DECLARE_DO_FUN( do_southeast    );
+ DECLARE_DO_FUN( do_southwest    );
  DECLARE_DO_FUN( do_sockets	);
  DECLARE_DO_FUN( do_spells	);
  DECLARE_DO_FUN(	do_split	);
*** merc.h.orig	Thu Mar 19 16:23:33 1998
--- merc.h	Thu Mar 19 16:29:06 1998
***************
*** 1736,1743 ****
      OBJ_DATA *		contents;
      EXTRA_DESCR_DATA *	extra_descr;
      AREA_DATA *		area;
!     EXIT_DATA *		exit	[6];
!     EXIT_DATA * 	old_exit[6];
      RESET_DATA *	reset_first;	/* OLC */
      RESET_DATA *	reset_last;	/* OLC */
      char *		name;
--- 1736,1743 ----
      OBJ_DATA *		contents;
      EXTRA_DESCR_DATA *	extra_descr;
      AREA_DATA *		area;
!     EXIT_DATA *		exit	[10];
!     EXIT_DATA * 	old_exit106];
      RESET_DATA *	reset_first;	/* OLC */
      RESET_DATA *	reset_last;	/* OLC */
      char *		name;
***************
*** 2447,2453 ****
  #define         AREA_ADDED      2	/* Area has been added to. */
  #define         AREA_LOADING    4	/* Used for counting in db.c */
  
! #define MAX_DIR	6
  #define NO_FLAG -99	/* Must not be used in flags or stats. */
  
  /*
--- 2447,2453 ----
  #define         AREA_ADDED      2	/* Area has been added to. */
  #define         AREA_LOADING    4	/* Used for counting in db.c */
  
! #define MAX_DIR 10
  #define NO_FLAG -99	/* Must not be used in flags or stats. */
  
  /*
*** olc_act.c.orig	Fri Mar 20 00:25:54 1998
--- olc_act.c	Thu Mar 19 19:18:07 1998
***************
*** 1535,1540 ****
--- 1535,1576 ----
  
  
  
+ REDIT( redit_northeast )
+ {
+     if ( change_exit( ch, argument, DIR_NORTHEAST ) )
+         return TRUE;
+ 
+         return FALSE;
+ }
+ 
+ 
+ REDIT( redit_southeast )
+ {
+     if ( change_exit( ch, argument, DIR_SOUTHEAST ) )
+         return TRUE;
+ 
+         return FALSE;
+ }
+ 
+ 
+ REDIT( redit_southwest )
+ {
+     if ( change_exit( ch, argument, DIR_SOUTHWEST ) )
+         return TRUE;
+ 
+         return FALSE;
+ }
+ 
+ 
+ REDIT( redit_northwest )
+ {
+     if ( change_exit( ch, argument, DIR_NORTHWEST ) )
+         return TRUE;
+ 
+         return FALSE;
+ }
+ 
+ 
  REDIT( redit_ed )
  {
      ROOM_INDEX_DATA *pRoom;
*** olc.c.orig	Fri Mar 20 00:23:28 1998
--- olc.c	Thu Mar 19 19:05:39 1998
***************
*** 234,239 ****
--- 234,243 ----
      {   "west",		redit_west	},
      {   "up",		redit_up	},
      {   "down",		redit_down	},
+     {   "northeast",    redit_northeast },
+     {   "southeast",    redit_southeast },
+     {   "southwest",    redit_southwest },
+     {   "northwest",    redit_northwest },
      /* New reset commands. */
      {	"mreset",	redit_mreset	},
      {	"oreset",	redit_oreset	},
*** olc.h.orig	Fri Mar 20 00:22:18 1998
--- olc.h	Thu Mar 19 19:56:24 1998
***************
*** 175,180 ****
--- 175,184 ----
  DECLARE_OLC_FUN( redit_west		);
  DECLARE_OLC_FUN( redit_up		);
  DECLARE_OLC_FUN( redit_down		);
+ DECLARE_OLC_FUN( redit_northeast        );
+ DECLARE_OLC_FUN( redit_southeast        );
+ DECLARE_OLC_FUN( redit_southwest        );
+ DECLARE_OLC_FUN( redit_northwest        );
  DECLARE_OLC_FUN( redit_mreset		);
  DECLARE_OLC_FUN( redit_oreset		);
  DECLARE_OLC_FUN( redit_mlist		);
*** scan.c.orig	Thu Mar 19 18:38:13 1998
--- scan.c	Thu Mar 19 18:37:31 1998
***************
*** 74,79 ****
--- 74,83 ----
     else if (!str_cmp(arg1, "w") || !str_cmp(arg1, "west"))  door = 3;
     else if (!str_cmp(arg1, "u") || !str_cmp(arg1, "up" ))   door = 4;
     else if (!str_cmp(arg1, "d") || !str_cmp(arg1, "down"))  door = 5;
+    elst if (!str_cmp(arg1, "ne") || !str_cmp(arg1, "northeast")) door = 6;
+    else if (!str_cmp(arg1, "se") || !str_cmp(arg1, "southeast")) door = 7;
+    else if (!str_cmp(arg1, "sw") || !str_cmp(arg1, "southwest")) door = 8;
+    else if (!str_cmp(arg1, "nw") || !str_cmp(arg1, "northwest")) door = 9;
     else { send_to_char("Which way do you want to scan?\n\r", ch); return; }
  
     act("You peer intently $T.", ch, NULL, dir_name[door], TO_CHAR);
*** update.c.orig	Fri Mar 20 00:10:17 1998
--- update.c	Thu Mar 19 18:56:51 1998
***************
*** 456,462 ****
  	/* Wander */
  	if ( !IS_SET(ch->act, ACT_SENTINEL) 
  	&& number_bits(3) == 0
! 	&& ( door = number_bits( 5 ) ) <= 5
  	&& ( pexit = ch->in_room->exit[door] ) != NULL
  	&&   pexit->u1.to_room != NULL
  	&&   !IS_SET(pexit->exit_info, EX_CLOSED)
--- 456,462 ----
  	/* Wander */
  	if ( !IS_SET(ch->act, ACT_SENTINEL) 
  	&& number_bits(3) == 0
! 	&& ( door = number_bits( 5 ) ) <= 9
  	&& ( pexit = ch->in_room->exit[door] ) != NULL
  	&&   pexit->u1.to_room != NULL
  	&&   !IS_SET(pexit->exit_info, EX_CLOSED)

Site Stats

Snippets: 1791
Codebases: 571