SRL Archive - Help and Support

SelectWorld(RandomWorld()) help


ZaSz

2009-06-16 06:17:06

Ok I got this
If(TimeFromMark(S) > 900000)Or(Command)Then
begin
if(Command)Then
begin
Command := False;
end else
Command := True;
If(HowManyPlayers = 1)Then
Wait(Random(60000));
LogOut;
DoBreaks;
SelectWorld(RandomWorld(Players[NextPlayerIndex].booleans[0],false));
NextPlayer(Command);
Command := False;
Logins;
end;

Then when it gets to the members account, It will do one of 2 things.
Switch worlds then after its done and does breaks. I come back and all players go false cause it wouldnt switch back to a members world.

Or it doesn't switch and says that the player is in a members only area and all players go false…

I have the player booleans right. (True = Members) (false= Non)

Any help?

senrath

2009-06-16 06:21:30

You using SMART? I don't think you can switch between members and nonmembers with SMART.

ZaSz

2009-06-16 06:23:13

It switches…

Take a look at
srl\SRL\misc/WorldSwitcher.scar


Shouldn't effect with smart at all?

senrath

2009-06-16 06:25:36

From: Zasz
It switches…

Take a look at

Shouldn't effect with smart at all?


Actually, now that I think of it, switching between members and free accounts won't work well no matter what, SMART or not. Think about it. If you load the free applet, then try to load a members world, no matter what account you use, it won't let you. Now, if you load the members applet, you can't load any world with a free account.

ZaSz

2009-06-16 06:29:22

From: senrath
Actually, now that I think of it, switching between members and free accounts won't work well no matter what, SMART or not. Think about it. If you load the free applet, then try to load a members world, no matter what account you use, it won't let you. Now, if you load the members applet, you can't load any world with a free account.


No sorry not right? I load up free client all the time. And Make the script on my members account for the members areas. And then use the others on non-members.

Im switching back it right now multiple times…

senrath

2009-06-16 06:30:22

From: Zasz
No sorry not right? I load up free client all the time. And Make the script on my members account for the members areas. And then use the others on non-members.

Im switching back it right now multiple times…


Odd. I didn't think that worked. I dunno then.

Nava2

2009-06-16 06:44:41

Is next players index being set right?

ZaSz

2009-06-16 08:24:19

well it would go from 2 (non-members) to 3 (members) back to 0 (non-members) right???

Runescapian321

2009-06-16 08:29:24

Senrath is almost right. I'm not sure of the specifics, but it's something like if you load the members applet, you can't log into a world with a Free account. I'm not sure about what happens if you load a free applet, test it manually?

EDIT: Not exactly sure if that pertains to your question though :p

ZaSz

2009-06-16 08:31:08

From: Runescapian
Senrath is almost right. I'm not sure of the specifics, but it's something like if you load the members applet, you can't log into a world with a Free account. I'm not sure about what happens if you load a free applet, test it manually?


I have (tested manually), there is no problem with logging in as long as the world is members or non. You can switch worlds with no problem with the smart client. They made it members or no members. It can load the world. (Just need the account to have members)

ZephyrsFury

2009-06-16 08:42:28

I think it might be a bug with NextPlayerIndex

ZaSz

2009-06-16 09:06:36

meh, i guess i couldve made a fix. So, I just created a new next player index.

Function MyNextPlayerIndex:integer;
begin
if(AllPlayersInactive)then
Exit;
Result := CurrentPlayer;
repeat
Inc(Result);
if(result>(high(players)))then
begin
result := 0;
end;
until (Players[result].active);
end;

ZephyrsFury

2009-06-16 09:14:35

Meh I just commited a fix in the dev svn. Turns out you can't set Result too early or it stuffs up. Rather strange…