Powerfrog Posted April 30, 2013 Share Posted April 30, 2013 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? Link to comment Share on other sites More sharing options...
Hedgehog Posted April 30, 2013 Share Posted April 30, 2013 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. Link to comment Share on other sites More sharing options...
Powerfrog Posted April 30, 2013 Author Share Posted April 30, 2013 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. Link to comment Share on other sites More sharing options...
Hedgehog Posted April 30, 2013 Share Posted April 30, 2013 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. Link to comment Share on other sites More sharing options...
dTwizy Posted May 5, 2013 Share Posted May 5, 2013 Check out the api, which is going to be a lot more reliable http://forums.zybez.net/runescape-2007-prices/api/nature+rune Link to comment Share on other sites More sharing options...
Hedgehog Posted May 5, 2013 Share Posted May 5, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now