/* The extra value on move_char is for disabling the character seeing any movement message when it is TRUE and showing when it is FALSe. You can either edit the calls below or the move_char() function. */ void do_run( CHAR_DATA *ch, char * argument) { char arg1[MSL], arg2[MSL]; int value, door = 0, i; argument = one_argument (argument, arg1); strcpy (arg2, argument); if (!strstr(arg1, "north") && !strstr(arg1, "south") && !strstr(arg1, "east") && !strstr(arg1, "west") && !strstr(arg1, "n") && !strstr(arg1, "s") && !strstr(arg1, "e") && !strstr(arg1, "w")) { send_to_char("run \n\r", ch); return; } value = atoi(arg2); if (value < 1 || value > 20) { send_to_char("You can run up to twenty and no less then one.", ch); return; } if (!str_cmp (arg1, "n") || !str_cmp (arg1, "north")) door = 0; else if (!str_cmp (arg1, "e") || !str_cmp (arg1, "east")) door = 1; else if (!str_cmp (arg1, "s") || !str_cmp (arg1, "south")) door = 2; 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; for (i = 1; i <= value; ++i) if (i != value) move_char( ch, door, FALSE, TRUE); else move_char( ch, door, FALSE, FALSE); }