Results 1 to 4 of 4

Thread: Fonts and uptexts are weird and wrong, what can i do?

  1. #1
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default Fonts and uptexts are weird and wrong, what can i do?

    Fonts and uptexts are weird and wrong, what can i do?

    I just reinstalled simba after a while that I didn't use it, and SRL-6 is new to me.

    This is the sample script I was testing and the result:
    Code:
    program chopp1st;
    {$DEFINE SMART}
    {$i srl-6/srl.simba}
    
    var
      x, y : Integer;
    
    begin
      clearDebug();
      setupSRL();
      mainscreen.findObject(x, y, 3428964, 4, colorSetting(2, 0.45, 0.33), mainscreen.getCenterPoint(), 30, 70, 60, ['hop'], MOUSE_LEFT);
    end.
    Result:
    Code:
    -- setupSRL()
    ---- Setting up SRL...
    ---- initSmart():
    ------ Attempting to pair to a previously spawned client
    ------ smartPairToExistingClient():
    -------- Found 1 free client(s), attempting to pair to one...
    ---------- smartSetAsTarget(): Succesfully set SMART[14840] as Simba's target
    -------- Succesfully paired to a existing client, SMART[14840]
    ------ smartPairToExistingClient(): result = true
    ------ Succesfully initialized via pairing to a previously spawned client
    ---- initSmart()
    ---- Waiting up to 5 minutes for RS to load...
    ------ minimap.__createMask(): Creating the bitmap mask
    ---- TRSMinimap.__find(): Sucesfully found and set minimap bounds at {X1 = 735, Y1 = 13, X2 = 959, Y2 = 223}
    ---- TRSActionBar.__find()
    ------ Found and set actionBar properties
    ---- TRSActionBar.__find(): True
    ---- TRSChatbox.__find()
    ------ Looking for chat text border...
    -------- TRSChatbox._findTextBorder(): No chat tab is open
    ------ Looking for the emote tab...
    -------- TRSChatbox._findEmoteBorder(): Didn't find text background color
    ------ Looking for the quick chat interface...
    -------- Didn't find quick chat border
    ---- TRSChatbox.__find(): False
    ------ TRSMainscreen.__find(): Set mainscreen bounds based on the other visible interfaces
    ---- Client is ready.
    ---- Setup SRL in 94ms.
    -- setupSRL(): True
    -- TRSMainscreen.findObject()
    ---- Colors found: 23256
    ---- Possible objects found: 28
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: ""
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n ek"
    ------ Current mouse-over text: "HA dA n ek"
    ------ Current mouse-over text: "HA dA n ek"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ".U U Yn T e"
    ------ Current mouse-over text: "HA dA n T ee"
    ------ Current mouse-over text: "HA dA n T ee"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: "HA dA n ek"
    ------ Current mouse-over text: "HA dA n ek"
    ------ Current mouse-over text: "HA dA n ek"
    ---- isMouseOverText(): False
    ---- isMouseOverText()
    ------ Current mouse-over text: ""
    ------ Current mouse-over text: "HA dA n ek"
    ------ Current mouse-over text: "HA dA n ek"
    ---- isMouseOverText(): False
    -- TRSMainscreen.findObject(): False
    -- Freeing gametabs bitmaps...
    -- Succesfully freed SMART[14840]
    -- Freeing the minimap mask
    Successfully executed.
    I followed the thread: http://villavu.com/forum/showthread.php?t=47714.

    Any help would be appreciated,
    Thanks,
    Zorgatone.
    Check out my new script here: http://villavu.com/forum/showthread.php?p=1194418 Al-Kharid Silk buyer

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    http://villavu.com/forum/showthread.php?t=106386

    I can't fix it until we get a new Simba version or getting the fonts updated, wizzup said he could do it this weekend hopefully.

  3. #3
    Join Date
    Oct 2013
    Location
    East Coast USA
    Posts
    770
    Mentioned
    61 Post(s)
    Quoted
    364 Post(s)

    Default

    Recent updates to rs have broken the mouseovertext reading capability.

    For now you have to use getMouseOverTextCount() and isMouseOverTextCount() to see how many pixels are in the mouseover text.

    This is a modified mainscreen.findObject I used as a workaround until it comes back. It takes an array of integers for the mousetext counts instead of the mousetext strings.

    Code:
    // modifed from mainscreen.simba for mouseovertextcounts
    function __findObject(var ix, iy: integer; cols, tols: TIntegerArray; colSettings: TColorSettings; 
       sortFrom: TPoint; objWidth, objHeight, minCount: integer; 
       mouseOverTextCounts: TIntegerArray; searchBox: TBox; mouseAction: integer = MOUSE_NONE): boolean;
    var
      i, l: integer;
      myPoint: TPoint;
      aPoints: T2DPointArray;
      ATPA: T2DPointArray;
      TPA: TPointArray;
      cs: TColorSettings;
      pixelCount : integer;
    begin
       writeln('---- in __findObject()');
      result := false;
    
      cs.retrieve();
      colSettings.apply();
      l := length(cols);
    
      setLength(ATPA, l);
    
      for i := 0 to (l - 1) do
        findColorsSpiralTolerance(ix, iy, ATPA[i], cols[i], searchBox, tols[i], colSettings);
    
      cs.apply();
    
      TPA := ATPA.merge();
      if (length(TPA) <= 0) then
      begin
        exit(false);
      end;
    
      aPoints := TPA.toATPA(objWidth, objHeight);
      aPoints.filterBetween(0, minCount); // removes objects that don't have enough colors
    
      aPoints.sortFromFirstPoint(sortFrom);
    
      // loop through each possible object
      for i := 0 to high(aPoints) do
      begin
        myPoint := aPoints[i].getMiddle();
        mouse(myPoint.rand(randomRange(-3, 3)), MOUSE_MOVE);
    
        pixelCount := getMouseOverTextCount();
        if (mouseOverTextCounts.isInArray(pixelCount)) then
        begin
          getMousePos(ix, iy);
          mouse(point(ix, iy), mouseAction);
          result := true;
          writeln('---- __findObject() object located at x=', ix, ' y=', iy);
          break;
        end
        else
          writeln('---- __findObject() unmatched mouseOverTextCount = ' + intToStr(pixelCount));
      end;
    end;

  4. #4
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    Thanks!!
    Check out my new script here: http://villavu.com/forum/showthread.php?p=1194418 Al-Kharid Silk buyer

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
  •