I originally made this Christmas Tree for Danny LaRue on Freegate. Enjoy! It features lights, ornaments, and decorations. You can put presents under it, and it grows the more stuff it has on it. The Tree keeps track of who owns the various lights and decorations, and only the owners (and the Tree's owner, and wizards) can delete or edit their lights and decorations. Note the properties ".light_owners" and ".decoration_owners". Because there are already some owners listed, they will undoubtedly cause weirdness on your system. You should be able to simply empty out ".lights", ".decorations", ".light_owners", and ".decoration_owners" and start from scratch. CONTENTS: A Christmas Tree ($container:) @create $container named Christmas Tree:Christmas Tree,tree,pine tree @prop #4948."height" 120 rc @prop #4948."lights" {} rc ;#4948.("lights") = {"A garland of tiny Elvises, complete with gold lame jumpsuits, alternating with tiny Annette Funicellos, complete with Mouseketeer ears, all dance to the various Christmas carols.", "Little twinkling lights display the star and double cross of the Pottsylvanian Workers' Party and Contract Bridge Association.", "A cascade of twinkling lights flow from the tree in a high arch, and wrap themselves around %N and Pammie.", "The lights on the %T dance to the tune of 'Golden Road', and it's just for you.", "Strings of red and white lights form a candy-cane pattern up the sides of the %t.", "Searing laser beams erupt from the tree like an attack of Ceylon warriors.", "Blue and green lights dance and flicker on the Christmas Tree.", "A brilliant flash of warm light erupts from the %T as all the white lights shine at once, then slowly dim.", "Steady green lights enhance the %t's natural beauty.", "The %t is covered in red, blue, white, orange, and green lights.", "White and blue lights flash in opposition all over the %t.", "The %T is a dizzy spiral of blue lights that zip upwards.", "The %t's lights sparkle and twinkle blue and green."} @prop #4948."decorations" {} rc ;#4948.("decorations") = {"Six foot rubber tongue.", "a large candy apple.", "golden bauble", "a 12*36 South Bend Lathe, glistening with propylene glycol and brass chips", "taiwanese ribbon bird", "calico cat", "silver angel", "a school of tiny Virtual Pirahna swarming around the icon of a bloody cow skeleton, festooned with red tinsel", "a tiny black hole that flits about, sucking up the fallen needles and other detritus", "tiny pixies flying about the tree, sprinkling sparkling dust upon the ornaments", "a cloud of brightly coloured tropical fish swim amongst the branches, nibbling at the tinsle and popcorn-strings. Occasionally, one will bite a light, and electrocute itself", "paper cutout snowflakes containing unnatural angles", "a cheap plastic figure of Santa in a hula skirt, drinking a mai tai under a palm tree", "glow-in-the-dark plastic nativity scenes, circa 1968", "visions of sugar plums, who come out to dance upon your head", "a diminutive elf in green moving among the branches, filling various stockings with wonders beyond compare", "a tesseract in Christmas Infrared, and sub-atomic sparkles", "a miniature train moving along a track winding through the branches", "a tiny stage replica of the Desert Peach musical, with the Desert Peach and the Desert Fox singing 'It's a Nice Place for a Picnic'", "a pulsing Mandelbrot set", "a streamer of colored sand moving in a constant Infinity pattern without losing a single grain", "a static vortex of air sculpted in the shape of a reindeer", "a garland of interlocking aluminum rings, in a repeating rainbow pattern", "a live vulture named louie, wearing a top hat", "a live spider monkey swinging through the branches", "a delicate silver angel wearing a gauzy white robe. The robe is patterned with what appear to be diamonds and sapphires, laid out in gentle swirls and starbursts. Its hair is white and silky and it's eyes are closed. It is holding a songbook, which upon very close inspection, is open to 'God Rest Ye Merry Gentlemen'. As you lean in close to read it, you can hear what appears to be the angel humming the carol", "a pasta angel", "garlands of popcorn", "a number of shiny silver bullets on little hooks", "a gold and green tassel", "prunes", "strings of chiming bells", "delicate crystal snowflakes", "garlands of cranberries", "a toy airplane", "crystal flames", "blue tinsel", "fine gold tinsel", "a large number of toy candy canes", "a golden cherub, smiling beatifically at the top of the tree, while pouring wine for %N from a Greek pitcher", "a pewter Winnie-the-Pooh, holding a pot of honey and licking his paw", "plastic Disney characters, painted like stained glass", "a tiny red and gold acoustic guitar, with plastic strings"} @prop #4948."kind" "living" rc @prop #4948."home" #3143 rc @prop #4948."help_msg" {} rc ;#4948.("help_msg") = {"This is a Christmas tree! You can help decorate it. Type 'DECORATE TREE WITH ' to help decorate it. You can even 'PUT ON TREE' if you have built some tree ornaments. And you can 'PUT UNDER TREE' if you have some presents you've built that you'd like to give away.", "You can add light effects with 'STRING TREE WITH '.", "If you want, you can admire the tree, even while you're doing other things, with 'ADMIRE TREE [FOR MINUTES]'. And you can browse the decorations with 'VIEW/BROWSE TREE'. If you want to stop admiring the tree before your time is up, use 'IGNORE TREE'.", "You can see the lights or decorations that you've put on the tree with 'SHOW/LIST ON TREE, and you can remove your lights and decorations with 'REMOVE/DELETE FROM TREE'. You can change your description with 'CHANGE ON TREE'.", "You can get an explanation of a verb or command on the tree with 'EXPLAIN ON TREE' -- for example, 'EXPLAIN STRING ON TREE' or 'EXPLAIN DECORATE ON TREE'. For tips on making ornaments or presents, use 'EXPLAIN ORNAMENTS ON TREE' or 'EXPLAIN PRESENTS ON TREE'."} @prop #4948."listen_msg" "You hear some rustling deep inside the tree. It sounds like something's living there!" rc @prop #4948."lights_on" 1 rc @prop #4948."flashing_on" 1 rc @prop #4948."current_lights" 6 rc @prop #4948."light_flashing_time" {} rc ;#4948.("light_flashing_time") = {25, 45} @prop #4948."wizard_help" {} c ;#4948.("wizard_help") = {"You can turn the tree's lights on and off by using 'START LIGHTS ON TREE' and 'STOP LIGHTS ON TREE.' You can do the same with 'flashing' in place of lights. This will stop the forking. ", "You can remove a specific person from the list of admirers by using 'REMOVE_ADMIRER FROM TREE', if, for some reason, the player can't 'ignore' the tree.", "", "Explanations can be added for 'foo' by adding a property called 'foo_help' to the tree. Players who then do 'explain foo on tree' will be shown that property.", "Take (for objects -- gifts and ornaments) and remove (for non-objects -- decorations and lights) pass to each other if they think the player really meant the other verb. This can be disabled by setting the property 'tree.take_is_remove' to 0 (false)."} @prop #4948."editor" {} rc ;#4948.("editor") = {"dobj = this:match_object(dobjstr);", "if (dobj in this.contents)", "if (((prepstr == \"off\") || (prepstr == \"from\")) || (prepstr == \"off of\"))", "pass(@ARGS);", "if (!(dobj in this.contents))", "if (dobj in this.gifts)", "this.gifts = listdelete(this.gifts,(dobj in this.gifts));", "this.height=this.height - this.gift_height;", "this.location:announce(player.name,\" takes a gift from the under the \",this.name,\".\");", "player:tell(\"You take the gift from under the tree.\");", "elseif (dobj in this.ornaments)", "this.ornaments=listdelete(this.ornaments,(dobj in this.ornaments));", "this.height=this.height-this.ornament_height;", "this.location:announce(player.name,\" takes an ornament from the \",this.name,\".\");", "player:tell(\"You take the ornament from the tree.\");", "endif", "endif", "else", "player:tell(\"You need to take things 'from' or 'off of' the \", this.name,\".\");", "endif", "elseif (args[1] in {\"light\",\"decoration\",\"*light\",\"*decoration\"} && this.take_is_remove)", "this:remove(@ARGS);", "else", "player:tell(\"There is no \",dobjstr,\" on or under the \",this.name,\".\");", "endif"} @prop #4948."admirers" {} rc ;#4948.("admirers") = {#1295, #2267, #2856, #2094, #4904, #2475, #5034, #162, #2662, #3834, #4935, #1744, #3660, #1303, #3530, #2360, #953, #1743, #2469, #1344, #5035, #161, #164, #4822, #2189} @prop #4948."admire_time" {} rc ;#4948.("admire_time") = {-666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, -666, 120, -666, -666, -666, -666, -666, -666} @prop #4948."light_owners" {} rc ;#4948.("light_owners") = {#5034, #5034, #4822, #4822, #4822, #164, #724, #4822, #4822, #4822, #4822, #4822, #4822} @prop #4948."tip" "At the very tip of the %t, a golden cherub rubs a silver %N down with oil, while golden dryads offer %o grapes and wine." rc @prop #4948."string_help" {} rc ;#4948.("string_help") = {"STRING TREE WITH allows you to add lights to the tree. When the tree is set to flash, lights are chosen randomly from all the lights available to it.", "Example: string tree with \"A brilliant flash of warm light explodes from the %T as all the white lights shine at once, then slowly dim.", "Also, see 'remove', 'show', and 'edit'.", "For a list of expansion wildcards, type EXPLAIN EXPANSION ON TREE."} @prop #4948."expansion_help" {} rc ;#4948.("expansion_help") = {"The following expansions work in 'string' and 'decorate':", " %T: The name of this tree.", " %t: The first alias of this tree.", " %k: The kind of tree this is.", " %h: The height of the tree (includes measurement word)", " %H: The home of the tree.", " %L: The location of the tree.", " %f: The low end of the time between light flashes (includes time unit).", " %F: The high end of the time between light flashes (includes time unit).", " %N: The looking player's name. ", " %s: The looking player's pronoun (he/she/it).", " %p: The looking player's possessive (his/hers/its).", " %o: The looking player's 'self' (him/her/it)."} @prop #4948."decoration_owners" {} rc ;#4948.("decoration_owners") = {#161, #724, #4789, #161, #1743, #1743, #161, #4904, #4904, #4904, #4904, #3660, #3660, #3660, #4904, #4904, #4904, #2360, #4822, #3780, #3780, #3780, #3660, #1743, #1743, #1305, #1743, #2189, #1771, #2189, #164, #724, #724, #2189, #4821, #1744, #1744, #4822, #4822, #4822, #4822, #4822, #4822} @prop #4948."browse_amount" 9 rc @prop #4948."browse_msg" "On the %T you see" rc @prop #4948."ornaments" {} rc ;#4948.("ornaments") = {#4277, #4850, #5099} @prop #4948."gifts" {} rc @prop #4948."many_gifts" 10 rc @prop #4948."many_ornaments" 15 rc @prop #4948."light_height" 2 rc @prop #4948."decoration_height" 2 rc @prop #4948."ornament_height" 3 rc @prop #4948."gift_height" 4 rc @prop #4948."decorate_help" {} rc ;#4948.("decorate_help") = {"'Decorate tree with ' allows you to add a decoration to the tree. When someone 'browses' the tree, they'll see some of the decorations.", "Example: decorate tree with \"a large number of toy candy canes", "Also see 'show', 'remove', and 'edit'.", "For a list of expansion wildcards, 'explain expansion on tree'."} @prop #4948."explain_help" {} rc ;#4948.("explain_help") = {"You can get explanations for the following verbs and topics:", " explain", " show/list", " decorate", " string", " remove/delete", " browse/view", " change/edit", "To use the 'explain' verb, type 'EXPLAIN ON TREE'."} @prop #4948."view_help" "View and Browse allow you to look at some of the decorations on the tree. You'll need to view a few times before you see all of the decorations!" rc @prop #4948."list_help" {} rc ;#4948.("list_help") = {"List/Show gives you a list of the 'lights' or 'decorations' that you have put on the tree. The number in front of the description is the number you use for 'remove' or 'change'.", "Example: list lights on tree", "Wizards can list all the lights or decorations by using *lights or *decorations."} @prop #4948."remove_help" {} rc ;#4948.("remove_help") = {"Use 'REMOVE/DELETE FROM TREE' to remove one of your lights or decorations from the Christmas tree.", "Example: remove decoration 3 from tree", "Wizards can use *light or *decoration to remove someone else's light or decoration. See 'list/show' for more information."} @prop #4948."change_help" {} rc ;#4948.("change_help") = {"You can change the light and decoration descriptions with 'CHANGE \"\" \"\" ON TREE'.", "Example:", "Original text of light 3: \"Strings of red lights and strings of white lights form a candy-cane pattern up the sides of the %t.\"", "change light 3 \"lights and strings of\" \"and\" on tree", "Final text of light 3: \"Strings of red and white lights form a candy-cane pattern up the sides of the %t.\"", "Note that 'change' changes ALL occurences of the first string to the second string. So if you change 'e' to 'Edward First,' you're likely in for a surprise. It is case sensitive, however.", "", "Wizards can use *light and *decoration to change other people's descriptions. See the explanation for 'list'."} @prop #4948."ornaments_help" {} rc ;#4948.("ornaments_help") = {"You can put objects on the tree. These should, in some way, be an ornament. When people look at the tree, they'll see a list of ornaments, so your name should be descriptive. When players 'look' at an ornament, the ornament's name is given by the 'title' function. You can override this function in your ornament if you need something special.", "If you want your ornament to do something, remember that it's location is the tree. To announce something to the room that the tree is in, you'll need something like: ", " 'this.location.location:announce(this.lyrics[random(length(lyrics))]);'", "If you want to only announce to people who are currently admiring the tree, you can check the list of admirers (this.location.admirers should do it). This will be less obnoxious to the room as a whole.", "You should also be able to patch into the tree's expansion verb ('explain expansion on tree' for a list of expansions), with something like \"New_String=this.location:expand(Old_String);"} @prop #4948."presents_help" {} rc ;#4948.("presents_help") = {"If you put an object under the tree, it should be something like a present. There are two ways to wrap a present that I can think of. One is to put it inside a 'wrapping paper' object whose description is \"Merry Christmas, Joe, from Fred!\" and can be unwrapped by Fred. The second (for those with smaller quotas) would be to hide or disable all the verbs, and have an 'unwrap' verb which resets the description and enables the object.", "Also, see the explanation of ornaments, with EXPLAIN ORNAMENTS ON TREE. Those tips should work here as well."} @prop #4948."look_msg" "One of the trees here has been strung with lights and ornaments for the holiday season. Feel free to add more decorations! It will be up until New Year's . . . " rc @prop #4948."take_is_remove" 1 rc ;#4948.("put_fail_msg") = "You can't do that!" ;#4948.("oremove_msg") = "" ;#4948.("remove_msg") = "" ;#4948.("oput_msg") = "" ;#4948.("put_msg") = "" ;#4948.("empty_msg") = "" ;#4948.("open_key") = 0 ;#4948.("key") = 0 ;#4948.("aliases") = {"Christmas Tree", "tree", "pine tree"} ;#4948.("description") = {"The 37-foot living Christmas Tree is covered with lights and decorations. A series of brilliant blue lights begin to flash in an odd sequence. Strangely, you realize that the Christmas Tree is calculating pi... At the very tip of the tree, a golden cherub rubs a silver Boris down with oil, while golden dryads offer him grapes and wine.", " Somebody has put some ornaments on the tree.", "There is a sign beside the tree."} @verb #4948:"g*et t*ake" this none none @program #4948:get if (this.location == player) player:tell("You already have the ", this.name, "!"); else player:tell("Is your heart a few sizes too small?"); if (this.location == player.location) this.location:announce(player.name, " is trying to take the Christmas tree!"); pass(@args); endif endif . @verb #4948:"d*rop th*row" this none none @program #4948:drop if (this.location == player) pass(@args); if (this.location == this.home) this.location:announce(player.name, "has returned the Christmas tree!"); player:tell("Now, didn't your heart grow five sizes today?"); endif else player:tell("You don't have the ", this.name, "!"); endif . @verb #4948:"listen" this none none rxd @program #4948:listen player:tell(this.listen_msg); . @verb #4948:"start" any on this d @program #4948:start if (dobjstr == "lights") if (this.lights_on) player:tell("The lights are already on!"); else this.lights_on = 1; player:tell("You turn the ", this.name, "'s lights on."); this.location:tell(player.name, " turns the ", this.name, "'s lights on."); endif elseif (dobjstr == "flashing") if (this.flashing_on) player:tell("The lights are already flashing!"); else this.flashing_on = 1; this:make_description(); player:tell("You start the ", this.name, "'s lights flashing."); if (this.lights_on) this.location:tell(player.name, " starts the ", this.name, "'s lights flashing."); endif endif else player:tell("You can start lights and flashing."); endif this:Flash_Lights(); . @verb #4948:"stop" any on this d @program #4948:stop if (dobjstr == "lights") if (this.lights_on) this.lights_on = 0; this:make_description(); player:tell("You turn the ", this.name, "'s lights off."); this.location:tell(player.name, " turns the ", this.name, "'s lights off."); else player:tell("The lights are already off!"); endif elseif (dobjstr == "flashing") if (this.flashing_on) this.flashing_on = 0; player:tell("You stop the ", this.name, "'s lights from flashing."); if (this.lights_on) this.location:tell(player.name, " stops the ", this.name, "'s lights from flashing."); endif else player:tell("The lights are already steady!"); endif else player:tell("You can stop lights and flashing on tree."); endif . @verb #4948:"read" any beside this rxd @program #4948:read if (dobjstr == "sign") player:tell("The ", dobjstr, " beside the ", this.name, " says:"); for n in (this.help_msg) player:tell(n); endfor if ((player == this.owner) || player.wizard) player:tell(); for n in (this.wizard_help) player:tell(n); endfor endif else player:tell("The only thing to read under this tree is the sign."); endif . @verb #4948:"Flash_Lights" this none this @program #4948:Flash_Lights while (this.lights_on && this.flashing_on) New_Flashing = random(length(this.lights)); Next_Wait = (this.light_flashing_time[1] + random(this.light_flashing_time[2])); this.current_lights = New_Flashing; this:make_description(); Current_Admirer = length(this.admirers); while (Current_Admirer > 0) Admirer = this.admirers[Current_Admirer]; if (Admirer.location == this.location) Lights = this.lights[New_Flashing]; Lights = strsub(Lights, "%t", "%T", 1); Lights = strsub(Lights, "%P", Admirer.name, 1); Lights = this:expand(Lights); Admirer:tell(Lights); if (this.admire_time[Current_Admirer] != -666) this.admire_time[Current_Admirer] = (this.admire_time[Current_Admirer] - Next_Wait); if (this.admire_time[Current_Admirer] <= 0) this.admirers = listdelete(this.admirers, Current_Admirer); this.admire_time = listdelete(this.admire_time, Current_Admirer); endif endif endif Current_Admirer = (Current_Admirer - 1); endwhile suspend(Next_Wait); endwhile . @verb #4948:"admire" this for any rxd @program #4948:admire Check_Index = 0; for Check_List in (this.admirers) Check_Index = (Check_Index + 1); if (player == Check_List) if (this.admire_time[Check_Index] == -666) player:tell("You are already a ", this.name, " admirer."); else player:tell("You are already a ", this.name, " admirer, with ", this.admire_time[Check_Index] / 60, " minutes left."); endif return; endif endfor if (args[3] == "-666") Time = -666; else Time = (60 * tonum(iobjstr)); endif this.admirers = listinsert(this.admirers, player, 1); this.admire_time = listinsert(this.admire_time, Time, 1); player:tell("You admire the ", this.name, "."); . @verb #4948:"ignore" this none none @program #4948:ignore Current_Admirer = length(this.admirers); while (Current_Admirer > 0) if (player == this.admirers[Current_Admirer]) this.admirers = listdelete(this.admirers, Current_Admirer); this.admire_time = listdelete(this.admire_time, Current_Admirer); player:tell("You are no longer admiring the ", this.name); return; endif Current_Admirer = (Current_Admirer - 1); endwhile player:tell("How can you ignore the ", this.name, "? You aren't admiring it."); . @verb #4948:"admire" this none none @program #4948:admire this:admire(this, "for", "-666"); . @verb #4948:"string" this with any @program #4948:string if (player.location == this.location) Light_Owner = player; Light_Description = iobjstr; this.lights = listinsert(this.lights, Light_Description); this.light_owners = listinsert(this.light_owners, Light_Owner); this.height = (this.height + this.light_height); player:tell("You string the tree."); this.location:announce(player.name, " strings some lights on the ", this.name); else player:tell("You can't string lights on the tree from another room!"); endif . @verb #4948:"make_description" this none this @program #4948:make_description Tree_Description = {" "}; Tree_Description[length(Tree_Description)] = (((((("The " + tostr(this.height / 12)) + "-foot ") + this.kind) + " ") + this.name) + " is covered with lights and decorations."); if (this.lights_on) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + this.lights[this.current_lights]); else Tree_Description[length(Tree_Description)] = (Tree_Description[length(Tree_Description)] + " The lights are not turned on at the moment."); endif Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + this.tip); if (length(this.ornaments) > 0) Tree_Description = {@Tree_Description, @{" "}}; endif if (length(this.ornaments) > this.many_ornaments) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "There are special ornaments all over the tree."); elseif (length(this.ornaments) > 2) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "Somebody has put some ornaments on the tree."); elseif (length(this.ornaments) == 1) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "A beautiful ornament adorns the tree."); endif Tree_Description = {@Tree_Description, {" "}}; Tree_Description[length(Tree_Description)] = "There is a sign beside the tree."; if (length(this.gifts) > this.many_gifts) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "There are many gifts under the tree."); elseif (length(this.gifts) > 2) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "There are some gifts under the tree."); elseif (length(this.gifts) == 1) Tree_Description[length(Tree_Description)] = ((Tree_Description[length(Tree_Description)] + " ") + "There is a gift under the tree."); endif Full_Description = {}; for Tree_Line in (Tree_Description) Full_Description = {@Full_Description, this:expand(Tree_Line)}; endfor this.description = Full_Description; return Full_Description; . @verb #4948:"decorate" this with any @program #4948:decorate if (this.location == player.location) Decoration_Owner = player; Decoration_Description = iobjstr; this.decorations = listinsert(this.decorations, Decoration_Description); this.decoration_owners = listinsert(this.decoration_owners, Decoration_Owner); this.height = (this.height + this.decoration_height); player:tell("You decorate the tree."); this.location:announce(player.name, " decorates the Christmas Tree with ", Decoration_Description); else player:tell("It's awfully hard to decorate a tree from another room..."); endif . @verb #4948:"expand" this none this @program #4948:expand New_String = args[1]; New_String = strsub(New_String, "%T", this.name, 1); New_String = strsub(New_String, "%t", this.aliases[2], 1); New_String = strsub(New_String, "%k", this.kind, 1); New_String = strsub(New_String, "%h", tostr(this.height / 12) + " feet", 1); New_String = strsub(New_String, "%H", this.home.name, 1); New_String = strsub(New_String, "%L", this.location.name, 1); New_String = strsub(New_String, "%f", tostr(this.light_flashing_time[1] + 1) + " seconds", 1); New_String = strsub(New_String, "%F", tostr(this.light_flashing_time[2] + this.light_flashing_time[1]) + " seconds", 1); New_String = strsub(New_String, "%N", player.name, 1); Gender_Pro = $gender_utils:pronoun_sub("%{:he}", player); Gender_Pos = $gender_utils:pronoun_sub("%{:his}", player); Gender_Ind = $gender_utils:pronoun_sub("%{:him}", player); New_String = strsub(New_String, "%s", Gender_Pro, 1); New_String = strsub(New_String, "%p", Gender_Pos, 1); New_String = strsub(New_String, "%o", Gender_Ind, 1); return New_String; . @verb #4948:"explain" any on this rx @program #4948:explain Main_Name = {"view", "list", "remove", "change"}; Other_Name = {"browse", "show", "delete", "edit"}; Help_Text = ""; count = 1; while ((count <= length(Other_Name)) && (Help_Text == "")) if ((dobjstr == Other_Name[count]) || (args[1] == Other_Name[count])) Help_Text = (Main_Name[count] + "_help"); else count = (count + 1); endif endwhile if (count > length(Other_Name)) if (args[1] != "") Help_Text = (args[1] + "_help"); else Help_Text = (dobjstr + "_help"); endif endif Help = this.(Help_Text); if (typeof(Help) == STR) player:tell(Help); elseif (typeof(Help) == LIST) for n in (Help) player:tell(n); endfor else player:tell("No help on '", dobjstr, "'."); endif . @verb #4948:"browse view" any on this rxd @program #4948:browse if (dobj == this) Look_At = "all"; else Look_At = dobjstr; endif To_Browse = {}; if ((Look_At == "decorations") || (Look_At == "all")) To_Browse = {@To_Browse, @this.decorations}; endif if (length(To_Browse) > 0) Left_To_Browse = this.browse_amount; Final_Display = this.browse_msg; Separator = " "; while ((Left_To_Browse > 0) && (length(To_Browse) > 0)) To_Show = random(length(To_Browse)); Final_Display = (Final_Display + Separator); Final_Display = (Final_Display + tostr(To_Browse[To_Show])); To_Browse = listdelete(To_Browse, To_Show); Left_To_Browse = (Left_To_Browse - 1); if ((Left_To_Browse == 1) || (length(To_Browse) == 1)) Separator = "; and "; else Separator = "; "; endif endwhile player:tell(this:expand(Final_Display), "."); else player:tell("There is no way to view ", Look_At, " on the ", this.name); endif . @verb #4948:"browse view" this none none @program #4948:browse this:browse(); . @verb #4948:"p*ut in*sert d*rop" any any this @program #4948:put if (((prepstr == "on") || (prepstr == "from")) || (prepstr == "onto")) pass(@args); if (dobj.location == this) this.ornaments = listappend(this.ornaments, dobj); this.height = (this.height + this.ornament_height); player:tell("You hang the ", dobj.name, " from the ", this.name, "."); this.location:announce(player.name, " hangs a ", dobj.name, " on the ", this.name, "."); endif elseif (((prepstr == "under") || (prepstr == "beneath")) || (prepstr == "underneath")) pass(@args); if (dobj.location == this) this.gifts = listappend(this.gifts, dobj); this.height = (this.height + this.gift_height); player:tell("You put the ", dobj.name, " under the ", this.name, "."); this.location:announce(player.name, " puts a present under the ", this.name, "."); endif else player:tell("You can only put things 'on' or 'under' the ", this.name, "."); endif . @verb #4948:"show list" any on this @program #4948:show if (dobjstr == "decorations") count = 1; Player_Count = 0; while (count <= length(this.decoration_owners)) if (this.decoration_owners[count] == player) Player_Count = (Player_Count + 1); player:tell(Player_Count, ": ", this.decorations[count]); endif count = (count + 1); endwhile elseif (dobjstr == "lights") count = 1; Player_Count = 0; while (count <= length(this.light_owners)) if (this.light_owners[count] == player) Player_Count = (Player_Count + 1); player:tell(Player_Count, ": ", this.lights[count]); endif count = (count + 1); endwhile elseif ((dobjstr == "*decorations") && ((player == this.owner) || player.wizard)) count = 1; while (count <= length(this.decoration_owners)) player:tell(count, ": ", this.decoration_owners[count].name, ": ", this.decorations[count]); count = (count + 1); endwhile elseif ((dobjstr == "*lights") && ((player == this.owner) || player.wizard)) count = 1; while (count <= length(this.light_owners)) player:tell(count, ": ", this.light_owners[count].name, ": ", this.lights[count]); count = (count + 1); endwhile else player:tell("There is no ", dobjstr, " for you to list."); endif . @verb #4948:"remove delete" any from this rxd @program #4948:remove ToRemove = tonum(args[2]); DoAll = (((args[1] == "*light") || (args[1] == "*decoration")) && (player.wizard || (player == this.owner))); if (ToRemove > 0) if ((args[1] == "light") || ((args[1] == "*light") && DoAll)) Count = 1; Player_Count = 0; while ((Count <= length(this.lights)) && (Player_Count < ToRemove)) if ((this.light_owners[Count] == player) || DoAll) Player_Count = (Player_Count + 1); endif Count = (Count + 1); endwhile if ((Player_Count == ToRemove) && ((this.light_owners[Count - 1] == player) || (DoAll && (ToRemove <= length(this.lights))))) player:tell("To put this light back, type:"); player:tell("string tree with \"", this.lights[Count - 1]); player.location:announce(player.name, " takes a string of lights off the ", this.name, "."); if ((player != this.light_owners[Count - 1]) && (this.light_owners[Count - 1].location == this.location)) this.light_owners[Count - 1]:tell("In fact, it's *your* string of lights."); endif this.lights = listdelete(this.lights, Count - 1); this.light_owners = listdelete(this.light_owners, Count - 1); this.height = (this.height - this.light_height); else player:tell("You don't have a ", args[1], " that high."); endif elseif ((args[1] == "decoration") || ((args[1] == "*decoration") && DoAll)) Count = 1; Player_Count = 0; while ((Count <= length(this.decorations)) && (Player_Count < ToRemove)) if ((this.decoration_owners[Count] == player) || DoAll) Player_Count = (Player_Count + 1); endif Count = (Count + 1); endwhile if ((Player_Count == ToRemove) && ((this.decoration_owners[Count - 1] == player) || (DoAll && (ToRemove <= length(this.decorations))))) player:tell("To put this decoration back, type:"); player:tell("decorate tree with \"", this.decorations[Count - 1]); this.location:announce(player.name, " takes ", this.decorations[Count - 1], " off the ", this.name, "."); if ((player != this.decoration_owners[Count - 1]) && (this.decoration_owners[Count - 1].location == this.location)) this.decoration_owner[Count - 1]:tell("I hope he has your permission, ", this.decoration_owner[Count - 1].name, "!"); endif this.decorations = listdelete(this.decorations, Count - 1); this.decoration_owners = listdelete(this.decoration_owners, Count - 1); this.height = (this.height - this.decoration_height); else player:tell("You don't have a ", args[1], " that high."); endif else player:tell("There are no ", args[1], "s to remove."); endif elseif ((this:match_object(dobjstr) in this.contents) && this.take_is_remove) this:take(@args); else player:tell("The correct way to use 'remove' is:"); this:explain("remove"); endif . @verb #4948:"edit change" any on this @program #4948:edit if ((length(args) == 6) && (args[3] != "")) ToChange = tonum(args[2]); DoAll = (((args[1] == "*light") || (args[1] == "*decoration")) && (player.wizard || (player == this.owner))); if (ToChange > 0) if ((args[1] == "light") || ((args[1] == "*light") && DoAll)) Count = 1; Player_Count = 0; while ((Count <= length(this.lights)) && (Player_Count < ToChange)) if ((this.light_owners[Count] == player) || DoAll) Player_Count = (Player_Count + 1); endif Count = (Count + 1); endwhile if ((Player_Count == ToChange) && ((this.light_owners[Count - 1] == player) || (DoAll && (ToChange <= length(this.lights))))) player.location:announce(player.name, " modifies a string of lights on the ", this.name, "."); if ((player != this.light_owners[Count - 1]) && (this.light_owners[Count - 1].location == this.location)) this.light_owners[Count - 1]:tell("In fact, it's *your* string of lights."); endif this.lights[Count - 1] = strsub(this.lights[Count - 1], args[3], args[4], 1); player:tell(this.lights[Count - 1]); else player:tell("You don't have a ", args[1], " that high."); endif elseif ((args[1] == "decoration") || ((args[1] == "*decoration") && DoAll)) Count = 1; Player_Count = 0; while ((Count <= length(this.decorations)) && (Player_Count < ToChange)) if ((this.decoration_owners[Count] == player) || DoAll) Player_Count = (Player_Count + 1); endif Count = (Count + 1); endwhile if ((Player_Count == ToChange) && ((this.decoration_owners[Count - 1] == player) || (DoAll && (ToChange <= length(this.decorations))))) this.location:announce(player.name, " changes ", this.decorations[Count - 1], " on the ", this.name, "."); if ((player != this.decoration_owners[Count - 1]) && (this.decoration_owners[Count - 1].location == this.location)) this.decoration_owner[Count - 1]:tell("I hope he has your permission, ", this.decoration_owner[Count - 1].name, "!"); endif this.decorations[Count - 1] = strsub(this.decorations[Count - 1], args[3], args[4], 1); player:tell(this.decorations[Count - 1]); else player:tell("You don't have a ", args[1], " that high."); endif else player:tell("There are no ", args[1], "s to change."); endif else player:tell("The correct way to use 'change' is:"); this:explain("change"); endif else player:tell("The correct way to use 'change' is:"); this:explain("change"); endif . @verb #4948:"close open" any any any d @program #4948:close player:tell("I don't understand ", verb, " ", argstr, "."); . @verb #4948:"ta*ke g*et" any any this rxd @program #4948:take dobj = this:match_object(dobjstr); if (dobj in this.contents) if (((prepstr == "off") || (prepstr == "from")) || (prepstr == "off of")) pass(@args); if (!(dobj in this.contents)) if (dobj in this.gifts) this.gifts = listdelete(this.gifts, dobj in this.gifts); this.height = (this.height - this.gift_height); this.location:announce(player.name, " takes a gift from the under the ", this.name, "."); player:tell("You take the gift from under the tree."); elseif (dobj in this.ornaments) this.ornaments = listdelete(this.ornaments, dobj in this.ornaments); this.height = (this.height - this.ornament_height); this.location:announce(player.name, " takes an ornament from the ", this.name, "."); player:tell("You take the ornament from the tree."); endif endif else player:tell("You need to take things 'from' or 'off of' the ", this.name, "."); endif elseif ((args[1] in {"light", "decoration", "*light", "*decoration"}) && this.take_is_remove) this:remove(@args); else player:tell("There is no ", dobjstr, " on or under the ", this.name, "."); endif . @verb #4948:"remove_admirer" any from this d @program #4948:remove_admirer if (valid(dobj)) To_Remove = dobj; Current_Admirer = length(this.admirers); while (Current_Admirer > 0) if (To_Remove == this.admirers[Current_Admirer]) this.admirers = listdelete(this.admirers, Current_Admirer); this.admire_time = listdelete(this.admire_time, Current_Admirer); To_Remove:tell("You are no longer admiring the ", this.name); return; endif Current_Admirer = (Current_Admirer - 1); endwhile player:tell(To_Remove.name, " isn't admiring the ", this.name, "."); else player:tell(dobjstr, " isn't a valid object."); endif . @verb #4948:"tell_contents" this none this @program #4948:tell_contents if (length(this.ornaments)) Ornaments = "Ornaments:"; separator = " "; for Ornament in (this.ornaments) Ornaments = ((Ornaments + separator) + Ornament:title()); separator = ", "; endfor player:tell(Ornaments); endif if (length(this.gifts)) Gifts = "Gifts:"; separator = " "; for Gift in (this.gifts) Gifts = ((Gifts + separator) + Gift:title()); separator = ", "; endfor player:tell(Gifts); endif . @verb #4948:"description" this none this @program #4948:description return this:make_description(); . "***finished***