diff --git a/lib/text/help/help.hlp b/lib/text/help/help.hlp index 0f9b987..915675e 100644 --- a/lib/text/help/help.hlp +++ b/lib/text/help/help.hlp @@ -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] diff --git a/src/act.h b/src/act.h index b2ddf4c..2611d18 100644 --- a/src/act.h +++ b/src/act.h @@ -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[]; diff --git a/src/act.movement.c b/src/act.movement.c index b464897..831e7ef 100644 --- a/src/act.movement.c +++ b/src/act.movement.c @@ -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; +} diff --git a/src/interpreter.c b/src/interpreter.c index ded8ebe..315fd7b 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -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 },