AsterixPad

A notepad which allows you to write things on numbered pages.

Category: Other
Features: color substitutions.
Compatibility: TinyMUX.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for AsterixPad

@create %crAsterisk%chpad
@lock Asteriskpad==me
@Desc Asteriskpad=This is an asteriskpad. Type %ch%cc*index%cn to look at the index of the asteriskpad, %ch%cc*look%cn %cg<page>%cn to look at a page, %ch%cc*add%cn %cg<page>%cn=%cr<something>%cn to add %cr<something>%cn to %cg<page>%cn, and %ch%cc*del%cn %cg<page>%cn to remove a page. You can abbreviate the name of a page when looking. Anyone can view the asteriskpad and add pages, but only the owner can delete pages.%r[switch(%!,#1318,%ch%cyIf you want to include a custom description for your Asteriskpad\, just give it an @desc. Otherwise the description will default to this one.%r)]%crAsterisk%chpad%cn created by Caffeinator
&CREDITS Asteriskpad=Caffeinator@SluggyMUX
&PADINDEX Asteriskpad=$\*index:@oemit %#=%N browses through the [name(me)]%cn.;@pemit %#=%cn---------- [name(me)]%cn ---------- %r[edit(edit(sort(iter(lcstr(lattr(me/pg_*)),after(##,pg_))),%b,%r),_,%b)]%r
&PADLOOK Asteriskpad=$\*look *:@switch [setr(0,match(sort(lattr(me/pg_*)),pg_[edit(%0,%b,_)]*))]=0,{@pemit %#=[name(me)]%cn: There is no page that begins with "[lcstr(%0)]".},{@pemit %#=%cn----- [name(me)]%cn - [edit(after(lcstr(extract(sort(lattr(me/pg_*)),r(0),1)),pg_),_,%b)]%cn ----- %r[u(extract(sort(lattr(me/pg_*)),r(0),1))]}
&PADADD Asteriskpad=$\*add *=*:@oemit %#=%N scribbles something on page "[lcstr(%0)]" of the [name(me)]%cn.;@pemit %#=[name(me)]%cn: Page "[lcstr(%0)]" added.;&pg_[edit(lcstr(%0),%b,_)] me=[strcat(v(pg_[edit(lcstr(%0),%b,_)]),translate(%1,1),lit(%b%ch),--%n,lit(%cn%r))]
&PADDEL Asteriskpad=$\*del *:@switch [owner(me)]=%#,{@oemit %#=%N destroys a page from the [name(me)]%cn.;@pemit %#=[name(me)]%cn: Page "[lcstr(%0)]" deleted.;&pg_[edit(lcstr(%0),%b,_)] me},{@oemit %#=%N attempts to destroy a page from the [name(me)]%cn, but fails.;@pemit %#=[name(me)]%cn: You're not authorized to do that!}
@set Asteriskpad=!NO_COMMAND