Mike408
2010-11-12 15:24:18
// Setup the player
MSI_SetSkillLevels();
with MSI_Players[CurrentPlayer] do
Result := MSI_Scripts[Scripts[CurrentScript].Name].PlayerSetup();
what does this mean
2010-11-12 15:24:18
// Setup the player
MSI_SetSkillLevels();
with MSI_Players[CurrentPlayer] do
Result := MSI_Scripts[Scripts[CurrentScript].Name].PlayerSetup();
what does this mean
2010-11-12 16:39:49
2010-11-12 16:46:26
From: Coh3n
What was the error…?
I'm assuming the code you posted was highlighted?
2010-11-12 16:55:06
From: Mike408
How can i find the error.
2010-11-12 17:31:24
From: Coh3n
It says in the debug box when the script stops.
Also, can you post your DeclarePlayers setup please? It's most likely an error you made when adding that second player from the other thread.
{==============================================================================\
| 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 := 'player1'; // Username
Pass := 'password1'; // Password
Nick := 'law'; // Nickname (3-4 lowercase letters from username)
Pin := '1234'; // 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 := 4; // 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 := 'player2';
Pass := 'password2';
Nick := 'law';
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.
2010-11-12 18:37:59