Forum:Template to add/subtract GEPrices and get a total

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Template to add/subtract GEPrices and get a total
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 29 November 2009 by Gaz Lloyd.

I was looking at the article gilded altar, and I noticed (and I have noticed this on other pages too), that a certain number was put there to represent the current total price of something. But, how often does this get updated? The GE prices update every day, surely that price is not accurate. "The total price for all the materials purchased at the shop is: 1,171,325 coins." says the article, but that last edit to the page was Sept. 4th, and it wasn't even to the price mentioned.

So, if there isn't already something like this, I propose:

Two templates (maybe "GEPriceAdd" and "GEPriceSubtract") which can add and subtract simple Grand Exchange prices to get a total, which will automatically update as the item's prices update.

The templates would have multiple customizable parameters to fit which items you'd like to add. They should also work interchangably like "{{GEPriceAdd}}+{{GEPriceSubtract}}" somehow. I would assume there would have to be {{ }} around both of those, as them being seperate just wouldn't work?

An example of, let's say, the total price of materials needed to make redberry pie, which is comprised of the GEPrice of pot of flour, redberries, jug of water, and a pie dish.

This is how it would look in code:

{{GEPriceAdd|Pot of flour|Redberries|Jug of water|Pie dish}}

The result would be (with words added around it so it's not just a number):

The total price to make a redberry pie with a pot of flour, redberries, jug of water, and a pie dish is number.


Hope you understand, signed, Quest point cape.pngLil Diriz 77 Talk Summoning-icon.png 18:43, November 29, 2009 (UTC)

Comment - Isn't there already something for that? Like {{#EXPR or something? Ancient talisman.png Oil4 Talk 20:36, November 29, 2009 (UTC)

edit conflict... On the Wind Strike article, this is used: {{#expr:{{GEPrice|Air rune}} + {{GEPrice|Mind rune}} }}. So we already have this... Ancient talisman.png Oil4 Talk 20:38, November 29, 2009 (UTC)

<edit conflict>Already possible - The code you want is:

{{formatnum:{{#expr:{{GEPrice|Pot of flour}}+{{GEPrice|Redberries}}+{{GEPrice|Jug of water}}+{{GEPrice|Pie dish}}}}}} coins

Giving 1,217 coins. The total will update whenever the price on any of the Exchange pages updates. See also: Meta's page on #expr functions. In respect to the gilded altar, thats using the prices from the NPC owned shop so is a static price. Quest.png Gaz Lloyd 7:^]Events!99s 20:36, November 29, 2009 (UTC)

Request for closure - Sweet =D Thanks guys, I apologize, thought there wasn't something for this already. And in regards to the altar, I thought the prices of the items were GEPrices. Close please :) Quest point cape.pngLil Diriz 77 Talk Summoning-icon.png 20:44, November 29, 2009 (UTC)

Request for closure

This already exists, therefore a new template is unnecessary, leaving no use for further discussion. Hello71 20:44, November 29, 2009 (UTC)

Look up - <_<, also, telling me it "already exists" doesn't help much. Quest point cape.pngLil Diriz 77 Talk Summoning-icon.png 20:45, November 29, 2009 (UTC)

Closed - Unneeded. Quest.png Gaz Lloyd 7:^]Events!99s 20:46, November 29, 2009 (UTC)