;;#31053.("button_space") = 7 @chmod #31053."notes" r ;;#31053.("notes") = {"Status bits:", "1 bit:Power, 1=on, 0=off.", "1 bit:non-owner can press buttons (default=1)", "1 bit:non-owner can add destinations.", "1 bit:can only press buttons if in room. (default=1)", "", "Other properties", "button_space: number of spaces alloted for a button's name.", "name_space: number of spaces alloted for button's name/description.", "line_space: maximum entries per lin.", "return_time: the length of time it takes before returning the destination to it's default.", "notes: this!", "status: the prop holding the above bits.", "buttons: holds the destination buttons, {button_name,room#,description}.", "wizcom_own_only_msg: message told to non-owner wizards, as a warning...", "com_own_only_msg: permission denied message for non-wizards.", "default_dest: the normal destination, location of the \"return\" doorway.", "no_press_msg: message told if non-owners can't press button.", "power_off_msg: told in cases of power is off. (see above)", "partner: on this the number of the moving doorway, on moving and fixed doorways points to this.", "reloc_msg_pause: pause between lines when saying the relocation msg.", "no_dest_msg: msg for the destination won't accept people.", "ono_dest_msg: announced to room at same time as above.", "ret_pause: time between lines on reloc_msg.", "reloc_msg: message announced when starting to relocate. (to source)", "oreloc_msg: announced to remote and when starting to relocate."} ;;#31053.("line_space") = 2 @chmod #31053."status" r ;;#31053.("status") = 3 @chmod #31053."buttons" r ;;#31053.("buttons") = {{"default", #87343, "The Labyrinth"}, {"LivingR", #17, "The living room"}, {"Dine", #28, "The dining room"}, {"Lib", #1670, "The library"}, {"Tub", #388, "The hot tub"}, {"Museum", #50827, "The museum"}, {"Lbrinth", #87343, "The Labyrinth"}, {"Cottage", #72097, "Caretaker's Cottage"}} ;;#31053.("wizcom_own_only_msg") = {"This verb can only be used by the owner! However considering the fact that", "you're a wizard (at least I hope so, all things point to that) this verb will", "allow you to use it. Thank the programmer for being nice!"} ;;#31053.("com_own_only_msg") = {"With the current setting this function can only be used by the owner!"} ;;#31053.("name_space") = 25 ;;#31053.("default_dest") = #11 ;;#31053.("no_press_msg") = {"Its a good thing you're in the room with this or you wouldn't be able to press", "the buttons."} ;;#31053.("power_off_msg") = "%T is currently shut off." ;;#31053.("partner") = #98970 ;;#31053.("reloc_msg_pause") = 1 ;;#31053.("no_dest_msg") = {"You hear a high pitched whine comming from the %T it gradualy grows louder and", "louder until you hear the sound of something breaking at which point the whine", "stops, as you look through it you see that %T hasn't changed it's destination."} ;;#31053.("ono_dest_msg") = {"You see a fire and some smoke coming from a nearby doorway where %n has pressed", "a button on it, giving it a bad destination."} ;;#31053.("oreloc_msg") = {"%N presses a button on %t.", "You hear a high pitched whine emminating from from %t.", "As the noise becomes unbearable all of a sudden a brilliant flash comes from %t, and you see a different place through %t.", "As the sound from %t dies down the image in it seems to gain substance, and it resumes it's gray fuzzy appearence again."} ;;#31053.("remote_description") = {"Looking through the exit it appears really hazy with no clues as to where it", "leads to, by the side of it you see several buttons. You hear a hum comming", "from the doorway."} ;;#31053.("commands") = {"new", "list", "last", "commands", "status", "power"} ;;#31053.("generic") = #31053 ;;#31053.("wizhid_own_only_msg") = "There is stuff here that normaly won't show up for non-owners, do you wish to overide and see it?" ;;#31053.("spartner") = #89280 ;;#31053.("help_msg") = {"Please type 'press commands on this'.", "", "A run down on the customization options: (properties)", "wizcom_own_only_msg Message to wizards asks if they want to override.", "wizhid_own_only_msg Message to wizards asks if they want to see hidden stuff.", "com_own_only_msg Completly owner only message.", "owner_only_msg Setting dependant owner only (set for owner).", ".power_off_msg Sorry, the power is turned off, ask the owner for help.", "", "For the rest of these there is a simple convention, an 'o' prefix means its", "announced to the entire room that the exit is connected to, an 'r' prefix is", "announced to the destination, no prefix is announced to the player.", "", "no_press_msg Are you in the room with the doorway?", "(o)no_dest_msg Couldn't move stuff into the destination.", "[or]reloc_msg Well its okay, moving the portal. (announced line by line)", "reloc_msg_pause Pause between lines in above.", "return_pause How long it stays in place before returning to (ab)normal.", "[or]ret_msg Announced line by line when returning.", "ret_msg_pause Time between lines in above.", "", "The following are just extensions of the messages on normal exits, they're", "what are said instead of the normal message when the destination is not the", "normal:", "rem_nogo_msg", "rem_onogo_msg", "rem_arrive_msg", "rem_oarrive_msg", "rem_leave_msg", "rem_oleave_msg", "", "The description changes too, the property below is substituted when its in", "remote mode:", "rem_description (note currently remote_description, will change soon)", "", "Now the little more mundane properties:", "default_dest The default destination, set to #-1 if not connected normaly.", "partner A *critical* property, points to the partner.", "spartner Points to the doorway that goes the opposite way in normal mode.", "generic Pointer to the generic. (for this #31053)", "", "The most common problem is one of the .partner property being set wrong, the", "other one is it being set wrong on the partner doorway, note that the .spartner", "property is used purely as a reminder when you recycle one of these. Also be", "mindful of the fact that this is not guarenteed to be 100% bug free, and I'm", "still sticking in a few more things. If you can't seem to get it to work", "take a look at the one to the north of the tech room (#2973) which I keep in", "working order. BTW @chparent doesn't fully work...", "", "The doorway that gets moved around needs to be a child of #98970, or", "somebody has come up with another one thats a kid of that. It is suggested", "to make the semi-normal doorway that goes the other direction (if there is", "one) to be a kid of #89280."} ;;#31053.("general_commands") = {"Press/Push/Touch on - Activates either a command or a destination", " button.", "", " Command Buttons", " List - Displays a list of all curently defined destination buttons.", " Last - Displays the name of the last player to transport, plus dest. and time", " Commands - Displays command list (this list)", " New - Stores new room destination and label to panel (sometimes disabled)", " Status - Shows (for owner changes) the status of this.", ""} ;;#31053.("owner_commands") = {" Remove from - Removes a currently defined destination button", "", " Command Buttons: Power - Toggles the on/off status of the device", "", " Dest - Changes the destination of doorway", ""} ;;#31053.("oret_msg") = {"Warning! The exit is about to return!", "Warning! The exit is about to return!", "Goodbye, the exit is leaving."} ;;#31053.("return_pause") = 60 ;;#31053.("ret_msg_pause") = 1 ;;#31053.("owner_only_msg") = "Permission denied! Owner only!" ;;#31053.("last") = {} ;;#31053.("rret_msg") = "Please stand back this portal is just about to disappear." ;;#31053.("rreloc_msg") = "All of a sudden there is a brilliant flash and a doorway is standing here." ;;#31053.("rem_nogo_msg") = 0 ;;#31053.("rem_onogo_msg") = 0 ;;#31053.("rem_arrive_msg") = 0 ;;#31053.("rem_oarrive_msg") = 0 ;;#31053.("rem_leave_msg") = 0 ;;#31053.("rem_oleave_msg") = 0 ;;#31053.("nogo_msg") = "" ;;#31053.("onogo_msg") = "" ;;#31053.("arrive_msg") = "" ;;#31053.("oarrive_msg") = "" ;;#31053.("oleave_msg") = "" ;;#31053.("leave_msg") = "" ;;#31053.("key") = 0 ;;#31053.("aliases") = {"Generic Inter-dimensional Gateway", "Generic Transporter Doorway", "exit"} ;;#31053.("description") = {"I think I've got most of the bugs out, however no guarentee is made, it still requires a lot of fiddling around to work.", "It appears to be a normal doorway, only with several buttons near the side of", "it, maybe if you tried them something would happen."} ;;#31053.("object_size") = {23996, 797343886} @args #31053:"new" this none this @program #31053:new if (!this:pcheck(4, 1)) return; endif player:tell("Please enter the destination room object number: "); dest = toobj($command_utils:read()); if (!(valid(dest) && $object_utils:isa(dest, $room))) player:tell("Invalid Destination."); else if (dest in $list_utils:slice(this.buttons, 2)) "Note should 2 be 3?"; player:tell("Note: room ", dest.name, " (", dest, ") is already listed."); endif player:tell("Please enter in a ", this.button_space, " character label for ", dest.name, ": "); label = tostr($command_utils:read()); if (label in $list_utils:slice(this.buttons, 1)) player:tell("Label \"", label, "\" is already being used."); return; elseif (label == "") player:tell("Aborting addition."); return; else if ((label == "default") && (this:pcheck(1, 0) && this:pcheck(1, 1))) "if(this.dest==this.default_dest)"; this.dest = dest; "endif"; this.default_dest = dest; return 1; endif label = (length(label) > this.button_space) ? label[1..this.button_space] | label; endif player:tell("Please enter in a ", this.name_space, " character description for ", dest.name, ": "); desc = tostr($command_utils:read()); if (desc == "") desc = ((dest.name + " (") + dest) + ")"; endif desc = (length(desc) > this.name_space) ? desc[1..this.name_space] | desc; this.buttons = {@this.buttons, {label, dest, desc}}; player:tell("Done."); endif . @args #31053:"press poke push touch" any on this @chmod #31053:press rxd @program #31053:press if ($trig_utils:AND(this.status, 8) && (player.location != this.source)) player:tell(this:no_press_msg()); return; elseif (args[1] in this.commands) caller_perms(); return this:(args[1])(); elseif (!$trig_utils:AND(this.status, 1)) player:tell(this:power_off_msg()); return; endif button = args[1]; if (!(button_index = $list_utils:iassoc(button, this.buttons))) player:tell("No such button on ", this.name, "."); player:tell("Type \"Press Commands on ", this.name, "\" for a list of buttons."); return; endif if (!this:pcheck(2, 1)) return; endif dest = this.buttons[button_index][2]; player:tell("You press ", this.buttons[button_index][1], " - ", this.buttons[button_index][3], " on ", this.name, "."); this.source:announce(player.name, " presses ", this.buttons[button_index][1], " on ", this.name, "."); if (this.dest != this.default_dest) player:tell("Destination relocation FAILED! You must wait for the destination to return to normal first!"); return E_NACC; endif if (!(dest:acceptable($no_one) && dest:acceptable(this.partner))) player:tell(@this:no_dest_msg()); if (msg = this:ono_dest_msg()) this.source:announce(@msg); endif return E_NACC; endif this.dest = #-1; this:sanon(this.source, this:oreloc_msg(), this.reloc_msg_pause); this.dest = dest; this.partner:moveto(dest); this.partner.source = dest; this.dest:announce_all(this:rreloc_msg()); fork (this.return_pause) this:danon(this.source, this:oret_msg(), this.dest, this:rret_msg(), this.ret_msg_pause); this.partner:moveto(#-1); this.dest = this.default_dest; endfork . @args #31053:"recycle" this none this @chmod #31053:recycle rx @program #31053:recycle if (!(this:pcheck(1, 0) && this:pcheck(1, 1))) return E_PERM; endif if (this == this.generic) player:tell("This is a generic object, DO NOT RECYCLE!"); return E_NONE; endif player:tell("You need to recycle #", tonum(this.partner), " and @chparent/@recycle the"); player:tell("corresponding doorway of #", tonum(this.dest), "."); . @args #31053:"initialize" this none this @chmod #31053:initialize rx @program #31053:initialize player:tell("Warning, this is being tested at the moment, it may be unreliable. If you find a bug send a message to EHeM."); player:tell("In order for this to work it needs another object, please @create an object"); player:tell("with the parent ", this.parent.partner, " and then @set the property \".partner\" to the"); player:tell("object number of it. It will also need it's \".partner\" set to this"); player:tell("Please note that this is *critical*, I imagine most errors will come from here."); player:tell("Please also @set the \".default_dest\" on this to what the normal destination"); player:tell("is. It is also recomended that you @chparent the other room's exit to"); player:tell(this.spartner, "."); player:tell("If you wish to have it normaly have no dest set the .dest s to #-1 (nowhere)"); player:tell("note that you _must_ use the command \"dest\" in order to change the dest,"); player:tell("because it lacks the 'c' flag."); return pass(@args); . @args #31053:"list" this none this @program #31053:list "Copied from Generic Transport Panel (#4237):list by Beryn (#25433) Sun Feb 19 15:42:58 1995 PST"; "The only change was to stick in .button_space, .name_space, and .line_space in correct positions."; lst = {}; player:tell("You press the destination list button:"); for button in (this.buttons) blanks = $string_utils:space(this.button_space - length(button[1]), " "); blank2 = $string_utils:space(this.name_space - length(button[3]), " "); templst = (((("[" + tostr(button[1])) + blanks) + "] ") + tostr(button[3])) + blank2; lst = {@lst, templst}; endfor player:tell_lines($string_utils:columnise(lst, this.line_space)); . @args #31053:"last" this none this @program #31053:last "Copied from Generic Transport Panel (#4237):last by Beryn (#25433) Sun Feb 19 15:43:41 1995 PST"; player:tell(this.on_screen); player:tell("Last player to transport: ", this.last[1].name); player:tell("Destination: ", this.last[2].name, " (", this.last[2], ")"); player:tell("Time of transport: ", ctime(this.last[3])); player:tell("--"); . @args #31053:"remove" any from this @chmod #31053:remove rxd @program #31053:remove "Copied from Generic Transport Panel (#4237):remove by Beryn (#25433) Sun Feb 19 15:43:47 1995 PST"; "The only change here was to use :pcheck instead of caller==owner"; if (!(this:pcheck(1, 0) && this:pcheck(1, 1))) return; endif button = args[1]; if (!(NUM = $list_utils:iassoc(button, this.buttons))) player:tell("No such button exists on ", this.name, "."); return; endif this.buttons = listdelete(this.buttons, NUM); player:tell(this.name, "'s button labeled ", button, " has been removed."); . @args #31053:"commands" this none this @program #31053:commands "Copied from Generic Transport Panel (#4237):commands by Beryn (#25433) Sun Feb 19 15:47:37 1995 PST"; player:tell("You press the commands listing button..."); player:tell(" - - - - - On Screen - - - - -"); player:tell_lines(this.general_commands); if (this:qcheck() || (this == this.generic)) player:tell("== Owner-Only Commands"); player:tell_lines(this.owner_commands); endif player:tell("-- You have finished reading. --"); . @args #31053:"set_last" this none this @program #31053:set_last "Copied from Generic Transport Panel (#4237):set_last by Beryn (#25433) Sun Feb 19 15:48:01 1995 PST"; who = toobj(args[1]); where = toobj(args[2]); when = tonum(args[3]); this.last = {who, where, when}; . @args #31053:"description" this none this @program #31053:description if (this.dest != this.default_dest) "will be changed to \"rem_description\" when I have the quota"; return this.remote_description; else return pass(@args); endif . @args #31053:"pcheck" this none this @program #31053:pcheck if ($trig_utils:AND(this.status, args[1]) ? !args[2] | args[2]) if ($perm_utils:controls(player, this)) if (player != this.owner) player:tell(msg = this:wizcom_own_only_msg()); ret = read(); if (ret == "n*o") return 0; endif endif else player:tell(this:owner_only_msg()); return 0; endif endif return 1; . @args #31053:"power_off_msg no_press_msg wizcom_own_only_msg owner_only_msg no_dest_msg ono_dest_msg oreloc_msg oret_msg wizhid_own_only_msg rret_msg rreloc_msg" this none this @program #31053:power_off_msg msg = this.(verb); return msg ? $string_utils:pronoun_sub(msg, @args) | ""; . @args #31053:"status" this none this @program #31053:status "Verb that sets the power status of the transport panel"; player:tell("Power: ", $trig_utils:AND(this.status, 1) ? "on" | "off", "."); player:tell($trig_utils:AND(this.status, 2) ? "Anybody" | "The Owner only", " can press buttons."); player:tell($trig_utils:AND(this.status, 4) ? "Anybody" | "The Owner only", " can add destinations."); player:tell("You can press buttons from ", $trig_utils:AND(this.status, 8) ? "this room only" | "anywhere", "."); player:tell("Buttons are ", this.button_space, " characters long."); player:tell("Descriptions are ", this.name_space, " characters long."); player:tell("When listing ", this.line_space, " buttons will be displayed per line."); player:tell("The remote portal will stay in place ", this.return_pause, " seconds before returning."); if (this:qcheck()) caller_perms(); stat = this.status; stat = this:benter("Shall non-owners be able to press buttons on this", stat, 2); stat = this:benter("Shall non-owners be able to add destinations", stat, 4); stat = this:benter("Shall people be able to press buttons remotely", stat, 8); this.status = stat; this.button_space = this:nenter("What is the new length of buttons", this.button_space); this.name_space = this:nenter("What is the new length of button's descriptions?", this.button_space); this.line_space = this:nenter("How many buttons shall be shown per line when listing?", this.line_space); player:tell("Done."); endif . @args #31053:"dest" this is any @chmod #31053:dest rxd @program #31053:dest if (this:pcheck(1, 0) && this:pcheck(1, 1)) this.dest = toobj(iobj); caller_perms(); this.default_dest = toobj(iobj); player:tell("Destination changed, please remeber to @chparent the previous destination's exit to $exit, and the new one's to #89280."); endif . @args #31053:"benter" none none none @chmod #31053:benter rxd @program #31053:benter "This a simple yes/no enter verb, that also takes care of status bit changes"; fin = $command_utils:yes_or_no(args[1]); if (!((fin == 1) || (fin == 0))) fin = $trig_utils:AND(args[2], args[3]); endif out = $trig_utils:AND(args[2], $trig_utils:NOT(args[3])); ret = $trig_utils:OR(out, fin ? args[3] | 0); return ret; . @args #31053:"nenter" none none none @chmod #31053:nenter rxd @program #31053:nenter "numeric input verb"; player:tell(args[1]); player:tell("Please enter some number>"); NUM = tonum($command_utils:read()); if (!NUM) NUM = args[2]; endif return NUM; . @args #31053:"power" this none this @program #31053:power "Verb that sets the power status of the transport panel"; if (!(this:pcheck(1, 0) && this:pcheck(1, 1))) return; endif caller_perms(); power = !$trig_utils:AND(this.status, 1); this.status = $trig_utils:OR($trig_utils:AND($trig_utils:NOT(1), this.status), power); player:tell("You toggle ", this.name, "'s power status to ", power ? "on" | "off", "."); . @args #31053:"qcheck" none none none @chmod #31053:qcheck rxd @program #31053:qcheck if ($perm_utils:controls(player, this)) if (player != this.owner) player:tell(this:wizhid_own_only_msg()); inp = read(); if (inp = "n*o") return 0; endif endif return 1; endif . @args #31053:"invoke" this none this @program #31053:invoke if (!valid(this.dest)) player:tell("You must wait for the destination to settle down first!"); return E_NONE; endif return pass(@args); . @args #31053:"danon" this none this @program #31053:danon dt1 = args[1]; ln1 = #93339:list(args[2]); dt2 = args[3]; ln2 = #93339:list(args[4]); if (length(ln2) > length(ln1)) tmp = ln2; ln2 = ln1; ln1 = tmp; tmp = dt2; dt2 = dt1; dt1 = tmp; endif len = length(ln1) - length(ln2); this:sanon(dt1, ln1[1..len], args[5]); ln1 = ln1[len + 1..length(ln1)]; len = !len; for elm in [1..length(ln2)] if (len) suspend(args[5]); endif dt1:announce_all(ln1[elm]); dt2:announce_all(ln2[elm]); len = 1; endfor . @args #31053:"sanon" this none this @program #31053:sanon args[2] = #93339:list(args[2]); tr = 0; for line in (args[2]) if (tr) suspend(args[3]); endif args[1]:announce_all(line); tr = 1; endfor . @args #31053:"leave_msg oleave_msg arrive_msg oarrive_msg nogo_msg onogo_msg rem_leave_msg rem_oleave_msg rem_arrive_msg rem_oarrive_msg rem_nogo_msg rem_onogo_msg" none none none @chmod #31053:leave_msg rxd @program #31053:leave_msg if ((this.dest != this.default_dest) && ("rem_" != verb[1..4])) return this:("rem_" + verb)(@args); endif "Copied from generic exit (#7):leave_msg by Haakon (#2) Thu Mar 23 19:26:23 1995 PST"; msg = this.(verb); return msg ? $string_utils:pronoun_sub(msg, @args) | ""; .