Home

[Package Index | Mudlib Index | Effect Index]

File /cmds/guild_base.c

This is the base object for all the guild/race commands. It handles all the common bits of guild/race commands, including teachability and help files.

Written by Pinkfish

Inherits

This class inherits the following classes /cmds/base.c

Includes

This class includes the following files /include/nroff.h and /include/cmds/guild_base.h

Method index

  • add_teach_skill(string, int, int)
    This method sets the teach level for the command.
  • can_teach_command(object, object)
    This method checks to see if the command can be taught or not.
  • help()
    This method returns the help as a string.
  • help_function()
    This method returns the help data as a function pointer.
  • query_command_name()
    This method returns the current command name of the command.
  • query_nroff_file()
    This method returns the name of the nroff help file associated with this command.
  • query_teach_guild()
    This method returns the currently set specific guild.
  • query_teach_skills()
    This method returns the current teach skill level.
  • query_www_help()
    This method returns the help in a html format for use with the web.
  • set_command_name(string)
    This method sets the name of the command.
  • set_nroff_file(string)
    Set the name of the nroff help file.
  • set_teach_guild(string)
    This method sets the command to be only able to be taught to a specific guild.
  • teach_command(object, object)
    This method actually teaches the command to the student.

Public Functions

These are functions that everyone can access.

.

    add_teach_skill
    void add_teach_skill(string skill,
                         int teach,
                         int learn)
    

    This method sets the teach level for the command. The player must be over this level in the teaching skill to be able to teach this command to the player. If this is set to 0, then teaching is inhibited.
    • Parameters:
      level - the new teaching level
    can_teach_command
    int can_teach_command(object teacher,
                          object student)
    

    This method checks to see if the command can be taught or not.
    • Parameters:
      teacher - the person doing the teaching
      student - the person being taught
    • Returns:
      0 on failure, 1 on success, -1 if teacher is too low level, -2 if student is too low level
        help
        string help()
        

        This method returns the help as a string.
        • Returns:
          the help as a string
            help_function
            function help_function()
            

            This method returns the help data as a function pointer. The function pointer needs to be evaluated to create the actual text.
            • Returns:
              the function pointer for the help text
                query_command_name
                string query_command_name()
                

                This method returns the current command name of the command.
                • Returns:
                  the current command name
                    query_nroff_file
                    string query_nroff_file()
                    

                    This method returns the name of the nroff help file associated with this command.
                    • Returns:
                      the nroff help file name
                        query_teach_guild
                        string query_teach_guild()
                        

                        This method returns the currently set specific guild. If this is 0 then the command can be taught to any guild.
                        • Returns:
                          the current teach guild
                            query_teach_skills
                            class teach_skill * query_teach_skills()
                            

                            This method returns the current teach skill level.
                            • Returns:
                              the current teach skill level
                                query_www_help
                                string query_www_help()
                                

                                This method returns the help in a html format for use with the web.
                                • Returns:
                                  a html string
                                    set_command_name
                                    void set_command_name(string name)
                                    

                                    This method sets the name of the command. This is used in the teaching to teach the command to the student.
                                    • Parameters:
                                      name - the new command name
                                        set_nroff_file
                                        void set_nroff_file(string str)
                                        

                                        Set the name of the nroff help file.
                                        • Parameters:
                                          str - the nroff help file name
                                            set_teach_guild
                                            void set_teach_guild(string guild)
                                            

                                            This method sets the command to be only able to be taught to a specific guild. If this is set to 0 then the command can be taught to any guild, this is the default.
                                            • Parameters:
                                              guild - the guild object it can be taught to
                                                teach_command
                                                int teach_command(object teacher,
                                                                  object student)
                                                

                                                This method actually teaches the command to the student.
                                                • Parameters:
                                                  teacher - the teacher of the command
                                                  student - the student of the command
                                                • Returns:
                                                  0 on failure, 1 on success, -1 if teacher is too low level, -2 if student is too low level
Valid HTML 4.01 Transitional
Valid CSS!
Read More