SRL Archive - OSR Help

Select World With Low Amount Of Players, Possible?


SomeGuyFromHere

2013-03-13 22:31:25

Hello community,

I remember having asked that a while ago on IRC but don't remember the response:
My scripts often run into the problem that SPS doesn't work because of too much players active in the world (the yellow dots seem to confuse the system). Is there a way to let Simba automatically select a world that has low activity?

Yours,
Pat :)

Brid Mayhem

2013-03-13 22:33:03

When you go to world select, they added filtering. You click the low arrow where it says Players then select.

SomeGuyFromHere

2013-03-14 07:33:38

I'm talking about getting my Simba script to do it automatically.

SomeGuyFromHere

2013-03-15 13:02:10

Thanks core, this looks like the solution. But it all makes my head turn… no idea how to read the source code or how I need to modify my login routine to get this to work.

Is there some tutorial for this, or any other source that explains this?

SomeGuyFromHere

2013-03-15 14:32:39

Hey,

the code you gave me returns errors:
Failed to sort the worlds. Choosing random world. Members: False; PVP: False;

But now at least I know how to begin. Thanks a lot! :)

SomeGuyFromHere

2013-03-16 15:53:05

Unsure how to use this. When I just replace LoginPlayer by your code it doesn't log me in at all and gets stuck on the login window without entering username and password. The DeclarePlayers function includes what you described…

SomeGuyFromHere

2013-03-18 08:16:39

Hey,

with the new code I get:

** Warning in ChooseWorldBy: Failed to sort the worlds. Choosing random world. Members: False; PVP: False **

SomeGuyFromHere

2013-03-18 15:21:22

Hey, did as you told me, same result :(

SomeGuyFromHere

2013-03-18 16:04:51

My login procedure looks like this:

Procedure StartLogin;

begin
ClearDebug;
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}
DeclarePlayers;
LoginPlayerToLob;
CoreChooseWorldBy(['Players', 'Type'],[true, Players[CurrentPlayer].Member],Players[CurrentPlayer].Member,false);
LoginPlayer;


end;

Sawyer

2013-03-19 09:57:58

This is for EOC, correct?

SomeGuyFromHere

2013-03-19 12:49:20

It's for the normal Runescape from Runescape.com …

SomeGuyFromHere

2013-03-20 07:58:06

Hey, any updates?

SomeGuyFromHere

2013-03-20 10:08:50

*sigh*
Now I can't login at all. The debug box shows:
SRL Compiled in 0 msec
Paired with SMART[10576]

and that's about it, the nothing more happens. Why it says "paired with SMART eludes me as no SMART instance is open before I run the thing.

I really appreciate all your help, maybe you could have a look at my code to figure out why this happens? From what I see I may just overlook something you told me in your other posts but I can't figure out what.

Here's how the relevant parts of my script look like. The beginning:

Program SomeScript;

{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

var
[...]



procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '*********'; // Player username
Pass := ***********'; // Player password
Member := False;
Active := True;
end;
end;


Procedure StartLogin;

begin
ClearDebug;
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}
SetupSRL;
DeclarePlayers;
LoginPlayerToLob;
ChooseWorldBy(['Players', 'Type'],[true, Players[CurrentPlayer].Member],Players[CurrentPlayer].Member,false);
end;

The beginning of my main loop:
begin
SetupSRL;
StartLogin;

SomeGuyFromHere

2013-03-29 07:43:03

Hey,

after core gave me some tips on IRC my script looks a little bit more tidy now ;) , but the worldchooser still seems to work incorrectly:
** Warning in ChooseWorldBy: World list not available **
and similar occur and the selected worlds are not really the ones with the lowest amount of players… anything I did wrong?