SRL Archive - OSR Help

Getting price items bought/sold from GE


Yakabu

2012-08-14 11:15:24

I want to get the price that items buy/sell on the GE. For example, if I bought a feather, I would want to read the following text to get my desired data:


I understand that I have to use the getTextAt method however I'm unsure as to exactly how I would implement this into my script.

Thanks in advance for the help :)

Nava2

2012-08-14 11:25:42

Have you looked at the GrandExchange.simba? It might have the methods you need.

Yakabu

2012-08-14 11:27:26

From: Nava2
Have you looked at the GrandExchange.simba? It might have the methods you need.


Already looked in GrandExchange.simba - there's nothing relevant to reading text in there. Thanks for the help though.

Nava2

2012-08-14 11:48:17

Check the documentation for GetTextAt, but I think it requires the top left point, just do a find colour of that, get the top left, then pass that pt into the GetTextAt with the appropriate parameters.

Home

2012-08-14 11:50:12

program new;
{$i SRL\SRL.simba}

var
Price: Integer;
begin
SetupSRL;
Price := StrToInt(ExtractFromStr(GetTextAtExWrap(156, 283, 338, 300, 0, 50, 10, 39372, 5, StatChars), Numbers));
WriteLn(IntToStr(Price));
end.


Should do the trick :)

Don't just copy it, try learn from it. Like Nava said above, look into Docs and same time look above code.

~Home

Yakabu

2012-08-14 14:22:03

Thanks guys - such a great community here, always ready to help! :)

J J

2012-08-14 14:47:52

This has been asked multiple times, here is another topic if you run into any errors:
http://villavu.com/forum/showthread.php?t=84829&highlight=price