Some little things for TinyMux and Thenocode
-
Some little codey things I've been working on...
First, this is for Thenomain's stat newest system. This is very ugly so please don't look, Theno!
&c.prove [v( d.nsc )]=$^\+?prove( [\s\S]+)?$: think strcat( setq( l, loc( %# )), setq( 0, secure( trim( %1 ) )), // This gets the full statpath thingy: SKILL.BRAWL or MERIT.LANGUAGE_(PASHTO) setq( f, u( v( d.sfp )/f.statpath.workhorse, %q0, %# ) ), setq( c, first( %qf, . ) ), setq( s, rest( %qf, . ) ), // This pulls back the results. Crafts:3|* Jewelry|* Silver|* Weaponsmith setq( a, u( f.cheat_getstat.trait-n-subtrait, %#, %qs, %qc ) ), // This processes the above. setq( 1, first( %qa, | ) ), setq( 2, rest( %qa, | ) ), if( cand( t( %qf ), t( %q0 ) ), remit( %ql, strcat( %xh<Prove> %xn[name( %# )] has "[first( %q1, :)]" at [rest( %q1, :)], if( t( %q2 ), %bwith specialties in: [edit( %q2, |, %b)]., . ) ) ), pemit( %#, %xh<Prove> %xnThat is not a recognized stat. ) ) ) @set [v( d.nsc )]/c.prove=regex
Usage:
+prove <stat>Output:
If the stat is valid:
<Prove> Karma has "Brawl" at 3 with specialties in: * Krav Maga.
If not:
<Prove> That is not a recognized stat.
It should auto-complete. So +prove str -> strength.
And here's the copy+paste:
&c.prove [v( d.nsc )]=$^\+?prove( [\s\S]+)?$:think strcat(setq( l, loc( %# )),setq( 0, secure( trim( %1 ) )),setq( f, u( v( d.sfp )/f.statpath.workhorse, %q0, %# ) ),setq( c, first( %qf, . ) ),setq( s, rest( %qf, . ) ),setq( a, u( f.cheat_getstat.trait-n-subtrait, %#, %qs, %qc ) ),setq( 1, first( %qa, | ) ),setq( 2, rest( %qa, | ) ),if( cand( t( %qf ), t( %q0 ) ), remit( %ql, strcat(%xh<Prove> %xn[name( %# )] has "[first( %q1, :)]" at [rest( %q1, :)], if( t( %q2 ), %bwith specialties in: [edit( %q2, |, %b)]., . )) ), pemit( %#, %xh<Prove> %xnThat is not a recognized stat. ) )) @set [v( d.nsc )]/c.prove=regex
-
+getcast
This is a bit of quick'n'dirty for TinyMUX systems using one of the standard +finger commands I see in WoD games (and elsewhere). It's designed to be plugged into the SGP that comes with Tiny. Specifically, it's looking for
SGP - Main Globals
which is usually#6
.Please update the
#6
if you want this elsewhere!The code will check the current room you are in and grab every player bit that's there, look for their "wiki" attribute that's set in +finger, and output a list of properly formatted Wiki names. This is extremely useful all the time, but especially where you're playing games where people have bit names that do not match their Wiki page names.
Note this code looks for
##/finger-wiki
and##/wiki
. If your means of logging a wiki uses a different attribute on the player bit, you'll need to update the code. Note also it looks for everything after the / in that value, sohttp://fatesharvest.com/w/Green
will returnGreen
.Usage:
+getcast : gets the cast for the room you're in.
+getcast <name> : get the wiki information for a specific person.If the player does not have their wiki set in their +finger, it'll say "missing".
Output:
______________________________________________________________________________ Scene Cast List for OOC Nexus [[User:Skew|Flatirons]], [[Logan_Brenner|Logan]], [[Beats|Beatrice]] ______________________________________________________________________________
or
Wiki-Friendly Formatting for AJ: [[AJ_Ray|AJ]]
Here's the code...
// This should go on SGP - Main Globals &c.get.cast #6=$^\+?getcast(.*)$:@pemit %#= strcat( setq( 0, secure( %1 )), switch( %q0, , u( f.disp.cast.room, loc( %# ), %# ), %b*, u( f.disp.cast.target, trim( %q0 ), %# ), It's either something or nothing how did this go wrong?) ) &f.disp.cast.room #6= strcat( setq( l, %0 ), setq( p, %1 ), u( disp.rainbow ), %r, center( %xhScene Cast List%xn for %xh[name(%ql)]%xn, 79 ),%r%r, iter( lcon( %ql, connect ), strcat( setq( f, last( get( ##/finger-wiki ), / ) ), setq( w, last( get( ##/wiki ), / ) ), lit([[), switch( 1, t( %qw ), %qw, t( %qf ), %qf, %xh%xxMissing%xn), |, name( ## ), lit(]]) ), , %,%b), %r, u( disp.rainbow) ) &f.disp.cast.target #6= strcat( setq( t, pmatch( %0 ) ), if( t( %qt), strcat( %r, Wiki-Friendly Formatting for %xh[name( %qt )]%xn:, %b, setq( f, last( get( %qt/finger-wiki ), / ) ), setq( w, last( get( %qt/wiki ), / ) ), lit([[), switch( 1, t( %qw ), %qw, t( %qf ), %qf, %xh%xxMissing%xn), |, name( %qt ), lit(]]), %r ), %xh<+getcast>%xn Target must be a player. ) ) &disp.rainbow #6=%r%xx__%xh__%xn%xm__%xh__%xn%xb___%xh___%xn%xc____%xh____%xn%xg_____%xh_____%xn%xx___%xn%xx_%xh_%xn%xm_%xh_%xn%xb_%xh_%xn%xc_%xh_%xn%xh%xx___%xn%xg%xh_____%xn%xg_____%xc%xh____%xn%xc____%xb%xh___%xn%xb___%xm%xh__%xn%xm__%xx%xh__%xn%xx__%xn @set #6/c.get.cast=regex
That
disp.rainbow
makes a pretty rainbow line. Feel free to replaceu( disp. rainbow )
in the code withheader( +getcast )
or whatever you'd like. I liked the rainbow. It's a good rainbow.And here's the copy+paste:
&c.get.cast #6=$^\+?getcast(.*)$:@pemit %#=strcat( setq( 0, secure( %1 )),switch( %q0,, u( f.disp.cast.room, loc( %# ), %# ),%b*, u( f.disp.cast.target, trim( %q0 ), %# ),It's either something or nothing how did this go wrong?) ) &f.disp.cast.room #6=strcat( setq( l, %0 ),setq( p, %1 ),u( disp.rainbow ), %r,center( %xhScene Cast List%xn for %xh[name(%ql)]%xn, 79 ),%r%r,iter( lcon( %ql, connect ), strcat(setq( f, last( get( ##/finger-wiki ), / ) ),setq( w, last( get( ##/wiki ), / ) ),lit([[),switch( 1,t( %qw ), %qw, t( %qf ), %qf,%xh%xxMissing%xn), |, name( ## ), lit(]]) ), , %,%b), %r,u( disp.rainbow) ) &f.disp.cast.target #6=strcat(setq( t, pmatch( %0 ) ),if( t( %qt),strcat(%r, Wiki-Friendly Formatting for %xh[name( %qt )]%xn:, %b,setq( f, last( get( %qt/finger-wiki ), / ) ),setq( w, last( get( %qt/wiki ), / ) ),lit([[),switch( 1,t( %qw ), %qw, t( %qf ), %qf,%xh%xxMissing%xn), |, name( %qt ), lit(]]), %r ),%xh<+getcast>%xn Target must be a player. )) &disp.rainbow #6=%r%xx__%xh__%xn%xm__%xh__%xn%xb___%xh___%xn%xc____%xh____%xn%xg_____%xh_____%xn%xx___%xn%xx_%xh_%xn%xm_%xh_%xn%xb_%xh_%xn%xc_%xh_%xn%xh%xx___%xn%xg%xh_____%xn%xg_____%xc%xh____%xn%xc____%xb%xh___%xn%xb___%xm%xh__%xn%xm__%xx%xh__%xn%xx__%xn @set #6/c.get.cast=regex