User Tools

Site Tools

#include <mudlib.h>
#include <ansi.h>
#pragma strong_types
inherit ROOM;
void reset (int arg)
  ::reset (arg);

  if (!present("soldier")) 
    tell_room(environment(this_player()),"Two guards arrive and take up station patrolling the area.\n");  

  if (arg) return;
  set_light (1);
  set_indoor (1);
  set_planet ("chapterhouse");
  set_short ("A Simple Room");
  set_long ("  This is a simple room on the planet Chapterhouse.  It has been created to show you\n\
the basics of room creation here on Dune.  We can see that we are indoors,\n\
thanks to the lamp in the corner of the room providing us with a little light!\n\
Someone has sneakily attached a lever to the floor.\n");
  add_item ("lamp", "A fancy little desk lamp.");
  add_item ("lever", "A small lever with a knob on the end that you could pull.");
  add_exit ("out", "/d/Space/stryder/planets/chap_station");
void init ()
  ::init ();
  add_action ("pull", "pull");
int pull (string str)
  if (!str || str != "lever")
    return notify_fail ("What are you trying to pull?\n");
  if (present("soldier"))
    return notify_fail ("The guards seem to be blocking the way!\n");
  write ("You pull the lever.  You feel healthier.\n");
  say (sprintf ("%s pulls the lever.  %s looks healthier.\n",
                 capitalize (this_player ()->query_real_name ()),
                 capitalize (this_player ()->query_pronoun ())));
  this_player ()->heal_self (50);
  return 1;

Yet again, we've built upon the basic room. We have created some guards to block the use of the lever. See the line by line description here.

coding/mobroom.txt · Last modified: 2010/04/09 16:48 by orbital