Results 1 to 9 of 9

Thread: Uptext issue

  1. #1
    Join Date
    Mar 2013
    Location
    The Netherlands
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    70 Post(s)

    Default Uptext issue

    Hi,

    I am working on a custom system which clicks a fishspot. I got the detection working, but it seems to be unable to recognzie the uptext altrough the contrast with the background is quite ok.

    I used findObjMulti() before this, which uses the same kind of uptext checking without a problem.

    Simba Code:
    function SeekFishingSpot(var x, y : integer) : boolean;
    var
      ColToldSpeed, I : integer;
      TPA : TpointArray;
      ATPA : T2DPointArray;
    begin
      ColToldSpeed := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(1.3, 1.49);

      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15056587, MSX1, MSY1, MSX2, MSY2, 12);
      ATPA := TPAtoATPAEx(TPA, 25, 25);

      for I:=Low(ATPA) to High(ATPA) do
      begin
        MMouse(MiddleTPA(ATPA[I]).X, MiddleTPA(ATPA[I]).Y, 10, 10);
        WaitCustom(false);
        WriteLn(GetUpText + ' | ' + rs_GetUpText + ' | ' + P07_GetUpText );

        if WaitUptext(ToolName, RandomRange(500, 750)) then
        begin

          WaitCustom(false);
          ClickMouse2(Mouse_right);
          WaitCustom(false);

          if ChooseOption(OptionName) then
          begin
            Result := true;
            exit;
          end else
          begin
            WriteLn('This spot does not support our fishing method :L.')
          end;
        end;
      end;
    end;

    When debugging the uptext, i either get nothing or gibberish.

    I hope someone could help me with this,
    Thanks in advance.
    Nothing to do here :l.

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    If uptext really isn't working you can use CountColor to check the uptext.

    First get the coordinates of the box around the text you're looking for, make sure not to include the more options bit because those numbers could change. Then do a Writeln(CountColor) to get the number of pixels that are that color.

    Then use an if statement to check if the number of pixels of that color are the same as the number of pixels of the color of the uptext.

    Sorry if that's really confusing, I'm on my phone so I can't do the Simba tags and parameters for CountColor easily

  3. #3
    Join Date
    Mar 2013
    Location
    The Netherlands
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    70 Post(s)

    Default

    Thing is, uptext should work as it works with other commands.
    Nothing to do here :l.

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by jelknab View Post
    Thing is, uptext should work as it works with other commands.
    update to simba 993, I think they got proper uptexts.

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    update to simba 993, I think they got proper uptexts.
    Still need to edit the getuptext function in simba 993 to have it work properly I guess. There's an extra parameter for the function rs_GetUpTextAtEx on 993.

  6. #6
    Join Date
    Mar 2013
    Location
    The Netherlands
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    70 Post(s)

    Default

    I use the latest version from wizzup.org
    Nothing to do here :l.

  7. #7
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by jelknab View Post
    I use the latest version from wizzup.org
    Ask Justin or another mod for the download link.

    Creds to DannyRS for this wonderful sig!

  8. #8
    Join Date
    Mar 2013
    Location
    The Netherlands
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    70 Post(s)

    Default

    It would be a shame to have everyone using my script asking justin for a download. Is there really no other option?
    Nothing to do here :l.

  9. #9
    Join Date
    Mar 2013
    Location
    The Netherlands
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    70 Post(s)

    Default

    I almost gave up on TPA's when i came across this working solution: http://villavu.com/forum/showthread.php?t=100372 . I spend over 6 hours trying everything i could :L...
    Nothing to do here :l.

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
  •