How to grab item prices from rswiki and the offical runescape website.
____________________________
This tutorial was last updated on January 24th, 2016.
What will you learn?
Currently, there are two main methods to grabbing the prices : the unofficial rswiki and the official runescape grand exchange website. Thus, In this guide you will learn both methods to price-
grab any item available on the Grand Exchange in RS3.
Requirements
Here are the requirements you will need for this guide:
- An item you can buy from the Grand Exchange
- A Simba Script
- An internet connection :P
Method 1: Price-grabbing from the unofficial rswiki
In order to price-grab an item from the rswiki, we will be using the following function:
Simba Code:
function getPrice(theItem:string):integer; //credits goes to The Mayor
var
thePage, thePrice:string;
begin
thePage := getPage('http://runescape.wikia.com/wiki/Exchange:' + theItem);
thePrice := between('GEPrice">', '</span>', thePage);
thePrice := replace(thePrice, ',', '', [rfReplaceAll]);
result := strToIntDef(thePrice, 0);
end;
Now, let's put this into practice by finding the price of big bones with the following script.
Simba Code:
program rsWiki; //credits goes to The Mayor
{$DEFINE SMART}
{$i srl-6/srl.simba}
var
bigBonesPrice: integer;
function getPrice(theItem:string):integer;
var
thePage, thePrice:string;
begin
thePage := getPage('http://runescape.wikia.com/wiki/Exchange:' + theItem);
thePrice := between('GEPrice">', '</span>', thePage);
thePrice := replace(thePrice, ',', '', [rfReplaceAll]);
result := strToIntDef(thePrice, 0);
end;
begin
clearDebug();
bigBonesPrice := getPrice('Big_bones');
writeLn(bigBonesPrice);
end.
If you were to run this, you would get the following in the debug screen.
Simba Code:
375
Successfully executed.
Finally, let's check if that's the same price as on the rswiki.
Success!
Method 2: Price-grabbing from the official rswiki
In order to price-grab an item from the official Grand Exchange webpage, we will be using the following built-in SRL-6 function.
Simba Code:
grandExchange.getPrice();
Once again, let's put it into practice by finding the price of big bones using the following script:
Simba Code:
program rsExchange;
{$DEFINE SMART}
{$i srl-6/srl.simba}
var
bigBonesPrice: integer;
begin
clearDebug();
bigBonesPrice := grandexchange.getPrice(532);
writeLn(bigBonesPrice);
end.
If you run the script, you would get this:
Simba Code:
SRL: Logfile = C:\Simba\Includes\SRL-6/logs/SRL log (24-01-16 at 04.09.25 PM).txt
-- TRSGrandExchange.getPrice(532): 375
375
Successfully executed.
Finally, let's check if that's the same on the official grand exchange website.
Success!
Conclusion
I hope you have learned something from this little guide. If you have any questions, comments, concerns, or even complements, please let me know.
-General Patrick
Credits