Page 1 of 3 123 LastLast
Results 1 to 25 of 51

Thread: How-To: Running Multiple SMART Clients

  1. #1
    Join Date
    Dec 2011
    Posts
    266
    Mentioned
    16 Post(s)
    Quoted
    185 Post(s)

    Default How-To: Running Multiple SMART Clients

    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

    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.


    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.


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

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

    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.

    createaccount.jpg

    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.

    newuser.jpg
    Manage.jpg

    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.


    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.

    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:

    Code:
    %systemroot%\system32
    Open that folder, and place your newly downloaded CPAU.exe file in it.

    sys32.jpg

    Step 3:
    Open Notepad.

    Step 4:
    Paste this into Notepad:
    Code:
    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.

    batch.jpg

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


    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!

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Set Random.dat to read-only?

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

  3. #3
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    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.

  4. #4
    Join Date
    Oct 2006
    Posts
    491
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default

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

  5. #5
    Join Date
    Dec 2011
    Posts
    266
    Mentioned
    16 Post(s)
    Quoted
    185 Post(s)

    Default

    Quote Originally Posted by ry0240 View Post
    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.

  6. #6
    Join Date
    Oct 2006
    Posts
    491
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default

    Quote Originally Posted by Gunner View Post
    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.

  7. #7
    Join Date
    Dec 2011
    Posts
    266
    Mentioned
    16 Post(s)
    Quoted
    185 Post(s)

    Default

    Quote Originally Posted by ry0240 View Post
    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.

  8. #8
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

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

  9. #9
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    fdcdc821bd.png

    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:

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

    Default

    Quote Originally Posted by ploxcake View Post
    fdcdc821bd.png

    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
    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

  11. #11
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Make sure the batch script is in the same directory as TRiBot.jar
    It is

    8391c315b0.jpg

    a60c637693.jpg

    43aa9606a3.png

  12. #12
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    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

  13. #13
    Join Date
    Oct 2013
    Location
    East Coast USA
    Posts
    770
    Mentioned
    61 Post(s)
    Quoted
    364 Post(s)

    Default

    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.

  14. #14
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by bonsai View Post
    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 -
    f55708aa44.jpg

    With windows users added to security tab with full control -
    72e1bdbfa6.png

  15. #15
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    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

  16. #16
    Join Date
    Dec 2011
    Posts
    266
    Mentioned
    16 Post(s)
    Quoted
    185 Post(s)

    Default

    Quote Originally Posted by ploxcake View Post
    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
    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.

  17. #17
    Join Date
    Feb 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    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

  18. #18
    Join Date
    Jun 2014
    Posts
    65
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

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

  19. #19
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Gonna be trying this tomorrow, thanks for sharing

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

    Default

    C Code:
    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 am Ggzz..
    Hackintosher

  21. #21
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    C Code:
    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.

  22. #22
    Join Date
    Dec 2011
    Posts
    266
    Mentioned
    16 Post(s)
    Quoted
    185 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    C Code:
    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.

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

    Default

    Quote Originally Posted by Gunner View Post
    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:

    Simba Code:
    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..


    Last edited by Brandon; 08-22-2014 at 09:51 AM.
    I am Ggzz..
    Hackintosher

  24. #24
    Join Date
    Jan 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    d10d0af4b584e4f566e2b7639c51e84d.png
    Not sure where I went wrong but refuses to run

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

    Default

    Quote Originally Posted by omd70 View Post
    d10d0af4b584e4f566e2b7639c51e84d.png
    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
    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

Page 1 of 3 123 LastLast

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
  •