INFO rooms - general comments on room creation DESCRIPTION This is the file that explains how to make your rooms. First of all learn how to write files in the mud, this can be does with ed or with ftp. (Se /doc/build/ed or ftp in wizbook. Read the example rooms to see how the code for rooms can look, they should be updated to the newest way of how to code rooms. When you want more advanced things in your rooms we recommend that you look at other rooms and read the doc for the room you inherit e.g. /doc/std/basic_room.doc See the below example (taken from /room/jetty.c). More examples can be found in /doc/examples . /* Always set the constant variables (yes, it sounds silly...) * in reset(), after the if(arg) return statement. */ inherit "/std/basic_room"; reset(arg) { /* There should be a bag here every reset */ if (!present("bag")) move_object(clone_object("obj/bag"),this_object()); if(arg) return; /* Code before this line is run every reset (it takes a couple of hour between resets). Code after this line is only run when the room is created. */ add_property("outside"); /* This room is outside. */ add_property("water"); /* There is water here. */ set_light(1); /* There is light in this room */ set_short("Jetty"); /* Description when using brief mode */ set_long("You are at a jetty. The waves rolls in from the east.\n"+ "A small path leads back to the west.\n"); /* Description */ add_exit("west","/room/vill_shore"); /* Obvious exits */ add_exit("east","/room/sea"); /* Obvious exits */ /* And here comes thing that you can examine. */ add_item("path","The path leads back to the village.\n"); add_item("village","You can't see the village from here.\n"); add_item("jetty", "It's a very well-built stone jetty which makes you \n"+ "wonder if there is a harbour around.\n"); add_item( ({ "wave", "waves" }), "Quite ordinary waves splash against the jetty.\n"); } /* reset function ends here */
Help topics available:
COPYRIGHT | README | banish | castle | door |
ed | feelings | genders | general | hook |
key | mapsystem | prices | properties | rooms |
style/ | termcap | tourist_info | water_room_old |
You are guest number 100 since November 2019.
This file was last modified: June 2000.