CharCreationpublic interface CharCreationLibrary extends CMLibrary
| Modifier and Type | Interface | Description | 
|---|---|---|
| static class  | CharCreationLibrary.LoginResult | A response object from one of the login system methods, basically telling the caller
 something about the results of what was attempted. | 
| static interface  | CharCreationLibrary.LoginSession | This is the main login state machine transaction object. | 
| static class  | CharCreationLibrary.NewCharNameCheckResult | A response object from one of the name checking methods, telling the caller some specifics
 about the attempt to create a new character by testing a new name. | 
idConverter| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | canChangeToThisClass(MOB mob,
                    CharClass thisClass,
                    int theme) | Returns whether the given mob can change to the given class (that is,
 to become level 0 in that class) in the given theme. | 
| java.util.List<CharClass> | classQualifies(MOB mob,
              int theme) | Returns the list of all character classes that the given mob can change
 into, given their currrent state, and the given theme. | 
| CharCreationLibrary.LoginResult | completePlayerLogin(Session session,
                   boolean wizi) | Takes the given session and mobs login by putting the mob into the given start room
 in the world, checking their email, and seeing if they are allowed in. | 
| CharCreationLibrary.LoginResult | createCharacter(java.lang.String login,
               Session session) | Attempts to send the given session through the character creation process,
 at the end of which a character with the given login as name will be
 in the database, ready to load. | 
| CharCreationLibrary.LoginSession | createLoginSession(Session session) | Creates a new Login Session for the given Session, which will start the login state machine process
 that will end eventually with either a disconnect or a character logged in. | 
| CharCreationLibrary.LoginResult | finishLogin(Session session,
           MOB mob,
           Room startRoom,
           boolean resetStats) | Completes the given session and mobs login by putting the mob into the given start room
 in the world, checking their email, and seeing if they are allowed in. | 
| java.lang.String | generateRandomName(int minSyllable,
                  int maxSyllable) | Returns a random fantasy name with the range of syllables given. | 
| java.util.Enumeration<java.lang.String> | getBodyRoomIDs() | Returns an enumeration of all possible body room ids | 
| Room | getDefaultBodyRoom(MOB mob) | Given the characteristics of the given mob, this method returns
 the appropriate morgue room for the given mob. | 
| Room | getDefaultDeathRoom(MOB mob) | Given the characteristics of the given mob, this method returns
 the appropriate death room for the given mob. | 
| Room | getDefaultStartRoom(MOB mob) | Given the characteristics of the given mob, this method returns
 the appropriate start/recall room for the given mob. | 
| java.util.List<java.lang.String> | getExpiredAcctOrCharsList() | Returns the list of the names of all the expired Accounts
 or Characters, depending on whether the account system
 is used or not. | 
| int | getMaxCarry(MOB mob) | Returns the maximum weight the given mob can carry. | 
| int | getMaxFollowers(MOB mob) | Returns the maximum followers the given mob can have | 
| int | getMaxItems(MOB mob) | Returns the maximum items the given mob can carry. | 
| int | getTotalBonusStatPoints(PlayerStats playerStats,
                       PlayerAccount account) | Based on the rules of the system, this method returns the number of
 bonus stat points available to players to allocate, if the system
 lets them do such a thing. | 
| CostDef.Cost | getTrainingCost(MOB mob,
               int abilityCode,
               boolean quiet) | Returns the cost, in trains, for the given mob to gain a point in the
 given ability code stat number. | 
| void | initBodyRooms(CMProps page) | Initialize the rules for determining the new character morgue room
 given the characteristics of the player. | 
| void | initDeathRooms(CMProps page) | Initialize the rules for determining the new character death room
 given the characteristics of the player. | 
| void | initStartRooms(CMProps page) | Initialize the rules for determining the new character start/recall room
 given the characteristics of the player. | 
| boolean | isAvailableCharClass(CharClass C) | Returns whether the given character class may be selected by a user. | 
| boolean | isAvailableRace(Race R) | Returns whether the given race may be selected by a user. | 
| boolean | isBadName(java.lang.String login) | Returns only whether the given name has a bad word in it. | 
| boolean | isOkName(java.lang.String login,
        boolean spacesOk) | Returns whether the given name is a valid,  legitimate,
 unused, unbanned, non-bad name to use in coffeemud, for accounts
 or players. | 
| CharCreationLibrary.NewCharNameCheckResult | newAccountNameCheck(java.lang.String login,
                   java.lang.String ipAddress) | Checks whether an account with the given login name from the
 given ipAddress may be created at this time. | 
| CharCreationLibrary.NewCharNameCheckResult | newCharNameCheck(java.lang.String login,
                java.lang.String ipAddress,
                boolean skipAccountNameCheck) | Checks whether a character with the given login name from the
 given ipAddress may be created at this time. | 
