Results 1 to 7 of 7

Thread: Batch file

  1. #1
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Batch file

    I am trying to make a batch file and when I run it this comes up.


    It says in the window that SMART initializes, but then fails because of my world setup?

  2. #2
    Join Date
    Dec 2011
    Location
    Holland
    Posts
    545
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Server 152 isnt a valid world, try server 1

  3. #3
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I set the Server to 0 and it still happens.
    Simba Code:
    (*
    RunMe
    =====

    The RunMe file is the file that the user will actually run.  It doesn't matter
    whether they're using the form or not, they still have to run this file.  If
    not using the form, the user should only change the DeclareSettings and
    DeclarePlayers procedures.

    The source for can be found
    `here <https://github.com/SRL/MSI/raw/master/RunMe.simba>`_, and a very detailed
    guide on how to properly setup MSI can be found here
    `here <http://villavu.com/forum/showthread.php?p=745942#post745942>`_ if you are
    having trouble setting up.

    *)


    program MSI_Script;
    // Define the extras you want to use
    {$DEFINE EXTRA_CHARACTER_STATS} // Saves player stats in HTML format

    // Define other settings
    //{$DEFINE SRL5}  // Uncomment if you're testing SRL5
    {$DEFINE SPS}   // Comment to disable SPS (no walking scripts)
    {$DEFINE SMART}
    {$DEFINE CRASHSMART} // Comment to use MSI with a browser
    {$DEFINE SRL_REMOTE} // Use SRL's player remote control

    { ============================================================================ }
    {$i MSI/MSI/Core/Setup.simba}

    const
      USE_FORM = False;

    (*
    DeclareSettings
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

      procedure DeclareSettings();

    Sets the global variable 'MSI_Settings.' Can be easily expandable to any type
    of setting requested by any user.

    *)

    procedure DeclareSettings();
    begin
      MSI_Settings[SETUP_DEBUG_SMART]   := False;    // Debugs things onto SMART (may cause lag)
      MSI_Settings[SETUP_SAVE_DEBUG]    := True;    // Save's the debug box text to a file
      MSI_Settings[SETUP_SAVE_REPORT]   := True;    // Save's the progress report to a file
      MSI_Settings[SETUP_HUMAN_BREAK]   := True;    // Take more human like breaks
      MSI_Settings[SETUP_SWITCH_WORLDS] := True;    // Switch worlds when switching players or after breaks
      MSI_Settings[SETUP_PRINT_REPORT]  := True;    // Will only print the short report in the debug box (will still save long report to file)
      MSI_Settings[SETUP_BREAK_TIME]    := 0;      // Single player only - how long to break for (in minutes)
      MSI_Settings[SETUP_DEBUG_LEVEL]   := 20;      // The lower the number, the less the script will debug
      MSI_Settings[SETUP_ANTIBAN_WAIT]  := 15000;   // Minimum time to wait between antibans (in milliseconds 1000ms = 1s)
      MSI_Settings[SETUP_RANDOMS_WAIT]  := 10000;   // Minimum time to wait between randoms checks
      MSI_Settings[SETUP_STATS_ID]      := '';      // Stats ID
      MSI_Settings[SETUP_STATS_PASS]    := '';      // Stats password
      MSI_Settings[SETUP_QC_LEVELUP]    := False;    // Quick chat when you level up, only available when your level is above 20
      MSI_Settings[SETUP_MAX_PLAYERS]   := 2;      // How many players around you before switching worlds
      MSI_Settings[SETUP_RANDOM_NP]     := True;    // Choose a random player when switching players?
    end;

    (*
    DeclarePlayers
    ~~~~~~~~~~~~~~

    .. code-block:: pascal

      procedure DeclarePlayers();

    When called, sets the global variable 'MSI_Players.'  This is the procedure
    the user needs to setup if they elect not to use the player form.

    *)

    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       := '';      // Username
        Pass       := '';      // Password
        Pin        := '';      // Bank pin; leave as '' if player doesn't have one
        Active     := True;    // Use this player?
        Member     := False;   // Is this player a member?
        BreakLoads := 0;       // Amount of loads before breaking/switching players; leave 0 to not take breaks
        BreakTime  := 0;       // Amount of time (in minutes) before breaking/witching; leave 0 to not take breaks
        TotalLoads := 0;       // 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_VE_MINER;
            Rocks         := [ROCK_IRON];
        end;
      end;

      with MSI_Players[1] do
      begin
        Name       := '';
        Pass       := '';
        Pin        := '';
        Active     := True;
        Member     := False;
        BreakLoads := 0;
        BreakTime  := 0;
        TotalLoads := 0;
        TotalTime  := 0;

        with Scripts[0] do
        begin
            Name      := SCRIPT_VE_MINER;
            Rocks         := [ROCK_IRON];
        end;
      end;
     {
      with MSI_Players[2] do
      begin
        Name       := '';
        Pass       := '';
        Pin        := '';
        Active     := True;
        Member     := False;
        BreakLoads := ;
        BreakTime  := ;
        TotalLoads := ;
        TotalTime  := ;

        with Scripts[0] do
        begin
        end;
      end;

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

        with Scripts[0] do
        begin
        end;
      end;

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

        with Scripts[0] do
        begin
        end;
      end;

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

        with Scripts[0] do
        begin
        end;
      end;

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

        with Scripts[0] do
        begin
        end;
      end;

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

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

    end;

    var
      i: integer;
    begin
      // set the script start date and time used to progress reports and logs
      ScriptStart := TheDate(DATE_DAY) + ' at ' + TheTime;
      ScriptStart := Replace(scriptStart, ':', ' ');

      ClearDebug;
      MSI_Setup;

      // initilize form if selected, otherwise call player setup routines
      if (USE_FORM) then
      begin
        try
          try
            ThreadSafeCallEx('ShowMSIForm');
          finally
            ThreadSafeCallEx('FreeMSIForm');
          end;
        except
          Writeln(ExceptionToString(ExceptionType, ExceptionParam));
        end;

        HowManyPlayers := Length(MSI_Players);
        NumberOfPlayers(HowManyPlayers);

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

        if (not ScriptReady) then
          TerminateScript;
      end else begin
        DeclareSettings;
        DeclarePlayers;
      end;

      // initialize SMART and clear it's canvas
      {$IFDEF SMART}
      SMART_Server := 0;
      SMART_Members := False;
      SMART_Signed := True;
      SMART_SuperDetail := False;
      {$ENDIF}

      SetupSRL;
      ActivateClient;
      CurrDebugLevel := 1;
      MSI_InitSRLPlayers();
      SetScriptProp(SP_WriteTimeStamp, [True]);
      AddOnTerminate('MSI_ScriptTerminate');

      {$IFDEF SMART}
      SMART_SetupDebug();
      clearRSCanvas(SMART_Canvas.canvas);
      {$ENDIF}

      // create debug file
      if (MSI_Settings[SETUP_SAVE_DEBUG]) then
        DebugFile := CreateFile(PATH_DEBUG + ScriptStart + '.txt');

      SetupSRLStats(21, MSI_Settings[SETUP_STATS_ID], MSI_Settings[SETUP_STATS_PASS]);

      MSI_WalkingDefines();

      // this boolean isn't yet in the player form
      if (USE_FORM) then
        MSI_Settings[SETUP_PRINT_REPORT] := True;

      MSI_Settings[SETUP_DEATH_WALK] := true;

      MSI_Mainloop;
    end.

  4. #4
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    0 isn't a server either.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  5. #5
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought 0 made it random. I used a valid world and it still told me I have an invalid world or world list and to check my settings. Where in that would be what I have to change? Maybe I am just missing it.

  6. #6
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Force an update of your SRL. It should be SRL/misc/worlds.ini or similar. World 61 works fine for me.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  7. #7
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I updated. I think it is trying to open my default. >.< This is what my batch says:
    Simba Code:
    echo Simba Restarter
    cd C:\Simba\
    C:\Simba\
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r
    simba.exe -o Simba\My Own\RunMeEditForBatch.simba -r

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •