April 30, 201313 yr I'm basically thinking about a tool that could refresh specific webpages such as forum market places and analyse the data in specifically chosen fields, if the data is below a set amount it would present itself in some way (perhaps make a noise or pop up some text) to inform me. For example it could be set to refresh http://forums.zybez....280-nature-rune every 10 minutes, and if it ever sees "Selling (>1000) for (<290)" it would let me know. A very useful merch tool. Do you know if this is possible to create? And what would be the best thing to create it with?
April 30, 201313 yr You can paste this into the JavaScript console in chrome: var td; var q; var p = ""; tr = document.getElementsByTagName("tr"); for(var i = 0; i < tr.length;i++){ td = document.getElementsByTagName("td"); var temp = document.createElement("div"); temp.innerHTML = td[i].innerHTML; var clean = temp.textContent || temp.innerText; if(clean.indexOf("Selling") > -1){ clean = clean.replace("Selling","").replace(",","").replace(" for ","").replace(" GP","").replace("ea",""); q = clean; for(var j = 0; j < 3; j++){ p += q%10; q = Math.floor(q/10); } p = p.split("").reverse().join("")*1; q *= 1; if(p <= 290 && q >= 1000){ alert("Selling " + q + " nature runes for " + p + "GP each."); td[i].style.backgroundColor = "#F4E23E"; } } p = ""; } Every time you run it, it will search for the offers that match those prices. I'd recommend using this as a foundation for a chrome app.
April 30, 201313 yr Author Hi Hedgehog, that's excellent and does exactly what I asked for, I can see how to change the parameters to meet my needs. :) I intend to create an application to run 100's of items automatically separate from the browser, hopefully directly from whatever database zybez uses rather than the actual web pages.
April 30, 201313 yr Alright, if you want to build an application to check the prices of multiple items, the JavaScript I posted won't work very well.If you want to interface directly with their storage (I'm sure they use XML or JSON, I don't think it's worth it for them to use a database for this), you'll have to get in contact with them. Then it's just a matter of downloading, parsing, and presenting the information.
May 5, 201313 yr Check out the api, which is going to be a lot more reliable http://forums.zybez.net/runescape-2007-prices/api/nature+rune
May 5, 201313 yr Check out the api, which is going to be a lot more reliable http://forums.zybez....api/nature runeOh, they have an API. Yeah, it should be really easy to do this then. Just make sure that you parse the JSON using a JSON parser, not regex.
Create an account or sign in to comment