Results 1 to 12 of 12

Thread: SRL Updates

  1. #1
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default SRL Updates

    SRL is not perfect, it also is only as complete as we want it to be. I'm not saying it's missing anything major with that comment, simply that everything can be improved - either via bug fixes or new functionality.

    On that note, I want to contribute more to SRL itself (and perhaps others do as well), but I feel like most people (based on myself) simply don't know where or how to contribute and develop towards SRL. That's where I want this thread to come in - not just for myself but for any who wish to develop for SRL. I would like anyone who feels like it to add either bugs or suggested SRL updates to compile a list that anyone can add to, or work on to improve SRL. Yes, I know we have an area to submit bugs, but I feel having them listed alongside other updates gives people a single location where they may choose to fix/add something based off a single list.

    1. GrandExchange.simba is outdated - [sticktothescript]
    2. GetAbilityCooldown is inaccurate for some abilities RS bug. detailed below.
    3. Support non-English worlds
    4. There is no standard method for getting max hp (several people have implemented their own) - [myself]


    Suggestions to add/anyone wanna take any of these on?

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

    Default

    Please can you give @euphemism a more accurate report of what abilities don't work for getCoolDown?

  3. #3
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Please can you give euphemism a more accurate report of what abilities don't work for getCoolDown?
    I'll try and gather a list based off all the skills (I have available) tonight and throw the mention tag for him next to it as soon as I do.

  4. #4
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,164
    Mentioned
    26 Post(s)
    Quoted
    433 Post(s)

  5. #5
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    @euphemism
    Looked into the GetAbilityCooldown issue much more thoroughly. Wrote a small snippet to print out the cooldown over every skill while it was spamming them. Discovered the issue isn't due to any current issue in code, but appears to be a RS bug instead.
    Whenever any ability is used, all abilities get a cooldown of about 600ms (this is normal, expected behavior). About 1% of the time that this 'all skill cooldown' occurs however, that little cooldown timer on the boxes fails to show up (or it has a delay where it starts at about the halfway point), however the cooldown is still enacted, preventing skill usage and displaying that little in game error message "still on cooldown".
    So I don't think there's really anything that can be done for the GetAbilityCooldown code because there really is no visual cue in these random circumstances. It can just be chalked down as another in-game bug that slightly hinders us. Sorry for that, Euph.

  6. #6
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    @euphemism
    Looked into the GetAbilityCooldown issue much more thoroughly. Wrote a small snippet to print out the cooldown over every skill while it was spamming them. Discovered the issue isn't due to any current issue in code, but appears to be a RS bug instead.
    Whenever any ability is used, all abilities get a cooldown of about 600ms (this is normal, expected behavior). About 1% of the time that this 'all skill cooldown' occurs however, that little cooldown timer on the boxes fails to show up (or it has a delay where it starts at about the halfway point), however the cooldown is still enacted, preventing skill usage and displaying that little in game error message "still on cooldown".
    So I don't think there's really anything that can be done for the GetAbilityCooldown code because there really is no visual cue in these random circumstances. It can just be chalked down as another in-game bug that slightly hinders us. Sorry for that, Euph.
    I see, so you are of the mind that the best course of action is to wait for Jagex to fix the bug?
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  7. #7
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by euphemism View Post
    I see, so you are of the mind that the best course of action is to wait for Jagex to fix the bug?
    Either that or simply have people using skills add some slight manual delay anyway. Therefore, as opposed to spamming every button the exact instant the cooldown is off anyway, have additional slight delays between ability usage. Ignoring any factor of current cooldowns, no skill can be used within 0.6 seconds of another anyway. Therefore, it would seem to me that the best course of action for scripters is to encourage an additionally handled delay at this point or let them continue as is on their own and wait for this to be fixed within RS. Any script attempting a skill "spam" would only need 2 more lines of code to get around this.
    Between those reasons, I don't see any reason to add any additional logic to try and handle that in SRL (your code) itself.

    Edited: 05/20/2013 -
    @euphemism - it turns out I was wrong, there is a case where GetAbilityCooldown is incorrect. As any Threshold or Ultimate ability finishes that "mini cooldown" for a split second, it flashes a complete white screen which is recognized as a cooldown that is finished (which isn't the entire case, as it isn't a usable ability if you don't have enough adrenaline).

    The numbers on that gif are made with the following code:
    Simba Code:
    for i:=1 to 12 do
        begin
          SMART_DrawText(ActionBarSlotToBox(i).x1, ActionBarSlotToBox(i).y1, LoginChars, IntToStr(GetAbilityCooldown(i)), 13158600);
        end;

    This is at least easily passable with a check for adrenaline percent, however that depends on knowing which slots is threshold or ultimate. So it's not a huge bug, but I do think it's a bug we could possibly fix unlike the originally mentioned one.

  8. #8
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    @euphemism - it turns out I was wrong, there is a case where GetAbilityCooldown is incorrect. As any Threshold or Ultimate ability finishes that "mini cooldown" for a split second, it flashes a complete white screen which is recognized as a cooldown that is finished (which isn't the entire case, as it isn't a usable ability if you don't have enough adrenaline).
    Ah, I see. This seems like something that can be accounted for within the cooldown function. Thank you for pursuing this.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  9. #9
    Join Date
    Apr 2013
    Location
    England
    Posts
    223
    Mentioned
    2 Post(s)
    Quoted
    106 Post(s)

    Default

    an observation, in SLR-OSR/SRL/core/gametab.simba the GetXp function moves the mouse to the top left of the skill box instead of the centre, when hovering to make the XP box appear. There are a few other minor issues i saw as well, when i remember i'll put there in here too.

    line 1089:
    Code:
     MMouse(MouseTB.X1+3,MouseTB.Y1+3, 55, 25);
    i think should be:
    Code:
     MMouse((MouseTB.X1 + MouseTB.X2) / 2, (MouseTB.Y1 + MouseTB.Y2) / 2,  55,  25);
    ** this is what the thread is for right? **
    Last edited by EngageTheRage; 05-28-2013 at 10:34 PM.

  10. #10
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Quote Originally Posted by StickToTheScript View Post
    Began working on the GE a bit. Will see what I come up with. Not finished testing.
    If you need help with GE. Ill help ya. I will need that for some coming scripts im making, was going to have to re-write most them anyways. Already did a few. Im having surgery tomrrow tho. Won't be on much for a week or so. Feel free to hit me up on skype : Peter_knight2191

    Just put ur SRl name in request so ik its you :P and we can talk ^^

  11. #11
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,164
    Mentioned
    26 Post(s)
    Quoted
    433 Post(s)

    Default

    Quote Originally Posted by Itankbots View Post
    If you need help with GE. Ill help ya. I will need that for some coming scripts im making, was going to have to re-write most them anyways. Already did a few. Im having surgery tomrrow tho. Won't be on much for a week or so. Feel free to hit me up on skype : Peter_knight2191

    Just put ur SRl name in request so ik its you :P and we can talk ^^
    Added

  12. #12
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    I will do the Max Hp method, just fixing OCR now.
    Simba Code:
    function Closewin(button,WaitT:integer): Boolean; //0 = noclick, 1 = click
    var
      bmp, t, x, y, i: integer;
    begin
      Result := False;
      Bmp := BitmapFromString(11, 9, 'meJzTzp6rs/Gv1oyHWgYZSkqhkso' + 'JQDZQRDKyj4dHRlPTUMcwEiICJBXMaiBstSn3OEScmJmlmZiEpaW9' + 'FFXSIeIQBJTlFgtkZTVmYVECKpCSspeWChLTLoErENUu4eZ24uCAK' + 'hASshSRigTqwmUCp6gTRBZIAs2BszmErZmZpRgZuaUi+yAiPOKBPD' + 'xOQL0QNUBfMDEJycioAJUB1XCKWLOxGUMQUC9ElomJZ/r06UBDgBY' + 'BlQFtBCIgA2yyEFA8MzPv1KlTAA4RVsQ=');
      MarkTime(T);
      while (TimefromMark(t) < WaitT) do
      begin
        if FindBitmapToleranceIn(bmp, x, y, 400, 0, 500, 100, 20) then
        begin
          writeln('Found x');
          If (button = 1) Then
          begin
          MMouse(x, y, 3, 3);
          ClickMouse2(True);
          end;
          Result := True;
          FreeBitmap(bmp);
          exit;
        end;
        inc(i);
        getmousepos(x, y);
        If (TimeFromMark(t) Mod 4) = 0 then
          MMouse(x + randomrange( - 5, 5), y + Randomrange( - 5, 5), 2, 2);
        wait(randomrange(10,50));
      end;
      FreeBitmap(bmp);
    end;

    function GetMaxHp: Integer;
    begin
      CloseWin(1,300);
      GameTab(tab_Equip);
      if not WaitTabExists(tab_Equip, 3000) then
      begin
        Result := - 1;
        Exit;
      end;
      MMouse(RandomRange(555, 590), RandomRange(420, 450), 3, 3);
      ClickMouse2(True);
      CloseWin(0,1000);
      Result := StrToInt(Replace(GetTextAtExWrap(250, 68, 290, 80, 0, 1, 4, 12903403, 75, 'EquipChars'), ' ', ''));
      CloseWin(1,100);
      if result < 800 then
         result := getmaxhp;
    end;
    Attached Files Attached Files

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
  •