SRL Archive - OSR Help

world switching problems


ajg0001991

2013-02-15 21:50:55

hi all im making a script at this moment in time but i cant seem to get the world switching working what i want it to do is when it logs to the lobby is to click a random world but instead it just goes and clicks the play button and loggs back in to the last world it was in ive seen the randomworld function but not sure how to use it could some 1 be nice enuff to post we a working function of world switching for me ty very much


p.s my script develepmont cannot continue till i solve this isse help is appreciated massivly and if all goes good i may be releasing my first script in short time =)


also i wud like to learn other methods of walking i currently know sps and would like to push my scripting abilities to learn a more advance and hopefully accurate walking method can any 1 post links to usefull tutorials that could help me learn other methods of walking

Silentcore

2013-02-15 22:02:49

Radial walking: http://villavu.com/forum/showthread.php?t=78648

Can you possibly post only the world switching part of your code to see what the problem might be.

ajg0001991

2013-02-15 22:07:07

if u have skype i can show u the whole code via screen sharing


add me: egf.powerbot

EDIT: if u dont want to use skype i can post partial bits of code

Silentcore

2013-02-15 22:10:59

I do have skype but I don't have access to my computer right now. Just go to your code and copy the cope where world switch happens and put them in between:
tags, if I can't help, others might..

ajg0001991

2013-02-15 22:17:16

{procedure Player();
begin
if(not(loggedin))then
loginplayer();

end;}



{ ExitToLobby;
wait(1000+random(400));
if(lobbyscreen)then
begin
OpenWorldScreen;
winitplayer;
wait(300+random(200));
wait(22000+random(4000)); // :D
end;
until(false); }


the long 22sec wait time is becos it takes 30 secs to switch worlds

Sjoe

2013-02-15 22:17:27

Do u use SelectWorld(RandomWorld(Players[0].Member, false)); ? This works for me.

Options of walking:

RadialWalking as SIlentcore said.

ObjextDTMS: http://villavu.com/forum/showthread.php?t=72067
and http://villavu.com/forum/showthread.php?t=78905
(Easy to use too!)

More advanced:
DDTMs: http://villavu.com/forum/showthread.php?t=49135

TPA Walking: http://villavu.com/forum/showthread.php?t=48491

I'd stick with SPS for long distances, since they're fairly accurate and easy to use!


From: ajg0001991

the long 22sec wait time is becos it takes 30 secs to switch worlds


Try this

procedure DeclarePlayers; // put this on top and call it in the mainloop
begin
NumberOfPlayers(1); // Set the number of players you are using
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0

with Players[0] do
begin
Players[0].Name := ''; // Username
Players[0].Pass := '' // Password
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // For your bank pin
Players[0].Member := False; // Are you Membs?
end;
end;

procedure Switchworlds;
begin
repeat
ExitToLobby;
LoginPlayerToLob;
until LobbyScreen;

OpenWorldScreen;
SelectWorld(RandomWorld(Players[0].Member, false)); // the false Boolean is for PVP or not ( parameter of RandomWorld)

repeat
LoginPlayer;
until LoggedIn
Wait(RandomRange(1000,3000));

ExitSquealOfFortune; // that stupid SoF :) close it!
end;

begin
SetupSRL;
DeclarePlayers; // call it in mainloop!
if not loggedin then loginplayer;

ajg0001991

2013-02-15 22:41:24

From: Sjoekeloe
Do u use SelectWorld(RandomWorld(Players[0].Member, false)); ? This works for me.

Options of walking:

RadialWalking as SIlentcore said.

ObjextDTMS: http://villavu.com/forum/showthread.php?t=72067
and http://villavu.com/forum/showthread.php?t=78905
(Easy to use too!)

More advanced:
DDTMs: http://villavu.com/forum/showthread.php?t=49135

TPA Walking: http://villavu.com/forum/showthread.php?t=48491

I'd stick with SPS for long distances, since they're fairly accurate and easy to use!




Try this

procedure DeclarePlayers; // put this on top and call it in the mainloop
begin
NumberOfPlayers(1); // Set the number of players you are using
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0

with Players[0] do
begin
Players[0].Name := ''; // Username
Players[0].Pass := '' // Password
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // For your bank pin
Players[0].Member := False; // Are you Membs?
end;
end;

procedure Switchworlds;
begin
repeat
ExitToLobby;
LoginPlayerToLob;
until LobbyScreen;

OpenWorldScreen;
SelectWorld(RandomWorld(Players[0].Member, false)); // the false Boolean is for PVP or not ( parameter of RandomWorld)

repeat
LoginPlayer;
until LoggedIn
Wait(RandomRange(1000,3000));

ExitSquealOfFortune; // that stupid SoF :) close it!
end;

begin
SetupSRL;
DeclarePlayers; // call it in mainloop!
if not loggedin then loginplayer;



thanks alot that worked perfectly come to skype please =)



and the for all the tutorials every 1 i guess its gna be a long night lol

Sjoe

2013-02-15 22:43:39

From: ajg0001991
thanks alot that worked perfectly come to skype please =)

and the for all the tutorials every 1 i guess its gna be a long night lol


Had no idea it's you haha, I'll be on later.

ajg0001991

2013-02-15 23:31:54

From: Sjoekeloe
Had no idea it's you haha, I'll be on later.



hehhe yep its me


i need help with 1 more thing i need a function/procedure that will log out if another white dot (player) is detected on the mini map or if the person is stood on the same tile as i am

DannyRS

2013-02-16 01:25:25

From: ajg0001991
hehhe yep its me


i need help with 1 more thing i need a function/procedure that will log out if another white dot (player) is detected on the mini map or if the person is stood on the same tile as i am


I believe theres some kind of GetMMDots function in the Includes somewhere, take a look at Ashaman88's salamander hunter, thats the only script I remember that has world hopping if there is someone else on the MM