Untitled diff

Created Diff never expires
The two files are identical
There is no difference to show between these two files
0 removals
12 lines
0 additions
12 lines
function getItemPrice(itemString: string; priceType: integer): integer;
function getItemPrice(itemString: string; priceType: integer): integer;
var
var
wikiaPage, priceString: string;
wikiaPage, priceString: string;
begin
begin
wikiaPage := getPage('http://runescape.wikia.com/wiki/Exchange:' + itemString);
wikiaPage := getPage('http://runescape.wikia.com/wiki/Exchange:' + itemString);
case priceType of
case priceType of
1: priceString := between('GEPrice">', '</span>', wikiaPage);
1: priceString := between('GEPrice">', '</span>', wikiaPage);
2: priceString := between('<b>Low Alchemy:</b> ', '</li>', wikiaPage);
2: priceString := between('<b>Low Alchemy:</b> ', '</li>', wikiaPage);
3: priceString := between('<b>High Alchemy:</b> ', '</li>', wikiaPage);
3: priceString := between('<b>High Alchemy:</b> ', '</li>', wikiaPage);
end;
end;
result := strToIntDef(ExtractFromStr(priceString, numbers), -1);
result := strToIntDef(ExtractFromStr(priceString, numbers), -1);
end;
end;