Look Hook

An @hook/override for 'look' that lets you set &LOOK_* attributes on rooms.

Author: Walker@M*U*S*H
Category: Globals
Features: regexp commands.
Compatibility: CobraMUSH, PennMUSH.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Look Hook

@create Look Hook
@lock Look Hook==me
@lock/Use Look Hook=IS_LOOK/1
@lset Look Hook/Use=no_inherit
@set Look Hook = VISUAL
@power Look Hook = Pemit_All
@power Look Hook = See_All
&DESCRIBE Look Hook=An @hook/override for 'look' that lets you set &LOOK_* attributes on rooms.
@set Look Hook/DESCRIBE=no_command visual prefixmatch public nearby
&FIND_LOOK Look Hook=first(cat(lattrp(%L/look_[edit(%0,%b,_)]*),lattrp(%L/look_*_[edit(%0,%b,_)])))
&FOR_STARTUP Look Hook=@hook/override look=%!,look
&IS_LOOK Look Hook=cand(not(locate(%#,rest(%c),*)),u(find_look,rest(%c)))
&LOOK Look Hook=$^(?\:l|lo|loo|look)\s+(\S[\s\S]*)$:think setq(0,u(find_look,%1)) ; @pemit %#=u(%L/%q0) ; @oemit %#=if(hasattr(%L,o%q0),%n [u(%L/o%q0)]) ; @assert hasattr(%L,a%q0) ; @trigger %L/a%q0=%#
@set Look Hook/LOOK=regexp