Log in

View Full Version : MultiPlayer not working



blackfire553
05-19-2007, 06:07 PM
I cant get multiplayer to work. i have SetupSRL in before DeclarePlayers

Im using this: (unfinished

{ |-----------------------------------------------| }
{ | | }
{ | Blackfire553's PowerChopper | }
{ | Thanks To: | }
{ | Jad, and all other tutorial-makers | }
{ | | }
{ |-----------------------------------------------| }

Program PowahChoppah;

Const
RunDirection = 'S';//Direction to run away (N,S,E,W)
LoadsPerPlayer = 10;//Loads to do before switching players
LogColorA = 1;// \/ \/ \/ \/ \/ \/ \/ \/ |
LogColorB = 1;//Only change these if it cant find the trees|
LogColorC = 1;// /\ /\ /\ /\ /\ /\ /\ /\ |
WeildingAxe = True;//Will you be Weilding the Axe?
Var
DidRandomHappen: Boolean;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 6;//Number of players (Inactive + Active)
NumberOfPlayers := HowManyPlayers;
CurrentPlayer :=0;//Player you want to start with

Players[0].Name :='Username';
Players[0].Pass :='Password';
Players[0].Nick :='4 consecutive letters of your name';
Players[0].Active:=True;

Players[1].Name :='Username';
Players[1].Pass :='Password';
Players[1].Nick :='4 consecutive letters of your name';
Players[1].Active:=False;

Players[2].Name :='Username';
Players[2].Pass :='Password';
Players[2].Nick :='4 consecutive letters of your name';
Players[2].Active:=False;

Players[3].Name :='Username';
Players[3].Pass :='Password';
Players[3].Nick :='4 consecutive letters of your name';
Players[3].Active:=False;

Players[4].Name :='Username';
Players[4].Pass :='Password';
Players[4].Nick :='4 consecutive letters of your name';
Players[4].Active:=False;

Players[5].Name :='Username';
Players[5].Pass :='Password';
Players[5].Nick :='4 consecutive letters of your name';
Players[5].Active:=False;
NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,UpChars)
End;

//~~~~Dont change anything else unless you know exactly what you are doing~~~~\\

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Normal Anti-Ban~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

Function HumanAntiBan: Boolean;
Begin
Wait(100 + Random(50));
RotateEvery(3 + Random(4));
Wait(300 + Random(100 + Random(100)));
BoredEvery(5 + Random(6));
Wait(500 + Random(300);
HoverEvery(6+Random(5),'WoodCutting')
Wait(650 + Random 200);
LeaveScreenEvery(3 + random(5));
Wait(300 + Random(200);
MakeCompass('N');
HighestAngle;
End;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~WT-Fakawi's Random Finding~~~~~~~~~~~~~~~~~~~~~~~\\

function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
if (Result = true) then
DidRandomHappen := true;
end;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~\\

Procedure DropLogs;
Begin
If (WieldingAxe = True) Then
Begin
DropTo(1,28);
End;
If (WieldingAxe = False) Then
DropTo(2,28);
End;






//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Setup Program~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

Procedure Setup;
Begin
SetupSRL;
DeclarePlayers;
ClearDebug;
ActivateClient;
DisguiseScar('RuneScape - the massive online adventure game by Jagex Ltd - Microsoft Internet Explorer');
End;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Main Program~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\
Begin
Setup;
Repeat
DropLogs;
ProgressReport;
If(LoadsDone=LoadsPerPlayer)Then
Begin
NextPlayer(True);
LoadsDone :=0;
HighestAngle;
MakeCompass('N');
Writeln('Sucessfully Switched Players!');
End;
until (False);
End.

Markus
05-19-2007, 06:15 PM
Seems nice for me. Could you please post the whole script?

blackfire553
05-19-2007, 06:27 PM
posted. again, its unfinished, but it still doesnt get past the multiplayer part. (i was doing a quick test to see if what i had so far was working)

Pentti
05-19-2007, 06:32 PM
Add LoadsDone :=LoadsDone+1 when one load is done...

blackfire553
05-19-2007, 09:23 PM
Add LoadsDone :=LoadsDone+1 when one load is done...

thanks

kooldude
05-23-2007, 07:54 PM
In ur main loop put if (not loggedin)then LoginPlayer or something like that, look at others people scripts for it, I forget easy :p

seaking
05-24-2007, 05:13 AM
In ur main loop put if (not loggedin)then LoginPlayer or something like that, look at others people scripts for it, I forget easy :p

You should always put
if not LoggedIn then break;
in every loop.

What you said is what LoginPlayer does. It checks if someone is logged in and if not, it will log in.

geerhedd
05-24-2007, 03:04 PM
without seeing the entire script, i cant help you, but just for player login, try this it should log you in, wait 1 min to 1 min20 sec log you out, and login next player. hope this helps.;)


{ |-----------------------------------------------| }
{ | | }
{ | Blackfire553's PowerChopper | }
{ | Thanks To: | }
{ | Jad, and all other tutorial-makers | }
{ | | }
{ |-----------------------------------------------| }

Program PowahChoppah;
{.include SRL/SRL.scar}

Const
RunDirection = 'S';//Direction to run away (N,S,E,W)
LoadsPerPlayer = 10;//Loads to do before switching players
LogColorA = 1;// \/ \/ \/ \/ \/ \/ \/ \/ |
LogColorB = 1;//Only change these if it cant find the trees|
LogColorC = 1;// /\ /\ /\ /\ /\ /\ /\ /\ |
WeildingAxe = True;//Will you be Weilding the Axe?
Var
DidRandomHappen: Boolean;
Loadsdone: integer;
WieldingAxe:boolean;
Procedure DeclarePlayers;
begin
HowManyPlayers:=6;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active :=True;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active :=True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active :=True;

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active :=true;

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Active :=true;

Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Active :=False;

Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Active :=False;

Players[8].Name :='';
Players[8].Pass :='';
Players[8].Nick :='';
Players[8].Active :=False;


end;


//~~~~Dont change anything else unless you know exactly what you are doing~~~~\\

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Normal Anti-Ban~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

Function HumanAntiBan: Boolean;
Begin
Wait(100 + Random(50));
RotateEvery(3 + Random(4));
Wait(300 + Random(100 + Random(100)));
BoredEvery(5 + Random(6));
Wait(500 + Random(300));
HoverEvery(6+Random(5),'WoodCutting')
Wait(650 + Random (200));
LeaveScreenEvery(3 + random(5));
Wait(300 + Random(200));
MakeCompass('N');
HighestAngle;
End;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~WT-Fakawi's Random Finding~~~~~~~~~~~~~~~~~~~~~~~\\

function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
if (Result = true) then
DidRandomHappen := true;

end;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~\\
procedure nothing;

begin

Wait(60000 + Random(20000));
LoadsDone :=6;
If(LoadsDone=LoadsPerPlayer)Then
Begin
Logout;
NextPlayer(True);
loginplayer;
LoadsDone :=0;
HighestAngle;
MakeCompass('N');
Writeln('Sucessfully Switched Players!');
end;
end;
//-----------------------------------------------------------------------------//
procedure progressreport;
begin
writeln ('blasted progress report');
end;
//------------------------------------------------------------------------------
Procedure DropLogs;
Begin
If (WieldingAxe = True) Then
Begin
DropTo(1,28);
End;
If (WieldingAxe = False) Then
DropTo(2,28);
End;






//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Setup Program~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

Procedure Setup;
Begin
SetupSRL;
DeclarePlayers;
ClearDebug;
ActivateClient;
DisguiseScar('RuneScape - the massive online adventure game by Jagex Ltd - Microsoft Internet Explorer');

End;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Main Program~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\
Begin
Setup;
loginplayer;
Repeat
DropLogs;
Nothing;
ProgressReport;
until (False);
End.

Pentti
05-26-2007, 10:07 AM
In ur main loop put if (not loggedin)then LoginPlayer or something like that, look at others people scripts for it, I forget easy :p
If you put like that, then what's the ideo of multi players?
Add this:
If(Not(LoggedIn))then
NextPlayer(False)

evilwalrus
05-27-2007, 08:51 PM
Add LoadsDone :=LoadsDone+1 when one load is done...

i agree with pentti, trust me man..pentti has helped me out so much on this forum