@prog lock-call 1 99999 d 1 i ( Action lock - Allows an action to be tied to a lock-test. ` The main intent of this is for a morphing program to be run from a normal exit, so that {say} someone can wake-up and jump straight to the bandstand, and that exit's lock is used to make them presentable. Of course, it can run any other program that doesn't use 'read' instead. ` Properties are sought on the trigger: ` _lock/fail: if this exists, the lock will fail. _lock/tell: if this exists, it is posed by the user like an osucc. _lock/prog#/1 2 3...: db integer of the program to call {no #s, just numbers} _lock/params#/1 2 3.. parameter string to give the called program _lock/set#/1 2 3...: property:propval ` You can ignore the prog/params list and/or the set list and/or tell. ` You can set _lock/name/properties too, but must be the owner of the trigger. The programs are called before the property settings, and everything is done regardless of success or failure. ` - Warwick ) : lock-call ( -- 0/1 ) "_lock/" me @ trig owner dbcmp if trig "_lock/" me @ name strcat propdir? if pop "_lock/" me @ name "/" strcat strcat then then 1 begin over "prog#/" strcat over intostr strcat trig swap getpropstr dup while 3 pick "params#/" strcat 3 pick intostr strcat trig swap getpropstr swap atoi dbref call 1 + repeat pop pop 1 begin over "set#/" strcat over intostr strcat trig swap getpropstr dup while dup ":" instr 1 - strcut 1 strcut swap pop me @ -3 rotate 0 addprop 1 + repeat pop pop dup "tell" strcat swap trig swap getpropstr dup if loc @ 0 rot me @ name swap strcat notify_exclude else pop then "fail" strcat swap trig swap getpropstr not not ; 42 lines displayed. . c q @register #me lock-call=tmp/prog1 @set $tmp/prog1=L @set $tmp/prog1=2 @propset $tmp/prog1=str:/_/de:A scroll containing a spell called lock-call @propset $tmp/prog1=str:/_docs:@list #77196=1-23 @propset $tmp/prog1=str:/_keywords:property properties set execute run programs MUF