SRL Archive - OSR Help

Choose a random world.


ownedlikenoob

2010-06-28 09:45:03

How Could I make a method that logs out, Chooses a random world, but not the one you were just in, and logs back in?

Sabzi

2010-06-28 09:48:05

From: ownedlikenoob
How Could I make a method that logs out, Chooses a random world, but not the one you were just in, and logs back in?


Look in WorldSwitcher.scar in SRL. There are functions you can use.
RandomWorld, SelectWorld, ChangeWorld

FrostFyr

2010-06-29 21:43:20

Well, ima do a rough draft just incase you need it

First record what World you went to when you go to it.
eg.
var Curr_World, Next_World: Integer;

begin
Curr_World := //Whatever way you chose to open a world
ChangeWorld(Curr_World);
end.

Next, when you want to change worlds just make sure Current world is not the same as Nextworld.
eg.
var Curr_World, Next_World: Integer;

begin
Curr_World := //Whatever way you chose to open a world
Next_World := Curr_World; //As to not confuse the script later
ChangeWorld(Curr_World);
Repeat
//Script
while Curr_World = Next_World do
Next_World := RandomWorld({Info on wanted worlds here});
Curr_World := Next_World;
ChangeWorld(Next_World);
Until(false)
end.

I'm pretty sure that would work, but i'm no pro at SRL or runescape so don't quote me :)