@create +Features Device=10 @lock +Features Device=*Yohshee &ADDFEATURE +Features Device=$+addfeature *=*-*:@switch hasflag(%#,wizard)=1,{&FEAT.[%0] me=%0|%1|%2; @pemit %#=New Feature added:%rName:%b%cy%0%cn%rAvailable:%b%cy%1%cn%rPosition:%b%cy%2%cn.},{@pemit %#=You are not authorized to use that command.} &EDITPOS +Features Device=$+editpos *=*:@switch and(hasflag(%#,wizard),hasattr(me,feat.[%0]))=1,{&feat.[%0] me=[replace(v(feat.[%0]),3,%1,|)]; @pemit %#=[capstr(%0)]'s position has now been set to %1.},{@pemit %#=Either that feature doesn't exist, or you are not authorized to use that command.} &AVAIL +Features Device=$+avail *=*:@switch and(hasflag(%#,wizard),hasattr(me,feat.[%0]))=1,{@switch member(yes no,lcstr(%1))=>0,{&feat.[%0] me=[replace(v(feat.[%0]),2,%1,|)]; @pemit %#=[capstr(%0)] is now [ifelse(strmatch(%1,yes),available, not available)].},{@pemit %#=You must specify either 'yes' or 'no.'}},{@pemit %#=Either that feature does not exist, or you are not authorized to use that command.} &DELFEATURE +Features Device=$+delfeature *:@switch and(hasflag(%#,wizard),hasattr(me,feat.[%0]))=1,{&feat.[%0] me; @pemit %#=[capstr(%0)] has been removed from the list of features.},{@pemit %#=Either that feature doesn't exist, or you are not authorized to use that command.} &FEATURES +Features Device=$+features:@pemit %#=[ansi(r,This is the list of feature characters:)]%r%r%b[ansi(c,NAME)][repeat(%b,10)][ansi(c,AVAILABLE)][repeat(%b,8)][ansi(c,POSITION)]%r[ansi(g,[repeat(-,80)])]%r[iter(lattr(me/feat.*),[ifelse(eq(#@,1),%b,)][u(feat_fn,##)]%r)][ansi(g,[repeat(-,80)])]%r%r%b[ansi(c,Cyan)] = [ansi(y,Feature Being Used)]%r%b[ansi(b,Blue)] = [ansi(y,Feature Not Used)] &DFEAT_FN +Features Device=[setq(0,v(%0))][ansi(g,elements(%q0,1,|))]%t%t%t[rjust(ansi(y,elements(%q0,2,|)),sub(29,strlen(elements(%q0,1,|))))] &DFEATURES +Features Device=$+deadfeatures:@pemit %#=[ansi(r,This is the list of deceased feature characters:)]%r%r%t[ansi(c,NAME)]%t%t%t[ansi(c,POSITION)]%r[ansi(g,[repeat(-,80)])]%r[iter(lattr(me/dfeat.*),[u(dfeat_fn,##)]%r)][ansi(g,[repeat(-,80)])] &DADDFEATURE +Features Device=$+addfeature/dead *=*:@switch hasflag(%#,wizard)=1,{&DFEAT.[%0] me=%0|%1; @pemit %#=New Deceased Feature added:%rName:%b%cy%0%cn%rPosition:%b%cy%1%cn.},{@pemit %#=You are not authorized to use that command.} &DDELFEATURE +Features Device=$+delfeature/dead *:@switch and(hasflag(%#,wizard),hasattr(me,dfeat.[%0]))=1,{&dfeat.[%0] me; @pemit %#=[capstr(%0)] has been removed from the list of deceased features.},{@pemit %#=Either that feature doesn't exist, or you are not authorized to use that command.} &DEDITPOS +Features Device=$+editpos/dead *=*:@switch and(hasflag(%#,wizard),hasattr(me,dfeat.[%0]))=1,{&dfeat.[%0] me=[replace(v(dfeat.[%0]),2,%1,|)]; @pemit %#=[capstr(%0)]'s position has now been set to %1.},{@pemit %#=Either that feature doesn't exist, or you are not authorized to use that command.} @Desc +Features Device=~~ +Feature Device Commands ~~%r+addfeature =-%r+delfeature %r+editpos =%r+avail =%r+features%r+addfeature/dead =%r+delfeature/dead %r+editpos/dead =%r+deadfeatures%r(A somewhat original work by Yohshee) &FEAT_FN +Features Device=[setq(0,v(%0))][setq(1,[ansi(ifelse(strmatch(elements(%q0,2,|),yes),b,c),elements(%q0,1,|))])]%q1[repeat(%b,sub(14,strlen(%q1)))][ansi(y,capstr(elements(%q0,2,|)))]%t%t[ansi(y,elements(%q0,3,|))] @set +Features Device=INHERIT