new unfollow command available for all players (#6)

* new unfollow command available for all players

* new unfollow command available for all players (fix redundant check)

* new unfollow command available for all players (fix redundant check)
This commit is contained in:
gbrunett 2017-10-20 21:32:58 -04:00 committed by wyld-sw
parent 324cfdd415
commit 75d8b58029
4 changed files with 31 additions and 0 deletions

View file

@ -12184,6 +12184,20 @@ Usage: unaffect [target]
Removes all affections (i.e., spell effects) from a player.
#31
UNFOLLOW
Usage: unfollow
The UNFOLLOW command will stop a player from following another player or
creature. This command will not succeed if the player is under the
influence of a CHARM spell.
Examples:
> unfollow
See also: FOLLOW
#0
UNGROUP DISBAND
Usage: ungroup [group member]

View file

@ -162,6 +162,7 @@ ACMD(do_rest);
ACMD(do_sit);
ACMD(do_sleep);
ACMD(do_stand);
ACMD(do_unfollow);
ACMD(do_wake);
/* Global variables from act.movement.c */
extern const char *cmd_door[];

View file

@ -970,3 +970,18 @@ ACMD(do_follow)
}
}
}
ACMD(do_unfollow)
{
if (ch->master) {
if (AFF_FLAGGED(ch, AFF_CHARM)) {
send_to_char(ch, "You feel compelled to follow %s.\r\n",
GET_NAME(ch->master));
} else {
stop_follower(ch);
}
} else {
send_to_char(ch, "You are not following anyone.\r\n");
}
return;
}

View file

@ -323,6 +323,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, SCMD_UNLOCK },
{ "unban" , "unban" , POS_DEAD , do_unban , LVL_GRGOD, 0 },
{ "unaffect" , "unaffect", POS_DEAD , do_wizutil , LVL_GOD, SCMD_UNAFFECT },
{ "unfollow" , "unf" , POS_RESTING , do_unfollow , 0, 0 },
{ "uptime" , "uptime" , POS_DEAD , do_date , LVL_GOD, SCMD_UPTIME },
{ "use" , "use" , POS_SITTING , do_use , 1, SCMD_USE },
{ "users" , "users" , POS_DEAD , do_users , LVL_GOD, 0 },