Kisa Flexible Lists

From Tenebrae
Revision as of 18:56, 14 December 2017 by Kisaiya (talk | contribs) (Created page with "==Step One: Copy and Paste== Copy and paste the following: &C_SHOP %!=|[ljust(%xh%0%xn,30,%xb-)]|[center(%xh%1%xn,14,%xb-)]|[center(%xh%2%xn,14,%xb-)]|%r%xn &V_ITEM %!=ITEM,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Step One: Copy and Paste

Copy and paste the following:

&C_SHOP %!=|[ljust(%xh%0%xn,30,%xb-)]|[center(%xh%1%xn,14,%xb-)]|[center(%xh%2%xn,14,%xb-)]|%r%xn &V_ITEM %!=ITEM, PRICE, CRAFTER &DO_HELPSHOP %!=$^\+(shop|sho|sh)$:@pemit %!=[center([ansi(hw,Shop Help)],70,[ansi(b,-)])]%r[ansi(hc,Usage:)] %r%tThis help File: %t[ansi(hw,+shop)]%r%tView your list: %t[ansi(hw,+shop/view)]%r%tAdds an item: %t%t[ansi(hw,+shop/add \<item\>\, \<cost\>\, \<maker\>)] %r%tRemoves an Item: %t[ansi(hw,+shop/rem \<item\>)] %r[ansi(b,[repeat(-,70)])] &DO_SHOP %!=$^\+(shop|sho|sh)/(view|vie|vi|v)$:@pemit %!=%r[ansi(hw,%n's Shopping List!)]%r [repeat(_,62)]%r [iter([u(V_ITEM)],[mix(C_SHOP,##,:)],|)] [repeat(-,62)] &DO_ADDSHOP %!=$^\+(shop|sho|sh)/(add|ad|a) (.+), (.+), (.+)$:&V_ITEM %!=[v(V_ITEM)]|%3\, %4\, %5;@pemit %!=Item "%3" stored. &DO_REMSHOP %!=$^\+(shop|sho|sh)/(remove|rem|r) (.+)$:&V_ITEM %!=[remove([u(V_ITEM)],[index([u(V_ITEM)],|,[match([u(V_ITEM)],%3*,|)],1)],|)];@pemit %!=Item "%3" removed from list.

Step Two: Enable Regular Expressions for several commands

Copy and paste the following:

@set %!/DO_HELPSHOP=regexp @set %!/DO_SHOP=regexp @set %!/DO_ADDSHOP=regexp @set %!/DO_REMSHOP=regexp

Step Three: ENJOY!

You type: +shop This will show you the help page, also as a node, you can actually shorten many of the commands down to something as simple as: +sh/r <item>