SRL Archive - Other Guides

How-To: Running Multiple SMART Clients


Gunner

2014-06-10 04:33:20

This is going to be a guide on how to set up your PC to run multiple (more than 4) SMART clients at once.

Credits:

Gunner - I wrote this damn thing!
timeforthe - A fellow SRL user I met on Powerbot. I do not know his SRL name. If he pops in, I will be sure to update this with his proper name. He came up with this brilliant idea. He deserves all the credit for the process. His Powerbot profile - timeforthe


[spoiler="The Problem"]

Running more than 4 SMART clients, or even official RS clients results in #5 and beyond being loaded in Safe Mode. This is obviously a problem because Simba is not designed to run in Safe Mode. This has to do with the jagexcache folders and the preferences.dat and preferences2.dat files. These files are what store your graphics settings, among other things. The .dat files exist in the jagexcache, and for each new client you open, either official or otherwise, it will create a new jagexcache folder, up to a maximum of 4, and they will be named respectively. Trying to open a 5th client will not create a new folder, but will instead attempt to use the .dat files of jagexcache3 (which is actually folder #4.) Since these files are already being utilized by client #4, it will fail to load the proper graphics settings and will lock that client into Safe Mode, and thus, render it useless to Simba. I don't know whether this is intentional on the part of Jagex to prevent goldfarming, or if it simply a limitation of the system itself.[/spoiler]

[spoiler="The Solution"]

We can beat this problem in one of 2 ways.

1: Utilize multiple PC's and VPS' with Teamviewer and Remote Desktop. (A very cumbersome process that I have been using for the past 2 months.)

2: Utilize batch files to load our clients from different user accounts on the same PC. We will be learning this option here. The benefits of this solution are two fold. It solves the problem of the preferences.dat files, and it greatly reduces the system resources used by SMART and Simba. As far as I can tell already, by at least 50%. That is HUGE!

While there are no theoretical limits to how many Windows user accounts you can create, there are practical ones. Hard drive size, database functionality all play a part in where your limit is, but rest assured, you WILL run out of system resources for your SMART clients long before you run out of user accounts. So for the purpose of this tutorial, we're going to assume that a user account limit does not exist.[/spoiler]

This is going to cover the process for creating new user accounts in Win7. If you are using a different version of Windows, :google:

IMPORTANT NOTE: You will never actually be logging on to this account!

[spoiler="Creating User Accounts (Win7)"]

Step 1:
Click Start and type in "create an account", press enter. This will bring you to the account creation window.

[ATTACH=CONFIG]23377[/ATTACH]

Step 2:
Type in what you want the new account to be named. EXAMPLE: "Simba" and tick the Standard User option. Click Create Account. This will create the account, and drop you into the Manage Accounts window.

[ATTACH=CONFIG]23378[/ATTACH]
[ATTACH=CONFIG]23379[/ATTACH]

Step 3:
Click on the newly created account and select the option to Create a password. Set this to anything you like. You may also fill out the Password Hint field, but this is purely optional. As stated, you will never actually be logging on to this account, but you will need to remember the name, and password at least once.[/spoiler]

Here we will be covering the process of creating the batch files that connect our main user account to the file storage of the newly created user accounts. This will allow us to run programs on our account as other users without having to actually log on to those accounts.

[spoiler="Creating the batch files"]

Step 1:
We will need to download a piece of software first. The software is called CPAU, and it replaces the runas CMD command.
Download it here

Step 2:
Once that has finished downloading, we need to move it to the systemroot folder. Click Start again and paste this in the search bar:


%systemroot%\system32

Open that folder, and place your newly downloaded CPAU.exe file in it.

[ATTACH=CONFIG]23380[/ATTACH]

Step 3:
Open Notepad.

Step 4:
Paste this into Notepad:

cpau -u newly_created_account_name -p password -ex "simba.exe" -lwp

NOTE: Be sure to change "newly_created_account_name" to the name of the account you just created, and change "password" to the password of the account you just created.

Step 5:
Still in Notepad - File > Save As > simba.bat

This does NOT have to be named simba, it can be named anything you want, but it MUST be .bat
After being saved, move your new simba.bat file into your Simba folder. If you named it simba.bat it should land directly above Simba.exe.

