Difference between revisions of "LATTR Commands (Softcode)"

From City of Hope MUSH
Jump to navigation Jump to search
m (Nerdvana moved page User:Nerdvana/lattr commands to LATTR Commands (Softcode): want it to sort on the Unofficcial page better)
m
Line 1: Line 1:
 
These commands list the attributes on any object you can control/examine. The first lists any/all attributes on such an object by attribute name, the second does the same but displays name and a single line of the attribute's value, and the third lists any $-command attributes on the object that meet the wild card called on and displays the whole attribute for that command attribute.
 
These commands list the attributes on any object you can control/examine. The first lists any/all attributes on such an object by attribute name, the second does the same but displays name and a single line of the attribute's value, and the third lists any $-command attributes on the object that meet the wild card called on and displays the whole attribute for that command attribute.
  
  &CMD-LATTR me=$.lattr *:@pemit %#=[case(lattr(%0),#-1,You are not allowed to evaluate that object.,{%xh%xb[repeat(-,79)] %r%r%xgAttribute Listing for %xw[name(objeval(%#,num(first(%0,/))))]%xy([num(objeval(%#,num(first(%0,/))))][flags(objeval(%#,num(first(%0,/))))])%xn %r%r[switch(words(%0,/),1,columns(sort(lattr(objeval(%#,num(first(%0,/))))),25),2,columns(sort(lattr(objeval(%#,[num(first(%0,/))]/[rest(%0,/)]))),25))] %r%xh%xb[repeat(-,79)]})]%xn
+
  &CMD-LATTR me=$+lattr *:@pemit %#=[case(lattr(%0),#-1,You are not allowed to evaluate that object.,{%xh%xb[repeat(-,79)] %r%r%xgAttribute Listing for %xw[name(objeval(%#,num(first(%0,/))))]%xy([num(objeval(%#,num(first(%0,/))))][flags(objeval(%#,num(first(%0,/))))])%xn %r%r[switch(words(%0,/),1,columns(sort(lattr(objeval(%#,num(first(%0,/))))),25),2,columns(sort(lattr(objeval(%#,[num(first(%0,/))]/[rest(%0,/)]))),25))] %r%xh%xb[repeat(-,79)]})]%xn
 
   
 
   
  &CMD-LATTR1 me=$.lattr1 *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Attributes on [fullname(%q0)],78)]%R[repeat(%xc-%xn,78)];@pemit %#=[list(lattr(%q0),[ljust(##,20)][left(get(%q0/##),58)])][repeat(%xc-%xn,78)]}
+
  &CMD-LATTR1 me=$+lattr1 *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Attributes on [fullname(%q0)],78)]%R[repeat(%xc-%xn,78)];@pemit %#=[list(lattr(%q0),[ljust(##,20)][left(get(%q0/##),58)])][repeat(%xc-%xn,78)]}
 
   
 
   
  &CMD-LATTRCMDS me=$.lattrcmds *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Commands on [fullname(%q0)]\(%q0[flags(%q0)]\),78)]%R[repeat(%xc-%xn,78)]%R;@pemit %#=[list(lattrcmds(%0),[ljust(before(after(get(%q0/##),$),:),20)][wrap(after(get(%q0/##),:),58,,,,20)])]%R[repeat(%xc-%xn,78)]}
+
  &CMD-LATTRCMDS me=$+lattrcmds *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Commands on [fullname(%q0)]\(%q0[flags(%q0)]\),78)]%R[repeat(%xc-%xn,78)]%R;@pemit %#=[list(lattrcmds(%0),[ljust(before(after(get(%q0/##),$),:),20)][wrap(after(get(%q0/##),:),58,,,,20)])]%R[repeat(%xc-%xn,78)]}
  
 
[[Category:Unofficial]]
 
[[Category:Unofficial]]

Revision as of 02:07, 4 October 2020

These commands list the attributes on any object you can control/examine. The first lists any/all attributes on such an object by attribute name, the second does the same but displays name and a single line of the attribute's value, and the third lists any $-command attributes on the object that meet the wild card called on and displays the whole attribute for that command attribute.

&CMD-LATTR me=$+lattr *:@pemit %#=[case(lattr(%0),#-1,You are not allowed to evaluate that object.,{%xh%xb[repeat(-,79)] %r%r%xgAttribute Listing for %xw[name(objeval(%#,num(first(%0,/))))]%xy([num(objeval(%#,num(first(%0,/))))][flags(objeval(%#,num(first(%0,/))))])%xn %r%r[switch(words(%0,/),1,columns(sort(lattr(objeval(%#,num(first(%0,/))))),25),2,columns(sort(lattr(objeval(%#,[num(first(%0,/))]/[rest(%0,/)]))),25))] %r%xh%xb[repeat(-,79)]})]%xn

&CMD-LATTR1 me=$+lattr1 *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Attributes on [fullname(%q0)],78)]%R[repeat(%xc-%xn,78)];@pemit %#=[list(lattr(%q0),[ljust(##,20)][left(get(%q0/##),58)])][repeat(%xc-%xn,78)]}

&CMD-LATTRCMDS me=$+lattrcmds *:@switch [setr(0,locate(%#,before(%0,/),*))]=#-1,{@pemit %#=Item '%0' not found.},#-2,{@pemit %#=Multiple items match '%0'. Please be more specific.},{@pemit %#=[repeat(%xc-%xn,78)]%R[center(Commands on [fullname(%q0)]\(%q0[flags(%q0)]\),78)]%R[repeat(%xc-%xn,78)]%R;@pemit %#=[list(lattrcmds(%0),[ljust(before(after(get(%q0/##),$),:),20)][wrap(after(get(%q0/##),:),58,,,,20)])]%R[repeat(%xc-%xn,78)]}