Room with Custom Exits

// Petrarch // a room with several types of exits // 1) normal exits // 2) add_exit (used to check requirements) // 3) add_invis_exits // 4) add_enter // 5) add_climb #include <std.h> inherit ROOM; int forest_check(); void create() { ::create(); set_short("lost in a forest"); set_day_long("This section of the forest is overgrown with tall " "trees that stretch to the sky. They block out almost " "all sunlight from above making it rather dark as well " "as drop the occassional leaf to the ground."); set_night_long("The forest is nearly completely dark. Any light " "from the moons or stars is completely blocked out from " "the tall overhanging trees."); set_items(([ "forest" : "The forest is thich with trees.", "sky" : "The sky can barely be seen though the tall trees.", "ground" : "The ground is littered with leaves and twigs from " "the tree braches above.", ({"leaves", "leaf", "twig", "twigs", "brach", "bracnches"}): "Leaves and twigs litter the ground.", ({"trees"}) : "The trees stretch high into the sky. One in " "particular is very large.", ({"tree", "large tree"}): "The largest tree here must be hundreds " "of years old. There is a giant hole in it, large enough " "to fit though even.", "hole":"It's large enough to enter.", ])); set_properties(([ "light" : 1, "night light" : 0, ])); set_exits(([ "south" : "/realms/petrarch/forest/f_room3.c", "north" : "/realms/petrarch/forest/f_room1.c", "east" : "/realms/petrarch/forest/f_room5.c", ])); add_exit("west", "/realms/petrarch/forest/f_room4.c", (: forest_check :) ); add_invis_exit("east"); add_enter("tree", "/realms/petrarch/forest/tree.c"); add_climb("tree", "/realms/petrarch/forest/brances.c", 50, "scurries up the tree") } // Just a nore about this add_climb() // The 50 is the acrobatic skill needed and the "scurries up the tree" // is the description people see as you leave that way when you type // <climb tree>. Also note that enter and climb can have the same // direction "tree" but go to different places int forest_check() { if(this_player()->is_player()) if(this_player()->query_level() < 20) { message("info", "A giant tree grows out of the ground immediately " "infront of you and blocks your way.", this_player()); message("info", this_player()->query_cap_name()+" attempts to " "go west, but a giant tree appears to block "+ this_player()->query_possessive()+" way.", this_object(), this_player()); message("info", "The tree disappears back into the ground.", this_object()); return 0; } return 1; }