Difference between revisions of "Kisa Flexible Lists"

From Tenebrae
Jump to navigation Jump to search
m (Lahar moved page Kisa Shop Code to Kisa Flexible Lists)
Line 1: Line 1:
  +
='''IF YOU'RE READING THIS, HOLD UP GONNA DO SOME REWRITES. WILL REMOVE WHEN DONE'''=
  +
  +
 
This code was designed because I (Kisaiya) am terrible at keeping track of what items I need to buy for my character(s). So, I wrote a code to keep it all organized! You can use this though, for lists of any type!
 
This code was designed because I (Kisaiya) am terrible at keeping track of what items I need to buy for my character(s). So, I wrote a code to keep it all organized! You can use this though, for lists of any type!
   

Revision as of 21:11, 14 December 2017

IF YOU'RE READING THIS, HOLD UP GONNA DO SOME REWRITES. WILL REMOVE WHEN DONE

This code was designed because I (Kisaiya) am terrible at keeping track of what items I need to buy for my character(s). So, I wrote a code to keep it all organized! You can use this though, for lists of any type!

Examples

Use as a Quick Reference

 ______________________________________________________________
 |ITEM--------------------------|----BENEFIT---|---CRAFTER----|
 |Power Attack------------------|--- -1/+4 ----|----Verna-----|
 --------------------------------------------------------------

Use as a Shopping List

 ______________________________________________________________
 |ITEM--------------------------|----PRICE-----|---CRAFTER----|
 |Ring of Protection +2---------|---3600 gp----|----Verna-----|
 |Fullplate +2------------------|---2400 gp----|---Kerbasi----|
 |Natural Armor Amulet +3-------|---10800 gp---|----Sandy-----|
 |Inf. Connections T5-----------|----10 RPP----|-----RPP------|
 --------------------------------------------------------------
 

The Help File

------------------------------Shop Help-------------------------------
Usage:
        This help File:         +shop
        View your list:         +shop/view
        Adds an item:           +shop/add <item>, <cost>, <maker>
        Removes an Item:        +shop/rem <item>
----------------------------------------------------------------------


Installation

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: ENJOY!

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


Options: RegEx!

Like RegEx? Copy and paste the following so you can enable regular expressions on several of the commands:

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