User Tools

Site Tools


A basic room…

#include <mudlib.h>
#include <ansi.h>
#pragma strong_types

inherit ROOM;

void reset (int arg)
  ::reset (arg);
  if (arg) return;

  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");
  add_item ("lamp", "A fancy little desk lamp.");
  add_exit ("out", "/d/Space/stryder/planets/chap_station");

This “basic” room actually has a lot going on. I've tried to explain it as best I can line-by-line. —paradox 2010/04/05 20:34

I was getting there, just had to go to work… :-(orbital 2010/04/05 22:44

Considering the “less basic room” example, you might want to add the mob in this example as well. It's pretty simple, after all. —Sav/Savannah 2010/04/07

Monster generation has a lot to do with understanding inheritance and the reset timer, which apparently, for most people, including myself, can be a lot to deal with, I'll add that to the less less basic room… — orbital 2010/04/08 02:35

coding/basicroom.txt · Last modified: 2010/04/08 02:36 by orbital