Results 1 to 10 of 10

Thread: Minimap Fonts are a bit off.

  1. #1
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default Minimap Fonts are a bit off.

    I've been debugging a script of mine.. and well for the prayer detection, I use detecting by level AND by TPA of colours.. it works fine except I noticed a small bug where level detection is broke. When finding prayer, sometimes instead of detecting 360, it detects 60 only.. Also sometimes messes up on detection overall.. The prayerLevel function is detecting 384 when my prayer is at 860.. See below (Picture and script)..



    Simba Code:
    Function PrayerLevel: Integer;
    var
      ColourString: String;
    begin
      //LProc:= 'PrayerLevel';
      Result:= GetMMLevels('Prayer', ColourString);

      //if debugs then
        writeln('Prayer: ' + ToStr(Result));
    end;
    I am Ggzz..
    Hackintosher

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    I personally use a tpa of the HP circle to detect when I should eat...you should probably do the same.

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    I personally use a tpa of the HP circle to detect when I should eat...you should probably do the same.
    I do this already but I'm just reporting the bug See that debug box there? It's a TPA using CLRed for colouring.
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Hm, I doubt it's the font. It could just be where GetMMLevels is searching for the font.

  5. #5
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm going to update this to SRL5 standards. It should be using GetTextAtExWrap (a box) not a TPoint (ewwww).

    Edit:
    Have a fix will see in SRL update tonight.
    Last edited by Narcle; 01-26-2012 at 12:08 AM.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  6. #6
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    I'm going to update this to SRL5 standards. It should be using GetTextAtExWrap (a box) not a TPoint (ewwww).

    Edit:
    Have a fix will see in SRL update tonight.
    Resting doesn't seem to work for me. It will rest @100% if it's set to rest @ 60 or less...

    ~Eerik.

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Resting has always been buggy. Because it has to look for 4 different colors AND the number is constantly changing.

    Edit:
    Weird, think I got the box wrong keeps returning summoning level. XD

    E2:
    yep lol, pushing fix now
    Last edited by Narcle; 01-26-2012 at 05:32 AM.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  8. #8
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Resting has always been buggy. Because it has to look for 4 different colors AND the number is constantly changing.

    Edit:
    Weird, think I got the box wrong keeps returning summoning level. XD

    E2:
    yep lol, pushing fix now
    Hmm was just going to report the resting till I saw this.. I had it fixed :S I used the old GetMMLevels and just set the searchbox to 25-15.. instead of 30-15.. I'll await this update.

    Also can u tell me what else changed in the include? A lot of functions in my script just broke :S

    Edit: Nvm Got myself a link to the Github include.

    Edit2: Summoning MMLevel is broke now.. At 0, it detects 100 :S and now my smart crashes like mad.. Might be something on my side.. I'll go fix/check it out and report back n see via edit.
    I am Ggzz..
    Hackintosher

  9. #9
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by ggzz View Post
    Hmm was just going to report the resting till I saw this.. I had it fixed :S I used the old GetMMLevels and just set the searchbox to 25-15.. instead of 30-15.. I'll await this update.

    Also can u tell me what else changed in the include? A lot of functions in my script just broke :S

    Edit: Nvm Got myself a link to the Github include.

    Edit2: Summoning MMLevel is broke now.. At 0, it detects 100 :S and now my smart crashes like mad.. Might be something on my side.. I'll go fix/check it out and report back n see via edit.
    Its all working for me correctly.

    Here's new GetMMLevels if your having problems:
    Simba Code:
    function GetMMLevels(LevelType: string; var ColorSign: string): Integer;
    var
      Colors : TIntegerArray;
      Signs: TStringArray;
      P: TPointArray;
      I: Integer;
      B: TBox;
    begin;
      Result := -1;
      ColorSign := '';
      case LowerCase(Leveltype) of
        'health', 'hp', 'hitpoints', 'constitution': B := IntToBox(719,27,745,43);
        'prayer', 'pray'                           : B := IntToBox(735,66,762,82);
        'run','energy'                             : B := IntToBox(735,103,762,122);
        'summon', 'summoning'                      : B := IntToBox(719,119,745,156);
      else
        begin;
          srl_Warn('GetMMLevels', 'Invalid LevelType: ''' + LevelType + '', warn_AllVersions);
          Exit;
        end;
      end;
      Colors := [65280, 65535, 2070783, 255];
      Signs  := ['Green', 'Yellow', 'Orange', 'Red'];
      for I := 0 to 3 do
      begin
        With B do
          FindColorsTolerance(P, Colors[i], x1, y1, x2, y2, 30);
        if Length(P) < 1 then
          Continue;
        Result := StrToIntDef(GetNumbers(GetTextAtExWrap(B.X1, B.Y1, B.X2, B.Y2, 0, 4, 4, Colors[i], 20, statChars)), -1);
        if (Result > -1) then
        begin
          ColorSign := Signs[i];
          Exit;
        end;
      end;
    end;
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  10. #10
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Thank you for fixing this so quickly!
    Much love, Narcle! <3
    BTW, it has worked really well for me...
    ~Eerik.

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
  •