[ATTACH=CONFIG]23381[/ATTACH]

Step 6:
Right click on the newly created .bat file, and create a Desktop shortcut.
[/spoiler]

Congratulations! You're now ready to run bots on top of bots on top of bots! There is no limit to the amount of users you can create, or the amount of SMARTS you can now run. The "limits" will be discovered when your scripts start to fail from lack of processing power. As stated above, this process lowers CPU usage by around 50%, but it will be up to your particular CPU/RAM/GPU as to how many clients you can run without your scripts failing.

To make use of your newly created bots, all you have to do is double-click on the .bat file and it will open Simba and it will be ready for use! You can open this same batch file up to 4 times per user account. If you need more bots, simply start again at step 1 and create more users and batch files!

Possible additional requirement: If you have never entered security credentials into the Windows command prompt before, you will need to enter the password for the newly created user account now.

To verify that you are indeed running your new bots as separate user accounts, open the task manager and verify.

So that's that. Good luck to all my fellow botters out there! Bot safe, Bot SMART, and Bot often!

Kasi

2014-06-10 05:11:59

Set Random.dat to read-only?

Edit: does this still work? (C:\Users\"User"\Random.dat)

Turpinator

2014-06-10 09:45:04

From: Kasi
Set Random.dat to read-only?

Edit: does this still work? (C:\Users\"User"\Random.dat)


Thats for logging into the same world.
this is to bypass the 4 runescape client limit per computer.

ry0240

2014-06-10 10:56:40

Tried this, but I didn't notice any speed differences. My CPU is still at 100% for 2 smarts lol.

Gunner

2014-06-10 11:33:58

From: ry0240
Tried this, but I didn't notice any speed differences. My CPU is still at 100% for 2 smarts lol.


So each client takes 50% of your CPU? Or do you have a bunch of other stuff running as well? What CPU do you have? I don't recommend forcing your computer to run harder when it's already at 100%, but you could try to force a few more clients open and see how well the scripts perform.

ry0240

2014-06-10 12:05:44

From: Gunner
So each client takes 50% of your CPU? Or do you have a bunch of other stuff running as well? What CPU do you have? I don't recommend forcing your computer to run harder when it's already at 100%, but you could try to force a few more clients open and see how well the scripts perform.


It is an old Core 2 duo E6300 @ 1.8ghz and besides the 2 Smart/simba clients I have chrome open with a 1 or 2 tabs open.

Gunner

2014-06-10 12:42:27

From: ry0240
It is an old Core 2 duo E6300 @ 1.8ghz and besides the 2 Smart/simba clients I have chrome open with a 1 or 2 tabs open.


Unfortunately about the only thing you can do at this point is keep opening clients and running scripts until scripts start to fail. Scripts may fail at client 3, or they may not fail until client 6. It depends on the script as well. A bank standing script will last a lot longer than a fighting script.

The Killer

2014-06-10 13:56:15

Fair play to you. Good job on this (y)

ploxcake

2014-06-29 08:28:47

[ATTACH=CONFIG]23455[/ATTACH]

Won't work? Just added pause in the bottom so you could see what it actually says. Yes, I know it's a complete other client I'm trying this for, however that shouldn't do any difference, and I'd still appericate the help from you guys.
Thanks in advance c:

KeepBotting

2014-06-29 08:53:36

From: ploxcake
[ATTACH=CONFIG]23455[/ATTACH]

Won't work? Just added pause in the bottom so you could see what it actually says. Yes, I know it's a complete other client I'm trying this for, however that shouldn't do any difference, and I'd still appericate the help from you guys.
Thanks in advance c:

Make sure the batch script is in the same directory as TRiBot.jar

ploxcake

2014-06-29 09:01:41

From: KeepBotting
Make sure the batch script is in the same directory as TRiBot.jar

It is

[ATTACH=CONFIG]23456[/ATTACH]

[ATTACH=CONFIG]23457[/ATTACH]

[ATTACH=CONFIG]23458[/ATTACH]

ploxcake

2014-06-29 10:55:19

OP, what did you mean with "Possible additional requirement: If you have never entered security credentials into the Windows command prompt before, you will need to enter the password for the newly created user account now."? Could you explain further how to exactly do this? Can't get this to work on either my bot rig nor my main gaming rig

bonsai

2014-06-29 11:46:40

I don't know anything about any of this but… I would move all of those files to a simple folder name without spaces and periods and whatnot.

Like c:\tritest

Right click tritest -> properties. Go to the security tab

Click 'edit' then 'add'. Add TriBot1 though 5

Make sure each is set for "full control" in the bottom panel.

ploxcake

2014-06-29 12:32:57

From: bonsai
I don't know anything about any of this but… I would move all of those files to a simple folder name without spaces and periods and whatnot.

Like c:\tritest

Right click tritest -> properties. Go to the security tab

Click 'edit' then 'add'. Add TriBot1 though 5

Make sure each is set for "full control" in the bottom panel.


Changed name to "TriTest".

Without windows users added to security tab -
[ATTACH=CONFIG]23462[/ATTACH]

With windows users added to security tab with full control -
[ATTACH=CONFIG]23463[/ATTACH]

ploxcake

2014-06-29 15:31:21

Found the problem, the programs seems to only only allow me to execute .exe files.

Downloaded a jar2exe program and seems to work fine now :D

Gunner

2014-07-02 00:45:37

From: ploxcake
Found the problem, the programs seems to only only allow me to execute .exe files.

Downloaded a jar2exe program and seems to work fine now :D


Glad to hear this is fixed now. In all of that posting no one tagged me, lol. Had no idea someone needed help. Glad you got it straightened out.

ploxcake

2014-07-02 14:36:09

Actually with help of timeforthe himself got it working with .jar's aswell

cpau -u ACCOUNTNAME -p PASSWORD -ex "JAVAPATH -jar .JAR(FULL)FILENAME" -lwp -hide

-hide is there due a new cmd window appearing that is quite annoying when using cpau for multiplie clients. Doesn't have to be included though.

So like…
cpau -u TRiBot1 -p password1 -ex "C:\Program Files (x86)\Java\jre7\bin\java.exe -jar TRiBot.jar" -lwp -hide

Truncheon

2014-07-02 15:08:35

Thank you very much for sharing this information, just hope I don't get flagged though!

Lipcot

2014-08-14 21:50:38

Gonna be trying this tomorrow, thanks for sharing :)

Brandon

2014-08-21 14:40:39


mklink /d "%USERPROFILE%/jagexcache" "%USERPROFILE%/NewCache/jagexcache"

If you run that in CMD, it will redirect the game's cache to a new directory. You can do this by creating a TProcess with Simba and run it with "cmd.exe /c" as the parameters before calling SetupSRL. You can also call "cmd /c xcopy … …" to copy another cache to the new dir for fast startups.

Then in add on terminate, use a TProcess to run "cmd.exe /c" and pass it "del %USERPROFILE%/NewCache/jagexcache".

This would allow you to have any amount of clients with a different cache for each client. When the client dies, you delete the cache. Simple.


These are called symbolic links btw..

NKN

2014-08-21 17:07:29

From: Brandon

mklink /d "%USERPROFILE%/jagexcache" "%USERPROFILE%/NewCache/jagexcache"

If you run that in CMD, it will redirect the game's cache to a new directory. You can do this by creating a TProcess with Simba and run it with "cmd.exe /c" as the parameters before calling SetupSRL. You can also call "cmd /c xcopy … …" to copy another cache to the new dir for fast startups.

Then in add on terminate, use a TProcess to run "cmd.exe /c" and pass it "del %USERPROFILE%/NewCache/jagexcache".

This would allow you to have any amount of clients with a different cache for each client. When the client dies, you delete the cache. Simple.


These are called symbolic links btw..


If I could rep you I would.

Gunner

2014-08-22 02:05:38

From: Brandon

mklink /d "%USERPROFILE%/jagexcache" "%USERPROFILE%/NewCache/jagexcache"

If you run that in CMD, it will redirect the game's cache to a new directory. You can do this by creating a TProcess with Simba and run it with "cmd.exe /c" as the parameters before calling SetupSRL. You can also call "cmd /c xcopy … …" to copy another cache to the new dir for fast startups.

Then in add on terminate, use a TProcess to run "cmd.exe /c" and pass it "del %USERPROFILE%/NewCache/jagexcache".

This would allow you to have any amount of clients with a different cache for each client. When the client dies, you delete the cache. Simple.


These are called symbolic links btw..


I'll be honest, I have no idea what any of that says. I can tell that you can have a instance-specific cache for each client launch, which can then be deleted on termination, but most of the processes for implementing went way over my head.

What would be the advantages for this process vs. the batch file system I posted? If I'm reading correctly, there is no setup involved, correct? As in, you run the Cmd and it does everything for you without having to create any new directories or files yourself?

Also, I'm assuming this would allow for multi-logging as well? So long as you used different user profiles for each launch?

Sorry, I'm sure these are basic questions, but I'm a basic kinda guy. Lol.

Brandon

2014-08-22 04:55:14

From: Gunner
I'll be honest, I have no idea what any of that says. I can tell that you can have a instance-specific cache for each client launch, which can then be deleted on termination, but most of the processes for implementing went way over my head.

What would be the advantages for this process vs. the batch file system I posted? If I'm reading correctly, there is no setup involved, correct? As in, you run the Cmd and it does everything for you without having to create any new directories or files yourself?

Also, I'm assuming this would allow for multi-logging as well? So long as you used different user profiles for each launch?

Sorry, I'm sure these are basic questions, but I'm a basic kinda guy. Lol.



Okay well there is nothing wrong with the method you posted. I was just "suggesting" an idea that MIGHT work through using symlinks and avoid having to create user accounts.
It doesn't work 100% though. For example, if the game needs to cache something and you remove the links and there are no links left for it to use, it will crash because it won't be able to find the cachedir..


The process stuff I was talking about was invoking CMD using:


type
TPW = record
b: Byte;
end;

Function TPW.Execute(Application: String; Args: TStringArray = []): Boolean;
var
I: Integer;
Tmp: TProcess;
begin
Tmp.Init(nil);
Tmp.setExecutable(Application);

For I := 0 To High(Args) Do
Begin
Tmp.getParameters().Add(Args[I]);
End;
Tmp.Execute();
Tmp.Free();
end;


Procedure CreateCacheSymLink();
begin
//CreateDirectory('"%USERPROFILE%/Desktop/NewCache"');
TPW.Execute('cmd.exe', ['/C', 'mklink', '/D', '"%USERPROFILE%/jagexcache"', '"%USERPROFILE%/Desktop/NewCache"']);
end;

Procedure DeleteCacheSymLink();
begin
TPW.Execute('cmd.exe', ['/C', 'rmdir', '"%USERPROFILE%/jagexcache"']);
end;

begin
CreateCacheSymLink();
//DeleteCacheSymLink();
end.

And what happens is that it redirects all calls to "C:/Users/Brandon/jagexcache" to "C:/Users/Brandon/Desktop/NewCache" and that's where all the cache files will go so long as the link is alive. I was thinking that you could use this to create an instance of the game. Let it load fully into whatever graphics mode you want.

Then swap the link to a new cache dir. Load another instance of the game and repeat until all of them are created. "Technically" it should work and give each game instance any graphics mode. Eventually, they'd all be sharing a single cache but bypass the graphics limit (hopefully).

I didn't get to test that part yet but it in theory should work.

EDIT: Confirmed.. laggy as hell! But it worked for me up to 8 clients.. I couldn't get anymore than that :S I guess user accounts are better then..


omd70

2014-11-17 18:26:30

[ATTACH=CONFIG]24463[/ATTACH]
Not sure where I went wrong but refuses to run

KeepBotting

2014-11-17 18:32:53

From: omd70
[ATTACH=CONFIG]24463[/ATTACH]
Not sure where I went wrong but refuses to run


You didn't install CPAU correctly and/or your cmdlet doesn't have the proper permissions to access it

riwu

2014-11-18 07:03:32

From: omd70
[ATTACH=CONFIG]24463[/ATTACH]
Not sure where I went wrong but refuses to run

