6,366
editsAd placeholder
Template:StoreTraderGold: Difference between revisions
Jump to navigation
Jump to search
Make it work without cargo.
No edit summary |
(Make it work without cargo.) |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{# | <includeonly><onlyinclude>{{#expr: | ||
{{# | |||
{{#if:{{{upper|}}} | |||
| | |{{#af_get:{{#af_list:0|45|54|63|72|81|90|99|108|117|126|135|144}}|{{{1}}} }} | ||
| | |{{#af_get:{{#af_list:0|20|24|28|32|36|40|44|48|52|56|60|64}}|{{{1}}} }} | ||
| | }} | ||
| | |||
* | |||
{{#switch: {{{2}}} | |||
|poor = {{#if:{{{upper|}}}|4|3}} | |||
|modest = {{#if:{{{upper|}}}|8|6}} | |||
|normal = {{#if:{{{upper|}}}|15|10}} | |||
|wealthy = {{#if:{{{upper|}}}|27|22}} | |||
|extremelyrich = {{#if:{{{upper|}}}|60|60}} | |||
}} | }} | ||
}}</onlyinclude></includeonly><noinclude> | |||
Looks up trader gold value. Accomplishes this by looking their number of gold piles in two very cursed embedded arrays (one for lower, one for upper). Finally, multiply depending on the trader's wealth. | |||
This is a very elementary template and should probably not be used directly. | |||
param 1 = The level of the trader. | |||
param 2 = (allowed values=poor,modest,wealthy,extremelyrich). The wealth level of the trader. | |||
upper = Whether to get the upper amount of gold. If empty, will get lower amount. | |||
Examples: | |||
* lv1 Poor trader sgiykd gave {{StoreTraderGold|1|normal}} ~ {{StoreTraderGold|1|normal|upper=true}} gold. | |||
* lv5 Normal trader should have {{StoreTraderGold|5|normal}} ~ {{StoreTraderGold|5|normal|upper=true}} gold. | |||
* lv12 Extremely Rich trader should have {{StoreTraderGold|12|extremelyrich}} ~ {{StoreTraderGold|12|extremelyrich|upper=true}} gold. | |||
[[Category:Templates]] | |||
</noinclude> | </noinclude> |