SRL Archive - Non-RuneScape Scripts

Using SRL on Non-RS Games?


Teksas

2015-05-10 15:48:41

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:
  3. function isClientReady(): boolean;
    begin
    Result := (isLoggedIn() or lobby.isOpen() or __setInputBoxes());
    end;
  4. 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.
  5. function isClientReady(): boolean;
    begin
    Result := [B][I]Not[/I][/B](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!

Camel

2015-05-10 16:04:36

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

KeepBotting

2015-05-10 16:37:50

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

:p?

Anyway, what Camel said.

Teksas

2015-05-10 16:59:25

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!

rj

2015-05-10 22:27:34

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