Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@scan [REF: Job 279] #60

Open
brazilofmux opened this issue Mar 24, 2015 · 4 comments
Open

@scan [REF: Job 279] #60

brazilofmux opened this issue Mar 24, 2015 · 4 comments

Comments

@brazilofmux
Copy link
Owner

Original issue 57 created by brazilofmux on 2006-09-09T03:20:13.000Z:

On Tue Feb 21 14:00:35 2006, Ronan suggested:

@scan from Penn would be swank. I can toss up the helpfile if you're
interested.

On Tue Feb 21 16:45:34 2006, Ian added:

Signed.

[REF: Job 279]

@brazilofmux
Copy link
Owner Author

Comment #1 originally posted by brazilofmux on 2006-10-21T03:42:41.000Z:

Comments added from duplicate issue 191:

PennMUSH (1.8.1p10) "help @scan:"
@scan[/<switch>] <command>

@scan gives you a list of all objects containing $commands (user-defined
commands) which could match <command>. If given no switches, it checks
you, your possessions, your location, objects in your location, the
zone/zone master room of your location, your zone, and objects in the
master room. It does NOT stop when it gets a match, but rather, finds all
possible matches. It also tells how many commands on each object were
matched, and what attributes they are in. It does NOT scan objects
that you do not control and are not set VISUAL.

This command can take four switches:
/room -- just matches on your location and objects in it.
/self -- just matches on you and anything you're carrying.
/zone -- just matches on zones of your location and yourself.
/globals -- just matches on objects in the master room.

I think something along these lines would be an excellent addition to MUX.

@brazilofmux
Copy link
Owner Author

Comment #2 originally posted by brazilofmux on 2006-10-21T03:53:48.000Z:

Workaround softcode:

@create ScanObj
&CREDITS ScanObj=Ashen-Shugar@Blahblahblah
&CMD_SCAN ScanObj=$@scan* :@pemit %#=[u(do_scan[not(words(v(0)))][match(/room /self
/zone /global,%0)],%0,%1,%#,$,@scan)]
&DO_SCAN00 ScanObj=Unrecognized switch '[lcstr(secure(%0))]' for command %4.
&CMD_SCAN2 ScanObj=$@scan:@pemit %#=What command do you want to scan for?
&CMD_SCAN3 ScanObj=$@scan/
:@pemit %#=[ifelse(match(room self zone
global,first(%0)),,u(do_scan00,/%0,x,x,x,@scan))]
&DO_SCAN10
ScanObj=[u(scan_contents,%0,%1,%2,%3,%4)][u(scan_self,%0,%1,%2,%3,%4)][u(scan_zone,%0,%1,%2,%3,%4)][u(scan_master,%0,%1,%2,%3,%4)]
&DO_SCAN01 ScanObj=[u(scan_contents,%0,%1,%2,%3,%4)]
&DO_SCAN02 ScanObj=[u(scan_self,%0,%1,%2,%3,%4)]
&SCAN_CONTENTS ScanObj=%rMatching on contents of your
location:[iter(setdiff(lcon(loc(%2)),%2),u(scan_obj,##,%1,%2,%3,%4),,@@)]
&SCAN_OBJ
ScanObj=[setq(1,trim(iter(lattrp(%0),ifelse(strmatch(%1,before(after(get(%0/##),%3),:)),##,),,@@)))][ifelse(words(r(1)),%r[name(%0)]%(%0[flags(%0)]%)
%[%q1%],)]
&SCAN_SELF ScanObj=%rMatching on self and carried
objects:[iter(setunion(lcon(%2),%2),u(scan_obj,##,%1,%2,%3,%4),,@@)]
&SCAN_ZONE ScanObj=%rMatching on zones in
vicinity:[iter(setunion(zone(loc(%2)),zone(%2),u(dozone,[lcon(%2)]
[lcon(loc(%2))])),u(scan_obj,##,%1,%2,%3,%4),,@@)]
&DOZONE ScanObj=[iter(%0,zone(##))]
&DO_SCAN04 ScanObj=[u(scan_master,%0,%1,%2,%3,%4)]
&DO_SCAN03 ScanObj=[u(scan_zone,%0,%1,%2,%3,%4)]
&SCAN_MASTER ScanObj=%rMatching on master
room:[iter(lcon(config(master_room)),u(scan_obj,##,%1,%2,%3,%4),,@@)]
&CMD_LSCAN ScanObj=$@lscan* :@pemit %#=[u(do_scan[not(words(v(0)))][match(/room
/self /zone /global,%0)],%0,%1,%#,^,@lscan)]
&CMD_LSCAN2 ScanObj=$@lscan:@pemit %#=What listen do you want to scan for?
&CMD_LSCAN3 ScanObj=$@lscan/
:@pemit %#=[ifelse(match(room self zone
global,first(%0)),,u(do_scan00,/%0,x,x,x,@lscan))]
&CANUSE ScanObj=[hasflag(%#,wizard)]
@lock/UseLock ScanObj=CANUSE/1
@set ScanObj=SAFE
@set ScanObj=INHERIT

@brazilofmux
Copy link
Owner Author

Comment #3 originally posted by brazilofmux on 2006-12-27T20:44:00.000Z:

<empty>

@brazilofmux
Copy link
Owner Author

Comment #4 originally posted by brazilofmux on 2007-09-21T00:57:11.000Z:

<empty>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant