SRL Archive - MSI Archives

Setting up multiple players?


Mike408

2010-11-12 14:09:55

I want to use 2 players, but it only uses one player until it takes a break and resumes from break using the same player. How can I make it switch players instead of breaking.
{==============================================================================\
| MSI Group Scripting Include |
| RunMe.scar |
|==============================================================================|
| For the script user to just simply press play |
| |
|==============================================================================|
| ** Setup Instructions ** |
|==============================================================================|
| |
| -> For a very detailed guide on how to properly setup MSI, please visit: |
| |
| [url]http://villavu.com/forum/showthread.php?p=745942#post745942[/url] |
\_____________________________________________________________________________}

program MSI_Script;

const
DEBUG_SMART = True; // Debugs things onto SMART (may cause lag)
BREAK_TIME = 15; // Single player only - how long to break for (in minutes)
SAVE_DEBUG = True; // Save's the debug box text to a file
ENABLE_REMOTE = True; // Do you want to enable the Player Remote?
LEVEL_TO_DEBUG = 10; // The lower the number, the less the script will debug
HUMAN_BREAKING = True; // Take more human like breaks
SWITCH_WORLDS = True; // Switch worlds when switching players or after breaks
ANTIBAN_MIN_WAIT = 14000; // Minimum time to wait between antibans

WORLD_SMART = 152;

STATS_ID = ''; // Temporary stats ID (2 digit number)
STATS_PASS = ''; // Temporary stats password

{$i MSI/Setup.simba}

procedure DeclarePlayers;
var
i: Integer;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
SetLength(MSI_Players, HowManyPlayers);

for i := 0 to High(MSI_Players) do
SetLength(MSI_Players[i].Scripts, 100);

CurrentPlayer := 0;
CurrentScript := 0;

with MSI_Players[0] do
begin
Name := 'lilbendeho'; // Username
Pass := 'lulz'; // Password
Nick := 'hok'; // Nickname (3-4 lowercase letters from username)
Pin := 'blah'; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Member := False; // Is this player a member?
Location := LOC_GE_BANK; // See instructions at the top
BreakLoads := 1; // Amount of loads before breaking/switching players
TotalLoads := 20; // Total loads for the player to do; leave 0 if using TotalTime or to go forever
TotalTime := 0; // How long for the player to run? (in minutes); leave 0 if using TotalLoads or go forever

with Scripts[0] do
begin
Name := SCRIPT_GE_YEWS; // The script constant
Trees := [TREE_YEW]; // Trees to cut
Priority := [];
DontDrop := []; // For powerchopping only
end;
end;
{
with MSI_Players[1] do
begin
Name := 'pinchebendeho';
Pass := 'pootieho';
Nick := 'tex';
Pin := '1234';
Active := True;
Member := True;
Location := LOC_GE_BANK;
BreakLoads := 4;
TotalLoads := 20;
TotalTime := 0;

with Scripts[0] do
begin
end;
end;

with MSI_Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[4] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[5] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[6] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[7] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;
}

(**
* No need to touch anything below here, this is to assign the necessary
* information so that SRL's Players array works with MSI's
*)
for i := 0 to High(Players) do
begin
Players[i].Name := MSI_Players[i].Name;
Players[i].Pass := MSI_Players[i].Pass;
Players[i].Nick := MSI_Players[i].Nick;
Players[i].Pin := MSI_Players[i].Pin;
Players[i].Active := MSI_Players[i].Active;
Players[i].Member := MSI_Players[i].Member;

if (SWITCH_WORLDS) then
Players[i].WorldInfo := [Players[i].Member, -1, False];
end;
end;

begin
ClearDebug;

AddOnTerminate('MSI_ScriptTerminate');
SetScriptProp(SP_WriteTimeStamp, [True]);

Smart_Server := WORLD_SMART;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ActivateClient;

SetupSRL;
SetupMSI;

{$IFDEF REFLECTION}
// So if the hooks are outdated, the script will attempt colour walking if the points exist
if (not MSI_SetupReflection(False)) then
ReflectionBroken := True;
{$ELSE}
ReflectionBroken := True; // Set to true because it's not even being used
{$ENDIF}

Stats_UserID := STATS_ID;
Stats_Password := STATS_PASS;
Stats_ScriptID := '47';
CurrDebugLevel := 1;

DeclarePlayers;
MSI_Mainloop;
end.

mormonman

2010-11-12 14:37:48

You have to uncomment the second player and then setup the script values for that player.

Edit: here is the file


{==============================================================================\
| MSI Group Scripting Include |
| RunMe.scar |
|==============================================================================|
| For the script user to just simply press play |
| |
|==============================================================================|
| ** Setup Instructions ** |
|==============================================================================|
| |
| -> For a very detailed guide on how to properly setup MSI, please visit: |
| |
| [url]http://villavu.com/forum/showthread.php?p=745942#post745942[/url] |
\_____________________________________________________________________________}

program MSI_Script;

const
DEBUG_SMART = True; // Debugs things onto SMART (may cause lag)
BREAK_TIME = 15; // Single player only - how long to break for (in minutes)
SAVE_DEBUG = True; // Save's the debug box text to a file
ENABLE_REMOTE = True; // Do you want to enable the Player Remote?
LEVEL_TO_DEBUG = 10; // The lower the number, the less the script will debug
HUMAN_BREAKING = True; // Take more human like breaks
SWITCH_WORLDS = True; // Switch worlds when switching players or after breaks
ANTIBAN_MIN_WAIT = 14000; // Minimum time to wait between antibans

WORLD_SMART = 152;

STATS_ID = ''; // Temporary stats ID (2 digit number)
STATS_PASS = ''; // Temporary stats password

{$i MSI/Setup.simba}

procedure DeclarePlayers;
var
i: Integer;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
SetLength(MSI_Players, HowManyPlayers);

for i := 0 to High(MSI_Players) do
SetLength(MSI_Players[i].Scripts, 100);

CurrentPlayer := 0;
CurrentScript := 0;

with MSI_Players[0] do
begin
Name := 'lilbendeho'; // Username
Pass := 'lulz'; // Password
Nick := 'hok'; // Nickname (3-4 lowercase letters from username)
Pin := 'blah'; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Member := False; // Is this player a member?
Location := LOC_GE_BANK; // See instructions at the top
BreakLoads := 1; // Amount of loads before breaking/switching players
TotalLoads := 20; // Total loads for the player to do; leave 0 if using TotalTime or to go forever
TotalTime := 0; // How long for the player to run? (in minutes); leave 0 if using TotalLoads or go forever

with Scripts[0] do
begin
Name := SCRIPT_GE_YEWS; // The script constant
Trees := [TREE_YEW]; // Trees to cut
Priority := [];
DontDrop := []; // For powerchopping only
end;
end;

with MSI_Players[1] do
begin
Name := 'pinchebendeho';
Pass := 'pootieho';
Nick := 'tex';
Pin := '1234';
Active := True;
Member := True;
Location := LOC_GE_BANK;
BreakLoads := 4;
TotalLoads := 20;
TotalTime := 0;

with Scripts[0] do
begin
Name := SCRIPT_GE_YEWS; // The script constant
Trees := [TREE_YEW]; // Trees to cut
Priority := [];
DontDrop := []; // For powerchopping only
end;
end;
{
with MSI_Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[4] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[5] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[6] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;

with MSI_Players[7] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
BreakLoads := ;
TotalLoads := ;
TotalTime := ;

with Scripts[0] do
begin
end;
end;
}

(**
* No need to touch anything below here, this is to assign the necessary
* information so that SRL's Players array works with MSI's
*)
for i := 0 to High(Players) do
begin
Players[i].Name := MSI_Players[i].Name;
Players[i].Pass := MSI_Players[i].Pass;
Players[i].Nick := MSI_Players[i].Nick;
Players[i].Pin := MSI_Players[i].Pin;
Players[i].Active := MSI_Players[i].Active;
Players[i].Member := MSI_Players[i].Member;

if (SWITCH_WORLDS) then
Players[i].WorldInfo := [Players[i].Member, -1, False];
end;
end;

begin
ClearDebug;

AddOnTerminate('MSI_ScriptTerminate');
SetScriptProp(SP_WriteTimeStamp, [True]);

Smart_Server := WORLD_SMART;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ActivateClient;

SetupSRL;
SetupMSI;

{$IFDEF REFLECTION}
// So if the hooks are outdated, the script will attempt colour walking if the points exist
if (not MSI_SetupReflection(False)) then
ReflectionBroken := True;
{$ELSE}
ReflectionBroken := True; // Set to true because it's not even being used
{$ENDIF}

Stats_UserID := STATS_ID;
Stats_Password := STATS_PASS;
Stats_ScriptID := '47';
CurrDebugLevel := 1;

DeclarePlayers;
MSI_Mainloop;
end.

Mike408

2010-11-12 14:40:08

So its just that bracket "{"
that was above player 1?

Coh3n

2010-11-12 14:48:20

From: Mike408
So its just that bracket "{"
that was above player 1?

You move it from the top of player 1 to the top of player 2.

Mike408

2010-11-12 14:55:29

From: Coh3n
You move it from the top of player 1 to the top of player 2.

Thank you both for helping me. I never wouldve figured that out, I was looking for a true false toggle i didnt see.:duh: