/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#include "path.h"
inherit "/std/room.c";

#define BOARD_HAND "/obj/handlers/board_handler"
#define MIN_APPLY_TIME 60*60*12
/* Must be 12 hours old before applying */
string message, next_func;
int in_use;

setup()
{
   set_short("The application room");
   set_long("You are in the application room of New Moon. It is here "
      +"that mortal players can come to join the ranks of the "
      +"immortal, the creators. A man wearing a large badge "
      +"sits behind a black desk. \n");
   add_item( ({"desk", "table"}),
      "The desk is, in fact, a black obsidan rectangluar object "
      +"suspended 3 feet off the ground. Looking more closely at "
      +"it, you find its dimensions to be one by four by nine, "
      +"and inexplicably start humming 'Also Sprach Zaruthstra' "
      +"to yourself....\n");
   add_item( ({"official", "man", "person", "elder"}),
      "This official looking man is in charge of applications to "
      +"become creators. He is wearing a large badge which reads "
      +":-\n     Type 'apply' to apply for a creatorship. \n");
   add_item( "badge",
      "The badge reads :-\n"
      +"     Type 'apply' to apply for a creatorship. \n");
   add_exit("north", "corridor2", "door");
   set_zone("town hall");
   set_light(60);
}

void init()
{
   ::init();
   add_action("do_apply", "apply");
}

void editor()
{
   write("Enter text, ** to end.\n");
   write("] ");
   input_to("get_text");
}

void get_text(string str)  
{
   if(str == "**")
      {
      message += "\n";
      call_out(next_func, 1);
      return;
   }
   message += str + "\n";
   write("] ");
   input_to("get_text");
}

int do_apply()
{
if( (int)this_player()->query_time_on()> -MIN_APPLY_TIME )
{
notify_fail("Sorry, but you must be at least 12 hours old "
+"to apply for a creatorship on new Moon. Why not "
+"spend this time extending your knowledge of the mud "
+"so that you might better improve it if you do become "
+"a creator.\n");
return 0;
}
   if(in_use)
   {
   notify_fail("Somebody is in the process of applying "
              +"right now. Please try again later.\n");
   return 0;
   }
   in_use = 1;
   write("Thank you for applying for a creatorship on "
      +"New Moon. If you will be so kind as to answer the "
      +"following questions, your application will be "
      +"processed in due time.\n\n");
   message = this_player()->query_cap_name() + " " + ctime(time()) + "\n\n";
   message += "Other muds associated with :-\n\n";
   write("What other muds do/have you played and/or created on?\n");
   editor();
   next_func = "get_referees";
   return 1;
}

void get_referees()
{

  message += "Referees:-\n\n";
   write("Is there anyone here who knows you well enough to recommend you?\n");
   editor();
   next_func="do_apply2";
   return;
}

void do_apply2()
{
   message += "Lpmud/C experience :-\n\n";
   write("What experience have you with LpMud and/or C?\n");
   editor();
   next_func = "do_apply3";
   return;
}

void do_apply3()
{
   message += "Time on mud per week :-\n\n";
   write("How many hours per week could you spend creating here?\n");
   editor();
   next_func = "do_apply4";
   return;
}

void do_apply4()
{
   message += "English, spelling, grammar ability:-\n\n";
   write("How good are your english, spelling and grammar?\n");
   editor();
   next_func = "do_apply5";
   return;
}

void do_apply5()
{
   message += "Area of New Moon wanting work in :-\n\n";
   write("What area(s) of new Moon would you like to work in?\n");
   editor();
   next_func = "do_apply6";
   return;
}

void do_apply6()
{
   write("Thank you for your application.\n"
      +"You will be mailed regarding its success or failure.\n");
   seteuid((string)"/secure/master"->get_root_uid());
   if (!BOARD_HAND->add_message("applications",
                  this_player()->query_name(),
                  "I wanna be a creator!", message))
      write("Error writing message.\n");
    else
      write("Application posted successfully.\n");
   in_use = 0;
   return;
}