Inheritable Guild Object *** Originally coded by Namhas and Madrid Recoded by Dranil *** set_guild(string) Sets the name for the guild. i.e. set_guild("Thieves"); *** set_guildmaster(string) Sets the name of the guildmaster. Used to determine the target of money you pay for training. i.e. set_guildmaster("jorma"); *** set_titles(string*) Sets the level-titles for the guild. There is no longer set_levels(), because it wasn't really needed. i.e. set_titles(({"Novice Thief", "Rogue"})); *** add_avail_skill(string skill, int *percents) skill - skillname percents - array of percents per level, with the same amount of elements as there are levels in that guild i.e. add_avail_skill("pick pockets",({30,50})); *** add_req_skill(string skill, int *percents) skill - skillname percents - array of skills required to get to _that_ level(not next level as it used to be), with the same amount of elements as there are levels in that guild i.e. add_req_skill("pick pockets",({0,30})); *** set_default_train_msg(string) used to set default message for training - put [skill_name] to each place in the string, where you want the skill name added i.e. set_default_train_msg("You train [skill_name].\n"); *** set_skill_train_msg(skill, text) sets training message 'text' for skill i.e. set_train_message_skill("pick pockets", "You learn a couple of tricks about " + "cut-pursing.\n"); *** set_custom_advance_msg(string) used to set the text you see, as you raise a guild-level put [title] to each place in the string you want to include the new title you got. i.e. set_custom_advance_msg("Congratulations, [title]!\n"); *** Additional Information - (written by madrid to previous version, with little changes by dranil) 1. Each guild must inherit GUILD; 2. don't use inherit ROOM; use create_guild() not create_room() use init_guild() not init() 3. in init_guild() you must add the following: init_guild () { add_action ("do_info", "info"); add_action ("do_join","join"); add_action ("do_advance","advance"); add_action ("do_train","train"); } 4. You should make some poster or something else in your guild that tells them each add action they can use and such. *** CHANGES FROM LAST VERSION: - Avail_skills and req_skills mappings have different syntax now. - Add_avail_skill() and add_req_skill() commands recoded. - There is no longer do_members() or members-array, for now on the information of joined guilds is in player-object. If you want a list of all members to your guildroom, code that yourself. But beware... i bet it will be hard to make it work perfectly as someone can reinc out of your guild! - Do_info() recoded to be a bit nicer. - More added to do_info() - Added guild_desc and set_guild_desc() so that you can see some information-text about the guild on do_info-command. - Set_guildmaster() added - Do_info() no longer bugs if there is no skills required/available on a level. - Training adds exp to player, as it before changed the skill_chance directly, what it is not supposed to do. - Training uses money nowadays -> you have to have a guildmaster in guild to whom you pay for the training. - When you type train without arguments, you get a list of all available skills - a couple of functions added to make the code a bit more clear - customable train-messages - customable advance msg *** What I'll add in near future: - Fix do_train to be a bit smarter. There's a couple of holes still. - Make it possible to put optional level-requirements, so that the player can choose which one to concentrate on. - Code add_avail_skill_spread(string name, int start_lvl, end_lvl, start_percent, end_percent) -> spreads skill-availability evenly on levels from start_lvl to end_lvl, so that on start_lvl it's available to train start_percent and on end_level it's available to train end_percent. Also code add_req_skill_spread(). Feel free to give me more ideas... (or to madrid too) drAnil the overlord of chaos