Results 1 to 6 of 6

Thread: in-game Text

  1. #1
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default in-game Text

    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)

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Use this function:
    Simba Code:
    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.

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    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
    Simba Code:
    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

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    Can I store the text I get as an integer to use later?
    Use StrToInt(the integer);

  5. #5
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Simba Code:
    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.

    Code:
    [Error] (10:87): Invalid number of parameters at line 9

  6. #6
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    No no, NeededNo is a string which then needs to be converted into another variable.

    Should be like this:

    Simba Code:
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •