Results 1 to 5 of 5

Thread: Using SRL on Non-RS Games?

  1. #1
    Join Date
    Dec 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using SRL on Non-RS Games?

    I'm a lurker that was involved in the RSC (2001) SCAR scene and have habitually continued to write SCAR scripts for other games. As I learned on SCAR's pascal system, it's native to me, and a lot of anti-cheat systems don't seem to look for SCAR.. so it's win-win. I like the improvements that Simba made though, so I've been trying to make use of it more, but have run into an issue.

    While trying to figure out a replacement for MoveMouseSmooth() in Simba, I saw a suggestion to use SRL's Mouse(). The problem I ran into was that SRL would get hungup trying to find a RS client that won't exist. SRL is working smoothly when I downloaded RS and loaded it up, so I knew it was installed properly. I tried to find a solution on the forums, but most were just appeals to make SRL for other games. I made a tweak to get SRL to load without a RS client, but if anyone else has solved this issue in a smarter way, or if I missed an obvious solution, please share it!

    While the meat is in various functions, SRL tries to find the RS client repeatedly until it hits the 5-minute timeout. Since we know it is never going to find a RS client, I just feed it a false positive where it determines if it has found the client. This causes some other procedures to not complete and leaves a couple bitmaps loaded, but at least you can use all of SRL's useful features. I haven't run into an issue with any of the SRL functions yet, but that may just be due to the simple nature of my current project. If you plan to use SRL for RS another time, you'll probably have to revert the change or reinstall SRL.. but I have no interest in trying that.

    Here's the steps I took:
    1. In the folder where you installed Simba, navigate through SRL's folders to find and open client.simba. Mine was located here: \Simba\Includes\srl-6\lib\core\client.simba
    2. Once client.simba is open, locate the isClientReady() function, which should look like this:
      Code:
      function isClientReady(): boolean;
      begin
        Result := (isLoggedIn() or lobby.isOpen() or __setInputBoxes());
      end;
    3. Since we know it will never find a runescape lobby or character that is logged in, we know the isClientReady() function is going to keep returning False. All we have to do is add a "Not" in front of the items being checked, and SRL will continue on without the RS client.
      Code:
      function isClientReady(): boolean;
      begin
        Result := Not(isLoggedIn() or lobby.isOpen() or __setInputBoxes());
      end;


    This has worked for me, but if there's a better way to use SRL on other games, please share!

  2. #2
    Join Date
    Jun 2014
    Location
    Oklahoma
    Posts
    336
    Mentioned
    22 Post(s)
    Quoted
    231 Post(s)

    Default

    You could just copy and paste relevant functions from SRL to your own script. Most of the functions are runescape specific.

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Simba Code:
    function isClientReady(): boolean;
    begin
      Result := true;
    end;

    ?

    Anyway, what Camel said.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  4. #4
    Join Date
    Dec 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha I guess I was trying to avoid writing over something that I might want to keep/use later. I might try to just include the features I use though. Thanks!

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Simba Code:
    function isClientReady():boolean; override;
    begin
      // code here to return true
    end;

    function isLoggedIn():boolean; override;
    begin
      // code here to return true
    end;

    No need to dissect the include

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
  •