Results 1 to 4 of 4

Thread: Spawning another SMART client?

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

    Default Spawning another SMART client?

    So, my init procedure is this (using bonsai's for now, because I can't figure out how to do it myself just yet, hence the purpose of this thread)

    Simba Code:
    procedure initScript; //adapted from bonsai's init procedure
    var i:integer;
    begin
       addOnTerminate('scriptTerminate');
       clearDebug();
       smartEnableDrawing := true;
       setupSrl();
       players.setup(playerNames, playerFile);
       currentPlayer := 0;
       for i := 0 to high(players) do
       begin
          players[i].world := desiredWorld;
          players[i].isActive := true;
       end;
        while (players.getActive() > 0) do
       begin
          if (not isLoggedIn()) then
          begin
             if (not players[currentPlayer].login()) then break;
             exitSquealOfFortune();
          end;
       end;
    end;

    I could call
    Code:
    initSmart(false);
    or
    Code:
    smartCreateClient;
    but both of those results in one instance of Simba spawning two clients, pairing to the second one, and attempting to perform RS-related actions before it's fully loaded. (I'm calling these right after setupSrl)

    Under SRL5, there was a way to do it (which I have forgotten and seem to have lost any documentation of) but for the life of me I can't figure out how to do it under srl-6.

    tl;dr how do I get an instance of Simba to always spawn an new instance of SMART and always pair to said new instance?

    Help is appreciated.
    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

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default


    Creds to DannyRS for this wonderful sig!

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

    Default

    Last edited by Olly; 11-14-2013 at 03:21 PM.

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

    Default

    Quote Originally Posted by Olly View Post
    Thanks! Now my Simbas don't try to pair to eachothers' SMART instances, lol.
    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

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
  •