SRL Archive - OSR Help

Script to pickup this #?


halgboy_tbc

2012-04-06 22:58:41

Is it possible for me to write a script that will recognize the number
"…for a total price of (x) gp."

if so how…?

Brandon

2012-04-06 23:02:54

what? I didn't understand the question.. do u mean you want to count the #of GP in the invent or bank? or do u mean u want to withdraw -X amount of gp? or what? it isn't clear..

EDIT: Just saw the pic u just posted..
Try looking at the ItemAmount function or modify it and make one.. easy

Sir Ducksworthy

2012-04-07 01:21:54

Hmm the Item amount function probably isn't going to work on that Font.
You may need to make your own font set for the G.E number's which won't take very long at all and use that its only 10 bitmap's ;)

Justin

2012-04-07 06:38:45

What I tested with:

Simba Script:


program Text;
{$i SRL/srl.simba}

function GetPrice: string;
begin
Result := GetTextAtExWrap(146, 285, 351, 298, 0, 5, 2, 39372, 5, StatChars);
end;

begin
ClearDebug;
writeln(GetPrice);
end.

Result:

1'295
Successfully executed.

Hope that is what you are looking for.