| void | notifyFriends(MOB mob,
             java.lang.String message) | If any of the given mobs friends are online, they are sent the
 given message. | 
| boolean | performSpamConnectionCheck(java.lang.String address) | Does a connection spam check against the given address, returning true if all
 is well, and false if it needs blocking. | 
| void | promptBaseCharStats(int theme,
                   MOB mob,
                   int timeoutSecs,
                   Session session,
                   int bonusPoints) | A blocking call that populates the given mob with their base
 CharStats according to character creation rules. | 
| CharClass | promptCharClass(int theme,
               MOB mob,
               Session session) | A blocking call that populates the given mob with a character class
 according to character creation rules. | 
| char | promptGender(int theme,
            MOB mob,
            Session session) | A blocking call that populates the given mob with a particular gender
 according to character creation rules. | 
| Race | promptRace(int theme,
          MOB mob,
          Session session) | A blocking call that populates the given mob with a particular race
 according to character creation rules. | 
| java.util.List<Race> | raceQualifies(MOB mob,
             int theme) | Returns the list of all races that the given mob can choose
 into, given their currrent state, and the given theme. | 
| void | reloadTerminal(MOB mob) | Resets the MXP, MSP and other session flags based on the mobs
 attributes. | 
| void | reRollStats(CharStats baseCharStats,
           int pointsLeft) | Re-populates the base stats of the given CharStats
 object by resetting the values to minimum, and then
 adding as many of the given points to random stats
 until they are all gone. | 
| void | showTheNews(MOB mob) | Resets the terminal to the given mobs specs, shows
 any available polls, the daily message, and runs
 the MOTD. | 
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, ID, initializeClass, name, newInstancevoid reRollStats(CharStats baseCharStats, int pointsLeft)
baseCharStats - the charstats object to populatepointsLeft - the number of points above minimum to allocateCharStatsvoid promptBaseCharStats(int theme,
                         MOB mob,
                         int timeoutSecs,
                         Session session,
                         int bonusPoints)
                  throws java.io.IOException
theme - the theme code to use for stat allocationmob - the mob who is getting the new char statstimeoutSecs - number of seconds before prompt times outsession - the session which might help allocate the pointsbonusPoints - any bonus points to allocate to statsjava.io.IOException - any input errors that occurCharStats, 
Area.THEME_FANTASY, 
reRollStats(CharStats, int), 
promptCharClass(int, MOB, Session), 
promptRace(int, MOB, Session), 
promptGender(int, MOB, Session)CharClass promptCharClass(int theme, MOB mob, Session session) throws java.io.IOException
theme - the theme code to use for class selectionmob - the mob who is getting the new char classsession - the session which might help allocate the pointsjava.io.IOException - any input errors that occurCharStats, 
reRollStats(CharStats, int), 
promptBaseCharStats(int, MOB, int, Session, int), 
promptRace(int, MOB, Session), 
promptGender(int, MOB, Session), 
Area.THEME_FANTASYRace promptRace(int theme, MOB mob, Session session) throws java.io.IOException
theme - the theme code to use for race selectionmob - the mob who is getting the new racesession - the session which might help get the racejava.io.IOException - any input errors that occurCharStats, 
reRollStats(CharStats, int), 
promptBaseCharStats(int, MOB, int, Session, int), 
promptCharClass(int, MOB, Session), 
promptGender(int, MOB, Session), 
Area.THEME_FANTASYchar promptGender(int theme,
                  MOB mob,
                  Session session)
           throws java.io.IOException
theme - the theme code to use for gender selectionmob - the mob who is getting the new gendersession - the session which might help get the genderjava.io.IOException - any input errors that occurCharStats, 
reRollStats(CharStats, int), 
promptBaseCharStats(int, MOB, int, Session, int), 
promptCharClass(int, MOB, Session), 
promptRace(int, MOB, Session), 
Area.THEME_FANTASYCostDef.Cost getTrainingCost(MOB mob, int abilityCode, boolean quiet)
mob - the mob who is trying to trainabilityCode - the ability code the mob wants to trainquiet - true to not give verbal errorsCharStatsboolean canChangeToThisClass(MOB mob, CharClass thisClass, int theme)
mob - null or the mob who wants to learn a new classthisClass - the class that the mob wants to learntheme - the theme defining which classes are availableArea.THEME_FANTASY, 
classQualifies(MOB, int)java.util.List<CharClass> classQualifies(MOB mob, int theme)
mob - the mob who wants to change classestheme - the theme to filter the classes bycanChangeToThisClass(MOB, CharClass, int)java.util.List<java.lang.String> getExpiredAcctOrCharsList()
boolean isAvailableRace(Race R)
R - the Race to checkboolean isAvailableCharClass(CharClass C)
C - the CharClass to checkjava.util.List<Race> raceQualifies(MOB mob, int theme)
mob - the mob who wants to do some racingtheme - the theme to filter the races bycanChangeToThisClass(MOB, CharClass, int)boolean isOkName(java.lang.String login,
                 boolean spacesOk)
