View Full Version : in-game Text
Le Jingle
05-02-2012, 01:57 AM
Are there any methods / ways to easily find what text you are looking / need to get from the RS screen?
I know guessing and checking is possible but aside from that is there a faster way to recognize which text type is which? (Note: I have horrid eye sight)
Use this function:
GetTextAtExWrap(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing,color, tol: integer;const font: string): string;
As you (should) know xs, ys, xe, ye is the box you can create around the text.
Minspacing - set to 0
Maxspacing - set to 3? Experiment with this...
Hspacing - set to 0
Color - clBlack, clOrange, clTeal etc...
Tol - 5 -10
Font - search C:\Simba\Fonts to find the right one[/QUOTE]
Alternatively
GetAmountBox - Returns the amount of an item at in the box ‘box’. Use this for counting stackable items in your inventory. For 'box' put InvBox(i), with i being the inventory box you want to search in.
GetBankItemAmount - Returns the amount of an item in the bank at bank screen coordinates. For the first number put in the row you're searching in and for the second put in the column.
Le Jingle
05-02-2012, 04:45 AM
Instead of starting a new thread for another similar question, I'll ask it here:
Can I store the text I get as an integer to use later?
Example
Procedure New;
Var
NeededNo : Integer;
Begin
NeededNo := ((GetTextAtEx(463, 26, 475, 37, 1, 2, 1, 16777215, 5, StatChars)) * (60000));
WriteLn(NeededNo);
End;
Edit: Sniped (for the better :) ) *reading above post
Can I store the text I get as an integer to use later?
Use StrToInt(the integer);
Le Jingle
05-02-2012, 05:21 AM
Program New;
{$DEFINE SRL5}
{$i SRL/srl.simba}
Var
NeededNo : Integer;
Procedure New;
Begin
NeededNo := StrToInt(GetTextAtEx(463, 26, 475, 37, 1, 2, 1, 16777215, 5, StatChars) * (60000));
End;
begin
SetupSRL;
New;
end.
[Error] (10:87): Invalid number of parameters at line 9
No no, NeededNo is a string which then needs to be converted into another variable.
Should be like this:
Program New;
{$DEFINE SRL5}
{$i SRL/srl.simba}
Var
NeededNo: String;
NeededNo1: Integer;
Procedure New;
Begin
NeededNo := GetTextAtExWrap(463, 26, 475, 37, 1, 2, 1, 16777215, 5,StatChars);
NeededNo1 := StrToInt(NeededNo) * 60000
End;
begin
SetupSRL;
New;
end.
Also, for GetTextAtEx you have the wrong number of values in the brackets, the function it should be is GetTextAtExWrap
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.