Results 1 to 16 of 16

Thread: False Mouse over text

  1. #1
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Question False Mouse over text

    Sup guise

    Havent been very active lately but decided to come back and do some botting cause reasons.

    false mouse over text.jpg

    The thing is im getting this when trying to withdraw spirit graahk pouches:

    Code:
    ---- Current mouse-over text: "Withdraw-1 SF'irit ).IraaI1k F'oucI1"
    ---- Current mouse-over text: "Withdraw-1 SF'irit ).IraaI1k F'oucI1"
    ---- Current mouse-over text: "Withdraw-1 SF'irit ).IraaI1k F'oucI1"
    ---- Current mouse-over text: "Withdraw-1 SF'irit ).IraaI1k F'oucI1"
    ---- Current mouse-over text: "Withdraw-1 SF'irit ).IraaI1k F'oucI1"
    -- isMouseOverText(): False
    ---- bankscreen.withdraw(): Incorrect Mouse-over text, result = false
    The rest of the mouseovertext's work fine but this one is broken. Havent scripted nor played RS in a while and the script is kinda old but still works, any ideas on why this could be happening?

    Code:
      if openbank then
      begin
        bankscreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
        wait(randomrange(1000, 2000));
        bankscreen.withdraw(sumPouchSlot, 1, ['Spirit', 'pirit', 'graahk', 'pouch']);
        wait(randomrange(1000, 2000));
        bankscreen.close;
      end;
    Thanks
    Formerly known as Undorak7

  2. #2
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    The default filtering is splitting the P into an F and '.
    ie the red


    (this is just a guess as to what is happening, i didnt run it through the thresholding and stuff to see)

    Similar scenario for the others id assume.
    Find your Tessdata folder/file and delete it. that might help?


    What about other pouches or words that have Ps, Gs, or Hs?

  3. #3
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    .
    the same happens with rings of duelling

    Code:
    ---- Current mouse-over text: "Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}"
    ---- Current mouse-over text: "Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}"
    ---- Current mouse-over text: "Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}"
    ---- Current mouse-over text: "Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}"
    ---- Current mouse-over text: "Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}"
    Its a clean simba Install though

    EDIT: erased tessdata and nothing changed. Tried using an older tessdata folder from previous installations and it didnt help either.
    Formerly known as Undorak7

  4. #4
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    post full screenshots of the game so i can test it out, with either the ring of dueling or the ghraak pouch up.

  5. #5
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    post full screenshots of the game so i can test it out, with either the ring of dueling or the ghraak pouch up.
    Edit: Noobs will be noobs
    Formerly known as Undorak7

  6. #6
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

  7. #7
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default



    Formerly known as Undorak7

  8. #8
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Simba Code:
    writeln(getMouseOverText(true));
    writeln(getmouseovertext());

    Progress Report:
    Compiled successfully in 1903 ms.
    Withdraw-1 Ring of duelling (8)
    Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}
    Successfully executed.

  9. #9
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Simba Code:
    writeln(getMouseOverText(true));
    writeln(getmouseovertext());

    Progress Report:
    Compiled successfully in 1903 ms.
    Withdraw-1 Ring of duelling (8)
    Withdraw-1 Ri!1).I of 'Tuelli!1).I (8}
    Successfully executed.
    Then bankscreen.withdraw is using getmouseovertext() thus, not working.

    I'll change my procedures to use getmouseovertext with tesseract then and stop using bankscreen.withdraw .

    Thanks Bruh!

    PD: should the bankscreen procedures in the include have that changed?
    Formerly known as Undorak7

  10. #10
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Simba Code:
    function TRSBankScreen.withdraw(slot, amount: integer; mouseOverText: TStringArray; asNote: boolean = false; toFamiliar: boolean = false): boolean; override;
    var
      b: TBox;
    begin
      result := false;
      b := self.getBankSlotBox(slot);

      if asNote then
      begin
        if not self.isButtonActive(BANK_BUTTON_NOTE) then
        begin
          self.clickButton(BANK_BUTTON_NOTE);
          wait(125 + random(50));
        end;
      end else
      begin
        if self.isButtonActive(BANK_BUTTON_NOTE) then
        begin
          self.clickButton(BANK_BUTTON_NOTE);
          wait(125 + random(50));
        end;
      end;

      if (b.x1 = -1) then // invaild slot
      begin
        print('bankscreen.withdraw(): Invalid slot '+toStr(slot), TDebug.WARNING);
        exit;
      end;

      if (not isItemIn(b)) then // no item in the slot?
      begin
        print('bankscreen.withdraw(): No item in slot '+toStr(slot), TDebug.WARNING);
        exit;
      end;

      mouseBox(b, MOUSE_MOVE);

      if (length(mouseOverText[0]) > 0) then
        if (not isMouseOverText(mouseOverText, 250, true)) then
        begin
          print('bankscreen.withdraw(): Incorrect Mouse-over text, result = false', TDebug.SUB);
          exit(false);
        end;

      if (amount = 1) then     // single item? let's just click it
      begin
        fastClick(MOUSE_LEFT);
        wait(400 + random(300));
        print('bankscreen.withdraw(): result = true', TDebug.SUB);
        exit(true);
      end else
        fastClick(MOUSE_RIGHT);  // more than 1 item? open choose options

      if (chooseOption.isOpen(2000)) then
      begin
        case (amount) of
          WITHDRAW_AMOUNT_ALL: result := chooseOption.select(['Withdraw-All', '-All']);
          WITHDRAW_AMOUNT_ALL_BUT_ONE: result := chooseOption.select(['Withdraw-All but one', 'All but one']);

          // check if the number is already availble, else let's withdraw X it
          else begin
            if toFamiliar then
            begin
              if (chooseOption.select(['Withdraw-X to BoB', 'to', 'BoB'])) then
              begin
                result := chatBox.enterAmount(amount, random(5000, 6000));
                print('bankscreen.withdraw(): result = ' + boolToStr(result), TDebug.SUB);
                exit();
              end else
              begin
                result := false;
                chooseOption.close();
                print('bankscreen.withdraw(): Withdraw-X to BoB option not present.  result = ' + boolToStr(result), TDebug.ERROR);
                exit();
              end;
            end;
            if (not chooseOption.optionsExist(['Withdraw-' + intToStr(amount), '-' + intToStr(amount), toStr(amount)])) then
            begin
              if (chooseOption.select(['Withdraw-X', '-X'])) then
                result := chatBox.enterAmount(amount, random(5000, 6000));
            end else
              result := chooseOption.select(['Withdraw-' + intToStr(amount), '-' + intToStr(amount), toStr(amount)]);
            end;
         end;
      end else
        print('bankscreen.withdraw(): chooseOption menu failed to open', TDebug.SUB);

      print('bankscreen.withdraw(): result = ' + boolToStr(result), TDebug.SUB);
    end;

    Override it.
    (or if youre using a DTM or bitmap or something, just override that func (in your script))

  11. #11
    Join Date
    Mar 2016
    Posts
    192
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    Quote Originally Posted by Lipcot View Post
    Then bankscreen.withdraw is using getmouseovertext() thus, not working.

    I'll change my procedures to use getmouseovertext with tesseract then and stop using bankscreen.withdraw .

    Thanks Bruh!

    PD: should the bankscreen procedures in the include have that changed?


    Simba Code:
    function __getMouseOverTextTess(const box: TBox): string; override;
    begin
      result := Tesseract_GetText(box.x1, box.y1, box.x2, box.y2, TTesseractFilter([3, 3, [true, 25, TM_Mean]]));
    end;

    Try this override, looks like it works
    (just paste it in your script above any use of getMouseOverText(true))

  12. #12
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by scob View Post


    Simba Code:
    function __getMouseOverTextTess(const box: TBox): string; override;
    begin
      result := Tesseract_GetText(box.x1, box.y1, box.x2, box.y2, TTesseractFilter([3, 3, [true, 25, TM_Mean]]));
    end;

    Try this override, looks like it works
    (just paste it in your script above any use of getMouseOverText(true))
    Theres nothing wrong with the tesseract filter. The issue was the thresholding used on the bitmap before running simba's ocr over it.

    You also dont need to paste it in before every getmouseovertext. Just once, preferably right at the beginning.

  13. #13
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    ty guyss everythings working now
    Formerly known as Undorak7

  14. #14
    Join Date
    Mar 2016
    Posts
    192
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    @Turpinator yep, thats what I meant- to paste it somewhere on top any =/= every

  15. #15
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by scob View Post
    @Turpinator yep, thats what I meant- to paste it somewhere on top any =/= every
    Turp means it doesn't matter where you paste it.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  16. #16
    Join Date
    Mar 2016
    Posts
    192
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    Quote Originally Posted by Harrier View Post
    Turp means it doesn't matter where you paste it.
    Oh, ok, good to know

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
  •