login - the name to testspacesOk - true if spaces in the name are ok, false otherwiseisBadName(String), 
isOkName(String, boolean), 
newCharNameCheck(String, String, boolean), 
newAccountNameCheck(String, String)boolean isBadName(java.lang.String login)
login - the name to testisOkName(String, boolean), 
newCharNameCheck(String, String, boolean), 
newAccountNameCheck(String, String)CharCreationLibrary.NewCharNameCheckResult newCharNameCheck(java.lang.String login, java.lang.String ipAddress, boolean skipAccountNameCheck)
login - the name to checkipAddress - the ip address of the name checkerskipAccountNameCheck - true to ignore account name matchesisBadName(String), 
isOkName(String, boolean), 
newAccountNameCheck(String, String), 
CharCreationLibrary.NewCharNameCheckResultCharCreationLibrary.NewCharNameCheckResult newAccountNameCheck(java.lang.String login, java.lang.String ipAddress)
login - the name to checkipAddress - the ip address of the name checkerisBadName(String), 
isOkName(String, boolean), 
newCharNameCheck(String, String, boolean)void reloadTerminal(MOB mob)
mob - the mob whose session needs to match hisshowTheNews(MOB)void showTheNews(MOB mob)
mob - the mob to show these things toreloadTerminal(MOB)void notifyFriends(MOB mob, java.lang.String message)
mob - the mob whose friends need notifyingmessage - the message to send to the mobs friends.CharCreationLibrary.LoginResult createCharacter(java.lang.String login, Session session) throws java.io.IOException
login - the name of the new charactersession - the session of the character creating personjava.io.IOException - an i/o error with the telnet sessionCharCreationLibrary.LoginResultvoid initStartRooms(CMProps page)
page - the properties containing info about the start roomsinitDeathRooms(CMProps), 
initBodyRooms(CMProps), 
getDefaultStartRoom(MOB)void initDeathRooms(CMProps page)
page - the properties containing info about the death roomsinitStartRooms(CMProps), 
initBodyRooms(CMProps), 
getDefaultDeathRoom(MOB)void initBodyRooms(CMProps page)
page - the properties containing info about the morgue roomsinitStartRooms(CMProps), 
initDeathRooms(CMProps), 
getDefaultBodyRoom(MOB)Room getDefaultStartRoom(MOB mob)
mob - the mob who needs to know their start roominitStartRooms(CMProps), 
getDefaultDeathRoom(MOB), 
getDefaultBodyRoom(MOB)Room getDefaultDeathRoom(MOB mob)
mob - the mob who needs to know their death roominitDeathRooms(CMProps), 
getDefaultStartRoom(MOB), 
getDefaultBodyRoom(MOB)Room getDefaultBodyRoom(MOB mob)
mob - the mob who needs to know their morgue roominitBodyRooms(CMProps), 
getDefaultStartRoom(MOB), 
getDefaultDeathRoom(MOB)java.util.Enumeration<java.lang.String> getBodyRoomIDs()
int getTotalBonusStatPoints(PlayerStats playerStats, PlayerAccount account)
playerStats - The player stats object for the playeraccount - the player account object for the player, if applicablejava.lang.String generateRandomName(int minSyllable,
                                    int maxSyllable)
minSyllable - the minimum number of syllables, at least 1maxSyllable - the maximum number of syllables, at least minimumint getMaxCarry(MOB mob)
mob - the mob who wants to carry stuffint getMaxItems(MOB mob)
mob - the mob who wants to carry stuffint getMaxFollowers(MOB mob)
mob - the mob who wants followersCharCreationLibrary.LoginResult finishLogin(Session session, MOB mob, Room startRoom, boolean resetStats) throws java.io.IOException
session - the session trying to loginmob - the mob trying to log instartRoom - the room they will appear inresetStats - true to reset their state (hit points, etc) or false to keep as-wasjava.io.IOException - any I/O errors during the processCharCreationLibrary.LoginResultboolean performSpamConnectionCheck(java.lang.String address)
address - the address to checkCharCreationLibrary.LoginResult completePlayerLogin(Session session, boolean wizi) throws java.io.IOException
session - the session trying to login, with the mob to loginwizi - true if the player should login wizinvisiblejava.io.IOException - any I/O errors during the processCharCreationLibrary.LoginSession createLoginSession(Session session)
session - the telnet session trying to login