Re: [CODE] guilds

From: Chuck Reed (creed@I-55.COM)
Date: 11/23/97


>struct guild_info {
>  sh_int guild_room;  // vnum of the room
>  sh_int class;       // class
>  void whatever_other_stuff_you_need;
>};
>
>then make an array of these..
>
>struct guild_info guilds[] = {
>  { 3021, CLASS_CLERIC, "poo" },
>  { 5470, CLASS_WARRIOR, "foo" }
>  { -1, -1, "\r\n" }
>};
>
>then in the guildmaster special, just do a check:
>
>  for (i = 0; guilds[i].class != -1; i++) {
>    if ((GET_CLASS(ch) == guilds[i].class) && // right class?
>       (world[ch->in_room].number == guilds[i].guild_room)) // right room?
>      found = TRUE;
>
>  if (!found) {
>    send_to_char("you can't do that here.\r\n", ch);
>    return;
>  }
>
>  do_guild_related_stuff_here..
>

Thanks a ton, this should give me a base idea of how to start it off.

>another way to do it would be to make it so that only people of that
>specific class can get into their guild..like we did with the magical
>guildhall of midgaard, and the teleporting wizard :)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I know, I wrote that for you silly :P.

Thanks Siv,
Chuck


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST