Runescape Smithing Profit Calculator
- 31/05/2011 -
I enjoy playing Runescape. I've been playing it for about 7 years now off and on, and for the last few months I've rejoined and been having fun on it. Smithing is a decent skill that I would love to train but it's just damn hard to find the money to do so, therefore I've tried to find an easy to use smithing profit calculator to at least break even, showing me the best possible ways to gain smithing experience, without costing a bomb.After searching the net for a smithing profit calculator to no avail, I've decided to write my own C# program that gets its prices straight from the Grand Exchange. Thus far I've got the program basics running, i.e: I've got code that can query the grand exchange directly through Jagex's website, you can select metal/item and it'll tell you how much profit you'll make from either ore smelting or buying metal bars directly from the Grand Exchange. The way it goes about it however is rather inefficient, and until I get this sorted I'm not going to release any source/executable until I've addressed this. The issue lies in that the query code literally loads the entire website page and filters through the items until it finds the price. This means that to get the full list of items the program supports, the grand exchange needs to be queried roughly 120-130 times. Despite the client side running rather slow having to wait for all the HTML to come through (god I love multi-threading), the Jagex server's got a number of requests, which while negligable compared to the vast number of world-wide queries happening anyway, it can still be reduced. If for example 10,000 people decided they wanted to use the program every day, that's at least 1,200,000 html requests, each with costs on both bandwidth, and server-side processing. Route A is to persuade Jagex to create an 'API' of sorts for third-party Grand Exhange queries, giving merely the item cost and price change, thus reducing bandwidth substantially. I'm sure Jagex has more pressing matters than doing all that work on the whim of a lone programmer however. Route B is to cycle through each HTML file when received for any items that are included within the program. For example if I query the Grand Exchange for "Bronze Dagger", the Adamant Dagger and Mithril Dagger are also shown, meaning I can add their prices to the list, and there is no need to query them in future (unless the user specifically wishes to re-query the price). I could probably write pages and pages, as I've probably already done, so I'll leave with a note that I'll be working more on the program today, and once it's efficient enough I'll post it up on my projects page. Edit:I've just added a little data checker to see how much data is being received, and when querying every single item, it came to a whopping 4MB of data!!! I know I expected it to be a high amount of data, but really... It is absolutely imperative that I reduce this amount of data substantially before anyone gets their hands on it.
|