SRL Archive - OSR Help

Spawning another SMART client?


KeepBotting

2013-11-14 07:51:52

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)

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
initSmart(false);
or
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.

Sjoe

2013-11-14 09:12:08

not sure, but this? https://github.com/SRL/SRL-6/blob/master/lib/misc/smart.simba#L668

Olly

2013-11-14 10:19:13

https://github.com/SRL/SRL-6/blob/master/lib/misc/smart.simba#L58

smartForceNewClient := true

KeepBotting

2013-11-14 21:00:32

From: Olly
https://github.com/SRL/SRL-6/blob/master/lib/misc/smart.simba#L58

smartForceNewClient := true
Thanks! Now my Simbas don't try to pair to eachothers' SMART instances, lol.