NAME

da.guestsay.muf - Guest Speaker program

SYNOPSIS

Input parameters:
S[0]: String to say or pose.
Return value:
S[0]: integer, 1 if successful, 0 otherwise.
Properties:
_Guest
String, name of guest speaker.
_Type
String, "say" or blank to indicate "say" semantics, "pose" to indicate "pose" semantics.
_Guest-permit-name
Allow player name to speak on my behalf.

DESCRIPTION

da.guestsay.muf is a program which allows you to speak as if you had a different name. This is useful if two people often share one keyboard, and players mutually trust each other to speak on their behalf, of if a player wants to let a visitor speak without using the player's name.

guestsay is used by linking an action to da.guestsay.muf (#2014). Two properties need to be set on the action before it can be used.

_Guest is a string which will replace your normal name when you speak or pose. For instance, if _Guest contains the string "Attila the Hun", then when you speak, you will appear to be speaking as Attila the Hun. the _Guest property may be set on the action itself or the object it is attached to. The latter is useful because it can be shared by both "say" and "pose" actions (see below).

_Type is optional. If it is omitted, or its value is "say", the action will behave like a say command. That is, the action's parameter will be enclosed in quotes following the _Guest name and the text " says, ", then the resulting string is displayed to everyone.

If _Type is set to "pose", the action will behave like a pose command. That is, the action's parameter will be appended to the player's name and displayed to everyone.

To have both "say" and "pose" ability, you will need to make two actions and set _Type to "pose" on one of them.

For added security, you cannot use a guest speaker to appear to be someone else unless you are specifically allowed to by that player. That is, the _Guest property cannot normally start with a word that is the same as another player. To allow a player (let's say she's called "Mildred") to speak as if she were you, you will need to set the _guest-permit-Mildred property on yourself to "yes". This only permits Mildred to speak on your behalf. Mildred will have to set a corresponding string on herself to permit you to speak on her behalf.

RETURN VALUE

da.guestsay.muf returns 1 if the program successfully ran, i.e. it notified everyone in the room. Otherwise it returns 0.

EXAMPLES

To create the "Attila the Hun" speaker described above:
    @create Guest Speaker
    @set Guest Speaker=_Guest:Attila the Hun
  
    @action asay=Guest Speaker
    @set asay=_Type:say                (this line is optional)
    @link asay=#2014
    
    @action apose=Guest Speaker
    @set apose=_Type:pose
    @link apose=#2014
If there is a player called "Attila" on the muck, then he will need to set this property on himself or you will be unable to use this guest speaker (assuming your name is "Mildred"):
    @set me=_guest-permit-Mildred:yes

DIAGNOSTICS

guestsay error: No _Guest property on action or its container.
You haven't set the _Guest property on the action or the object to which it is attached.
guestsay error: _Type foo is unknown.
You have set a _Type property on the action, but it is not blank, nor equal to "say" or "pose". Try one of those strings.
guestsay error: foo resembles a player.
You are trying to use a guest speaker but the _Guest name could be mistaken for another player. Change the _Guest text, or have the relevant player set its _Guest-permit-yourname property.

BUGS

If you use guestsay to speak on your own behalf, to insert a description, e.g. "Adella the Hug", you will need to set your permission property to allow yourself to speak as yourself. That is, just type:
    @set me=_guest-permit-Adella:yes
(Assuming your name is Adella.)

"say" verbs and other niceties are not supported.

Since name matching uses nicknames, if your _Guest string is a unique prefix of the name of a player on the Muck, you may find that the "resembles a player" error crops up.

AUTHOR

Deborah Pickett (<Ariel> on FDCMuck).