( This program is Copyright [c] 1992-93, by Timothy F. Schmidt, aka Radagast. RLook version 4.2.9 'look' replacement program. It may NOT be used without permission from the author. This program *should* follow all the standard looking rules, with a few modifications. o You can look at objects people are carrying. [ look rad's staff ] o Sleeping players are not shown unless you own the room or they are set @InContents:Yes. o For ex-MUDers, "look at " should work. o A _mute property on player's _proploc supresses room descs. o When in CyberSpace, bodies are left behind. o _look and _olook [non-player]/_look-notify [player] messages displayed. o Every player has a pager. o [A]uthor flag [owner displayed] observed. o [N]oInventory flag is observed. o [S]ilent flag [no dbrefs displayed] observed. o [U]nseen flag observed. o [V]isible flag [dbref and flags displayed] observed. o [I]nContents flag [shows room] observed. Contact Radagast at tfschmidt@miavx1.acs.muohio.edu ) : TM me @ swap notify ; : TNM loc @ me @ rot notify_except ; : proploc ( d -- d ) dup "_proploc" getpropstr atoi dbref dup #0 dbcmp not if swap pop else pop then ; : AP ( d s s -- ) rot proploc -3 rotate 0 addprop ; : GP ( d s -- ) swap proploc swap getpropstr ; : RP ( d s -- ) swap proploc swap remove_prop ; : PE? ( d s -- ) swap proploc swap prop-exists? ; : Erase me @ ".RLook-obj" over ".RLook-temp" RP RP ; : NoSee "I don't see that here." TM ; : Clarify "You'll have to clarify that." TM ; : P_Sub me @ swap pronoun_sub ; : HideMe? me @ "u" flag? me @ "d" flag? or ; : SayMsgs trigger @ "_look" getpropstr dup if P_Sub TM else pop then HideMe? if exit then trigger @ dup player? if dup "_look-notify" getpropstr dup if P_Sub notify else pop pop then else "_olook" getpropstr dup if P_Sub TNM else pop then then ; : Visible-exit-loop ( d d' -- d i ) dup 3 pick dbcmp if pop pop 1 exit then dup #0 dbcmp if pop me @ dbcmp not if 0 else 1 then exit then location Visible-exit-loop ; : Visible-exit? ( d -- d i ) (check if the exit is on a parent) dup location dup room? if loc @ Visible-exit-loop else location loc @ dbcmp if 1 else 0 then then ; : Clean dup string? if dup "*RLook*" instr if pop exit then then pop Clean ; : CallIt ( d s -- ) "*RLook*" swap rot atoi dbref call Clean ; : Run (run a @111 program.. pray that it doesn't change the stack) 1 strcut swap pop dup " " instr dup if strcut CallIt else pop "" Callit then "me" match me ! ; : Check_Lock (check the lock and do @succ/@osucc or @fail/@ofail) dup room? not if exit then me @ over passlock? if dup succ dup if dup "@" instr 1 = if Run else P_Sub TM then else pop then HideMe? not if dup osucc dup if dup "@" instr 1 = if Run else me @ name " " strcat swap strcat P_Sub TNM then else pop then then else dup fail dup if dup "@" instr 1 = if Run else P_Sub TM then else pop then HideMe? not if dup ofail dup if dup "@" instr 1 = if Run else me @ name " " strcat swap strcat P_Sub TNM then else pop then then then ; : Yes (kill the 'contents' or 'holding' string when used) me @ ".RLook-temp" GP dup "" strcmp if TM me @ ".RLook-temp" RP else pop then TM ; : FullName ( d -- d s ) (show name, and flags if neccessary) dup me @ unparse_object ; : FinalLoop (do the final checks.. this is only for Cyberspace) dup 0 = if pop exit then over "*Jack" getpropstr dup "" strcmp if atoi dbref over 3 + pick dbcmp if swap name "The prone body of " swap strcat Yes else swap pop then else pop swap pop then 1 - FinalLoop ; : Say-it (display the inventory object) FullName Yes ; : Say-it? (is inventory object visible? check permissions) me @ over dbcmp if 0 exit then dup room? over "i" flag? not and if 0 exit then me @ wizard? if 1 exit then dup owner me @ dbcmp if 1 exit then dup "u" flag? over player? and if 0 exit then dup "v" flag? if 1 exit then dup "d" flag? if 0 exit then dup "dark" prop-exists? over player? not and if 0 exit then dup player? over awake? not and over location owner me @ dbcmp not and over "@InContents" prop-exists? not and if 0 exit then dup program? over "l" flag? not and if 0 exit then 1 ; : DoLoop (cycle through contents) dup #-1 dbcmp if pop me @ ".RLook-obj" GP atoi dbref dup room? if online FinalLoop then dup player? if #447 FullName swap pop Yes then pop pop exit then Say-it? if Say-it then next DoLoop ; : Print (display desc) dup room? me @ "_mute" PE? and if exit then dup desc dup "" strcmp not if pop dup room? not if "You see nothing special." TM then else dup "@" instr 1 = if Run else TM then then Check_Lock ; : Visible? (is object seeable? check permissions) me @ Wizard? not if dup room? if dup loc @ dbcmp not over location loc @ dbcmp not and if pop NoSee 0 else 1 then exit then dup exit? if Visible-exit? not if pop NoSee 0 else 1 then exit then dup location dup loc @ dbcmp not swap me @ dbcmp not and if pop NoSee 0 exit then then 1 ; : Number? ( s -- s d ) (is t: Number? ( s -- s d ) (is the string a dbref?) dup "#" instr 1 = if 1 strcut swap pop then dup atoi dbref dup #0 dbcmp if pop #-1 then ; : Check ( s d -- d 1 or 0 ) (get a dbref, or fail) dup not if over "at " instr 1 = if pop 3 strcut swap pop dup match then then dup not if pop Number? then dup #-2 dbcmp if pop pop Clarify 0 exit then dup ok? not if NoSee 0 exit then Visible? not if 0 exit then swap pop 1 ; : Normal ( s -- ) (just a regular look) dup match check if dup trigger ! SayMsgs dup intostr me @ swap ".RLook-obj" swap AP dup room? if FullName TM then Print dup "n" flag? if pop exit then dup player? if dup dup me @ ".RLook-temp" "Carrying:" AP contents DoLoop else dup room? if dup dup me @ ".RLook-temp" "Contents:" AP contents DoLoop then then pop then ; : PosCheck ( d d' -- d 1 or 0 ) (is he carrying that?) dup #-1 dbcmp if pop name " is not holding that." strcat TM 0 exit then dup #-2 dbcmp if pop pop Clarify 0 exit then 1 ; : Possession ( s -- ) (string had "'s" so check for possession) dup match dup #-1 dbcmp not swap #-2 dbcmp not and if Normal exit then dup "'" instr 1 - strcut swap dup match Check if swap dup not if pop #-1 PosCheck pop exit then (* cludge *) dup "'s " instr 1 = if 3 strcut swap pop else 2 strcut swap pop then over swap rmatch PosCheck if dup trigger ! SayMsgs FullName " (held by " strcat rot name strcat ")" strcat TM Print pop then else pop then ; : main ( ? -- ) (start here) dup not if pop "here" then dup "'" instr if Possession Erase exit then Normal Erase ;