User:Toancaro/List of utilities spells/Variables: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
__TOC__ | |||
==Variables== | |||
{{Template:TranscludeableLST|variables}}<br/> | {{Template:TranscludeableLST|variables}}<br/> | ||
<section begin="variables" /><nowiki | |||
/>{{#vardefine: querySpellsLearnable | ((classes HOLDS "Wizard" OR classes HOLDS "Sorcerer" OR classes HOLDS "Cleric" OR classes HOLDS "Bard" OR classes HOLDS "Ranger" OR classes HOLDS "Druid" OR classes HOLDS "Paladin" OR classes HOLDS "Warlock") AND (is_npc = false OR is_npc IS NULL))}}<nowiki | />{{#vardefine: querySpellsLearnable | ((classes HOLDS "Wizard" OR classes HOLDS "Sorcerer" OR classes HOLDS "Cleric" OR classes HOLDS "Bard" OR classes HOLDS "Ranger" OR classes HOLDS "Druid" OR classes HOLDS "Paladin" OR classes HOLDS "Warlock") AND (is_npc = false OR is_npc IS NULL))}}<nowiki | ||
Line 80: | Line 55: | ||
/>{{#vardefine: queryNamesSpellsAll | {{#ifexpr: {{#arraysize:spellsAll}} > 0 | ({{#var: queryNamesSpellsAll1|TRUE}} AND {{#var: queryNamesSpellsAll2|TRUE}} AND {{#var: queryNamesSpellsAll3|TRUE}} AND {{#var: queryNamesSpellsAll4|TRUE}} AND {{#var: queryNamesSpellsAll5|TRUE}} AND {{#var: queryNamesSpellsAll6|TRUE}}) | FALSE}} }}<nowiki | />{{#vardefine: queryNamesSpellsAll | {{#ifexpr: {{#arraysize:spellsAll}} > 0 | ({{#var: queryNamesSpellsAll1|TRUE}} AND {{#var: queryNamesSpellsAll2|TRUE}} AND {{#var: queryNamesSpellsAll3|TRUE}} AND {{#var: queryNamesSpellsAll4|TRUE}} AND {{#var: queryNamesSpellsAll5|TRUE}} AND {{#var: queryNamesSpellsAll6|TRUE}}) | FALSE}} }}<nowiki | ||
/><section end="variables" /></ | /><section end="variables" /> | ||
{{Back to top}} | |||
==Join OR== | |||
{{Template:TranscludeableLST|joinOR}} | |||
<syntaxhighlight line="1"> | |||
{{#arraydefine: joinORItems | a,b,c,d,e}} | |||
{{#vardefine: joinORPageSize | 1}} | |||
{{#vardefine: test | {{#lst:User:Toancaro/List of utilities spells/Variables|joinOR}} }} | |||
Print: {{#var: test}}<br/> | |||
</syntaxhighlight> | |||
<section begin="joinOR" /><nowiki | |||
/>{{#arrayunion: joinORItems | {{#if: {{#arraysize:joinORItems}} | joinORItems | }} }}<nowiki | |||
/>{{#vardefine: joinORPageSize | {{#varexists:joinORPageSize | {{#var:joinORPageSize}} | 25 }} }}<nowiki | |||
/>{{#vardefine: joinORResult | }}<nowiki | |||
/>{{#loop: i | 0 | {{#expr: ceil({{#arraysize:joinORItems}} / {{#var:joinORPageSize}})}} | <nowiki | |||
/>{{#arrayslice: itemSliced | joinORItems | {{#expr: {{#var: i}} * {{#var:joinORPageSize}} }} | {{#var:joinORPageSize}}}}<nowiki | |||
/>{{#vardefine: itemsOR | {{#arrayprint: itemSliced | OR | @ | name = "@" }}}}<nowiki | |||
/>{{#vardefine: itemsORNormalized | {{#replace:{{#var: itemsOR}} | OR | <nowiki/> <nowiki/>OR<nowiki/> <nowiki/>}}}}<nowiki | |||
/>{{#vardefine: joinORResult | {{#if: {{#var:joinORResult}} | {{#var:joinORResult}} OR {{#var:itemsORNormalized}} | {{#var:itemsORNormalized}} }} }}<nowiki | |||
/>}}<nowiki | |||
/>{{#var: joinORResult}}<nowiki | |||
/><section end="joinOR" /> | |||
{{Back to top}} |
Revision as of 17:54, 15 January 2024
Variables
The following section can be transcluded into other pages with {{#lst:User:Toancaro/List of utilities spells/Variables|variables}}
.
Join OR
The following section can be transcluded into other pages with {{#lst:User:Toancaro/List of utilities spells/Variables|joinOR}}
.
{{#arraydefine: joinORItems | a,b,c,d,e}}
{{#vardefine: joinORPageSize | 1}}
{{#vardefine: test | {{#lst:User:Toancaro/List of utilities spells/Variables|joinOR}} }}
Print: {{#var: test}}<br/>