Difference between revisions of "Kisa Flexible Lists"
(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,...") |
|||
Line 2: | Line 2: | ||
Copy and paste the following: |
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 |
+ | &C_SHOP %!=|[ljust(%xh%0%xn,30,%xb-)]|[center(%xh%1%xn,14,%xb-)]|[center(%xh%2%xn,14,%xb-)]|%r%xn <br /> |
− | &V_ITEM %!=ITEM, PRICE, CRAFTER |
+ | &V_ITEM %!=ITEM, PRICE, CRAFTER <br /> |
− | &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_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)])] <br /> |
− | &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_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)]<br /> |
− | &DO_ADDSHOP %!=$^\+(shop|sho|sh)/(add|ad|a) (.+), (.+), (.+)$:&V_ITEM %!=[v(V_ITEM)]|%3\, %4\, %5;@pemit %!=Item "%3" stored. |
+ | &DO_ADDSHOP %!=$^\+(shop|sho|sh)/(add|ad|a) (.+), (.+), (.+)$:&V_ITEM %!=[v(V_ITEM)]|%3\, %4\, %5;@pemit %!=Item "%3" stored.<br /> |
− | &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. |
+ | &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.<br /> |
==Step Two: Enable Regular Expressions for several commands== |
==Step Two: Enable Regular Expressions for several commands== |
||
Copy and paste the following: |
Copy and paste the following: |
||
− | @set %!/DO_HELPSHOP=regexp |
+ | @set %!/DO_HELPSHOP=regexp<br /> |
− | @set %!/DO_SHOP=regexp |
+ | @set %!/DO_SHOP=regexp<br /> |
− | @set %!/DO_ADDSHOP=regexp |
+ | @set %!/DO_ADDSHOP=regexp<br /> |
− | @set %!/DO_REMSHOP=regexp |
+ | @set %!/DO_REMSHOP=regexp<br /> |
==Step Three: ENJOY!== |
==Step Three: ENJOY!== |
||
You type: +shop |
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> |
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> |
||
+ | |||
+ | [[Category:Player|Kisa Shop Code]] |
Revision as of 18:57, 14 December 2017
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>