|
Methods defined here:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- act(...)
- act(command)
Simulate a character typing in a command.
- append_look(...)
- append_look(text)
Adds text to the character's current look buffer.
- attach(...)
- attach(trigger)
Attach a trigger to the character by key name.
- aux(...)
- Alias for char.Char.getAuxiliary(name)
- cansee(...)
- cansee(thing)
Returns whether a character can see the specified object, exit, or other
character.
- clear_look(...)
- clear_look()
Clear the character's current look buffer.
- copy(...)
- copy()
Returns a copy of the character.
- deletevar(...)
- deletevar(name)
Deletes a special variable from a character if they have one by the
given name.
- delvar(...)
- Alias for char.Char.deletevar(name)
- detach(...)
- detach(trigger)
Detach a trigger from the character by key name.
- do_trigs(...)
- do_trigs(type, ch=None, obj=None, room=None, exit=None, cmd=None,
arg=None, opts=None)
Run triggers of the specified type on the character. By default, the
trigger owner is 'me'. Other variables can be specified. The opts
variable can be a dictionary that maps optional variable names to their
values.
- equip(...)
- equip(obj, positions=None, forced=False)
Attempts to equip an object to the character's body. Positions can be a
comma-separated list of position names or position types. If positions
is None and object is of type 'worn', attempt to equip the object to
its default positions. Setting forced to True allows non-worn objects
to be equipped, or worn objects to be equipped to their non-default
positions. Returns success of attempt.
- getAuxiliary(...)
- getAuxiliary(name)
Returns character's auxiliary data of the specified name.
- get_alias(...)
- get_alias(name)
Return character's alias by the specified name, or None.
- get_bodypct(...)
- get_bodypct(posnames)
Returns the percent mass of the character's body taken up by the
specified parts. Bodyparts must be a comma-separated list.
- get_equip(...)
- get_equip(bodypart)
Returns object currently equipped to the character's bodypart, or None.
- get_slot_types(...)
- get_slot_types(obj)
Returns a list of the bodypart types currently occupied by the object.
Returns an empty list of the object is not equipped to this character.
- get_slots(...)
- get_slots(obj)
Returns a comma-separated list of bodypart names currently occupied by
the object.
- getvar(...)
- getvar(name)
Return value of a special variable. Return 0 if no value has been set.
- hasPrefs(...)
- hasPrefs(char_prefs)
Return whether character has any of the specified character preferences.
Multiples can be specified as a comma-separated string.
- hasvar(...)
- hasvar(name)
Return True if a character has the given special variable. False otherwise.
- interrupt(...)
- interrupt()
Cancel any action the character is currently taking.
- isActing(...)
- isActing()
Returns True if the character is currently taking an action, and False
otherwise.
- isInGroup(...)
- isInGroup(usergroup)
Returns whether a character belongs to a specified user group.
- isinstance(...)
- isinstance(prototype)
returns whether the character inherits from a specified mob prototype.
- page(...)
- page(text)
Send text to the character in paginated form e.g., for helpfiles and
.other large blocks of text.
- see_as(...)
- see_as(thing)
Returns the name by which a character sees a specified object, exit, or
other character.
- send(...)
- send(mssg, dict = None, newline = True)
Sends message to the character. Messages can have scripts embedded in
them, using [ and ]. If so, a variable dictionary must be provided. By
default, 'me' references the character being sent the message.
- send_raw(...)
- send_raw(mssg)
Sends message to the character with no newline appended.
- sendaround(...)
- sendaround(mssg, dict = None, cansee_only = False, newline=True)
Sends a message to everyone in the character's room. Messages can have
scripts embedded in them using [ and ]. If so, a variable dictionary
must be provided. By default, 'me' references the person sendaround is
called on, and 'ch' references each character being sent a message.
- set_alias(...)
- set_alias(name, value)
Set a character's alias. Value must be a string.
- set_routine(ch, routine, repeat=False, checks=None)
- Sets a routine to a character. Routine steps can constain commands
(character strings), functions (one argument, ch), or tuples
(delay, string | function). If a tuple is not supplied, the default
step time is used
- setvar(...)
- setvar(name, val)
Set value of a special variable for the character. Values must be
strings or numbers. This function is intended to allow scripts and
triggers to open-endedly add variables to characters.
- startAction(...)
- startAction(delay, on_complete, on_interrupt=None, data=None, arg='')
Begins a new delayed action for the character. Delay is in seconds.
on_complete is a function taking three arguments: the character, the
data, and the argument. Argument must be a string, data can be anything.
on_interrupt takes the same arguments as on_complete, but is instead
called if the character's action is interrupted.
- store(...)
- store()
Return a storage set representing the character.
Data descriptors defined here:
- age
- Value is the difference between the character's creation time and the
current system time. Immutable.
- aliases
- A list of all aliases the character currently has defined. Immutable.
- birth
- Value is the character's creation time (system time). Immutable.
- bodyparts
- An immutable list naming all of the character's bodyparts.
- desc
- A character's verbose description for e.g., when they are looked at.
- eq
- An immutable list of the character's worn equipment.
See equip() and unequip() for altering a characters worn items.
- gender
- Alias for char.Char.sex
- heshe
- Value is 'he', 'she', or 'it'. Immutable.
- hidden
- Integer value representing how hidden the character is. Default is 0.
- himher
- Value is 'him', 'her', or 'it'. Immutable.
- hisher
- Value is 'his', 'her', or 'its'. Immutable.
- inv
- An immutable list of objects in the character's inventory.
See obj.Obj.carrier for altering an item's carrier.
- is_npc
- Value is True if character is an NPC, and False otherwise. Immutable.
- is_pc
- Value is negation of char.Char.is_npc
- keywords
- A comma-separated list of the keywords for referencing the character.
- last_room
- The last room a character was in. Immutable. Value is None if character
was not previously in a room.
- look_buf
- When characters look at something, the thing's description is copied to
the character's look buffer for processing before being sent.
- mdesc
- The equivalent of mname, for room descriptions.
- mname
- The character's name for describing packs, e.g.,
a horde of 9001 mosquitos. The number should be replaced by %d, or not
included.
- mob_class
- The main prototype the mobile inherits from. Immutable.
- name
- The characer's name, e.g., Grunald the Baker.
- notepad
- Returns the character's notepad, if any
- objs
- An alias for inv to be consistent with how room and object contents are
accessed.
- on
- The furniture the character is sitting on/at. Value is None if character
is not currently on furniture. Set value to None to remove a character
from their furniture.
- pos
- Alias for char.Char.position.
- position
- The character's current position (e.g., standing, sleeping, sitting).
- prototypes
- A comma-separated list of prototypes the mobile inherits from. Immutable.
- race
- The character's race.
- rdesc
- The character's description when seen in a room, e.g.,
Bob is here, baking a cake.
- room
- The current room a character is in. Can be set by room or room key.
- sex
- The character's sex. Can be male, female, or neutral.
- sock
- Alias for char.Char.socket
- socket
- The current socket this character is attached to. Value is None if
socket does not exist. Immutable. Use mudsys.attach_char_socket to
attach a character and socket to each other.
- uid
- The character's unique identification number. Immutable.
- user_groups
- A comma-separated list of user groups the character belongs to.
Use char.Char.isInGroup(group) to check for a specific group. Immutable.
- weight
- Floating point value representing how heavy the character is.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x6f380>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|