cmd_comm
index
/Users/hollis/Desktop/nakedmud/lib/pymodules/cmd_comm.py

cmd_comm.c
 
Various commands used in NakedMud(tm) for communicating with other
characters, and NPCs.

 
Modules
       
history
hooks
inform
mud
mudsock
mudsys

 
Functions
       
add_cmd(...)
add_cmd(name, shorthand, cmd_func, user_group, interrupts_action)
 
Add a new command to the master command table. If a preferred shorthand
exists, e.g., 'n' for 'north', it can be specified. Otherwise, shorthand
should be None. Command functions take three arguments: a character
issuing the command, the command name, and a string argument supplied
to the command. Commands must be tied to a specific user group, and they
can optionally interupt character actions.
add_cmd_check(...)
add_cmd_check(name, check_func)
 
Add a new command check to a registered command. Check functions take
two arguments: the character issuing the command, and the command name.
If a check fails, it should return False and send the character a
message why.
chk_room_communication(ch, cmd)
cmd_ask(ch, cmd, arg)
Usage: ask <person> [about] <question>
 
This command is used to pose a question to another character. Mostly,
this is intended to be used to carry on dialogs with NPCs. Ask has a
local range (i.e. you can only ask questions to people in the same room
as you.
cmd_chat(ch, cmd, arg)
Usage: chat <message>
 
This command will send a message to all players currently logged on.
cmd_emote(ch, cmd, arg)
Usage: emote <text>
 
Send a special text message to the room you are in. The message is
preceded by your name, unless you put a $n somewhere in the text, in
which case the $n is replaced by your name. For example:
 
> emote A gunshot sounds, and $n is laying on the ground, dead.
 
Would show a message to everyone in the room saying that you are dead
to a gunshot.
cmd_gemote(ch, cmd, arg)
Gemote is similar to emote, except that it sends a mud-wide message
instead of a room-specific message.
cmd_greet(ch, cmd, arg)
Usage: greet <person>
 
NPCs with dialogs will often have something to say when you greet or
approach then. Greeting an NPC is a way to get them talking.
cmd_page(ch, cmd, arg)
Usage: page <person> <message>
 
Paging a person will send them a message, as well as making a beeping
sound on their computer to get their attention. Page can be used on
anyone in the mud, regardless if you are in the same room as them or not.
cmd_say(ch, cmd, arg)
Usage: say <message>
 
This command will send a message to everyone in the same room as you. Say,
like ask, can trigger NPC dialogs.
cmd_tell(ch, cmd, arg)
Usage: tell <person> <message>
 
This command sends a message to another character. Primarily intended
for player-to-player communication. Players can tell other players
things even if they are not in the same room.
 
see also: reply
cmd_wiz(ch, cmd, arg)
erase_global(...)
erase_global(name)
 
Delete a value from the global variable table.
expand_text(...)
expand_text(text, dict={}, newline=False)
 
Take text with embedded Python statements. Statements can be embedded
between [ and ]. Expand them out and return the new text. Variables can
be added to the scripting environment by specifying their names and
values in an optional dictionary. Statements are expanded in the default
scripting environment.
extract(...)
extract(thing)
 
Extracts an object, character, or room from the game.
format_string(...)
format_string(text, indent=True, width=80)
 
Format a block of text to be of the specified width, possibly indenting
paragraphs.
generic_find(...)
Deprecated. Use mud.parse_args instead.
get_global(...)
get_global(name)
 
Return a non-persistent global variable, or None.
get_greeting(...)
get_greeting()
 
returns the mud's connection greeting.
get_hour(...)
get_hour()
 
Return the current in-game hour of day.
get_motd(...)
get_motd()
 
Returns the mud's message of the day.
get_time(...)
get_time()
 
Return time of day (morning, afternoon, evening, night).
is_afternoon(...)
True or False if it is afternoon.
is_evening(...)
True or False if it is evening.
is_morning(...)
True or False if it is morning.
is_night(...)
True or False if it is night.
is_race(...)
is_race(name)
 
Returns True or False if the string is a valid race name.
ite(...)
ite(logic_statement, if_statement, else_statement=None)
 
A functional form of if/then/else.
keys_equal(...)
keys_equal(key1, key2)
 
Returns whether two world database keys are equal, relative to the
locale (if any) that the current script is running in.
list_races(...)
list_races(player_only=False)
 
Return a list of available races. If player_only is True, list only the
races that players have access to.
log_string(...)
log_string(mssg)
Send a message to the mud's log.
message(...)
message(ch, vict, obj, vobj, show_invis, range, mssg)
 
Send a message via the mud messaging system using $ expansions. Range
can be 'to_room', 'to_char', 'to_vict', or 'to_world'.
parse_args(...)
parse_args(ch, show_usage_errors, cmd, args, format)
 
equivalent to parse_args written in C. See parse.h for information.
send(...)
send(list, mssg, dict = None, newline = True)
 
Sends a message to a list of characters. Messages can have scripts
embedded in them, using [ and ]. If so, a variable dictionary must be
provided. By default, 'ch' references each character being sent the
message, for embedded scripts.
set_global(...)
set_global(name, val)
 
Sets a non-persistent global variable. Val can be any type.

 
Data
        cmd = ':'