Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetProfit(WhatBar: String; out Profit: Integer): Boolean;
- var
- Page, BarProfit, BarString, BarType: String;
- begin
- Result := False;
- case LowerCase(WhatBar) of
- 'bronze': BarType := 'Bronze';
- 'iron': BarType := 'Iron';
- 'silver': BarType := 'Silver';
- 'steel': BarType := 'Steel';
- 'gold': BarType := 'Gold';
- 'mithril': BarType := 'Mithril';
- 'adamant': BarType := 'Adamant';
- 'rune': BarType := 'Rune';
- end;
- BarType := '</td><td> <span class="GEIcon"><a href="/wiki/' + BarType + '_bar';
- Page := GetPage('http://runescape.wikia.com/wiki/Calculator:Magic/Superheat');
- BarString := Between(BarType, '<tr>', Page);
- BarProfit := Between('>', '<', Between('e="c', '/s', BarString));
- Profit :=StrToIntDef(BarProfit, -1337);
- Result := (Profit <> -1337);
- end;
Advertisement
Add Comment
Please, Sign In to add comment