Logger Code Object

From City of Hope MUSH
Revision as of 13:22, 20 September 2020 by Nerdvana (talk | contribs)
Jump to navigation Jump to search

This code project is a work in progress that was started by User:Arumi. As of 20Sept2020 I (User:Nerdvana) have taken over the project and as it is developed updates will be made here.

Arumi's Original Version

@create Flux Capacitor=10
&INDEX Flux Capacitor=0
@Ahear Flux Capacitor=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
@Listen Flux Capacitor=*
&CMD_CLEAR Flux Capacitor=$+logger/clear:@emit Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
&CMD_SHOW Flux Capacitor=$+logger/show:think [list([lattr(me/log_*)],get(me/##)[%r])]
@Desc Flux Capacitor=OOC: This is Arumi's scene logger. Type +logger/show to see the scene log (could be spammy if the scene's long)
@rxlevel Flux Capacitor= Real
@txlevel Flux Capacitor= Real

Nerdvana's Slightly Tweaked Version

Using this version it will work, the description can be set to what ever you want and it will not override the OOC note about code object.

@create Logger Object=10
@lock Logger Object=*Vic
&INDEX Logger Object=0
@Ahear Logger Object=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
@Listen Logger Object=*
&CMD_CLEAR Logger Object=$+logger/clear:@break strmatch(%#,not(owner(me)));@pemit/list %# [owner(me)]=Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
&CMD_SHOW Logger Object=$+logger/show:@pemit %#=%xh%xg%xuLOG EMIT%xn%r;think [list([lattr(me/log_*)],get(me/##)[%r%r----%r])]
@Descformat Logger Object=%0[u(logger-desc)]
&LOGGER-DESC Logger Object=%xcOOC:%xn This is a version of Arumi's logger. %xh%xy+logger/show%xn displays the log %r[space(5)](potential spam warning as the scene may be long)
@Adesc Logger Object=@break strmatch(%#,owner(me));@pemit owner(me)=%xh%xcLogger>%xn [moniker(%#)] just looked at your logger/bag.
@set Logger Object=SAFE
@rxlevel Logger Object= Real
@txlevel Logger Object= Real