Room example

Room example

Postby Suhis » 08.07.2011 15:08:50

Code: Select all
/**************************************************************************/
/* Example room coded by Xman X,                                 */
/* Please report all typos and wrong informations to Xman, Thanks         */
/**************************************************************************/
#include <mudlib.h>
#include <daemons.h>
inherit ROOM;

void reset(status arg)
{
  ::reset(arg);
  if(arg) return;                                   
  add_monster("/players/xman/monster",4);                       /* 1.  */
  set_short("Test room for newbie-wizards.\n");                /* 2.  */
  set_long("This is example room for newbie-wizards.\n");      /* 3.  */
  set_items(({"sign", "There is a little sign.\n",}));         /* 4.  */
  set_extra_objects(({"torch", "/objects/torch",}));           /* 5.  */
  set_night_items(({"window", "There is a nice window.\n",})); /* 6.  */
  set_day_items(({"lamp", "There is a little lamp.\n",}));     /* 7.  */
  set_enter_msg("Echo says 'Hello!'\n");                       /* 8.  */
  set_exit_msg("Echo says 'see you soon..'\n");                /* 9.  */
  set_smell("There is a terrible smell.\n");                   /* 10. */
  set_listen("You can hear soft voices.\n");                   /* 11. */
  set_night_desc("There is very dark and cold.\n");            /* 12. */
  set_day_desc("There is very warm and light.\n");             /* 13. */
  set_no_summon(1);                                            /* 14. */
  set_no_fight(1);                                             /* 15. */
  set_exits(({"players/xman/test", "up",                       /* 16. */
              "players/xman/test", "east", }));

 load_door(({
        "door number", 1,                                      /* 17. */
        "destination", "dir/dir/file",                         /* 18. */
        "direction", "north door",                             /* 19. */
        "open",                                                /* 20. */
        "description", "The door is a stalwart wooden door with steel /* 21. */
    reinforcements.\n",
        "lock id", "lock",                                     /* 22. */
        "lock description", "A heavy iron padlock. \n",        /* 23. */
        "lock difficulty", 6000,                               /* 24. */
        "key", "keyname",                                      /* 25. */
        }));

    set_light(10);                                             /* 26 */
    set_weather(0, 2, 0);                                      /* 27 */

}


//if you want it to show your name with creator <room> command
string query_creator() { return "CreatorName"; }
/*
1. 
With this you can add monsters on the room. Example:

add_monster("/players/xman/guard",4); == Clones four guards in the room.

!! NOTE: YOU HAVE TO WRITE IT AFTER THIS: if(arg) return;   

2. 
With this you can set the rooms short.

3. 
With long you can set the rooms long.

4. 
With this you can set items on the room.
Try 'la sign'

5. 
With this you can add extra objects.
'take torch' takes torch from /objects/torch

6. 
With this you can set night items.
You can see the items only when it is day.

7. 
With this you can set day items.
You can see the items only when it is day.

8. 
With this you can set enter msg.
You can see it only when you enter the room

9.   
With this you can set exit msg.
You can see it when you go out from the room.

10. 
With this you can set rooms smell.
You can smell it like 'smell'

11.
With this you can set the rooms listen.
You can hear it like 'listen'

12.
With this you can set the rooms night desc.
You see the desc only when it is night.

13.
With this you can set the rooms day desc.
You see the desc only when it is day.

14.
With this you can set the no summon in room.
set_no_summon(1); == You can't summon and relocate

15.
With this you can set the rooms fight.
set_no_fight(1); == You can't fight or cast spells/use skills in this room


16. With this you can set room exits.

17. Door number, this needs to be same in both rooms (one room can have many doors, numbers merge right doors in rooms)

18. Destination, Where this door leads? - IMPORTANT: it needs to be without / at the start. If there are / at the start it won't close/open the other door on otherside

19. Direction, Which direction this room leads? (also you should make north exit in room)

20. Open, What is the situation with door when reset comes.  "open", "closed", "locked", "unlocked"

21. Description, what does the door look like

22. Lock id, i'ts lock

23. Lock description, what does the lock look like.

24. Lock difficulty, How hard is it for thief to pick lock it (random pick locks skill > random lock difficulty)

25. Key, Which key fits to this lock

26. set_light, this can be negative number also.

27. set_weather values can be found from 'help weather'

Suhis
 
Posts: 180
Joined: 31.01.2004 13:31:16

Return to Manuals

Who is online

Users browsing this forum: No registered users and 1 guest

cron