Your cpau isnt in C:\simba. It must be at the same directory as the current directory of the cmd.
Also why download a closed source 3rd party program when u can simply use window's runas command?

KeepBotting

2014-11-18 07:38:56

From: riwu
Your cpau isnt in C:\simba. It must be at the same directory as the current directory of the cmd.
Also why download a closed source 3rd party program when u can simply use window's runas command?


cpau is better than runas. You can pass the password through your cmdlet and also startup with network credentials vs. local credentials.

Also when you runas, you lose the ability to access NAS (network attached storage) - security feature imposed by Microsoft.

You could even tell cpau to generate a CRC, and if the check fails, the job won't be started.

riwu

2014-11-19 05:21:51

From: KeepBotting
cpau is better than runas. You can pass the password through your cmdlet and also startup with network credentials vs. local credentials.

Also when you runas, you lose the ability to access NAS (network attached storage) - security feature imposed by Microsoft.

You could even tell cpau to generate a CRC, and if the check fails, the job won't be started.

You could just save credentials so u only need to enter the very first time. Also by network credentials do u mean linking the user account to a microsoft account? Why would u want to do that if the user account is only created for botting, and why do u think runas couldnt do anything that cpau could?

The Mayor

2014-12-30 22:52:56

From: malamud1
I don't know why but It made my computer super laggy.


Please read: https://villavu.com/forum/showthread.php?t=111379

Jayden C

2015-01-01 11:54:21

nice guide, though my comp gets laggy after 3 :(

mrisperfect

2015-01-05 04:48:12

From: ploxcake
OP, what did you mean with "Possible additional requirement: If you have never entered security credentials into the Windows command prompt before, you will need to enter the password for the newly created user account now."? Could you explain further how to exactly do this? Can't get this to work on either my bot rig nor my main gaming rig


I still don't know how to do this either. Any help please?

Edit: I solved the issue, to get it to work once you've done all the steps, you need to put the cpau.exe into the simba folder as well, for anyone else that is struggling with this.

jrtsoget

2015-01-13 20:57:49

Nice guide, just worried about using the same IP address for all my clients.

KeepBotting

2015-01-13 21:13:12

From: jrtsoget
Nice guide, just worried about using the same IP address for all my clients.


Don't be, Jagex doesn't ban accounts solely on basis of IP address.

jrtsoget

2015-01-14 01:46:01

Yeah, but still. It may draw more attention, which would be the last thing I would want.

KeepBotting

2015-01-14 07:25:17

From: jrtsoget
Yeah, but still. It may draw more attention, which would be the last thing I would want.


Honestly if Jagex did do any banning on basis of IP address, we'd all be pretty screwed.

It's not even worth losing sleep over - you'll be detected in a thousand other ways before your IP ever becomes a factor.

mylastregret

2015-02-10 22:18:38

Well they would probably ban your IP all together, before banning every single account pertaining to that IP address



From: KeepBotting
Honestly if Jagex did do any banning on basis of IP address, we'd all be pretty screwed.

It's not even worth losing sleep over - you'll be detected in a thousand other ways before your IP ever becomes a factor.

SirPrize

2015-02-22 13:42:23

Hmm, I'll try this, thanks! I have been having some trouble running multiple smart windows at once

Thomas

2015-02-28 12:38:35

Why would this lower cpu usage?
I cant Think of a single reason why it would?

What method out of the 2 suggested does everyone recommend?
I'm leaning towards the relocating of the cache folder as I rather not create a bunch of user accounts.

klamor

2015-05-24 23:18:51

From: lovebotter
Why would this lower cpu usage?
I cant Think of a single reason why it would?

What method out of the 2 suggested does everyone recommend?
I'm leaning towards the relocating of the cache folder as I rather not create a bunch of user accounts.


The easiest method i've found (at least in windows 8) is to create the user accounts, add full control permissions to the security of the simba folder and simply shift-right click on the simba icon and run each instance with it's own user account. The link to the cpau program did not work for me, but this simple method worked like a charm.

R3LAX

2015-06-07 09:21:11

Is there are memory leak with the current SMART clients?
With several other sites I was unable to run more than ~3 at a time, even though I have run far more in the past.