User:Alicecomma/Template/Smith/Codedump

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search

WIP code 19/8[edit | edit source]

<noinclude>{{Documentation}}</noinclude>
<includeonly>|-
| [[File:{{{icon|{{{1|}}}}}}.png]]
| [[{{{item|{{{1|}}}}}}]]
| {{#ifexpr:%gebars%<={{#expr:%bars%*%bigswitch%}}<!--
-->|style="background:#FFC;"{{!}}{{Coins|{{#expr:-1*%gebars%}}}}<!--
	-->{{!!}}{{#ifexpr:{{#if:{{{ge|}}}|-1|%geprice%}}<=%storeprice%<!--
		-->|{{#ifexpr:%storeprice%<=%alchprice%<!--
			-->|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%-%gebars%}}}}{{!!}}{{Coins|{{#expr:(%alchprice%-%gebars%)/%experience%}}}}<!--
			-->|style="background:#CCF;"{{!}}{{Coins|%storeprice%}}{{!!}}{{Coins|{{#expr:%storeprice%-%gebars%}}}}{{!!}}{{Coins|{{#expr:(%storeprice%-%gebars%)/%experience%}}}} }}<!--
		-->|{{#ifexpr:%geprice%<=%alchprice%<!--
			-->|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%-%gebars%}}}}{{!!}}{{Coins|{{#expr:(%alchprice%-%gebars%)/%experience%}}}}<!--
			-->|style="background:#FFC;"{{!}}{{Coins|%geprice%}}{{!!}}{{Coins|{{#expr:%geprice%-%gebars%}}}}{{!!}}{{Coins|{{#expr:(%geprice%-%gebars%)/%experience%}}}} }}<!--
-->|style="background:#CCF;"{{!}}{{Coins|{{#expr:-1*%bars%*%bigswitch%}}}}<!--
	-->{{!!}}{{#ifexpr:{{#if:{{{ge|}}}|-1|%geprice%}}<=%storeprice%<!--
		-->|{{#ifexpr:%storeprice%<=%alchprice%<!--
			-->|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%-(%bars%*%bigswitch%)}}}}{{!!}}{{Coins|{{#expr:(%alchprice%-(%bars%*%bigswitch%))/%experiencesmelt%}}}}<!--
			-->|style="background:#CCF;"{{!}}{{Coins|%storeprice%}}{{!!}}{{Coins|{{#expr:%storeprice%-(%bars%*%bigswitch%)}}}}{{!!}}{{Coins|{{#expr:(%storeprice%-(%bars%*%bigswitch%))/%experiencesmelt%}}}} }}<!--
		-->|{{#ifexpr:%geprice%<=%alchprice%<!--
			-->|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%-(%bars%*%bigswitch%)}}}}{{!!}}{{Coins|{{#expr:(%alchprice%-(%bars%*%bigswitch%))/%experiencesmelt%}}}}<!--
			-->|style="background:#FFC;"{{!}}{{Coins|%geprice%}}{{!!}}{{Coins|{{#expr:%geprice%-(%bars%*%bigswitch%)}}}}{{!!}}{{Coins|{{#expr:(%geprice%-(%bars%*%bigswitch%))/%experiencesmelt%}}}} }}<!--
	-->}}<!--
-->}}
</includeonly>

%experience% = {{#expr:%bars%*{{#switch:{{lc:{{{material|{{{2|}}}}}}}}|bronze=12.5|iron=25|steel=37.5|mithril=50|adamant=62.5|rune=75}}}}
%experiencesmelt% = {{#expr:%bars%*({{#switch:{{lc:{{{material|{{{2|}}}}}}}}|bronze=18.7|iron=37.5|steel=55|mithril=80|adamant=100|rune=125}})}}
%gebars% = {{GEP|{{{material|{{{2|}}}}}} bar|%bars%}}
%bigswitch% = {{#switch:{{lc:{{{material|{{{2|}}}}}}}}|bronze={{#expr:{{GEP|Tin ore}}+{{GEP|Copper ore}}}}|steel={{#expr:{{GEP|Iron ore}}+{{GEP|Coal|2}}}}|mithril={{#expr:{{GEP|Mithril ore}}+{{GEP|Coal|4}}}}|adamant={{#expr:{{GEP|Adamantite ore}}+{{GEP|Coal|6}}}}|rune={{#expr:{{GEP|Runite ore}}+{{GEP|Coal|8}}}}|#default={{GEP|{{{material|{{{2|}}}}}} ore}}}}
%bars% = {{{bars|{{{3|1}}}}}}
%geprice% = {{GEP|{{{item|{{{1|}}}}}}}}
%storeprice% = {{{store|{{#expr:floor({{Exchange:{{{item|{{{1|}}}}}}|View=value}}*0.3)}}}}}
%alchprice% = {{#expr:floor({{{alch|{{Exchange:{{{item|{{{1|}}}}}}|View=value}}}}}*0.6)-{{GEP|Nature rune}}}}

WIP code 18/8[edit | edit source]

<noinclude>{{Documentation}}</noinclude>
<includeonly>|-
| [[File:{{{icon|{{{1|}}}}}}.png]]
| [[{{{item|{{{1|}}}}}}]]
| {{#ifexpr:{{GEP|{{{material|{{{2|}}}}}} bar|%bars%}}<={{#expr:%bars%*%bigswitch%}}
	|style="background:#FFC;"{{!}}{{Coins|{{#expr:-1*%bars%*{{GEP|{{{material|{{{2|}}}}}} bar}}}}}}
	|style="background:#CCF;"{{!}}{{Coins|{{#expr:-1*%bars%*%bigswitch%}}}}}}
|{{#ifexpr:%geprice%<=%storeprice%
	|{{#ifexpr:%storeprice%<=%alchprice%
		|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%/%bars%}}}}
		|style="background:#CCF;"{{!}}{{Coins|%storeprice%}}{{!!}}{{Coins|{{#expr:%storeprice%/%bars%}}}}
	}}
	|{{#ifexpr:%geprice%<=%alchprice%
		|style="background:#CFC;"{{!}}{{Coins|%alchprice%}}{{!!}}{{Coins|{{#expr:%alchprice%/%bars%}}}}
		|style="background:#FFC;"{{!}}{{Coins|%geprice%}}{{!!}}{{Coins|{{#expr:%geprice%/%bars%}}}}
	}}
}}
</includeonly>

%bigswitch% = {{#switch:{{lc:{{{material|{{{2|}}}}}}}}|bronze={{#expr:{{GEP|Tin ore}}+{{GEP|Copper ore}}}}|steel={{#expr:{{GEP|Iron ore}}+{{GEP|Coal|2}}}}|mithril={{#expr:{{GEP|Mithril ore}}+{{GEP|Coal|4}}}}|adamant={{#expr:{{GEP|Adamantite ore}}+{{GEP|Coal|6}}}}|rune={{#expr:{{GEP|Runite ore}}+{{GEP|Coal|8}}}}|#default={{GEP|{{{material|{{{2|}}}}}} ore}}}}
%bars% = {{{bars|{{{3|}}}}}}
%geprice% = {{GEP|{{{item|{{{1|}}}}}}}}
%storeprice% = {{{store|{{#expr:{{Exchange:{{{item|{{{1|}}}}}}|View=value}}*0.3}}}}}
%alchprice% = {{#expr:({{{alch|{{Exchange:{{{item|{{{1|}}}}}}|View=value}}}}}*0.6)-{{GEP|Nature rune}}}}