[CODE] Clan Insignia's

From: john (psbait@BRIGHT.NET)
Date: 07/25/98


Here is a bit of code, for chars to goto there clan hall.
It is used with the patch on the Snippit Site.
If anyone would like a Little piece of code, to have a random Opening
Screen and a Random Bad Command Message that is differ the Hhu?!?
Email Me at: psbait@bright.net
You newbie coder Wam :)
Also you must add the Eq postion Insignia

/* Code to Transfer Chars to The Clan Hall */
ACMD(do_insignia){
 int clan_num, hall;
    one_argument(argument, arg);
/* If you are a Immort insignia is differ */
if (GET_LEVEL(ch) >= LVL_IMMORT){
 if(!*arg){
  send_to_char("Usage: insignia <clan num>\r\n", ch); /* Sends to the
Imm, How to use the insignia */
 return;
 }
 /* Make Sure the is a Clan that has that number */
 if ((clan_num = find_clan_by_id(atoi(arg) + 1)) < 0) {
           send_to_char("There is no such Clan!\r\n", ch);
  return;
 }
 /* Assigns The Clan to the imm */
GET_CLAN(ch)= atoi(arg) + 1;
}else {
 /* If you a !IMMORT, You cant be Fighting to use the command*/
 if (GET_POS(ch) == POS_FIGHTING)
  send_to_char("No way!  You're fighting for your life!\r\n", ch);
/*Make Sure You are in a Clan */
 if((clan_num=find_clan_by_id(GET_CLAN(ch)))<0 || GET_CLAN_RANK(ch) <=
0) {
      send_to_char("You do not belong to a Clan!!!\r\n", ch);
 return;
 }
/*You Must be useing a Insignia*/
if(!GET_EQ(ch, WEAR_INSIGNIA)){
    send_to_char("You must be useing a insignia!\r\n", ch);
 return;
 }
}
/*Goes Though the List of bulit clan halls*/
switch(GET_CLAN(ch)) {
/* Bod's Clan hall */
case 1:
hall = 1;
break;
/* If the Clan Does not have a Clan hall*/
  default:
   send_to_char("Your Clan Does not own a Clan Hall yet.\r\n", ch);
  break;

  }
/* If Immort, Changes the Clan Back */
if (GET_LEVEL(ch) >= LVL_IMMORT)
 GET_CLAN(ch) = -1;
/*Sends a Message to the Room */
   act("$n suddenly disappears.", TRUE, ch, 0, 0, TO_ROOM);
/*Remove the Char From the Room */
   char_from_room(ch);
/*Send Char to the Clan Hall */
      char_to_room(ch, hall);
   act("$n suddenly appears.", TRUE, ch, 0, 0, TO_ROOM);
/*Makes The Char look at the Room */
   look_at_room(ch, 0);
/* Set The Hall as the Chars Load Room */
if (GET_LEVEL(ch) < LVL_IMMORT){
   SET_BIT(PLR_FLAGS(ch), PLR_LOADROOM);
   GET_LOADROOM(ch) = hall;
}
}


     +------------------------------------------------------------+
     | 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/15/00 PST