Results 1 to 8 of 8

Thread: Error

  1. #1
    Join Date
    Mar 2007
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Error

    well, this is the only thread i can find to put this in so here goes. i got a mining script, don't rmember from where, and i keep getting this error: Include file C:\Program Files\SCAR 2.03\includes\SRL/RangerFunction.scar does not exist.
    Failed when compiling

    i have the latest version of srl working and the latest plug ins. if someone needs me to post the script i will.

  2. #2
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    Then Post Please

  3. #3
    Join Date
    Mar 2007
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    program SPMReborn;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\mining.scar}
    
    //==============================[Setup]===================================\\
    const
      VersionNumber = '0.71';//Current version number.
      StartPlayer   = 0;//Forgot to add it in the form, doh!
      
    //==============================[Colors]==================================\\
    //If your mining new rocks you might need to set your own color.
    const
      CopperColor       = 3824768;
      TinColor          = 7829375;
      ClayColor         = 4553880;
      IronColor         = 2569045;
      SilverColor       = 12434885;
      CoalColor         = 2834753;
      GoldColor         = 1881051;
      MithrilColor      = 7359564;
      AdamantColor      = 6322272;
      RuniteColor       = 0;
    
    //==========================[Player Setup]================================\\
    procedure DeclarePlayers;
    begin
         HowManyPlayers := 6;//MAKE SURE THIS ONE IS CORRECT!
    
         CurrentPlayer := StartPlayer;
         NumberOfPlayers(HowManyPlayers);
    
         Players[0].Name    :='Username';
         Players[0].Pass    :='Password';
         Players[0].Nick    :='sern';  // 3-4 letters from your name, NO CAPITALS (that includes the first character)
         Players[0].String1 :='Iron';  //Will be mined most (unless RandomlyChooseRock is set)
         Players[0].String2 :='Copper';//Will be mined less, unless ^
         Players[0].String3 :='Tin';   //Will be mined even less, unless ^
         Players[0].Active:= True;
    
         Players[1].Name    :='Username';
         Players[1].Pass    :='Password';
         Players[1].Nick    :='sern';
         Players[1].String1 :='Coal';
         Players[1].String2 :='Gold';
         Players[1].String3 :='Iron';
         Players[1].Active:= True;
    
         Players[2].Name    :='Username';
         Players[2].Pass    :='Password';
         Players[2].Nick    :='sern';
         Players[2].String1 :='Copper';
         Players[2].String2 :='Tin';
         Players[2].String3 :='Iron';
         Players[2].Active:= True;
    
         Players[3].Name    :='Username';
         Players[3].Pass    :='Password';
         Players[3].Nick    :='sern';
         Players[3].String1 :='Addy';
         Players[3].String2 :='Mith';
         Players[3].String3 :='Gold';
         Players[3].Active:= True;
    
         Players[4].Name    :='Username';
         Players[4].Pass    :='Password';
         Players[4].Nick    :='sern';
         Players[4].String1 :='Coal';
         Players[4].String2 :='Copper';
         Players[4].String3 :='Tin';
         Players[4].Active:= True;
    
         Players[5].Name    :='Username';
         Players[5].Pass    :='Password';
         Players[5].Nick    :='sern';
         Players[5].String1 :='Iron';
         Players[5].String2 :='Addy';
         Players[5].String3 :='Coal';
         Players[5].Active:= True;
    end;
    
    //=========================[DONT TOUCH BELOW]=============================\\
    var
      arOreColor, arOreColorResults: TPointArray;
      I, bmpOreMask, bmpClayMask, OresMined, LoadsDone,
      TotalLoadsDone, GasAvoided, MineMax, TheLoads, MaxMin,
      TheMinCount, LoadsPerPlayer, RandomLoads, MaxSecToWait,
      MaxMinPerLoad, TheOreTolerance, AntiBanAmount: Integer;
      PlayerStatus, MiningInDwarvenMine, MineNewRocks, UseTimeOut,
      CheckForHealth, RunFar, RandomlyChooseRock, MMouseWhenWaiting,
      UseAntiBan, UsePlayerForm : Boolean;
      OresDropDir, RunDir, DebugStyle, PartOfRCName: string;
      
    var
      SumMainForm : TForm;
      lUsePlayerForm : TLabel;
      lUseAntiBan : TLabel;
      lMaxMinPerLoad : TLabel;
      lMaxSecToWait : TLabel;
      lLoadsPerPlayer : TLabel;
      cbUsePlayerForm : TCheckBox;
      cbUseAntiBan : TCheckBox;
      eMaxMinPerLoad : TEdit;
      eMaxSecToWait : TEdit;
      eLoadsPerPlayer : TEdit;
      bStart : TButton;
      bPlayerForm : TButton;
      bExtraSettings : TButton;
      SumExtraForm : TForm;
      lDwarfMines : TLabel;
      lNewRocks : TLabel;
      lUseTimeOut : TLabel;
      lCheckHealth : TLabel;
      lRunDir : TLabel;
      lRunFar : TLabel;
      lOreTol : TLabel;
      lRandomChooseRock : TLabel;
      lMMouseWaiting : TLabel;
      lAntiBanAmount : TLabel;
      lOreDropDir : TLabel;
      lRandomLoads : TLabel;
      lPartOfRCName : TLabel;
      lDebugStyle : TLabel;
      cbDwarfMines : TCheckBox;
      cbNewRocks : TCheckBox;
      cbUseTimeOut : TCheckBox;
      cbCheckHealth : TCheckBox;
      cbRandomChooseRock : TCheckBox;
      cbMMouseWaiting : TCheckBox;
      cbRunFar : TCheckBox;
      cbbRunDir : TComboBox;
      cbbDropDir : TComboBox;
      cbbDebugStyle : TComboBox;
      cbbAntiBanAmount : TComboBox;
      eOreTol : TEdit;
      eRandomLoads : TEdit;
      ePartOfRCName : TEdit;
      bSaveSettings : TButton;
      
    procedure ButtonClick(Sender: TObject); forward;
    
    procedure SumLoadSettings;
    begin
      if(LoadSetting('SPMForm', 'UseTimeOut') = '')then
        SaveSetting('SPMForm', 'UseTimeOut', 'True');
      if(LoadSetting('SPMForm', 'RunFar') = '')then
        SaveSetting('SPMForm', 'RunFar', 'True');
      if(LoadSetting('SPMForm', 'MMouseWaiting') = '')then
        SaveSetting('SPMForm', 'MMouseWaiting', 'True');
      if(LoadSetting('SPMForm', 'UseAntiBan') = '')then
        SaveSetting('SPMForm', 'UseAntiBan', 'True');
      if(LoadSetting('SPMForm', 'UsePlayerForm') = '')then
        SaveSetting('SPMForm', 'UsePlayerForm', 'True');
      if(LoadSetting('SPMForm', 'LoadsPerPlayer') = '')then
        SaveSetting('SPMForm', 'LoadsPerPlayer', '3');
      if(LoadSetting('SPMForm', 'MaxMin') = '')then
        SaveSetting('SPMForm', 'MaxMin', '10');
      if(LoadSetting('SPMForm', 'MaxSec') = '')then
        SaveSetting('SPMForm', 'MaxSec', '10');
      if(LoadSetting('SPMForm', 'OreTol') = '')then
        SaveSetting('SPMForm', 'OreTol', '5');
      if(LoadSetting('SPMForm', 'RandomLoads') = '')then
        SaveSetting('SPMForm', 'RandomLoads', '2');
      if(LoadSetting('SPMForm', 'PartOfRCName') = '')then
        SaveSetting('SPMForm', 'PartOfRCName', 'umil');
      if(LoadSetting('SPMForm', 'RunDir') = '')then
        SaveSetting('SPMForm', 'RunDir', 'N');
      if(LoadSetting('SPMForm', 'DropDir') = '')then
        SaveSetting('SPMForm', 'DropDir', 'None');
      if(LoadSetting('SPMForm', 'DebugStyle') = '')then
        SaveSetting('SPMForm', 'DebugStyle', 'Write');
      if(LoadSetting('SPMForm', 'AntiBanAmount') = '')then
        SaveSetting('SPMForm', 'AntiBanAmount', '3');
      eLoadsPerPlayer.Text := LoadSetting('SPMForm', 'LoadsPerPlayer');
      eMaxMinPerLoad.Text := LoadSetting('SPMForm', 'MaxMin');
      eMaxSecToWait.Text := LoadSetting('SPMForm', 'MaxSec');
      cbUseAntiBan.State := StrToBool(LoadSetting('SPMForm', 'UseAntiBan'));
      cbUsePlayerForm.State := StrToBool(LoadSetting('SPMForm', 'UsePlayerForm'));
      cbDwarfMines.State := StrToBool(LoadSetting('SPMForm', 'DwarvenMines'));
      cbNewRocks.State := StrToBool(LoadSetting('SPMForm', 'NewRocks'));
      cbUseTimeOut.State := StrToBool(LoadSetting('SPMForm', 'UseTimeOut'));
      cbCheckHealth.State := StrToBool(LoadSetting('SPMForm', 'CheckHealth'));
      cbRandomChooseRock.State := StrToBool(LoadSetting('SPMForm', 'RandomRock'));
      cbMMouseWaiting.State := StrToBool(LoadSetting('SPMForm', 'MMouseWaiting'));
      cbRunFar.State := StrToBool(LoadSetting('SPMForm', 'RunFar'));
      cbbRunDir.Text := LoadSetting('SPMForm', 'RunDir');
      cbbDropDir.Text := LoadSetting('SPMForm', 'DropDir');
      cbbDebugStyle.Text := LoadSetting('SPMForm', 'DebugStyle');
      cbbAntiBanAmount.Text := LoadSetting('SPMForm', 'AntiBanAmount');
      eOreTol.Text := LoadSetting('SPMForm', 'OreTol');
      eRandomLoads.Text := LoadSetting('SPMForm', 'RandomLoads');
      ePartOfRCName.Text := LoadSetting('SPMForm', 'PartOfRCName');
    end;
    
    procedure SumSaveSettings;
    begin
      SaveSetting('SPMForm', 'LoadsPerPlayer', eLoadsPerPlayer.Text);
      SaveSetting('SPMForm', 'MaxMin', eMaxMinPerLoad.Text);
      SaveSetting('SPMForm', 'MaxSec', eMaxSecToWait.Text);
      SaveSetting('SPMForm', 'UseAntiBan', BoolToStr(cbUseAntiBan.State));
      SaveSetting('SPMForm', 'UsePlayerForm', BoolToStr(cbUsePlayerForm.State));
      SaveSetting('SPMForm', 'DwarvenMines', BoolToStr(cbDwarfMines.State));
      SaveSetting('SPMForm', 'NewRocks', BoolToStr(cbNewRocks.State));
      SaveSetting('SPMForm', 'UseTimeOut', BoolToStr(cbUseTimeOut.State));
      SaveSetting('SPMForm', 'CheckHealth', BoolToStr(cbCheckHealth.State));
      SaveSetting('SPMForm', 'RandomRock', BoolToStr(cbRandomChooseRock.State));
      SaveSetting('SPMForm', 'MMouseWaiting', BoolToStr(cbMMouseWaiting.State));
      SaveSetting('SPMForm', 'RunFar', BoolToStr(cbRunFar.State));
      SaveSetting('SPMForm', 'RunDir', cbbRunDir.Text);
      SaveSetting('SPMForm', 'DropDir', cbbDropDir.Text);
      SaveSetting('SPMForm', 'DebugStyle', cbbDebugStyle.Text);
      SaveSetting('SPMForm', 'AntiBanAmount', cbbAntiBanAmount.Text);
      SaveSetting('SPMForm', 'OreTol', eOreTol.Text);
      SaveSetting('SPMForm', 'RandomLoads', eRandomLoads.Text);
      SaveSetting('SPMForm', 'PartOfRCName', ePartOfRCName.Text);
      LoadsPerPlayer := StrToInt(eLoadsPerPlayer.Text);
      RandomLoads := StrToInt(eRandomLoads.Text);
      MaxSecToWait := StrToInt(eMaxSecToWait.Text);
      MaxMinPerLoad := StrToInt(eMaxMinPerLoad.Text);
      TheOreTolerance := StrToInt(eOreTol.Text);
      AntiBanAmount := StrToInt(cbbAntiBanAmount.Text);
      MiningInDwarvenMine := cbDwarfMines.State;
      MineNewRocks := cbNewRocks.State;
      UseTimeOut := cbUseTimeOut.State;
      CheckForHealth := cbCheckHealth.State;
      RunFar := cbRunFar.State;
      RandomlyChooseRock := cbRandomChooseRock.State;
      MMouseWhenWaiting := cbMMouseWaiting.State;
      UseAntiBan := cbUseAntiBan.State;
      UsePlayerForm := cbUsePlayerForm.State;
      OresDropDir := cbbDropDir.Text;
      RunDir := cbbRunDir.Text;
      DebugStyle := cbbDebugStyle.Text;
      PartOfRCName := ePartOfRCName.Text;
    end;
    
    procedure SafeShowExtraFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowExtraFormModal', v);
    end;
    
    procedure SafeInitExtraForm;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('SumExtraFormProc', v);
    end;
    
    procedure ShowExtraFormModal;
    begin
      SumExtraForm.ShowModal;
    end;
    
    procedure SumExtraFormProc;
    begin
      SumExtraForm := CreateForm;
      SumExtraForm.Left := 275;
      SumExtraForm.Top := 122;
      SumExtraForm.Width := 395;
      SumExtraForm.Height := 236;
      SumExtraForm.Caption := 'SumExtraFrom - SPM Form';
      SumExtraForm.Color := $00B3A69D;
      SumExtraForm.Font.Color := clWindowText;
      SumExtraForm.Font.Height := -11;
      SumExtraForm.Font.Name := 'MS Sans Serif';
      SumExtraForm.Font.Style := [];
      SumExtraForm.Visible := False;
      SumExtraForm.PixelsPerInch := 96;
      lDwarfMines := TLabel.Create(SumExtraForm);
      lDwarfMines.Parent := SumExtraForm;
      lDwarfMines.Left := 18;
      lDwarfMines.Top := 15;
      lDwarfMines.Width := 74;
      lDwarfMines.Height := 13;
      lDwarfMines.Hint := 'Mining in the Dwarven Mines?';
      lDwarfMines.Caption := 'Dwarven Mines';
      lNewRocks := TLabel.Create(SumExtraForm);
      lNewRocks.Parent := SumExtraForm;
      lNewRocks.Left := 18;
      lNewRocks.Top := 35;
      lNewRocks.Width := 56;
      lNewRocks.Height := 13;
      lNewRocks.Hint := 'Mining the new (Rimmington) Rocks?';
      lNewRocks.Caption := 'New Rocks';
      lUseTimeOut := TLabel.Create(SumExtraForm);
      lUseTimeOut.Parent := SumExtraForm;
      lUseTimeOut.Left := 18;
      lUseTimeOut.Top := 55;
      lUseTimeOut.Width := 62;
      lUseTimeOut.Height := 13;
      lUseTimeOut.Caption := 'Use TimeOut';
      lCheckHealth := TLabel.Create(SumExtraForm);
      lCheckHealth.Parent := SumExtraForm;
      lCheckHealth.Left := 18;
      lCheckHealth.Top := 75;
      lCheckHealth.Width := 80;
      lCheckHealth.Height := 13;
      lCheckHealth.Caption := 'Check for Health';
      lRunDir := TLabel.Create(SumExtraForm);
      lRunDir.Parent := SumExtraForm;
      lRunDir.Left := 186;
      lRunDir.Top := 15;
      lRunDir.Width := 65;
      lRunDir.Height := 13;
      lRunDir.Caption := 'Run Direction';
      lRunFar := TLabel.Create(SumExtraForm);
      lRunFar.Parent := SumExtraForm;
      lRunFar.Left := 18;
      lRunFar.Top := 135;
      lRunFar.Width := 38;
      lRunFar.Height := 13;
      lRunFar.Caption := 'Run Far';
      lOreTol := TLabel.Create(SumExtraForm);
      lOreTol.Parent := SumExtraForm;
      lOreTol.Left := 185;
      lOreTol.Top := 95;
      lOreTol.Width := 90;
      lOreTol.Height := 13;
      lOreTol.Caption := 'The Ore Tolerance';
      lRandomChooseRock := TLabel.Create(SumExtraForm);
      lRandomChooseRock.Parent := SumExtraForm;
      lRandomChooseRock.Left := 18;
      lRandomChooseRock.Top := 95;
      lRandomChooseRock.Width := 86;
      lRandomChooseRock.Height := 13;
      lRandomChooseRock.Caption := 'Choose Randomly';
      lMMouseWaiting := TLabel.Create(SumExtraForm);
      lMMouseWaiting.Parent := SumExtraForm;
      lMMouseWaiting.Left := 18;
      lMMouseWaiting.Top := 115;
      lMMouseWaiting.Width := 82;
      lMMouseWaiting.Height := 13;
      lMMouseWaiting.Hint := 'Move the mouse when waiting?';
      lMMouseWaiting.Caption := 'MMouse anti-ban';
      lAntiBanAmount := TLabel.Create(SumExtraForm);
      lAntiBanAmount.Parent := SumExtraForm;
      lAntiBanAmount.Left := 185;
      lAntiBanAmount.Top := 75;
      lAntiBanAmount.Width := 78;
      lAntiBanAmount.Height := 13;
      lAntiBanAmount.Caption := 'Anti-Ban amount';
      lOreDropDir := TLabel.Create(SumExtraForm);
      lOreDropDir.Parent := SumExtraForm;
      lOreDropDir.Left := 185;
      lOreDropDir.Top := 35;
      lOreDropDir.Width := 68;
      lOreDropDir.Height := 13;
      lOreDropDir.Caption := 'Drop Direction';
      lRandomLoads := TLabel.Create(SumExtraForm);
      lRandomLoads.Parent := SumExtraForm;
      lRandomLoads.Left := 185;
      lRandomLoads.Top := 115;
      lRandomLoads.Width := 72;
      lRandomLoads.Height := 13;
      lRandomLoads.Caption := 'Random Loads';
      lPartOfRCName := TLabel.Create(SumExtraForm);
      lPartOfRCName.Parent := SumExtraForm;
      lPartOfRCName.Left := 185;
      lPartOfRCName.Top := 135;
      lPartOfRCName.Width := 96;
      lPartOfRCName.Height := 13;
      lPartOfRCName.Caption := 'Part of the RC name';
      lDebugStyle := TLabel.Create(SumExtraForm);
      lDebugStyle.Parent := SumExtraForm;
      lDebugStyle.Left := 185;
      lDebugStyle.Top := 55;
      lDebugStyle.Width := 58;
      lDebugStyle.Height := 13;
      lDebugStyle.Caption := 'Debug Style';
      cbDwarfMines := TCheckBox.Create(SumExtraForm);
      cbDwarfMines.Parent := SumExtraForm;
      cbDwarfMines.Left := 134;
      cbDwarfMines.Top := 13;
      cbDwarfMines.Width := 15;
      cbDwarfMines.Height := 17;
      cbDwarfMines.TabOrder := 0;
      cbNewRocks := TCheckBox.Create(SumExtraForm);
      cbNewRocks.Parent := SumExtraForm;
      cbNewRocks.Left := 134;
      cbNewRocks.Top := 33;
      cbNewRocks.Width := 15;
      cbNewRocks.Height := 17;
      cbNewRocks.TabOrder := 1;
      cbUseTimeOut := TCheckBox.Create(SumExtraForm);
      cbUseTimeOut.Parent := SumExtraForm;
      cbUseTimeOut.Left := 134;
      cbUseTimeOut.Top := 53;
      cbUseTimeOut.Width := 15;
      cbUseTimeOut.Height := 17;
      cbUseTimeOut.TabOrder := 2;
      cbCheckHealth := TCheckBox.Create(SumExtraForm);
      cbCheckHealth.Parent := SumExtraForm;
      cbCheckHealth.Left := 134;
      cbCheckHealth.Top := 73;
      cbCheckHealth.Width := 15;
      cbCheckHealth.Height := 17;
      cbCheckHealth.TabOrder := 3;
      cbRandomChooseRock := TCheckBox.Create(SumExtraForm);
      cbRandomChooseRock.Parent := SumExtraForm;
      cbRandomChooseRock.Left := 134;
      cbRandomChooseRock.Top := 93;
      cbRandomChooseRock.Width := 15;
      cbRandomChooseRock.Height := 17;
      cbRandomChooseRock.TabOrder := 4;
      cbMMouseWaiting := TCheckBox.Create(SumExtraForm);
      cbMMouseWaiting.Parent := SumExtraForm;
      cbMMouseWaiting.Left := 134;
      cbMMouseWaiting.Top := 113;
      cbMMouseWaiting.Width := 15;
      cbMMouseWaiting.Height := 17;
      cbMMouseWaiting.TabOrder := 5;
      cbRunFar := TCheckBox.Create(SumExtraForm);
      cbRunFar.Parent := SumExtraForm;
      cbRunFar.Left := 134;
      cbRunFar.Top := 133;
      cbRunFar.Width := 15;
      cbRunFar.Height := 17;
      cbRunFar.TabOrder := 6;
      cbbRunDir := TComboBox.Create(SumExtraForm);
      cbbRunDir.Parent := SumExtraForm;
      cbbRunDir.Left := 296;
      cbbRunDir.Top := 12;
      cbbRunDir.Width := 75;
      cbbRunDir.Height := 21;
      cbbRunDir.ItemHeight := 13;
      cbbRunDir.MaxLength := 4;
      cbbRunDir.TabOrder := 7;
      cbbRunDir.Items.Add('N');
      cbbRunDir.Items.Add('E');
      cbbRunDir.Items.Add('S');
      cbbRunDir.Items.Add('W');
      cbbDropDir := TComboBox.Create(SumExtraForm);
      cbbDropDir.Parent := SumExtraForm;
      cbbDropDir.Left := 296;
      cbbDropDir.Top := 32;
      cbbDropDir.Width := 75;
      cbbDropDir.Height := 21;
      cbbDropDir.ItemHeight := 13;
      cbbDropDir.TabOrder := 8;
      cbbDropDir.Items.Add('None');
      cbbDropDir.Items.Add('Random');
      cbbDropDir.Items.Add('N');
      cbbDropDir.Items.Add('E');
      cbbDropDir.Items.Add('S');
      cbbDropDir.Items.Add('W');
      cbbDebugStyle := TComboBox.Create(SumExtraForm);
      cbbDebugStyle.Parent := SumExtraForm;
      cbbDebugStyle.Left := 296;
      cbbDebugStyle.Top := 52;
      cbbDebugStyle.Width := 75;
      cbbDebugStyle.Height := 21;
      cbbDebugStyle.DropDownCount := 4;
      cbbDebugStyle.ItemHeight := 13;
      cbbDebugStyle.TabOrder := 9;
      cbbDebugStyle.Items.Add('Write');
      cbbDebugStyle.Items.Add('Disguise');
      cbbDebugStyle.Items.Add('Status');
      cbbDebugStyle.Items.Add('None');
      cbbAntiBanAmount := TComboBox.Create(SumExtraForm);
      cbbAntiBanAmount.Parent := SumExtraForm;
      cbbAntiBanAmount.Left := 296;
      cbbAntiBanAmount.Top := 72;
      cbbAntiBanAmount.Width := 75;
      cbbAntiBanAmount.Height := 21;
      cbbAntiBanAmount.ItemHeight := 13;
      cbbAntiBanAmount.TabOrder := 10;
      cbbAntiBanAmount.Items.Add('0');
      cbbAntiBanAmount.Items.Add('1');
      cbbAntiBanAmount.Items.Add('2');
      cbbAntiBanAmount.Items.Add('3');
      cbbAntiBanAmount.Items.Add('4');
      cbbAntiBanAmount.Items.Add('5');
      eOreTol := TEdit.Create(SumExtraForm);
      eOreTol.Parent := SumExtraForm;
      eOreTol.Left := 296;
      eOreTol.Top := 92;
      eOreTol.Width := 75;
      eOreTol.Height := 21;
      eOreTol.TabOrder := 11;
      eRandomLoads := TEdit.Create(SumExtraForm);
      eRandomLoads.Parent := SumExtraForm;
      eRandomLoads.Left := 296;
      eRandomLoads.Top := 112;
      eRandomLoads.Width := 75;
      eRandomLoads.Height := 21;
      eRandomLoads.TabOrder := 12;
      ePartOfRCName := TEdit.Create(SumExtraForm);
      ePartOfRCName.Parent := SumExtraForm;
      ePartOfRCName.Left := 296;
      ePartOfRCName.Top := 132;
      ePartOfRCName.Width := 75;
      ePartOfRCName.Height := 21;
      ePartOfRCName.TabOrder := 13;
      bSaveSettings := TButton.Create(SumExtraForm);
      bSaveSettings.Parent := SumExtraForm;
      bSaveSettings.Left := 160;
      bSaveSettings.Top := 165;
      bSaveSettings.Width := 75;
      bSaveSettings.Height := 25;
      bSaveSettings.Caption := 'Save !';
      bSaveSettings.TabOrder := 14;
      bSaveSettings.OnClick := @ButtonClick;
    end;
    
    procedure ButtonClick(Sender: TObject);
    begin
      case Sender of
        bStart :
        begin
          SumMainForm.Caption:= SumMainForm.Caption + '.';
          SumMainForm.ModalResult:= mrOk;
        end;
        bPlayerForm :
          StartPlayers(true, 'string1 string2 string3');
        bExtraSettings :
          SafeShowExtraFormModal;
        bSaveSettings :
        begin
          SumExtraForm.Caption:= SumExtraForm.Caption + '.';
          SumExtraForm.ModalResult:= mrOk;
        end;
      end;
    end;
    
    
    procedure SumMainFormProc;
    begin
      SumMainForm := CreateForm;
      SumMainForm.Left := 310;
      SumMainForm.Top := 155;
      SumMainForm.Width := 278;
      SumMainForm.Height := 249;
      SumMainForm.Caption := 'SumMainForm - SPM Form';
      SumMainForm.Color := $00B3A69D;
      SumMainForm.Font.Color := clWindowText;
      SumMainForm.Font.Height := -11;
      SumMainForm.Font.Name := 'MS Sans Serif';
      SumMainForm.Font.Style := [];
      SumMainForm.Visible := False;
      SumMainForm.PixelsPerInch := 96;
      lUsePlayerForm := TLabel.Create(SumMainForm);
      lUsePlayerForm.Parent := SumMainForm;
      lUsePlayerForm.Left := 64;
      lUsePlayerForm.Top := 147;
      lUsePlayerForm.Width := 89;
      lUsePlayerForm.Height := 13;
      lUsePlayerForm.Caption := 'Use the Playerform';
      lUseAntiBan := TLabel.Create(SumMainForm);
      lUseAntiBan.Parent := SumMainForm;
      lUseAntiBan.Left := 64;
      lUseAntiBan.Top := 129;
      lUseAntiBan.Width := 62;
      lUseAntiBan.Height := 13;
      lUseAntiBan.Caption := 'Use Anti-Ban';
      lMaxMinPerLoad := TLabel.Create(SumMainForm);
      lMaxMinPerLoad.Parent := SumMainForm;
      lMaxMinPerLoad.Left := 64;
      lMaxMinPerLoad.Top := 99;
      lMaxMinPerLoad.Width := 102;
      lMaxMinPerLoad.Height := 13;
      lMaxMinPerLoad.Caption := 'Max minutes per load';
      lMaxSecToWait := TLabel.Create(SumMainForm);
      lMaxSecToWait.Parent := SumMainForm;
      lMaxSecToWait.Left := 64;
      lMaxSecToWait.Top := 74;
      lMaxSecToWait.Width := 97;
      lMaxSecToWait.Height := 13;
      lMaxSecToWait.Caption := 'Max seconds to wait';
      lLoadsPerPlayer := TLabel.Create(SumMainForm);
      lLoadsPerPlayer.Parent := SumMainForm;
      lLoadsPerPlayer.Left := 64;
      lLoadsPerPlayer.Top := 52;
      lLoadsPerPlayer.Width := 85;
      lLoadsPerPlayer.Height := 13;
      lLoadsPerPlayer.Caption := 'Loads per player';
      cbUsePlayerForm := TCheckBox.Create(SumMainForm);
      cbUsePlayerForm.Parent := SumMainForm;
      cbUsePlayerForm.Left := 187;
      cbUsePlayerForm.Top := 145;
      cbUsePlayerForm.Width := 18;
      cbUsePlayerForm.Height := 17;
      cbUsePlayerForm.TabOrder := 4;
      cbUseAntiBan := TCheckBox.Create(SumMainForm);
      cbUseAntiBan.Parent := SumMainForm;
      cbUseAntiBan.Left := 187;
      cbUseAntiBan.Top := 128;
      cbUseAntiBan.Width := 19;
      cbUseAntiBan.Height := 18;
      cbUseAntiBan.TabOrder := 3;
      eMaxMinPerLoad := TEdit.Create(SumMainForm);
      eMaxMinPerLoad.Parent := SumMainForm;
      eMaxMinPerLoad.Left := 178;
      eMaxMinPerLoad.Top := 94;
      eMaxMinPerLoad.Width := 30;
      eMaxMinPerLoad.Height := 21;
      eMaxMinPerLoad.TabOrder := 2;
      eMaxSecToWait := TEdit.Create(SumMainForm);
      eMaxSecToWait.Parent := SumMainForm;
      eMaxSecToWait.Left := 178;
      eMaxSecToWait.Top := 70;
      eMaxSecToWait.Width := 30;
      eMaxSecToWait.Height := 21;
      eMaxSecToWait.TabOrder := 1;
      eLoadsPerPlayer := TEdit.Create(SumMainForm);
      eLoadsPerPlayer.Parent := SumMainForm;
      eLoadsPerPlayer.Left := 178;
      eLoadsPerPlayer.Top := 46;
      eLoadsPerPlayer.Width := 30;
      eLoadsPerPlayer.Height := 21;
      eLoadsPerPlayer.TabOrder := 0;
      bStart := TButton.Create(SumMainForm);
      bStart.Parent := SumMainForm;
      bStart.Left := 99;
      bStart.Top := 176;
      bStart.Width := 75;
      bStart.Height := 25;
      bStart.Caption := 'Start';
      bStart.TabOrder := 5;
      bStart.OnClick:= @ButtonClick;
      bPlayerForm := TButton.Create(SumMainForm);
      bPlayerForm.Parent := SumMainForm;
      bPlayerForm.Left := 11;
      bPlayerForm.Top := 11;
      bPlayerForm.Width := 114;
      bPlayerForm.Height := 25;
      bPlayerForm.Caption := 'Player Form';
      bPlayerForm.TabOrder := 6;
      bPlayerForm.OnClick:= @ButtonClick;
      bExtraSettings := TButton.Create(SumMainForm);
      bExtraSettings.Parent := SumMainForm;
      bExtraSettings.Left := 144;
      bExtraSettings.Top := 11;
      bExtraSettings.Width := 112;
      bExtraSettings.Height := 25;
      bExtraSettings.Caption := 'Extra Settings';
      bExtraSettings.TabOrder := 7;
      bExtraSettings.OnClick:= @ButtonClick;
    end;
    
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('SumMainFormProc', v);
    end;
    
    procedure ShowFormModal;
    begin
      SumMainForm.ShowModal;
    end;
    
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    
    //------------------------------------------------------------------------\\
    {                Signature - To prove its mine, lol.                      ||
    \\------------------------------------------------------------------------//}
    
    procedure Signature;
    begin
     Writeln('  _______              __ __ __');
     Writeln(' / _____/__ __  _____ |__|  |__| ___  ____');
     Writeln(' \___  \|  |  \/     \|  |  |  |/ _ \/    \');
     Writeln(' /      \  |  /  Y Y  \  |  |  ( <_> )  |  \');
     Writeln('/_____  /____/|__|_|  /__|__|__|\___/|__|  /');
     Writeln('      \/            \/                   \/');
     Writeln('Scripts Brings You:');
     Writeln('                 SumPowerMiner');
    end;
    
    //------------------------------------------------------------------------\\
    {             ProgressReport - Shows what the script has done             ||
    \\------------------------------------------------------------------------//}
    
    procedure ProgressReport;//Made by Fakawi, i think, edited by me
    var
      PActive: string;
      I: Integer;
    begin
      SRLRandomsReport;
      if Players[CurrentPlayer].Active then PActive:='True' else PActive:='False';
      Writeln(' ');
      Writeln('<============= SumPowerMiner ==============>');
      Writeln('<========= -'+VersionNumber+'- Progress Report =========>');
      Writeln('/==========================================\');
      Writeln('      Worked for '+ TimeRunning);
      Writeln('      Mined ' + IntToStr(OresMined) + ' ores.');
      if(GasAvoided > 0)then Writeln('      Avoided gas ' + IntToStr(GasAvoided) + ' times.');
      Writeln('\==========================================/');
      Writeln('    Name       : '+Players[CurrentPlayer].Name);
      Writeln('    Mining Lvl : '+IntToStr(Players[CurrentPlayer].Level[15]));
      Writeln('    Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' minutes.');
      Writeln('    Loads done : '+IntToStr(Players[CurrentPlayer].Integer1));
      Writeln('    Active     : '+PActive);
      Writeln('    Location   : '+Players[CurrentPlayer].Loc);
      Writeln('\\----------------------------------------//');
       for I := 0 to HowManyPlayers-1 do
        begin
          if(Players[I].Active = True)then PActive := 'True' else PActive := 'False';
          Writeln(IntToStr(I) + ' : ' + Players[I].Name + ' = '+ PActive +
          ' , Loads: ' + IntToStr(Players[I].Integer1) +
          ', Lvl: ' + IntToStr(Players[I].Level[15]) +
          ', Loc: ' + Players[I].Loc);
        end
      Writeln('<==========================================>');
     end;
    
    //------------------------------------------------------------------------\\
    {                KeepUpStats - Updates the statistics.                    ||
    \\------------------------------------------------------------------------//}
    
    procedure KeepUpStats;
    begin
      OresMined := OresMined + CountItemBmpMaskTol(bmpOreMask, 5, 5);
      OresMined := OresMined + CountItemBmpMaskTol(bmpClayMask, 5, 5);
      LoadsDone := LoadsDone + 1;
      TotalLoadsDone := TotalLoadsDone + 1;
      Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + 1;
      ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpOreMask, 5, 5);
      ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpClayMask, 5, 5);
      ReportVars[1] := ReportVars[1] + 1;
    end;
    
    //------------------------------------------------------------------------\\
    {                LoadImages - Loads images in memory.                     ||
    \\------------------------------------------------------------------------//}
    
    procedure LoadImages;
    begin
      bmpOreMask := BitmapFromString(9, 8, 'z78DA333040076E6080C9C60' +
           'F064A17F17A71E9C2AFD70D03E09725DE4CF2DC0F00DCD05C59');
      bmpClayMask := BitmapFromString(9, 6, 'z78DA33302016B88101F' +
           '12A4905B86CC1AF9E3CB7E1329F787F218B03004FC54795');
    end;
    
    //------------------------------------------------------------------------\\
    {            DebugMe - Shows info of what the script is doing.            ||
    \\------------------------------------------------------------------------//}
    
    procedure DebugMe(Info: string);
    begin
      case(LowerCase(DebugStyle))of
        'write'   : Writeln(Info);
        'status'  : Status(Info);
        'disguise': DisguiseScar(Info);
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {              PlayerLost - Deactivates player if needed.                 ||
    \\------------------------------------------------------------------------//}
    
    procedure PlayerLost(Info: string);
    begin
      Writeln(Info);
      PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
      Logout;
    end;
    
    //------------------------------------------------------------------------\\
    {       MouseAntiBan - Moves mouse human-like (Anti-ban). By Yakman       ||
    \\------------------------------------------------------------------------//}
    
    procedure MouseAntiBan;
    begin
      if not(LoggedIn)then Exit;
      case Random(6) of
        0 : IdleTime(1000 + Random(350),500,1.0);
        1 : IdleTime(1000 + Random(350),1000,1.0);
        2 : IdleTime(1000 + Random(350),750,0.5);
        3 : SleepAndMoveMouse(2500 + Random(2500));
        4 : SleepAndMoveMouse(1500 + Random(1500));
        5 : SleepAndMoveMouse(500 + Random(500));
      end
    end;
    
    //------------------------------------------------------------------------\\
    {                  MyAntiBan - Anti-Ban procedure by Yakman.              ||
    \\------------------------------------------------------------------------//}
    
    procedure MyAntiBan;//From Yakman
    var
      DItem, DBanMe, AntiBanRatio: Integer;
    begin
      if not(LoggedIn)then
        Exit;
      if not(UseAntiBan)then
        Exit;
      AntiBanRatio := 25 + (25 * AntiBanAmount);
      DBanMe := Random(AntiBanRatio);
      case DBanMe of
        0 : MMouse(Random(MSX2), Random(MSY2),0,0);
        1 : RandomRClickEvery(2 + Random(13));
        2 : HoverSkill('mining', False);
        3 : HoverSkill('smithing', False);
        4 : RotateEvery(20+random(10));
        5 : LeaveScreenEvery(5+random(5));
        6 : HoverEvery(15+random(5),'random');
        7 : HoverEvery(15+random(5),players[currentplayer].skill);
        8 : MouseAntiBan;
        9 : begin
              DItem:=1+random(14);
              if(ExistsItem(DItem))then
                DragItem(DItem,15+random(10));
            end
        10 : begin
               GameTab(1+random(12));
               wait(1500+random(500));
               GameTab(4);
             end;
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {                    DropOres - Drops all the ores.                       ||
    \\------------------------------------------------------------------------//}
    
    procedure DropOres;
    var
      i, Dx, Dy: Integer;
      RDir: string;
    begin
      if(Lowercase(OresDropDir) = 'random')then
      begin
        case Random(4) of
          0 : RDir := 'S';
          1 : RDir := 'N';
          2 : RDir := 'E';
          3 : RDir := 'W';
        end;
      end
      else
        RDir := OresDropDir;
      if not(RDir = 'None')then
        RunAwayDirection(RDir);
      Flag;
      Dx := x;
      Dy := y;
      GameTab(4);
      while(FindBitmapMaskTolerance(bmpOreMask, x, y, MIX1, MIY1, MIX2, MIY2, 10, 5))or
           (FindBitmapMaskTolerance(bmpClayMask, x, y, MIX1, MIY1, MIX2, MIY2, 10, 5))and
           (i < 5)do
      begin
        ClickAllItemsBmpMaskTolWait('Drop', bmpOreMask, 5, 5, 300);
        ClickAllItemsBmpMaskTolWait('Drop', bmpClayMask, 5, 5, 300);
        if(FindColor(x, y, 16777215, MIX1, MIY1, MIX2, MIY2))then
          Mouse(x, y, 5, 5, false);
        ChooseOption(x, y, 'cel');
        i := i + 1;
      end;
      if(FindColor(x, y, 16777215, MIX1, MIY1, MIX2, MIY2))then
        Mouse(x, y, 5, 5, false);
      ChooseOption(x, y, 'cel');
      x := Dx;
      y := Dy;
      if not(RDir = 'None')then
      RunBack;
      Flag;
      GameTab(4);
    end;
    
    //------------------------------------------------------------------------\\
    {               SetOreColor - Sets the desired OreColors                  ||
    \\------------------------------------------------------------------------//}
    
    procedure SetOreColor;
    begin
      case LowerCase(Players[CurrentPlayer].String1) of
        'copper'  :  OreColor1 := CopperColor;
        'tin'     :  OreColor1 := TinColor;
        'clay'    :  OreColor1 := ClayColor;
        'iron'    :  OreColor1 := IronColor;
        'silver'  :  OreColor1 := SilverColor;
        'coal'    :  OreColor1 := CoalColor;
        'gold'    :  OreColor1 := GoldColor;
        'mithril' :  OreColor1 := MithrilColor;
        'adamant' :  OreColor1 := AdamantColor;
        'runite'  :  OreColor1 := RuniteColor;
      end;
      case Lowercase(Players[CurrentPlayer].String2) of
        'copper'  :  OreColor2 := CopperColor;
        'tin'     :  OreColor2 := TinColor;
        'clay'    :  OreColor2 := ClayColor;
        'iron'    :  OreColor2 := IronColor;
        'silver'  :  OreColor2 := SilverColor;
        'coal'    :  OreColor2 := CoalColor;
        'gold'    :  OreColor2 := GoldColor;
        'mithril' :  OreColor2 := MithrilColor;
        'adamant' :  OreColor2 := AdamantColor;
        'runite'  :  OreColor2 := RuniteColor;
       end;
       case Lowercase(Players[CurrentPlayer].String3) of
        'copper'  :  OreColor3 := CopperColor;
        'tin'     :  OreColor3 := TinColor;
        'clay'    :  OreColor3 := ClayColor;
        'iron'    :  OreColor3 := IronColor;
        'silver'  :  OreColor3 := SilverColor;
        'coal'    :  OreColor3 := CoalColor;
        'gold'    :  OreColor3 := GoldColor;
        'mithril' :  OreColor3 := MithrilColor;
        'adamant' :  OreColor3 := AdamantColor;
        'runite'  :  OreColor3 := RuniteColor;
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {  SumFindPickHeadColor - Advanced FindPickHeadColor, finds the paxe      ||
    \\------------------------------------------------------------------------//}
    
    function SumFindPickHeadColor: Boolean;
    var
      InvPAxe, WieldPAxe, Ix, Iy, Wx, Wy: integer;
      dtmPaxes: Array[1..6] of integer;
    begin
      dtmPaxes[1] := DTMFromString('78DA637463646008664001068A0C0C5C401A2' +
           '8C3F01F0818C381AC40543536FE11703520C0E80B6479A0AAF149' +
           '2D405103000A07084F');  //Rune
      dtmPaxes[2] := DTMFromString('78DA631463646008634001068A0C0C5C401A2' +
           '8C3F01F08183580AC405435561E56703520C028076479A0AAF188' +
           'F142510300D923076A');  //Addy
      dtmPaxes[3] := DTMFromString('78DA637CCEC0C010C680020C141918B880342' +
           '310FF0702C69F404620AA1A73F300B81A10607C0F243C50D5B8BA' +
           'A7A3A8010086BD09E1');  //Mith
      dtmPaxes[4] := DTMFromString('78DA63DCC9C0C010CC80020C141918B880342' +
           '310FF0702C653404620AA9ACCA424B81A10603C00243C50D5B4D6' +
           'D4A0A801007D560A4B');  //Steel
      dtmPaxes[5] := DTMFromString('78DA63EC62606008654001068A0C0C5C409A1' +
           '188FF0301E36C202310558DBB93135C0D08304E04121EA86AA242' +
           '4250D400003C4908E3');  //Iron
      dtmPaxes[6] := DTMFromString('78DA638C62606008634001068A0C0C5C409A1' +
           '188FF0301630E901188AAC6D1480EAE0604189380843BAA1A3B2D' +
           '0614350000CD0781');    //Bronze
      GameTab(4);
      for InvPAxe := 1 to 7 do
      begin
        if(InvPAxe = 7)then Break;
        if(FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
         Break;
      end;
      GameTab(5);
      for WieldPAxe := 1 to 7 do
      begin
        if(WieldPAxe = 7)then Break;
        if(FindDtm(dtmPaxes[WieldPAxe], Wx, Wy, MIX1, MIY1, MIX2, MIY2))then
          Break;
      end;
    
      if(InvPAxe = 7) and (WieldPAxe = 7)then begin Result := false; Exit; end;
      if((InvPAxe-WieldPAxe) < 0)then EquipPick := false else EquipPick := true;
      Result := true;
      if(EquipPick)then
      begin
        GameTab(5);
        hc1 := GetColor(585, 295);
        hc2 := GetColor(597, 297);
        hc3 := GetColor(594, 296);
        hc4 := GetColor(588, 295);
        hc5 := GetColor(582, 294);
      end else
      begin
        GameTab(4);
        if(Ix > 592) and (Iy > 238)then Drag(Ix, Iy, 5, 5, 579, 227, 5, 5, true);
        FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2);
        hc1 := GetColor(587, 216);
        hc2 := GetColor(587, 219);
        hc3 := GetColor(592, 222);
        hc4 := GetColor(584, 216);
        hc5 := GetColor(577, 219);
      end;
      for WieldPAxe := 1 to 6 do
        FreeDtm(dtmPaxes[WieldPAxe]);
      WriteLn('Pick head colors... ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
          IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
    end;
    
    //------------------------------------------------------------------------\\
    {        FindFastRandoms - Finds basic randoms fast. By WT-Fakawi.        ||
    \\------------------------------------------------------------------------//}
    
    function FindFastRandoms: Boolean;    // By WT-Fakawi.
    var
      i: Integer;
    begin
      for I := 1 to 11 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;
    
           8: begin
                if not MiningInDwarvenMine then
                begin
                  if InBlack then
                  begin
                    Result := True;
                    Players[CurrentPlayer].loc := 'InBlack';
                    Logout;
                    Exit;
                  end;
                end;
               end;
    
           9 : if RC then
                 Result := True;
    
           10 : if FindFight then
                  begin
                    Result := True;
                    RunTo(RunDir, RunFar);
                  end;
    
           11: if FindTalk then
                 Result := True;
        end;
        Wait(1);
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {            HandleGas - Handles the player when there is gas.            ||
    \\------------------------------------------------------------------------//}
    
    procedure HandleGas;
    var
      TempMouseSpeed, GasTime: Integer;
    begin
      Writeln('Gas found!');
      TempMouseSpeed := MouseSpeed;
      MouseSpeed := 5;
      MouseFindNoFlag(MMCX, MMCY, 1, 1);
      MarkTime(GasTime);
      MouseSpeed := TempMouseSpeed;
      while(TimeFromMark(GasTime) < 35000)do
        if(Random(20) > 15)then
          IdleTime(500, 500, 0.4)
        else
          Wait(1000);
      MarkTime(MineMax);
      GasAvoided := GasAvoided + 1;
      ReportVars[3] := ReportVars[3] + 1;
    end;
    
    //------------------------------------------------------------------------\\
    {              FindNewOre - Finds new ores in the inventory.              ||
    \\------------------------------------------------------------------------//}
    
    function FindNewOre(InvSpot: Integer): Boolean;
    begin
      Result := ExistsItem(InvSpot);
    end;
    
    //------------------------------------------------------------------------\\
    {      FindColorsArray - Finds specified rock colors. Thnx to Lorax.      ||
    \\------------------------------------------------------------------------//}
    
    function FindColorsArray(Color, Tolerance, Step, MaxTol: Integer): TPointArray;
    var
      Count, tx, ty: Integer;
    begin
      while (not FindColorTolerance(tx, ty, Color, MSX1, MSY1, MSX2, MSY2, Tolerance + Count * Step))and
            (Count * Step <= MaxTol) do
        Count := Count + 1;
      FindColorsSpiralTolerance(MSCX, MSCY, Result, Color, MSX1, MSY1, MSX2, MSY2, Tolerance + Count * Step);
    end;
    
    //------------------------------------------------------------------------\\
    { getArrayFromBox - Splits above results in groups of size. Thnx to Lorax ||
    \\------------------------------------------------------------------------//}
    
    function getArrayFromBox(arColor: TPointArray; Width, Height, MinCount, Dist: Integer): TPointArray;
    var
      Count, Count2, Count3, Count4, TempArrayLength: Integer;
      Average : TPoint;
    begin
      Count2 := 1;
      TempArraylength := GetArrayLength(Result);
      SetArrayLength(Result, Count2);
      for Count := 1 to GetArrayLength(arColor) - 1 do
      begin
        if(arColor[Count].x < arColor[Count - 1].x + Width)and
          (arColor[Count].y < arColor[Count - 1].y + Height)and
          (arColor[Count].x > arColor[Count - 1].x - Width)and
          (arColor[Count].y > arColor[Count - 1].y - Height)and
          (Count < GetArrayLength(arColor)-1)then
        else
        begin
          Average.x := 0;
          Average.y := 0;
          for Count3 := Count4 to Count - 1 do
          begin
            Average.x := Average.x + arColor[Count3].x;
            Average.y := Average.y + arColor[Count3].y;
          end;
    
          if((Count3-Count4) > MinCount)then
          begin
            if(Distance(Average.x, Average.y, MSCX, MSCY) > Dist)then
            begin
              Average.x := Average.x / (Count3 - Count4);
              Average.y := Average.y / (Count3 - Count4);
              SetArrayLength(Result, Count2);
              Result[Count2 - 1].x := Average.x;
              Result[Count2 - 1].y := Average.y;
              Count2 := Count2 + 1;
            end;
          end;
        end;
        if(GetArrayLength(Result)>TempArrayLength)then
        begin
          TempArrayLength := GetArrayLength(Result);
          Count4 := Count;
        end;
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {          UpdateColor - Updates the coords of the rock. By Lorax.        ||
    \\------------------------------------------------------------------------//}
    
    function UpdateColor(var ax, ay: Integer; tColor: Integer): boolean;
    var
      Checker: Integer;
    begin
      Checker := GetSystemTime;
      while(FindColorSpiralTolerance(ax, ay, tColor, ax - 20, ay - 20, ax + 20, ay + 20, 10))and
           (TimeFromMark(Checker) < 10000)and
           (FlagPresent)do
        Wait(16);
      for Checker := 0 to 62 do
      begin
          FindColorSpiralTolerance(ax, ay, tColor, ax - 10, ay - 10, ax + 10, ay + 10, 10);
          Wait(16);
      end;
    
      Result := FindColorSpiralTolerance(ax, ay, tColor, ax - 10, ay - 10, ax + 10, ay + 10, 10);
    end;
    
    //------------------------------------------------------------------------\\
    {                RockGone - Results true if the rock is gone.             ||
    \\------------------------------------------------------------------------//}
    
    function RockGone(Rx, Ry, Squarex, Squarey, Color, Tol: Integer): Boolean;
    begin
      if not(UpdateColor(Rx, Ry, Color))then
      begin
        Result := True;
        Exit;
      end;
      Result := not(FindColorSpiralTolerance(x, y, Color, Rx - Squarex, Ry - Squarex, Rx + Squarex, Ry + Squarey, Tol));
    end;
    
    //------------------------------------------------------------------------\\
    {          WaitWhileWorking - Waits while mining. Thnx to Lorax.          ||
    \\------------------------------------------------------------------------//}
    
    procedure WaitWhileWorking(Ax, Ay, InvSpot, MineMark: Integer);
    begin
      while (LoggedIn) do
      begin
        if(NoPick)then
        begin
          if not(SumFindPickHeadColor)then
          begin
            PlayerLost('Player lost, no more paxes');
            NoPick := False;
            Exit;
          end;
        NoPick := False;
        end;
        if not(FindPick)then
        begin
          MarkTime(MineMax);
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          DebugMe('Something is wrong with our pickaxe.');
          Exit;
        end;
        if not(MineNewRocks)then
          if(RockGone(Ax, Ay, 10, 10, OreColor, TheOreTolerance))then
            Exit;
        Wait(10);
        if(GasCheck(Ax, Ay))then
        begin
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          HandleGas;
          DebugMe('We got gas while waiting');
          Exit;
        end;
        Wait(10);
        if(FindFastRandoms)then
        begin
          MarkTime(MineMax);
          DebugMe('Found a random while waiting');
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          Exit;
        end;
        Wait(50);
        if(TimeFromMark(MineMark) > MaxSecToWait * 1000)then
        begin
          DebugMe('Time ran out while waiting');
          Exit;
        end;
        if(FindFight)then
        begin
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          RunTo(RunDir, True);
          DebugMe('We got into a fight');
          Exit;
        end;
        Wait(10);
        if(FindNewOre(InvSpot))then
          Exit;
        if(MMouseWhenWaiting)then
          if(Random(20)+1 > 15)then
            IdleTime(200 + Random(500), 500, 0.4);
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {              FindRock - Finds closest rocks on the screen.              ||
    \\------------------------------------------------------------------------//}
    
    function FindRock: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 3 do
      begin
        if(RandomlyChooseRock)then
        begin
          case(Random(2) + 1)of
            1 : OreColor := OreColor1;
            2 : OreColor := OreColor2;
            3 : OreColor := OreColor3;
          end;
        end
        else
          case I of
            1 : OreColor := OreColor1;
            2 : OreColor := OreColor2;
            3 : OreColor := OreColor3;
          end;
        arOreColor := FindColorsArray(OreColor, 4, 2, TheOreTolerance);
        arOreColorResults := getArrayFromBox(arOreColor, 20, 20, TheMinCount, 20);
        Result := (GetArrayLength(arOreColorResults) > 0);
        if(Result)then
          Exit;
      end
      DebugMe('Rock NOT found...');
    end;
    
    //------------------------------------------------------------------------\\
    {   PowerMine - Main PowerMiner function. Combinds all mine procedures.   ||
    \\------------------------------------------------------------------------//}
    
    function PowerMine: Boolean;
    var
      Mx, My, TempColor, InvSpot, MaxWait : Integer;
      FoundRock: Boolean;
    begin
      if not(LoggedIn)then Exit;
      if(FindRock)then
      begin
        GameTab(4);
        for InvSpot := 1 to 28 do
          if not(ExistsItem(InvSpot))then
            Break;
        MarkTime(MaxWait);
        for I := 0 to GetArrayLength(arOreColorResults) - 1 do
        begin
          MMouse(arOreColorResults[I].x, arOreColorResults[I].y, 0, 0);
          if(IsUpText('Mine'))then
          begin
            FoundRock := True;
            Break;
          end;
          Wait(300);
          if(TimeFromMark(MaxWait) > 2000)then
            Exit;
        end;
        if not(FoundRock)then
          Exit;
        Result := True;
        GetMousePos(Mx, My);
        TempColor := GetColor(Mx, My);
        if not(IsUpText('Mine'))then
          Exit;
        if not(GasCheck(Mx, My - 20))then
        begin
          if Random (20) < 19 Then Mouse(Mx, My, 0, 0, True)
          else
          begin
            Mouse(Mx, My, 0, 0, False);
            ChooseOption(x, y, 'Mine');
          end;
        end
        else
        begin
          HandleGas;
          Exit;
        end;
        MarkTime(MineMax);
        MarkTime(MaxWait);
        WaitWhileWorking(Mx, My, InvSpot, MineMax);
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {                 PlayersTime - Time to switch players ?                  ||
    \\------------------------------------------------------------------------//}
    
    procedure PlayersTime;
    begin
      if not(LoggedIn)then
        Exit;
      if(LoadsDone >= TheLoads)then
      begin
        Writeln('Logging out player, loads done.');
        Players[CurrentPlayer].Loc := 'Done Mining';
        Logout;
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {                     WriteNews - Downloads the news                      ||
    \\------------------------------------------------------------------------//}
    
    procedure WriteNews(HowMany: Integer);
    var
      Timer, i, x, y: Integer;
      News :array of string;
      New, TheNews: string;
    begin
      ChangeReportWidth(280);
      SetArrayLength(News, HowMany+1);
      Status('Downloading news ...');
      Wait(1);
      TheNews := Getpage('http://sumilionscripts.freehostia.com/SPMNews.txt');
      x := 0;
      AddToReport('//============================\\');
      AddToReport('| >> SumPowerMiner News (v' + VersionNumber + ')');
      AddToReport('|');
      y := 1;
      for i := 1 to HowMany do
      begin
        MarkTime(Timer);
        repeat
          x := x + 1;
          new := copy(TheNews, x, x+1);
          if(new = '|')then
          begin
            i := HowMany;
            Break;
          end;
        until(copy(new, 1, 1) = ',')or(TimeFromMark(Timer) >= 2000);
      news[i]:= copy(TheNews, y, (x-y));
      y := x + 1;
      AddToReport('| :: '+news[i]);
      Wait(1);
      end;
      AddToReport('|');
      AddToReport('\\============================//');
    end;
    
    //------------------------------------------------------------------------\\
    {             CheckVersion - Gets latest version if needed                ||
    \\------------------------------------------------------------------------//}
    
    procedure CheckVersion;
    var
      TheFileNumber: Integer;
      CurrentVersion: Extended;
      TheScriptString, ScriptName, CurrentVersionString: string;
    begin
      CurrentVersionString := GetPage('http://sumilionscripts.freehostia.com/SPMVersion.txt');
      CurrentVersion := StrToFloat(CurrentVersionString);
      if(CurrentVersion > StrToFloat(VersionNumber))then
      begin
        Writeln('Your current version is not the latest.');
        Writeln('Downloading new version, please wait...');
        TheScriptString := GetPage('http://sumilionscripts.freehostia.com/SPM.scar');
        ScriptName := 'SPM v' + CurrentVersionString + '.scar';
        TheFileNumber := ReWriteFile(ScriptPath + ScriptName, false);
        WriteFileString(TheFileNumber, TheScriptString);
        Writeln('Updated script can be found at :');
        Writeln(ScriptPath + ScriptName);
        TerminateScript;
      end;
    end;
    
    //------------------------------------------------------------------------\\
    {          SetupClient - Makes SCAR ready to handle the script.           ||
    \\------------------------------------------------------------------------//}
    
    procedure SetupClient;
    begin
      SetupSRL;
      SetupSRLMining;
      ScriptID := '12';
      LoadImages;
      CheckHPFirst := CheckForHealth;
      if(MineNewRocks)then
        TheMinCount := 2
      else
        TheMinCount := 0;
      RCMaster := PartOfRCName;
      Cleardebug;
      Signature;
      CheckVersion;
      ClearReport;
      WriteNews(10);
      DisguiseScar('RuneScape - the massive online adventure game by Jagex Ltd');
      SafeInitForm;
      SafeInitExtraForm;
      SumLoadSettings;
      SafeShowFormModal;
      SumSaveSettings;
      if(UsePlayerForm)then
        StartPlayers(False, 'string1 string2 string3')
      else
        DeclarePlayers;
      CurrentPlayer := StartPlayer;
      ActivateClient;
      Wait(500+Random(1000));
    end;
    
    //------------------------------------------------------------------------\\
    {          SetupUser - Makes Character ready to handle the script.        ||
    \\------------------------------------------------------------------------//}
    
    procedure SetupUser;
     begin
       LoginPlayer;
       SetOreColor;
       TheLoads := LoadsPerPlayer + Random(RandomLoads);
       LoadsDone := 0;
       MakeCompass('N');
       HighestAngle;
       if not SumFindPickHeadColor then
        begin
          Writeln('No Paxe found... logging out.');
          Logout;
          NextPlayer(false);
        end;
       Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
       Players[CurrentPlayer].Loc := 'Mining';
       SetRun(true);
       MarkTime(MineMax);
     end;
    
    //------------------------------------------------------------------------\\
    {                    Main line - Combinds all magic =].                   ||
    \\------------------------------------------------------------------------//}
    
    begin
      SetupClient;
      repeat;
        SetupUser;
        repeat;
          MarkTime(MaxMin);
          while(InvCount < 28)and
               (TimeFromMark(MaxMin) < MaxMinPerLoad * 1000 * 60)and
               (LoggedIn)do
          begin
            if(UseTimeOut)then
              if(TimeFromMark(MineMax) > 300000)then
                Break;
            Wait(20);
            PowerMine;
            Wait(20);
            if(FindNormalRandoms)then
              MarkTime(MineMax);
            MyAntiBan;
            Wait(20);
          end;
          if(UseTimeOut)then
            if(TimeFromMark(MineMax) > 300000)then
              PlayerLost('Player lost, timed out.');
          if(LoggedIn)then
          begin
            KeepUpStats;
            DropOres;
          end;
          ProgressReport;
          PlayerStatus := LoggedIn;
          PlayersTime;
        until not(LoggedIn);
        NextPlayer(PlayerStatus);
      until not(Players[CurrentPlayer].Active);
    end.

  4. #4
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    try this if it doesn't
    work then i will have to fix it at home ok
    SCAR Code:
    program SPMReborn;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\mining.scar}

    //==============================[Setup]===================================\\
    const
      VersionNumber = '0.71';//Current version number.
      StartPlayer   = 0;//Forgot to add it in the form, doh!
     
    //==============================[Colors]==================================\\
    //If your mining new rocks you might need to set your own color.
    const
      CopperColor       = 3824768;
      TinColor          = 7829375;
      ClayColor         = 4553880;
      IronColor         = 2569045;
      SilverColor       = 12434885;
      CoalColor         = 2834753;
      GoldColor         = 1881051;
      MithrilColor      = 7359564;
      AdamantColor      = 6322272;
      RuniteColor       = 0;

    //==========================[Player Setup]================================\\
    procedure DeclarePlayers;
    begin
         HowManyPlayers := 6;//MAKE SURE THIS ONE IS CORRECT!

         CurrentPlayer := StartPlayer;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name    :='Username';
         Players[0].Pass    :='Password';
         Players[0].Nick    :='sern';  // 3-4 letters from your name, NO CAPITALS (that includes the first character)
         Players[0].String1 :='Iron';  //Will be mined most (unless RandomlyChooseRock is set)
         Players[0].String2 :='Copper';//Will be mined less, unless ^
         Players[0].String3 :='Tin';   //Will be mined even less, unless ^
         Players[0].Active:= True;

         Players[1].Name    :='Username';
         Players[1].Pass    :='Password';
         Players[1].Nick    :='sern';
         Players[1].String1 :='Coal';
         Players[1].String2 :='Gold';
         Players[1].String3 :='Iron';
         Players[1].Active:= True;

         Players[2].Name    :='Username';
         Players[2].Pass    :='Password';
         Players[2].Nick    :='sern';
         Players[2].String1 :='Copper';
         Players[2].String2 :='Tin';
         Players[2].String3 :='Iron';
         Players[2].Active:= True;

         Players[3].Name    :='Username';
         Players[3].Pass    :='Password';
         Players[3].Nick    :='sern';
         Players[3].String1 :='Addy';
         Players[3].String2 :='Mith';
         Players[3].String3 :='Gold';
         Players[3].Active:= True;

         Players[4].Name    :='Username';
         Players[4].Pass    :='Password';
         Players[4].Nick    :='sern';
         Players[4].String1 :='Coal';
         Players[4].String2 :='Copper';
         Players[4].String3 :='Tin';
         Players[4].Active:= True;

         Players[5].Name    :='Username';
         Players[5].Pass    :='Password';
         Players[5].Nick    :='sern';
         Players[5].String1 :='Iron';
         Players[5].String2 :='Addy';
         Players[5].String3 :='Coal';
         Players[5].Active:= True;
    end;

    //=========================[DONT TOUCH BELOW]=============================\\
    var
      arOreColor, arOreColorResults: TPointArray;
      I, bmpOreMask, bmpClayMask, OresMined, LoadsDone,
      TotalLoadsDone, GasAvoided, MineMax, TheLoads, MaxMin,
      TheMinCount, LoadsPerPlayer, RandomLoads, MaxSecToWait,
      MaxMinPerLoad, TheOreTolerance, AntiBanAmount: Integer;
      PlayerStatus, MiningInDwarvenMine, MineNewRocks, UseTimeOut,
      CheckForHealth, RunFar, RandomlyChooseRock, MMouseWhenWaiting,
      UseAntiBan, UsePlayerForm : Boolean;
      OresDropDir, RunDir, DebugStyle, PartOfRCName: string;
     
    var
      SumMainForm : TForm;
      lUsePlayerForm : TLabel;
      lUseAntiBan : TLabel;
      lMaxMinPerLoad : TLabel;
      lMaxSecToWait : TLabel;
      lLoadsPerPlayer : TLabel;
      cbUsePlayerForm : TCheckBox;
      cbUseAntiBan : TCheckBox;
      eMaxMinPerLoad : TEdit;
      eMaxSecToWait : TEdit;
      eLoadsPerPlayer : TEdit;
      bStart : TButton;
      bPlayerForm : TButton;
      bExtraSettings : TButton;
      SumExtraForm : TForm;
      lDwarfMines : TLabel;
      lNewRocks : TLabel;
      lUseTimeOut : TLabel;
      lCheckHealth : TLabel;
      lRunDir : TLabel;
      lRunFar : TLabel;
      lOreTol : TLabel;
      lRandomChooseRock : TLabel;
      lMMouseWaiting : TLabel;
      lAntiBanAmount : TLabel;
      lOreDropDir : TLabel;
      lRandomLoads : TLabel;
      lPartOfRCName : TLabel;
      lDebugStyle : TLabel;
      cbDwarfMines : TCheckBox;
      cbNewRocks : TCheckBox;
      cbUseTimeOut : TCheckBox;
      cbCheckHealth : TCheckBox;
      cbRandomChooseRock : TCheckBox;
      cbMMouseWaiting : TCheckBox;
      cbRunFar : TCheckBox;
      cbbRunDir : TComboBox;
      cbbDropDir : TComboBox;
      cbbDebugStyle : TComboBox;
      cbbAntiBanAmount : TComboBox;
      eOreTol : TEdit;
      eRandomLoads : TEdit;
      ePartOfRCName : TEdit;
      bSaveSettings : TButton;
     
    procedure ButtonClick(Sender: TObject); forward;

    procedure SumLoadSettings;
    begin
      if(LoadSetting('SPMForm', 'UseTimeOut') = '')then
        SaveSetting('SPMForm', 'UseTimeOut', 'True');
      if(LoadSetting('SPMForm', 'RunFar') = '')then
        SaveSetting('SPMForm', 'RunFar', 'True');
      if(LoadSetting('SPMForm', 'MMouseWaiting') = '')then
        SaveSetting('SPMForm', 'MMouseWaiting', 'True');
      if(LoadSetting('SPMForm', 'UseAntiBan') = '')then
        SaveSetting('SPMForm', 'UseAntiBan', 'True');
      if(LoadSetting('SPMForm', 'UsePlayerForm') = '')then
        SaveSetting('SPMForm', 'UsePlayerForm', 'True');
      if(LoadSetting('SPMForm', 'LoadsPerPlayer') = '')then
        SaveSetting('SPMForm', 'LoadsPerPlayer', '3');
      if(LoadSetting('SPMForm', 'MaxMin') = '')then
        SaveSetting('SPMForm', 'MaxMin', '10');
      if(LoadSetting('SPMForm', 'MaxSec') = '')then
        SaveSetting('SPMForm', 'MaxSec', '10');
      if(LoadSetting('SPMForm', 'OreTol') = '')then
        SaveSetting('SPMForm', 'OreTol', '5');
      if(LoadSetting('SPMForm', 'RandomLoads') = '')then
        SaveSetting('SPMForm', 'RandomLoads', '2');
      if(LoadSetting('SPMForm', 'PartOfRCName') = '')then
        SaveSetting('SPMForm', 'PartOfRCName', 'umil');
      if(LoadSetting('SPMForm', 'RunDir') = '')then
        SaveSetting('SPMForm', 'RunDir', 'N');
      if(LoadSetting('SPMForm', 'DropDir') = '')then
        SaveSetting('SPMForm', 'DropDir', 'None');
      if(LoadSetting('SPMForm', 'DebugStyle') = '')then
        SaveSetting('SPMForm', 'DebugStyle', 'Write');
      if(LoadSetting('SPMForm', 'AntiBanAmount') = '')then
        SaveSetting('SPMForm', 'AntiBanAmount', '3');
      eLoadsPerPlayer.Text := LoadSetting('SPMForm', 'LoadsPerPlayer');
      eMaxMinPerLoad.Text := LoadSetting('SPMForm', 'MaxMin');
      eMaxSecToWait.Text := LoadSetting('SPMForm', 'MaxSec');
      cbUseAntiBan.State := StrToBool(LoadSetting('SPMForm', 'UseAntiBan'));
      cbUsePlayerForm.State := StrToBool(LoadSetting('SPMForm', 'UsePlayerForm'));
      cbDwarfMines.State := StrToBool(LoadSetting('SPMForm', 'DwarvenMines'));
      cbNewRocks.State := StrToBool(LoadSetting('SPMForm', 'NewRocks'));
      cbUseTimeOut.State := StrToBool(LoadSetting('SPMForm', 'UseTimeOut'));
      cbCheckHealth.State := StrToBool(LoadSetting('SPMForm', 'CheckHealth'));
      cbRandomChooseRock.State := StrToBool(LoadSetting('SPMForm', 'RandomRock'));
      cbMMouseWaiting.State := StrToBool(LoadSetting('SPMForm', 'MMouseWaiting'));
      cbRunFar.State := StrToBool(LoadSetting('SPMForm', 'RunFar'));
      cbbRunDir.Text := LoadSetting('SPMForm', 'RunDir');
      cbbDropDir.Text := LoadSetting('SPMForm', 'DropDir');
      cbbDebugStyle.Text := LoadSetting('SPMForm', 'DebugStyle');
      cbbAntiBanAmount.Text := LoadSetting('SPMForm', 'AntiBanAmount');
      eOreTol.Text := LoadSetting('SPMForm', 'OreTol');
      eRandomLoads.Text := LoadSetting('SPMForm', 'RandomLoads');
      ePartOfRCName.Text := LoadSetting('SPMForm', 'PartOfRCName');
    end;

    procedure SumSaveSettings;
    begin
      SaveSetting('SPMForm', 'LoadsPerPlayer', eLoadsPerPlayer.Text);
      SaveSetting('SPMForm', 'MaxMin', eMaxMinPerLoad.Text);
      SaveSetting('SPMForm', 'MaxSec', eMaxSecToWait.Text);
      SaveSetting('SPMForm', 'UseAntiBan', BoolToStr(cbUseAntiBan.State));
      SaveSetting('SPMForm', 'UsePlayerForm', BoolToStr(cbUsePlayerForm.State));
      SaveSetting('SPMForm', 'DwarvenMines', BoolToStr(cbDwarfMines.State));
      SaveSetting('SPMForm', 'NewRocks', BoolToStr(cbNewRocks.State));
      SaveSetting('SPMForm', 'UseTimeOut', BoolToStr(cbUseTimeOut.State));
      SaveSetting('SPMForm', 'CheckHealth', BoolToStr(cbCheckHealth.State));
      SaveSetting('SPMForm', 'RandomRock', BoolToStr(cbRandomChooseRock.State));
      SaveSetting('SPMForm', 'MMouseWaiting', BoolToStr(cbMMouseWaiting.State));
      SaveSetting('SPMForm', 'RunFar', BoolToStr(cbRunFar.State));
      SaveSetting('SPMForm', 'RunDir', cbbRunDir.Text);
      SaveSetting('SPMForm', 'DropDir', cbbDropDir.Text);
      SaveSetting('SPMForm', 'DebugStyle', cbbDebugStyle.Text);
      SaveSetting('SPMForm', 'AntiBanAmount', cbbAntiBanAmount.Text);
      SaveSetting('SPMForm', 'OreTol', eOreTol.Text);
      SaveSetting('SPMForm', 'RandomLoads', eRandomLoads.Text);
      SaveSetting('SPMForm', 'PartOfRCName', ePartOfRCName.Text);
      LoadsPerPlayer := StrToInt(eLoadsPerPlayer.Text);
      RandomLoads := StrToInt(eRandomLoads.Text);
      MaxSecToWait := StrToInt(eMaxSecToWait.Text);
      MaxMinPerLoad := StrToInt(eMaxMinPerLoad.Text);
      TheOreTolerance := StrToInt(eOreTol.Text);
      AntiBanAmount := StrToInt(cbbAntiBanAmount.Text);
      MiningInDwarvenMine := cbDwarfMines.State;
      MineNewRocks := cbNewRocks.State;
      UseTimeOut := cbUseTimeOut.State;
      CheckForHealth := cbCheckHealth.State;
      RunFar := cbRunFar.State;
      RandomlyChooseRock := cbRandomChooseRock.State;
      MMouseWhenWaiting := cbMMouseWaiting.State;
      UseAntiBan := cbUseAntiBan.State;
      UsePlayerForm := cbUsePlayerForm.State;
      OresDropDir := cbbDropDir.Text;
      RunDir := cbbRunDir.Text;
      DebugStyle := cbbDebugStyle.Text;
      PartOfRCName := ePartOfRCName.Text;
    end;

    procedure SafeShowExtraFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowExtraFormModal', v);
    end;

    procedure SafeInitExtraForm;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('SumExtraFormProc', v);
    end;

    procedure ShowExtraFormModal;
    begin
      SumExtraForm.ShowModal;
    end;

    procedure SumExtraFormProc;
    begin
      SumExtraForm := CreateForm;
      SumExtraForm.Left := 275;
      SumExtraForm.Top := 122;
      SumExtraForm.Width := 395;
      SumExtraForm.Height := 236;
      SumExtraForm.Caption := 'SumExtraFrom - SPM Form';
      SumExtraForm.Color := $00B3A69D;
      SumExtraForm.Font.Color := clWindowText;
      SumExtraForm.Font.Height := -11;
      SumExtraForm.Font.Name := 'MS Sans Serif';
      SumExtraForm.Font.Style := [];
      SumExtraForm.Visible := False;
      SumExtraForm.PixelsPerInch := 96;
      lDwarfMines := TLabel.Create(SumExtraForm);
      lDwarfMines.Parent := SumExtraForm;
      lDwarfMines.Left := 18;
      lDwarfMines.Top := 15;
      lDwarfMines.Width := 74;
      lDwarfMines.Height := 13;
      lDwarfMines.Hint := 'Mining in the Dwarven Mines?';
      lDwarfMines.Caption := 'Dwarven Mines';
      lNewRocks := TLabel.Create(SumExtraForm);
      lNewRocks.Parent := SumExtraForm;
      lNewRocks.Left := 18;
      lNewRocks.Top := 35;
      lNewRocks.Width := 56;
      lNewRocks.Height := 13;
      lNewRocks.Hint := 'Mining the new (Rimmington) Rocks?';
      lNewRocks.Caption := 'New Rocks';
      lUseTimeOut := TLabel.Create(SumExtraForm);
      lUseTimeOut.Parent := SumExtraForm;
      lUseTimeOut.Left := 18;
      lUseTimeOut.Top := 55;
      lUseTimeOut.Width := 62;
      lUseTimeOut.Height := 13;
      lUseTimeOut.Caption := 'Use TimeOut';
      lCheckHealth := TLabel.Create(SumExtraForm);
      lCheckHealth.Parent := SumExtraForm;
      lCheckHealth.Left := 18;
      lCheckHealth.Top := 75;
      lCheckHealth.Width := 80;
      lCheckHealth.Height := 13;
      lCheckHealth.Caption := 'Check for Health';
      lRunDir := TLabel.Create(SumExtraForm);
      lRunDir.Parent := SumExtraForm;
      lRunDir.Left := 186;
      lRunDir.Top := 15;
      lRunDir.Width := 65;
      lRunDir.Height := 13;
      lRunDir.Caption := 'Run Direction';
      lRunFar := TLabel.Create(SumExtraForm);
      lRunFar.Parent := SumExtraForm;
      lRunFar.Left := 18;
      lRunFar.Top := 135;
      lRunFar.Width := 38;
      lRunFar.Height := 13;
      lRunFar.Caption := 'Run Far';
      lOreTol := TLabel.Create(SumExtraForm);
      lOreTol.Parent := SumExtraForm;
      lOreTol.Left := 185;
      lOreTol.Top := 95;
      lOreTol.Width := 90;
      lOreTol.Height := 13;
      lOreTol.Caption := 'The Ore Tolerance';
      lRandomChooseRock := TLabel.Create(SumExtraForm);
      lRandomChooseRock.Parent := SumExtraForm;
      lRandomChooseRock.Left := 18;
      lRandomChooseRock.Top := 95;
      lRandomChooseRock.Width := 86;
      lRandomChooseRock.Height := 13;
      lRandomChooseRock.Caption := 'Choose Randomly';
      lMMouseWaiting := TLabel.Create(SumExtraForm);
      lMMouseWaiting.Parent := SumExtraForm;
      lMMouseWaiting.Left := 18;
      lMMouseWaiting.Top := 115;
      lMMouseWaiting.Width := 82;
      lMMouseWaiting.Height := 13;
      lMMouseWaiting.Hint := 'Move the mouse when waiting?';
      lMMouseWaiting.Caption := 'MMouse anti-ban';
      lAntiBanAmount := TLabel.Create(SumExtraForm);
      lAntiBanAmount.Parent := SumExtraForm;
      lAntiBanAmount.Left := 185;
      lAntiBanAmount.Top := 75;
      lAntiBanAmount.Width := 78;
      lAntiBanAmount.Height := 13;
      lAntiBanAmount.Caption := 'Anti-Ban amount';
      lOreDropDir := TLabel.Create(SumExtraForm);
      lOreDropDir.Parent := SumExtraForm;
      lOreDropDir.Left := 185;
      lOreDropDir.Top := 35;
      lOreDropDir.Width := 68;
      lOreDropDir.Height := 13;
      lOreDropDir.Caption := 'Drop Direction';
      lRandomLoads := TLabel.Create(SumExtraForm);
      lRandomLoads.Parent := SumExtraForm;
      lRandomLoads.Left := 185;
      lRandomLoads.Top := 115;
      lRandomLoads.Width := 72;
      lRandomLoads.Height := 13;
      lRandomLoads.Caption := 'Random Loads';
      lPartOfRCName := TLabel.Create(SumExtraForm);
      lPartOfRCName.Parent := SumExtraForm;
      lPartOfRCName.Left := 185;
      lPartOfRCName.Top := 135;
      lPartOfRCName.Width := 96;
      lPartOfRCName.Height := 13;
      lPartOfRCName.Caption := 'Part of the RC name';
      lDebugStyle := TLabel.Create(SumExtraForm);
      lDebugStyle.Parent := SumExtraForm;
      lDebugStyle.Left := 185;
      lDebugStyle.Top := 55;
      lDebugStyle.Width := 58;
      lDebugStyle.Height := 13;
      lDebugStyle.Caption := 'Debug Style';
      cbDwarfMines := TCheckBox.Create(SumExtraForm);
      cbDwarfMines.Parent := SumExtraForm;
      cbDwarfMines.Left := 134;
      cbDwarfMines.Top := 13;
      cbDwarfMines.Width := 15;
      cbDwarfMines.Height := 17;
      cbDwarfMines.TabOrder := 0;
      cbNewRocks := TCheckBox.Create(SumExtraForm);
      cbNewRocks.Parent := SumExtraForm;
      cbNewRocks.Left := 134;
      cbNewRocks.Top := 33;
      cbNewRocks.Width := 15;
      cbNewRocks.Height := 17;
      cbNewRocks.TabOrder := 1;
      cbUseTimeOut := TCheckBox.Create(SumExtraForm);
      cbUseTimeOut.Parent := SumExtraForm;
      cbUseTimeOut.Left := 134;
      cbUseTimeOut.Top := 53;
      cbUseTimeOut.Width := 15;
      cbUseTimeOut.Height := 17;
      cbUseTimeOut.TabOrder := 2;
      cbCheckHealth := TCheckBox.Create(SumExtraForm);
      cbCheckHealth.Parent := SumExtraForm;
      cbCheckHealth.Left := 134;
      cbCheckHealth.Top := 73;
      cbCheckHealth.Width := 15;
      cbCheckHealth.Height := 17;
      cbCheckHealth.TabOrder := 3;
      cbRandomChooseRock := TCheckBox.Create(SumExtraForm);
      cbRandomChooseRock.Parent := SumExtraForm;
      cbRandomChooseRock.Left := 134;
      cbRandomChooseRock.Top := 93;
      cbRandomChooseRock.Width := 15;
      cbRandomChooseRock.Height := 17;
      cbRandomChooseRock.TabOrder := 4;
      cbMMouseWaiting := TCheckBox.Create(SumExtraForm);
      cbMMouseWaiting.Parent := SumExtraForm;
      cbMMouseWaiting.Left := 134;
      cbMMouseWaiting.Top := 113;
      cbMMouseWaiting.Width := 15;
      cbMMouseWaiting.Height := 17;
      cbMMouseWaiting.TabOrder := 5;
      cbRunFar := TCheckBox.Create(SumExtraForm);
      cbRunFar.Parent := SumExtraForm;
      cbRunFar.Left := 134;
      cbRunFar.Top := 133;
      cbRunFar.Width := 15;
      cbRunFar.Height := 17;
      cbRunFar.TabOrder := 6;
      cbbRunDir := TComboBox.Create(SumExtraForm);
      cbbRunDir.Parent := SumExtraForm;
      cbbRunDir.Left := 296;
      cbbRunDir.Top := 12;
      cbbRunDir.Width := 75;
      cbbRunDir.Height := 21;
      cbbRunDir.ItemHeight := 13;
      cbbRunDir.MaxLength := 4;
      cbbRunDir.TabOrder := 7;
      cbbRunDir.Items.Add('N');
      cbbRunDir.Items.Add('E');
      cbbRunDir.Items.Add('S');
      cbbRunDir.Items.Add('W');
      cbbDropDir := TComboBox.Create(SumExtraForm);
      cbbDropDir.Parent := SumExtraForm;
      cbbDropDir.Left := 296;
      cbbDropDir.Top := 32;
      cbbDropDir.Width := 75;
      cbbDropDir.Height := 21;
      cbbDropDir.ItemHeight := 13;
      cbbDropDir.TabOrder := 8;
      cbbDropDir.Items.Add('None');
      cbbDropDir.Items.Add('Random');
      cbbDropDir.Items.Add('N');
      cbbDropDir.Items.Add('E');
      cbbDropDir.Items.Add('S');
      cbbDropDir.Items.Add('W');
      cbbDebugStyle := TComboBox.Create(SumExtraForm);
      cbbDebugStyle.Parent := SumExtraForm;
      cbbDebugStyle.Left := 296;
      cbbDebugStyle.Top := 52;
      cbbDebugStyle.Width := 75;
      cbbDebugStyle.Height := 21;
      cbbDebugStyle.DropDownCount := 4;
      cbbDebugStyle.ItemHeight := 13;
      cbbDebugStyle.TabOrder := 9;
      cbbDebugStyle.Items.Add('Write');
      cbbDebugStyle.Items.Add('Disguise');
      cbbDebugStyle.Items.Add('Status');
      cbbDebugStyle.Items.Add('None');
      cbbAntiBanAmount := TComboBox.Create(SumExtraForm);
      cbbAntiBanAmount.Parent := SumExtraForm;
      cbbAntiBanAmount.Left := 296;
      cbbAntiBanAmount.Top := 72;
      cbbAntiBanAmount.Width := 75;
      cbbAntiBanAmount.Height := 21;
      cbbAntiBanAmount.ItemHeight := 13;
      cbbAntiBanAmount.TabOrder := 10;
      cbbAntiBanAmount.Items.Add('0');
      cbbAntiBanAmount.Items.Add('1');
      cbbAntiBanAmount.Items.Add('2');
      cbbAntiBanAmount.Items.Add('3');
      cbbAntiBanAmount.Items.Add('4');
      cbbAntiBanAmount.Items.Add('5');
      eOreTol := TEdit.Create(SumExtraForm);
      eOreTol.Parent := SumExtraForm;
      eOreTol.Left := 296;
      eOreTol.Top := 92;
      eOreTol.Width := 75;
      eOreTol.Height := 21;
      eOreTol.TabOrder := 11;
      eRandomLoads := TEdit.Create(SumExtraForm);
      eRandomLoads.Parent := SumExtraForm;
      eRandomLoads.Left := 296;
      eRandomLoads.Top := 112;
      eRandomLoads.Width := 75;
      eRandomLoads.Height := 21;
      eRandomLoads.TabOrder := 12;
      ePartOfRCName := TEdit.Create(SumExtraForm);
      ePartOfRCName.Parent := SumExtraForm;
      ePartOfRCName.Left := 296;
      ePartOfRCName.Top := 132;
      ePartOfRCName.Width := 75;
      ePartOfRCName.Height := 21;
      ePartOfRCName.TabOrder := 13;
      bSaveSettings := TButton.Create(SumExtraForm);
      bSaveSettings.Parent := SumExtraForm;
      bSaveSettings.Left := 160;
      bSaveSettings.Top := 165;
      bSaveSettings.Width := 75;
      bSaveSettings.Height := 25;
      bSaveSettings.Caption := 'Save !';
      bSaveSettings.TabOrder := 14;
      bSaveSettings.OnClick := @ButtonClick;
    end;

    procedure ButtonClick(Sender: TObject);
    begin
      case Sender of
        bStart :
        begin
          SumMainForm.Caption:= SumMainForm.Caption + '.';
          SumMainForm.ModalResult:= mrOk;
        end;
        bPlayerForm :
          StartPlayers(true, 'string1 string2 string3');
        bExtraSettings :
          SafeShowExtraFormModal;
        bSaveSettings :
        begin
          SumExtraForm.Caption:= SumExtraForm.Caption + '.';
          SumExtraForm.ModalResult:= mrOk;
        end;
      end;
    end;


    procedure SumMainFormProc;
    begin
      SumMainForm := CreateForm;
      SumMainForm.Left := 310;
      SumMainForm.Top := 155;
      SumMainForm.Width := 278;
      SumMainForm.Height := 249;
      SumMainForm.Caption := 'SumMainForm - SPM Form';
      SumMainForm.Color := $00B3A69D;
      SumMainForm.Font.Color := clWindowText;
      SumMainForm.Font.Height := -11;
      SumMainForm.Font.Name := 'MS Sans Serif';
      SumMainForm.Font.Style := [];
      SumMainForm.Visible := False;
      SumMainForm.PixelsPerInch := 96;
      lUsePlayerForm := TLabel.Create(SumMainForm);
      lUsePlayerForm.Parent := SumMainForm;
      lUsePlayerForm.Left := 64;
      lUsePlayerForm.Top := 147;
      lUsePlayerForm.Width := 89;
      lUsePlayerForm.Height := 13;
      lUsePlayerForm.Caption := 'Use the Playerform';
      lUseAntiBan := TLabel.Create(SumMainForm);
      lUseAntiBan.Parent := SumMainForm;
      lUseAntiBan.Left := 64;
      lUseAntiBan.Top := 129;
      lUseAntiBan.Width := 62;
      lUseAntiBan.Height := 13;
      lUseAntiBan.Caption := 'Use Anti-Ban';
      lMaxMinPerLoad := TLabel.Create(SumMainForm);
      lMaxMinPerLoad.Parent := SumMainForm;
      lMaxMinPerLoad.Left := 64;
      lMaxMinPerLoad.Top := 99;
      lMaxMinPerLoad.Width := 102;
      lMaxMinPerLoad.Height := 13;
      lMaxMinPerLoad.Caption := 'Max minutes per load';
      lMaxSecToWait := TLabel.Create(SumMainForm);
      lMaxSecToWait.Parent := SumMainForm;
      lMaxSecToWait.Left := 64;
      lMaxSecToWait.Top := 74;
      lMaxSecToWait.Width := 97;
      lMaxSecToWait.Height := 13;
      lMaxSecToWait.Caption := 'Max seconds to wait';
      lLoadsPerPlayer := TLabel.Create(SumMainForm);
      lLoadsPerPlayer.Parent := SumMainForm;
      lLoadsPerPlayer.Left := 64;
      lLoadsPerPlayer.Top := 52;
      lLoadsPerPlayer.Width := 85;
      lLoadsPerPlayer.Height := 13;
      lLoadsPerPlayer.Caption := 'Loads per player';
      cbUsePlayerForm := TCheckBox.Create(SumMainForm);
      cbUsePlayerForm.Parent := SumMainForm;
      cbUsePlayerForm.Left := 187;
      cbUsePlayerForm.Top := 145;
      cbUsePlayerForm.Width := 18;
      cbUsePlayerForm.Height := 17;
      cbUsePlayerForm.TabOrder := 4;
      cbUseAntiBan := TCheckBox.Create(SumMainForm);
      cbUseAntiBan.Parent := SumMainForm;
      cbUseAntiBan.Left := 187;
      cbUseAntiBan.Top := 128;
      cbUseAntiBan.Width := 19;
      cbUseAntiBan.Height := 18;
      cbUseAntiBan.TabOrder := 3;
      eMaxMinPerLoad := TEdit.Create(SumMainForm);
      eMaxMinPerLoad.Parent := SumMainForm;
      eMaxMinPerLoad.Left := 178;
      eMaxMinPerLoad.Top := 94;
      eMaxMinPerLoad.Width := 30;
      eMaxMinPerLoad.Height := 21;
      eMaxMinPerLoad.TabOrder := 2;
      eMaxSecToWait := TEdit.Create(SumMainForm);
      eMaxSecToWait.Parent := SumMainForm;
      eMaxSecToWait.Left := 178;
      eMaxSecToWait.Top := 70;
      eMaxSecToWait.Width := 30;
      eMaxSecToWait.Height := 21;
      eMaxSecToWait.TabOrder := 1;
      eLoadsPerPlayer := TEdit.Create(SumMainForm);
      eLoadsPerPlayer.Parent := SumMainForm;
      eLoadsPerPlayer.Left := 178;
      eLoadsPerPlayer.Top := 46;
      eLoadsPerPlayer.Width := 30;
      eLoadsPerPlayer.Height := 21;
      eLoadsPerPlayer.TabOrder := 0;
      bStart := TButton.Create(SumMainForm);
      bStart.Parent := SumMainForm;
      bStart.Left := 99;
      bStart.Top := 176;
      bStart.Width := 75;
      bStart.Height := 25;
      bStart.Caption := 'Start';
      bStart.TabOrder := 5;
      bStart.OnClick:= @ButtonClick;
      bPlayerForm := TButton.Create(SumMainForm);
      bPlayerForm.Parent := SumMainForm;
      bPlayerForm.Left := 11;
      bPlayerForm.Top := 11;
      bPlayerForm.Width := 114;
      bPlayerForm.Height := 25;
      bPlayerForm.Caption := 'Player Form';
      bPlayerForm.TabOrder := 6;
      bPlayerForm.OnClick:= @ButtonClick;
      bExtraSettings := TButton.Create(SumMainForm);
      bExtraSettings.Parent := SumMainForm;
      bExtraSettings.Left := 144;
      bExtraSettings.Top := 11;
      bExtraSettings.Width := 112;
      bExtraSettings.Height := 25;
      bExtraSettings.Caption := 'Extra Settings';
      bExtraSettings.TabOrder := 7;
      bExtraSettings.OnClick:= @ButtonClick;
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('SumMainFormProc', v);
    end;

    procedure ShowFormModal;
    begin
      SumMainForm.ShowModal;
    end;

    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(v, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;

    //------------------------------------------------------------------------\\
    {                Signature - To prove its mine, lol.                      ||
    \\------------------------------------------------------------------------//}


    procedure Signature;
    begin
     Writeln('  _______              __ __ __');
     Writeln(' / _____/__ __  _____ |__|  |__| ___  ____');
     Writeln(' \___  \|  |  \/     \|  |  |  |/ _ \/    \');
     Writeln(' /      \  |  /  Y Y  \  |  |  ( <_> )  |  \');
     Writeln('/_____  /____/|__|_|  /__|__|__|\___/|__|  /');
     Writeln('      \/            \/                   \/');
     Writeln('Scripts Brings You:');
     Writeln('                 SumPowerMiner');
    end;

    //------------------------------------------------------------------------\\
    {             ProgressReport - Shows what the script has done             ||
    \\------------------------------------------------------------------------//}


    procedure ProgressReport;//Made by Fakawi, i think, edited by me
    var
      PActive: string;
      I: Integer;
    begin
      SRLRandomsReport;
      if Players[CurrentPlayer].Active then PActive:='True' else PActive:='False';
      Writeln(' ');
      Writeln('<============= SumPowerMiner ==============>');
      Writeln('<========= -'+VersionNumber+'- Progress Report =========>');
      Writeln('/==========================================\');
      Writeln('      Worked for '+ TimeRunning);
      Writeln('      Mined ' + IntToStr(OresMined) + ' ores.');
      if(GasAvoided > 0)then Writeln('      Avoided gas ' + IntToStr(GasAvoided) + ' times.');
      Writeln('\==========================================/');
      Writeln('    Name       : '+Players[CurrentPlayer].Name);
      Writeln('    Mining Lvl : '+IntToStr(Players[CurrentPlayer].Level[15]));
      Writeln('    Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' minutes.');
      Writeln('    Loads done : '+IntToStr(Players[CurrentPlayer].Integer1));
      Writeln('    Active     : '+PActive);
      Writeln('    Location   : '+Players[CurrentPlayer].Loc);
      Writeln('\\----------------------------------------//');
       for I := 0 to HowManyPlayers-1 do
        begin
          if(Players[i].Active = True)then PActive := 'True' else PActive := 'False';
          Writeln(IntToStr(I) + ' : ' + Players[i].Name + ' = '+ PActive +
          ' , Loads: ' + IntToStr(Players[i].Integer1) +
          ', Lvl: ' + IntToStr(Players[i].Level[15]) +
          ', Loc: ' + Players[i].Loc);
        end
      Writeln('<==========================================>');
     end;

    //------------------------------------------------------------------------\\
    {                KeepUpStats - Updates the statistics.                    ||
    \\------------------------------------------------------------------------//}


    procedure KeepUpStats;
    begin
      OresMined := OresMined + CountItemBmpMaskTol(bmpOreMask, 5, 5);
      OresMined := OresMined + CountItemBmpMaskTol(bmpClayMask, 5, 5);
      LoadsDone := LoadsDone + 1;
      TotalLoadsDone := TotalLoadsDone + 1;
      Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + 1;
      ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpOreMask, 5, 5);
      ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpClayMask, 5, 5);
      ReportVars[1] := ReportVars[1] + 1;
    end;

    //------------------------------------------------------------------------\\
    {                LoadImages - Loads images in memory.                     ||
    \\------------------------------------------------------------------------//}


    procedure LoadImages;
    begin
      bmpOreMask := BitmapFromString(9, 8, 'z78DA333040076E6080C9C60' +
           'F064A17F17A71E9C2AFD70D03E09725DE4CF2DC0F00DCD05C59');
      bmpClayMask := BitmapFromString(9, 6, 'z78DA33302016B88101F' +
           '12A4905B86CC1AF9E3CB7E1329F787F218B03004FC54795');
    end;

    //------------------------------------------------------------------------\\
    {            DebugMe - Shows info of what the script is doing.            ||
    \\------------------------------------------------------------------------//}


    procedure DebugMe(Info: string);
    begin
      case(LowerCase(DebugStyle))of
        'write'   : Writeln(Info);
        'status'  : Status(Info);
        'disguise': DisguiseScar(Info);
      end;
    end;

    //------------------------------------------------------------------------\\
    {              PlayerLost - Deactivates player if needed.                 ||
    \\------------------------------------------------------------------------//}


    procedure PlayerLost(Info: string);
    begin
      Writeln(Info);
      PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
      Logout;
    end;

    //------------------------------------------------------------------------\\
    {       MouseAntiBan - Moves mouse human-like (Anti-ban). By Yakman       ||
    \\------------------------------------------------------------------------//}


    procedure MouseAntiBan;
    begin
      if not(LoggedIn)then Exit;
      case Random(6) of
        0 : IdleTime(1000 + Random(350),500,1.0);
        1 : IdleTime(1000 + Random(350),1000,1.0);
        2 : IdleTime(1000 + Random(350),750,0.5);
        3 : SleepAndMoveMouse(2500 + Random(2500));
        4 : SleepAndMoveMouse(1500 + Random(1500));
        5 : SleepAndMoveMouse(500 + Random(500));
      end
    end;

    //------------------------------------------------------------------------\\
    {                  MyAntiBan - Anti-Ban procedure by Yakman.              ||
    \\------------------------------------------------------------------------//}


    procedure MyAntiBan;//From Yakman
    var
      DItem, DBanMe, AntiBanRatio: Integer;
    begin
      if not(LoggedIn)then
        Exit;
      if not(UseAntiBan)then
        Exit;
      AntiBanRatio := 25 + (25 * AntiBanAmount);
      DBanMe := Random(AntiBanRatio);
      case DBanMe of
        0 : MMouse(Random(MSX2), Random(MSY2),0,0);
        1 : RandomRClickEvery(2 + Random(13));
        2 : HoverSkill('mining', False);
        3 : HoverSkill('smithing', False);
        4 : RotateEvery(20+random(10));
        5 : LeaveScreenEvery(5+random(5));
        6 : HoverEvery(15+random(5),'random');
        7 : HoverEvery(15+random(5),players[currentplayer].skill);
        8 : MouseAntiBan;
        9 : begin
              DItem:=1+random(14);
              if(ExistsItem(DItem))then
                DragItem(DItem,15+random(10));
            end
        10 : begin
               GameTab(1+random(12));
               wait(1500+random(500));
               GameTab(4);
             end;
      end;
    end;

    //------------------------------------------------------------------------\\
    {                    DropOres - Drops all the ores.                       ||
    \\------------------------------------------------------------------------//}


    procedure DropOres;
    var
      i, Dx, Dy: Integer;
      RDir: string;
    begin
      if(Lowercase(OresDropDir) = 'random')then
      begin
        case Random(4) of
          0 : RDir := 'S';
          1 : RDir := 'N';
          2 : RDir := 'E';
          3 : RDir := 'W';
        end;
      end
      else
        RDir := OresDropDir;
      if not(RDir = 'None')then
        RunAwayDirection(RDir);
      Flag;
      Dx := x;
      Dy := y;
      GameTab(4);
      while(FindBitmapMaskTolerance(bmpOreMask, x, y, MIX1, MIY1, MIX2, MIY2, 10, 5))or
           (FindBitmapMaskTolerance(bmpClayMask, x, y, MIX1, MIY1, MIX2, MIY2, 10, 5))and
           (i < 5)do
      begin
        ClickAllItemsBmpMaskTolWait('Drop', bmpOreMask, 5, 5, 300);
        ClickAllItemsBmpMaskTolWait('Drop', bmpClayMask, 5, 5, 300);
        if(FindColor(x, y, 16777215, MIX1, MIY1, MIX2, MIY2))then
          Mouse(x, y, 5, 5, false);
        ChooseOption(x, y, 'cel');
        i := i + 1;
      end;
      if(FindColor(x, y, 16777215, MIX1, MIY1, MIX2, MIY2))then
        Mouse(x, y, 5, 5, false);
      ChooseOption(x, y, 'cel');
      x := Dx;
      y := Dy;
      if not(RDir = 'None')then
      RunBack;
      Flag;
      GameTab(4);
    end;

    //------------------------------------------------------------------------\\
    {               SetOreColor - Sets the desired OreColors                  ||
    \\------------------------------------------------------------------------//}


    procedure SetOreColor;
    begin
      case LowerCase(Players[CurrentPlayer].String1) of
        'copper'  :  OreColor1 := CopperColor;
        'tin'     :  OreColor1 := TinColor;
        'clay'    :  OreColor1 := ClayColor;
        'iron'    :  OreColor1 := IronColor;
        'silver'  :  OreColor1 := SilverColor;
        'coal'    :  OreColor1 := CoalColor;
        'gold'    :  OreColor1 := GoldColor;
        'mithril' :  OreColor1 := MithrilColor;
        'adamant' :  OreColor1 := AdamantColor;
        'runite'  :  OreColor1 := RuniteColor;
      end;
      case Lowercase(Players[CurrentPlayer].String2) of
        'copper'  :  OreColor2 := CopperColor;
        'tin'     :  OreColor2 := TinColor;
        'clay'    :  OreColor2 := ClayColor;
        'iron'    :  OreColor2 := IronColor;
        'silver'  :  OreColor2 := SilverColor;
        'coal'    :  OreColor2 := CoalColor;
        'gold'    :  OreColor2 := GoldColor;
        'mithril' :  OreColor2 := MithrilColor;
        'adamant' :  OreColor2 := AdamantColor;
        'runite'  :  OreColor2 := RuniteColor;
       end;
       case Lowercase(Players[CurrentPlayer].String3) of
        'copper'  :  OreColor3 := CopperColor;
        'tin'     :  OreColor3 := TinColor;
        'clay'    :  OreColor3 := ClayColor;
        'iron'    :  OreColor3 := IronColor;
        'silver'  :  OreColor3 := SilverColor;
        'coal'    :  OreColor3 := CoalColor;
        'gold'    :  OreColor3 := GoldColor;
        'mithril' :  OreColor3 := MithrilColor;
        'adamant' :  OreColor3 := AdamantColor;
        'runite'  :  OreColor3 := RuniteColor;
      end;
    end;

    //------------------------------------------------------------------------\\
    {  SumFindPickHeadColor - Advanced FindPickHeadColor, finds the paxe      ||
    \\------------------------------------------------------------------------//}


    function SumFindPickHeadColor: Boolean;
    var
      InvPAxe, WieldPAxe, Ix, Iy, Wx, Wy: integer;
      dtmPaxes: Array[1..6] of integer;
    begin
      dtmPaxes[1] := DTMFromString('78DA637463646008664001068A0C0C5C401A2' +
           '8C3F01F0818C381AC40543536FE11703520C0E80B6479A0AAF149' +
           '2D405103000A07084F');  //Rune
      dtmPaxes[2] := DTMFromString('78DA631463646008634001068A0C0C5C401A2' +
           '8C3F01F08183580AC405435561E56703520C028076479A0AAF188' +
           'F142510300D923076A');  //Addy
      dtmPaxes[3] := DTMFromString('78DA637CCEC0C010C680020C141918B880342' +
           '310FF0702C69F404620AA1A73F300B81A10607C0F243C50D5B8BA' +
           'A7A3A8010086BD09E1');  //Mith
      dtmPaxes[4] := DTMFromString('78DA63DCC9C0C010CC80020C141918B880342' +
           '310FF0702C653404620AA9ACCA424B81A10603C00243C50D5B4D6' +
           'D4A0A801007D560A4B');  //Steel
      dtmPaxes[5] := DTMFromString('78DA63EC62606008654001068A0C0C5C409A1' +
           '188FF0301E36C202310558DBB93135C0D08304E04121EA86AA242' +
           '4250D400003C4908E3');  //Iron
      dtmPaxes[6] := DTMFromString('78DA638C62606008634001068A0C0C5C409A1' +
           '188FF0301630E901188AAC6D1480EAE0604189380843BAA1A3B2D' +
           '0614350000CD0781');    //Bronze
      GameTab(4);
      for InvPAxe := 1 to 7 do
      begin
        if(InvPAxe = 7)then Break;
        if(FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
         Break;
      end;
      GameTab(5);
      for WieldPAxe := 1 to 7 do
      begin
        if(WieldPAxe = 7)then Break;
        if(FindDtm(dtmPaxes[WieldPAxe], Wx, Wy, MIX1, MIY1, MIX2, MIY2))then
          Break;
      end;

      if(InvPAxe = 7) and (WieldPAxe = 7)then begin Result := false; Exit; end;
      if((InvPAxe-WieldPAxe) < 0)then EquipPick := false else EquipPick := true;
      Result := true;
      if(EquipPick)then
      begin
        GameTab(5);
        hc1 := GetColor(585, 295);
        hc2 := GetColor(597, 297);
        hc3 := GetColor(594, 296);
        hc4 := GetColor(588, 295);
        hc5 := GetColor(582, 294);
      end else
      begin
        GameTab(4);
        if(Ix > 592) and (Iy > 238)then Drag(Ix, Iy, 5, 5, 579, 227, 5, 5, true);
        FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2);
        hc1 := GetColor(587, 216);
        hc2 := GetColor(587, 219);
        hc3 := GetColor(592, 222);
        hc4 := GetColor(584, 216);
        hc5 := GetColor(577, 219);
      end;
      for WieldPAxe := 1 to 6 do
        FreeDtm(dtmPaxes[WieldPAxe]);
      WriteLn('Pick head colors... ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
          IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
    end;

    //------------------------------------------------------------------------\\
    {        FindFastRandoms - Finds basic randoms fast. By WT-Fakawi.        ||
    \\------------------------------------------------------------------------//}


    function FindFastRandoms: Boolean;    // By WT-Fakawi.
    var
      i: Integer;
    begin
      for I := 1 to 11 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;

           8: begin
                if not MiningInDwarvenMine then
                begin
                  if InBlack then
                  begin
                    Result := True;
                    Players[CurrentPlayer].loc := 'InBlack';
                    Logout;
                    Exit;
                  end;
                end;
               end;

           9 : if RC then
                 Result := True;

           10 : if FindFight then
                  begin
                    Result := True;
                    RunTo(RunDir, RunFar);
                  end;

           11: if FindTalk then
                 Result := True;
        end;
        Wait(1);
      end;
    end;

    //------------------------------------------------------------------------\\
    {            HandleGas - Handles the player when there is gas.            ||
    \\------------------------------------------------------------------------//}


    procedure HandleGas;
    var
      TempMouseSpeed, GasTime: Integer;
    begin
      Writeln('Gas found!');
      TempMouseSpeed := MouseSpeed;
      MouseSpeed := 5;
      MouseFindNoFlag(MMCX, MMCY, 1, 1);
      MarkTime(GasTime);
      MouseSpeed := TempMouseSpeed;
      while(TimeFromMark(GasTime) < 35000)do
        if(Random(20) > 15)then
          IdleTime(500, 500, 0.4)
        else
          Wait(1000);
      MarkTime(MineMax);
      GasAvoided := GasAvoided + 1;
      ReportVars[3] := ReportVars[3] + 1;
    end;

    //------------------------------------------------------------------------\\
    {              FindNewOre - Finds new ores in the inventory.              ||
    \\------------------------------------------------------------------------//}


    function FindNewOre(InvSpot: Integer): Boolean;
    begin
      Result := ExistsItem(InvSpot);
    end;

    //------------------------------------------------------------------------\\
    {      FindColorsArray - Finds specified rock colors. Thnx to Lorax.      ||
    \\------------------------------------------------------------------------//}


    function FindColorsArray(Color, Tolerance, Step, MaxTol: Integer): TPointArray;
    var
      Count, tx, ty: Integer;
    begin
      while (not FindColorTolerance(tx, ty, Color, MSX1, MSY1, MSX2, MSY2, Tolerance + Count * Step))and
            (Count * Step <= MaxTol) do
        Count := Count + 1;
      FindColorsSpiralTolerance(MSCX, MSCY, Result, Color, MSX1, MSY1, MSX2, MSY2, Tolerance + Count * Step);
    end;

    //------------------------------------------------------------------------\\
    { getArrayFromBox - Splits above results in groups of size. Thnx to Lorax ||
    \\------------------------------------------------------------------------//}


    function getArrayFromBox(arColor: TPointArray; Width, Height, MinCount, Dist: Integer): TPointArray;
    var
      Count, Count2, Count3, Count4, TempArrayLength: Integer;
      Average : TPoint;
    begin
      Count2 := 1;
      TempArraylength := GetArrayLength(Result);
      SetArrayLength(Result, Count2);
      for Count := 1 to GetArrayLength(arColor) - 1 do
      begin
        if(arColor[Count].x < arColor[Count - 1].x + Width)and
          (arColor[Count].y < arColor[Count - 1].y + Height)and
          (arColor[Count].x > arColor[Count - 1].x - Width)and
          (arColor[Count].y > arColor[Count - 1].y - Height)and
          (Count < GetArrayLength(arColor)-1)then
        else
        begin
          Average.x := 0;
          Average.y := 0;
          for Count3 := Count4 to Count - 1 do
          begin
            Average.x := Average.x + arColor[Count3].x;
            Average.y := Average.y + arColor[Count3].y;
          end;

          if((Count3-Count4) > MinCount)then
          begin
            if(Distance(Average.x, Average.y, MSCX, MSCY) > Dist)then
            begin
              Average.x := Average.x / (Count3 - Count4);
              Average.y := Average.y / (Count3 - Count4);
              SetArrayLength(Result, Count2);
              Result[Count2 - 1].x := Average.x;
              Result[Count2 - 1].y := Average.y;
              Count2 := Count2 + 1;
            end;
          end;
        end;
        if(GetArrayLength(Result)>TempArrayLength)then
        begin
          TempArrayLength := GetArrayLength(Result);
          Count4 := Count;
        end;
      end;
    end;

    //------------------------------------------------------------------------\\
    {          UpdateColor - Updates the coords of the rock. By Lorax.        ||
    \\------------------------------------------------------------------------//}


    function UpdateColor(var ax, ay: Integer; tColor: Integer): boolean;
    var
      Checker: Integer;
    begin
      Checker := GetSystemTime;
      while(FindColorSpiralTolerance(ax, ay, tColor, ax - 20, ay - 20, ax + 20, ay + 20, 10))and
           (TimeFromMark(Checker) < 10000)and
           (FlagPresent)do
        Wait(16);
      for Checker := 0 to 62 do
      begin
          FindColorSpiralTolerance(ax, ay, tColor, ax - 10, ay - 10, ax + 10, ay + 10, 10);
          Wait(16);
      end;

      Result := FindColorSpiralTolerance(ax, ay, tColor, ax - 10, ay - 10, ax + 10, ay + 10, 10);
    end;

    //------------------------------------------------------------------------\\
    {                RockGone - Results true if the rock is gone.             ||
    \\------------------------------------------------------------------------//}


    function RockGone(Rx, Ry, Squarex, Squarey, Color, Tol: Integer): Boolean;
    begin
      if not(UpdateColor(Rx, Ry, Color))then
      begin
        Result := True;
        Exit;
      end;
      Result := not(FindColorSpiralTolerance(x, y, Color, Rx - Squarex, Ry - Squarex, Rx + Squarex, Ry + Squarey, Tol));
    end;

    //------------------------------------------------------------------------\\
    {          WaitWhileWorking - Waits while mining. Thnx to Lorax.          ||
    \\------------------------------------------------------------------------//}


    procedure WaitWhileWorking(Ax, Ay, InvSpot, MineMark: Integer);
    begin
      while (LoggedIn) do
      begin
        if(NoPick)then
        begin
          if not(SumFindPickHeadColor)then
          begin
            PlayerLost('Player lost, no more paxes');
            NoPick := False;
            Exit;
          end;
        NoPick := False;
        end;
        if not(FindPick)then
        begin
          MarkTime(MineMax);
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          DebugMe('Something is wrong with our pickaxe.');
          Exit;
        end;
        if not(MineNewRocks)then
          if(RockGone(Ax, Ay, 10, 10, OreColor, TheOreTolerance))then
            Exit;
        Wait(10);
        if(GasCheck(Ax, Ay))then
        begin
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          HandleGas;
          DebugMe('We got gas while waiting');
          Exit;
        end;
        Wait(10);
        if(FindFastRandoms)then
        begin
          MarkTime(MineMax);
          DebugMe('Found a random while waiting');
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          Exit;
        end;
        Wait(50);
        if(TimeFromMark(MineMark) > MaxSecToWait * 1000)then
        begin
          DebugMe('Time ran out while waiting');
          Exit;
        end;
        if(FindFight)then
        begin
          PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
          RunTo(RunDir, True);
          DebugMe('We got into a fight');
          Exit;
        end;
        Wait(10);
        if(FindNewOre(InvSpot))then
          Exit;
        if(MMouseWhenWaiting)then
          if(Random(20)+1 > 15)then
            IdleTime(200 + Random(500), 500, 0.4);
      end;
    end;

    //------------------------------------------------------------------------\\
    {              FindRock - Finds closest rocks on the screen.              ||
    \\------------------------------------------------------------------------//}


    function FindRock: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 3 do
      begin
        if(RandomlyChooseRock)then
        begin
          case(Random(2) + 1)of
            1 : OreColor := OreColor1;
            2 : OreColor := OreColor2;
            3 : OreColor := OreColor3;
          end;
        end
        else
          case I of
            1 : OreColor := OreColor1;
            2 : OreColor := OreColor2;
            3 : OreColor := OreColor3;
          end;
        arOreColor := FindColorsArray(OreColor, 4, 2, TheOreTolerance);
        arOreColorResults := getArrayFromBox(arOreColor, 20, 20, TheMinCount, 20);
        Result := (GetArrayLength(arOreColorResults) > 0);
        if(Result)then
          Exit;
      end
      DebugMe('Rock NOT found...');
    end;

    //------------------------------------------------------------------------\\
    {   PowerMine - Main PowerMiner function. Combinds all mine procedures.   ||
    \\------------------------------------------------------------------------//}


    function PowerMine: Boolean;
    var
      Mx, My, TempColor, InvSpot, MaxWait : Integer;
      FoundRock: Boolean;
    begin
      if not(LoggedIn)then Exit;
      if(FindRock)then
      begin
        GameTab(4);
        for InvSpot := 1 to 28 do
          if not(ExistsItem(InvSpot))then
            Break;
        MarkTime(MaxWait);
        for I := 0 to GetArrayLength(arOreColorResults) - 1 do
        begin
          MMouse(arOreColorResults[i].x, arOreColorResults[i].y, 0, 0);
          if(IsUpText('Mine'))then
          begin
            FoundRock := True;
            Break;
          end;
          Wait(300);
          if(TimeFromMark(MaxWait) > 2000)then
            Exit;
        end;
        if not(FoundRock)then
          Exit;
        Result := True;
        GetMousePos(Mx, My);
        TempColor := GetColor(Mx, My);
        if not(IsUpText('Mine'))then
          Exit;
        if not(GasCheck(Mx, My - 20))then
        begin
          if Random (20) < 19 Then Mouse(Mx, My, 0, 0, True)
          else
          begin
            Mouse(Mx, My, 0, 0, False);
            ChooseOption(x, y, 'Mine');
          end;
        end
        else
        begin
          HandleGas;
          Exit;
        end;
        MarkTime(MineMax);
        MarkTime(MaxWait);
        WaitWhileWorking(Mx, My, InvSpot, MineMax);
      end;
    end;

    //------------------------------------------------------------------------\\
    {                 PlayersTime - Time to switch players ?                  ||
    \\------------------------------------------------------------------------//}


    procedure PlayersTime;
    begin
      if not(LoggedIn)then
        Exit;
      if(LoadsDone >= TheLoads)then
      begin
        Writeln('Logging out player, loads done.');
        Players[CurrentPlayer].Loc := 'Done Mining';
        Logout;
      end;
    end;

    //------------------------------------------------------------------------\\
    {                     WriteNews - Downloads the news                      ||
    \\------------------------------------------------------------------------//}


    procedure WriteNews(HowMany: Integer);
    var
      Timer, i, x, y: Integer;
      News :array of string;
      New, TheNews: string;
    begin
      ChangeReportWidth(280);
      SetArrayLength(News, HowMany+1);
      Status('Downloading news ...');
      Wait(1);
      TheNews := Getpage('http://sumilionscripts.freehostia.com/SPMNews.txt');
      x := 0;
      AddToReport('//============================\\');
      AddToReport('| >> SumPowerMiner News (v' + VersionNumber + ')');
      AddToReport('|');
      y := 1;
      for i := 1 to HowMany do
      begin
        MarkTime(Timer);
        repeat
          x := x + 1;
          new := copy(TheNews, x, x+1);
          if(new = '|')then
          begin
            i := HowMany;
            Break;
          end;
        until(copy(new, 1, 1) = ',')or(TimeFromMark(Timer) >= 2000);
      news[i]:= copy(TheNews, y, (x-y));
      y := x + 1;
      AddToReport('| :: '+news[i]);
      Wait(1);
      end;
      AddToReport('|');
      AddToReport('\\============================//');
    end;

    //------------------------------------------------------------------------\\
    {             CheckVersion - Gets latest version if needed                ||
    \\------------------------------------------------------------------------//}


    procedure CheckVersion;
    var
      TheFileNumber: Integer;
      CurrentVersion: Extended;
      TheScriptString, ScriptName, CurrentVersionString: string;
    begin
      CurrentVersionString := GetPage('http://sumilionscripts.freehostia.com/SPMVersion.txt');
      CurrentVersion := StrToFloat(CurrentVersionString);
      if(CurrentVersion > StrToFloat(VersionNumber))then
      begin
        Writeln('Your current version is not the latest.');
        Writeln('Downloading new version, please wait...');
        TheScriptString := GetPage('http://sumilionscripts.freehostia.com/SPM.scar');
        ScriptName := 'SPM v' + CurrentVersionString + '.scar';
        TheFileNumber := ReWriteFile(ScriptPath + ScriptName, false);
        WriteFileString(TheFileNumber, TheScriptString);
        Writeln('Updated script can be found at :');
        Writeln(ScriptPath + ScriptName);
        TerminateScript;
      end;
    end;

    //------------------------------------------------------------------------\\
    {          SetupClient - Makes SCAR ready to handle the script.           ||
    \\------------------------------------------------------------------------//}


    procedure SetupClient;
    begin
      SetupSRL;
      SetupSRLMining;
      ScriptID := '12';
      LoadImages;
      CheckHPFirst := CheckForHealth;
      if(MineNewRocks)then
        TheMinCount := 2
      else
        TheMinCount := 0;
      RCMaster := PartOfRCName;
      Cleardebug;
      Signature;
      CheckVersion;
      ClearReport;
      WriteNews(10);
      DisguiseScar('RuneScape - the massive online adventure game by Jagex Ltd');
      SafeInitForm;
      SafeInitExtraForm;
      SumLoadSettings;
      SafeShowFormModal;
      SumSaveSettings;
      if(UsePlayerForm)then
        StartPlayers(False, 'string1 string2 string3')
      else
        DeclarePlayers;
      CurrentPlayer := StartPlayer;
      ActivateClient;
      Wait(500+Random(1000));
    end;

    //------------------------------------------------------------------------\\
    {          SetupUser - Makes Character ready to handle the script.        ||
    \\------------------------------------------------------------------------//}


    procedure SetupUser;
     begin
       LoginPlayer;
       SetOreColor;
       TheLoads := LoadsPerPlayer + Random(RandomLoads);
       LoadsDone := 0;
       MakeCompass('N');
       HighestAngle;
       if not SumFindPickHeadColor then
        begin
          Writeln('No Paxe found... logging out.');
          Logout;
          NextPlayer(false);
        end;
       Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
       Players[CurrentPlayer].Loc := 'Mining';
       SetRun(true);
       MarkTime(MineMax);
     end;

    //------------------------------------------------------------------------\\
    {                    Main line - Combinds all magic =].                   ||
    \\------------------------------------------------------------------------//}


    begin
    SetupSRL;
      SetupClient;
      repeat;
        SetupUser;
        repeat;
          MarkTime(MaxMin);
          while(InvCount < 28)and
               (TimeFromMark(MaxMin) < MaxMinPerLoad * 1000 * 60)and
               (LoggedIn)do
          begin
            if(UseTimeOut)then
              if(TimeFromMark(MineMax) > 300000)then
                Break;
            Wait(20);
            PowerMine;
            Wait(20);
            if(FindNormalRandoms)then
              MarkTime(MineMax);
            MyAntiBan;
            Wait(20);
          end;
          if(UseTimeOut)then
            if(TimeFromMark(MineMax) > 300000)then
              PlayerLost('Player lost, timed out.');
          if(LoggedIn)then
          begin
            KeepUpStats;
            DropOres;
          end;
          ProgressReport;
          PlayerStatus := LoggedIn;
          PlayersTime;
        until not(LoggedIn);
        NextPlayer(PlayerStatus);
      until not(Players[CurrentPlayer].Active);
    end.

    it might not work sadly................

    if not i would suggest a diffrent powerminer
    heres a link:
    http://www.srl-forums.com/forum/mining-f192.html

    you can find many powerminers there

  5. #5
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    So....Sky...what did you change?
    Interested in C# and Electrical Engineering? This might interest you.

  6. #6
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    So....Sky...what did you change?
    lol i just put in SetupSRL;

  7. #7
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Its already in there, in SetupClient; ----

    It has to be your SRL. I guess.

    hakuna matata ;)

  8. #8
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    Its already in there, in SetupClient; ----

    It has to be your SRL. I guess.
    oh ok
    thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 AM

Posting Permissions

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