Code
get $text,$target in $loc; if $target > 0 then continue else try2; ##try2: get $target in $loc; var $text to ''; if $target > 0 then continue else fail; ##continue: if $actor's loc eq $target's loc then cont2 else end; ##cont2: var $tlink to $target's link; runsub catchbrokendoor; runsub end; ##catchbrokendoor: var $tlhost to $tlink's loc; if $tlhost > 0 then checklockedoor else nodoor; ##checklockedoor: if $tlhost eq $loc then lockedoor else gothroughit; ##lockedoor: if $pw like $target's pwd then slipthroughit else comparekey; ##comparekey: $tkey = $target's keyid; print "[$actor] discovered that [$target] is locked with [$tkey]"; ##nodoor: say 'xfail',"There is no valid doorway here"; ##slipthroughit: say 'leaves',"[$actor] sneaks away via [$target] _ping $target,arrow1_nw,2"; $dloc = $target's keyloc; $nloc = $dloc's loc; set $actor's loc to $nloc; relook $loc; msg $nloc,$actor,0,0,'force',"force:look $nloc"; msg $nloc,$actor,0,0,'arrives',"[$actor] sneaks in via [$dloc]"; ##gothroughit: if $target's link > 0 then checkprivate else move; ##setloc: set $tlink's loc to 2; ##checkprivate: $tlloc = $tlink's loc; $material = $tlloc's material; if $material like _private_ then checkprivate2 else checkguard; ##checkprivate2: $matvals = $tlloc's matvals; manipulate $matvals get private to $private; manipulate $private get go to $restrict by 2; if $restrict == 1 then checkfriends else checkguard; ##checkfriends: $owner = $tlloc's owner; $material = $owner's material; if $material like _friend_ then checkfriends2 else denyaccess; ##checkfriends2: $matvals = $owner's matvals; $fobj = "f$init_obj"; manipulate $matvals get friend to $friend; manipulate $friend get $fobj to $override by 2; if $override == friend then checkguard else denyaccess; ##denyaccess: say 'denied',"A mysterious force blocks [$init_obj] from [$target]"; ##checkguard: $guard is guarding before $target; if $guard > 0 then checkg2 else checkdiff; ##checkg2: if $guard's health > 0 then guarded else stepover; ##checkg3: // to prevent exploit of changing material after putting a living on guard so no one can kill it; if $guard's material like living then guarded else stepover; ##guarded: $second = $guard; say 'noneshallpass',"[$guard] steps in front of [$target], blocking your way."; ##stepover: $step = (steps,climbs,leaps,jumps,walks); $body = (body,corpse,remains); say 'msg',"[$actor] $step over the $body of [$guard]." runsub checkdiff; ##checkdiff: if $target's material like _difficult_ then checkdiff2 else newloc; ##checkdiff2: include 69104; $dobject = $target; runsub difficultcheck; if $success > 0 then newloc; ##newloc: if $tlink's loc < 1 then setloc; var $oldloc to $loc; motion $actor's motion,leaves; say 'leaves',"[$actor] $motion via [$target] _ping $target,arrow1_nw,2"; msg $loc,$actor,0,0,'force',"force:look $loc"; set $actor's loc to $tlink's loc; clear $actor,all; var $loc to $actor's loc; motion $actor's motion,arrives; say 'arrives',"[$actor] $motion via [$tlink]"; refresh $actor; set $actor's host to $tlink; set $actor's hosthow to "beside"; var $loc to $actor's loc; look $loc; msg $loc,$actor,0,0,'force',"force:look $loc"; runsub noisy/10; ##noisy: msg 0,$actor,0,0,"moves","You can hear [$actor] moving around"; ##move: if $text eq "" then keepmoving else posetest; ##keepmoving: set $actor's host to $target; set $actor's hosthow to "beside"; motion $actor's motion,moves; say 'moves',"[$actor] $motion towards [$target] _ping $target,arrow1_nw,2"; look loc; msg $loc,$actor,0,0,'force',"force:look $loc"; ##posetest: if $text eq "to" then keepmoving else poseit; ##poseit: set $actor's host to $target; set $actor's hosthow to $text; motion $actor's motion,moves; say 'moves',"[$actor] $motion $text [$target] _ping $target,arrow1_nw,2"; look loc; msg $loc,$actor,0,0,'force',"force:look $loc"; runsub noisy/3; ##fail: if $counter > 0 then end else listall; ##listall: var $click_cmd to 'go to'; var $desc_intro to 'Click on the object you want to go to:(If it is a doorway you will go through it) '; look $loc,list; msg $loc,$actor,$actor,0,'force',"force:look $loc,list";