Edit April 15, 2007 By KRJ Here is the final version of the $Exit:_html verb as recommended by Alexandre Borgia below. This version handles locking better as well as exit messages etc. You also require the noted changes to $encore_web_utils:generate_links verb. Ciao KJ ================================================ #7:_html rxd this none this "Modified by KRJ April 15 2007"; "allows exits to be used properly from Xpresss"; user = args[1]; if (user.location == this.source) "this:move(user)"; "First check if we can use this exit"; unlocked = this:is_unlocked_for(user); if (unlocked) this.dest:bless_for_entry(user); endif if (unlocked && this.dest:acceptable(user)) start = user.location; if (msg = this:leave_msg(user)) user:tell_lines(msg); endif "Exit is unlocked for us so do the move"; $encore_web_utils:move_via_web(user, this.dest); if (user.location == this.dest) "Force display of where we end up"; base_url = $encore_web_utils:baseurl(); object = toint(this.dest); url = base_url + tostr(object); user:tell(" <", url, ">."); return {""}; else return user.location:_html(user, {{}}); endif endif if (msg = this:nogo_msg(user)) user:tell_lines(msg); else user:tell("You can't go that way."); endif if (msg = this:onogo_msg(user)) this:announce_msg(user.location, user, msg); endif endif return user.location:_html(user, {{}}); ================================================ Here is the original post tothe list by Barbara McManus: From: encore-bounce@utdallas.edu [mailto:encore-bounce@utdallas.edu] On Behalf Of Barbara F. McManus Sent: February 9, 2006 9:52 AM To: encore@utdallas.edu Subject: [encore] Re: Problem with locking rooms Karen Campbell wrote: "One thing I'm having a problem with though is locking rooms. I give the command room.free_entry to 0 and it gives the response -> 0 which I assume means that it set it to zero. But it still lets people teleport into the room, and when I go back to check what the entry for the room is set to, it tells me 1!" Try this command: go to the room where you want to prohibit teleporting. Type @set here.free_entry to 0. You should then get the message Property set to 0. You can check by typing @d here.free_entry. This should confirm that the prop has indeed been changed. I tried this in VRoma, and it did prohibit everybody but the room's owner or a wizard from teleporting into the room, though people could still enter by "walking" in through text commands or webexits. "Also, when I try to lock the entrances, I give the command @lock room with me This time it doesn't let others use the entrance if they use the text command. But, it will let anyone go in if they click the express link (which most of our students do)." I had this same problem a while back and got the following explanation and fix from Alexandre Borgia. I followed this procedure exactly in VRoma, and @lock now works for the webexits as well as the text commands. Good luck! Barbara Alexandre Borgia wrote: Exits are actually bypassed by the web interface; they have been replaced with clickable hyperlinks that point directly to their destination - and although this is a very convenient and intuitive way to move around the MOO I agree there is not much interaction left with them. I found an easy way to put back exits to their right place in the player moving sequence which will consider @locks and such. Basically what I did is make the hyperlinks point to the actual exits so they can generate their own webpage that uses old verification mechanisms before moving the player. Here it goes: ========================================= Step 1) In $encore_web_utils:generate_links, replace: 11: if ($object_utils:isa(object, $exit) && (!use_exit_name)) 12: linkname = object.dest.name; 13: link = tonum(object.dest); With: if ($object_utils:isa(object, $exit)) linkname = use_exit_name ? object.name | object.dest.name; link = tonum(object); Step 2) Create the following verb: @verb $exit:_html this none this rdx And program it as follow: ------------------------ user = args[1]; if (user.location == this.source) this:move(user); if (user.location == this.dest) return {""}; else return user.location:_html(user); endif endif return pass(user); ------------------------ ========================================= KJ Addendum Aug 26, 2006 I added the following to the generate_links verb instead of only the link = tonum(object); line: if (!user.ts_client) link = tonum(object.dest); else link = tonum(object); endif This fixed a problem I had that resulted in WEB users only seeing the description of the exit not the linked page. ==========================================