Results 1 to 10 of 10

Thread: Wizzup?'s Power problem XD

  1. #1
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Wizzup?'s Power problem XD

    when i use Wizzup?'s power miner (SRL Powerminer 2.4), i get an error saying
    Code:
    Failed when compiling
    Line 847: [Error] (16681:23): Unknown identifier 'Face' in script C:\DOCUME~1\Can\Desktop\RS\SRL Powerminer 2.4.scar
    I setup Scar and SRl a load of time, installed all the includes but nothig... i got the latest versions (i think).
    Scar 2.03 and SRL 3.1

    Please Help

  2. #2
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by teloport
    when i use Wizzup?'s power miner (SRL Powerminer 2.4), i get an error saying
    Code:
    Failed when compiling
    Line 847: [Error] (16681:23): Unknown identifier 'Face' in script C:\DOCUME~1\Can\Desktop\RS\SRL Powerminer 2.4.scar
    I setup Scar and SRl a load of time, installed all the includes but nothig... i got the latest versions (i think).
    Scar 2.03 and SRL 3.1

    Please Help
    Face mgiht have been added to the Extended functions.

    Go to the top of your script, and under {.include SRL\SRL.scar} put {.include SRL\extended\XMapWalk.scar} Or you can change Face to MakeCompass.
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    I have heard about quite some problems, I will go and fix.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cheesehunk
    Face mgiht have been added to the Extended functions.

    Go to the top of your script, and under {.include SRL\SRL.scar} put {.include SRL\extended\XMapWalk.scar} Or you can change Face to MakeCompass.
    I tried adding the include but i dont have it and when i change Face to MakeCompass then i get this:
    File access error
    [Runtime Error] : Exception: Access violation at address 0064C975 in module 'scar.exe'. Read of address 00000001 in line 472 in script C:\Documents and Settings\Can\Desktop\RS\SRL Powerminer 2.4.scar

  5. #5
    Join Date
    Jul 2006
    Location
    Garbage
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by teloport
    I tried adding the include but i dont have it and when i change Face to MakeCompass then i get this:
    File access error
    [Runtime Error] : Exception: Access violation at address 0064C975 in module 'scar.exe'. Read of address 00000001 in line 472 in script C:\Documents and Settings\Can\Desktop\RS\SRL Powerminer 2.4.scar
    something didnt declare your bitmaps.
    AznRx

  6. #6
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would it help if i placed the code? maby i have a messed up one.

  7. #7
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, posting the code might help a bit more
    Administrator's Warning:


  8. #8
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    {.include SRL/SRL/Misc/Trade.scar}


    Var

      OreTol           : Integer;
      SecondsToWait    : Integer;
      MinutesPerLoad   : Integer;
      Loads            : Integer;
      StartPlayer      : Integer;
      RunDir           : String;
      DirectionForOres : String;
      AutoColor        : Boolean;
      NewOres          : Boolean;
      DropOresInDir    : Boolean;
      DiffOrePlaces    : Boolean;
     
      TraderName       : String;
     
      GasDir       : Integer;
      Clay,Ores    : Integer;
      G,H,J        : Integer;
      PickaxeMask  : Integer;
      OreMask      : Integer;
      North        : Integer;
      South        : Integer;
      West         : Integer;
      East         : Integer;
      None         : Integer;
      MyMark       : Integer;

    // *************************** //

    Procedure DeclarePlayers;

      Begin
         NumberOfPlayers( HowManyPlayers );
         CurrentPlayer := StartPlayer;

         Players[0].Name :='';
         Players[0].Pass :='';
         Players[0].Nick :='';
         Players[0].Active:=True;
         Players[0].String1  := 'Iron';      // Primairy Ore Color
         Players[0].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[0].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[0].Boolean1  := True;       // Is The Pick Equipped?

         Players[1].Name :='';
         Players[1].Pass :='';
         Players[1].Nick :='';
         Players[1].Active:=True;
         Players[1].String1  := 'Iron';      // Primairy Ore Color
         Players[1].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[1].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[1].Boolean1  := True;       // Is The Pick Equipped?

         Players[2].Name :='';
         Players[2].Pass :=''
         Players[2].Nick :='';
         Players[2].Active:=True;
         Players[2].String1  := 'Iron';      // Primairy Ore Color
         Players[2].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[2].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[2].Boolean1  := True;       // Is The Pick Equipped?

         Players[3].Name :='';
         Players[3].Pass :='';
         Players[3].Nick :='';
         Players[3].Active:=True;
         Players[3].String1  := 'Iron';      // Primairy Ore Color
         Players[3].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[3].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[3].Boolean1  := True;       // Is The Pick Equipped?

         Players[4].Name :='';
         Players[4].Pass :='';
         Players[4].Nick :='';
         Players[4].Active:=True;
         Players[4].String1  := 'Iron';      // Primairy Ore Color
         Players[4].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[4].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[4].Boolean1  := True;       // Is The Pick Equipped?

         Players[5].Name :='';
         Players[5].Pass :='';
         Players[5].Nick :='';
         Players[5].Active:=True;
         Players[5].String1  := 'Iron';      // Primairy Ore Color
         Players[5].String2  := 'Iron';      // Secondairy Ore Color wont be mined as much as 1.
         Players[5].String3  := 'Iron';      // Third Ore Color, won't be mined as much as 1 and 2.
         Players[5].Boolean1  := True;       // Is The Pick Equipped?

        Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
      End;

    // *************************** //

    Const

     CopperColor       = 5476070;
     TinColor          = 9277080;
     ClayColor         = 4553880;
     IronColor         = 2898528;
     SilverColor       = 12434885;
     CoalColor         = 2834753;
     GoldColor         = 1881051;
     MithrilColor      = 7359564;
     AdamantColor      = 6322272;
     RuniteColor       = 0;
     
     // *******BEGIN FORM******** //

    Var

      frmDesign : TForm;
      CheckBox1 : TCheckBox;
      CheckBox2 : TCheckBox;
      CheckBox3 : TCheckBox;
      CheckBox4 : TCheckBox;
      CheckBox5 : TCheckBox;
      Button1 : TButton;
      Edit1 : TEdit;
      Edit2 : TEdit;
      Edit3 : TEdit;
      Edit4 : TEdit;
      Edit5 : TEdit;
      Edit6 : TEdit;
      Edit7 : TEdit;
      Edit8 : TEdit;
      Edit9 : TEdit;
      Edit10: TEdit;
      Edit11: TEdit;
      Edit12: TEdit;
      Edit13: TEdit;
      Edit14: TEdit;
      Edit15: TEdit;
      Edit16: TEdit;
      Edit17: TEdit;
      Edit18: TEdit;

    Procedure DoSecondsToWait(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
    End;

    Procedure DoOreTol(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
    End;

    Procedure CheckBoxClick(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
      If CheckBox1.Checked Then WriteLn('RimmingtonOres = True');
      If Not CheckBox1.Checked Then WriteLn('RimmingtonOres = False');
    End;

    Procedure CheckBoxClick2(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
      If CheckBox2.Checked Then WriteLn('AutoColor = True');
      If Not CheckBox2.Checked Then WriteLn('AutoColor = False');
    End;

    Procedure CheckBoxClick3(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
      If CheckBox3.Checked Then WriteLn('BenMouse = True');
      If Not CheckBox3.Checked Then WriteLn('BenMouse = False');
    End;

    Procedure CheckBoxClick4(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
      If CheckBox4.Checked Then WriteLn('Drop Ores In Direction a certain direction = True');
      If Not CheckBox4.Checked Then WriteLn('Drop Ores In Direction a certain direction = False');
    End;

    Procedure CheckBoxClick5(Sender : TObject);

    Begin
      FrmDesign.Caption := FrmDesign.Caption + '.';
      If CheckBox5.Checked Then WriteLn('RunToDifferentDirection = True');
      If Not CheckBox5.Checked Then WriteLn('RunToDifferentDirection = False');
    End;

    Procedure ButtonClick(Sender : TObject);

    Begin
      WriteLn('Running Script.');
      FrmDesign.Caption := FrmDesign.Caption + '.';
      FrmDesign.ModalResult := MrOk;
    End;

    Procedure InitForm;

    begin
    FrmDesign := CreateForm;
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 375;
    frmDesign.Height := 550;
    frmDesign.Caption := 'frmDesign';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'Times';
    frmDesign.Font.Style := [];
    frmDesign.Visible := False;
    frmDesign.PixelsPerInch := 96;
    frmDesign.Color := clGray;

    CheckBox1 := TCheckBox.Create(frmDesign);
    CheckBox1.OnClick := @CheckBoxClick;
    CheckBox1.Parent := frmDesign;
    CheckBox1.Left := 25;
    CheckBox1.Top := 60;
    CheckBox1.Width := 150;
    CheckBox1.Height := 30;
    CheckBox1.Caption := 'Rimmington Ores?';
    CheckBox1.TabOrder := 8;

    CheckBox2 := TCheckBox.Create(frmDesign);
    CheckBox2.OnClick := @CheckBoxClick2;
    CheckBox2.Parent := frmDesign;
    CheckBox2.Left := 25;
    CheckBox2.Top := 90;
    CheckBox2.Width := 150;
    CheckBox2.Height := 30;
    CheckBox2.Caption := 'AutoColor ?';
    CheckBox2.TabOrder := 8;

    CheckBox3 := TCheckBox.Create(frmDesign);
    CheckBox3.OnClick := @CheckBoxClick3;
    CheckBox3.Parent := frmDesign;
    CheckBox3.Left := 25;
    CheckBox3.Top := 120;
    CheckBox3.Width := 150;
    CheckBox3.Height := 30;
    CheckBox3.Caption := 'BenMouse ?';
    CheckBox3.TabOrder := 8;

    CheckBox4 := TCheckBox.Create(frmDesign);
    CheckBox4.OnClick := @CheckBoxClick4;
    CheckBox4.Parent := frmDesign;
    CheckBox4.Left := 25;
    CheckBox4.Top := 150;
    CheckBox4.Width := 150;
    CheckBox4.Height := 30;
    CheckBox4.Caption := 'Drop Ores In a Dir ?';
    CheckBox4.TabOrder := 8;

    CheckBox5 := TCheckBox.Create(frmDesign);
    CheckBox5.OnClick := @CheckBoxClick5;
    CheckBox5.Parent := frmDesign;
    CheckBox5.Left := 25;
    CheckBox5.Top := 180;
    CheckBox5.Width := 150;
    CheckBox5.Height := 30;
    CheckBox5.Caption := 'Run To Different Places?';
    CheckBox5.TabOrder := 8;

    Button1 := TButton.Create(frmDesign);
    Button1.OnClick := @ButtonClick;
    Button1.Parent := frmDesign;
    Button1.Left := 25;
    Button1.Top := 30;
    Button1.Width := 150;
    Button1.Height := 20;
    Button1.Caption := 'Run!';
    Button1.TabOrder := 8;

    Edit1 := TEdit.Create(frmDesign);
    Edit1.Parent := frmDesign;
    Edit1.Left := 200;
    Edit1.Top := 220;
    Edit1.Width := 150;
    Edit1.Height := 20;
    Edit1.TabOrder := 8;

    Edit2 := TEdit.Create(frmDesign);
    Edit2.Parent := frmDesign;
    Edit2.Left := 200;
    Edit2.Top := 250;
    Edit2.Width := 150;
    Edit2.Height := 20;
    Edit2.TabOrder := 8;

    Edit3 := TEdit.Create(frmDesign);
    Edit3.Parent := frmDesign;
    Edit3.Left := 200;
    Edit3.Top := 280;
    Edit3.Width := 150;
    Edit3.Height := 20;
    Edit3.TabOrder := 8;

    Edit4 := TEdit.Create(frmDesign);
    Edit4.Parent := frmDesign;
    Edit4.Left := 200;
    Edit4.Top := 310;
    Edit4.Width := 150;
    Edit4.Height := 20;
    Edit4.TabOrder := 8;

    Edit5 := TEdit.Create(frmDesign);
    Edit5.Parent := frmDesign;
    Edit5.Left := 200;
    Edit5.Top := 340;
    Edit5.Width := 150;
    Edit5.Height := 20;
    Edit5.TabOrder := 8;

    Edit6 := TEdit.Create(frmDesign);
    Edit6.Parent := frmDesign;
    Edit6.Left := 200;
    Edit6.Top := 370;
    Edit6.Width := 150;
    Edit6.Height := 20;
    Edit6.TabOrder := 8;

    Edit7 := TEdit.Create(frmDesign);
    Edit7.Parent := frmDesign;
    Edit7.Left := 200;
    Edit7.Top := 400;
    Edit7.Width := 150;
    Edit7.Height := 20;
    Edit7.TabOrder := 8;

    Edit8 := TEdit.Create(frmDesign);
    Edit8.Parent := frmDesign;
    Edit8.Left := 200;
    Edit8.Top := 430;
    Edit8.Width := 150;
    Edit8.Height := 20;
    Edit8.TabOrder := 8;

    Edit9 := TEdit.Create(frmDesign);
    Edit9.Parent := frmDesign;
    Edit9.Left := 200;
    Edit9.Top := 460;
    Edit9.Width := 150;
    Edit9.Height := 20;
    Edit9.TabOrder := 8;

    Edit10 := TEdit.Create(frmDesign);
    Edit10.Parent := frmDesign;
    Edit10.Left := 25;
    Edit10.Top := 220;
    Edit10.Width := 150;
    Edit10.Height := 20;
    Edit10.TabOrder := 8;
    Edit10.Text := 'OreTolerance =';
    Edit10.ReadOnly := True;

    Edit11 := TEdit.Create(frmDesign);
    Edit11.Parent := frmDesign;
    Edit11.Left := 25;
    Edit11.Top := 250;
    Edit11.Width := 150;
    Edit11.Height := 20;
    Edit11.TabOrder := 8;
    Edit11.Text := 'SecondsToWait =';
    Edit11.ReadOnly := True;

    Edit12 := TEdit.Create(frmDesign);
    Edit12.Parent := frmDesign;
    Edit12.Left := 25;
    Edit12.Top := 280;
    Edit12.Width := 150;
    Edit12.Height := 20;
    Edit12.TabOrder := 8;
    Edit12.Text := 'MinutesPerLoad =';
    Edit12.ReadOnly := True;

    Edit13 := TEdit.Create(frmDesign);
    Edit13.Parent := frmDesign;
    Edit13.Left := 25;
    Edit13.Top := 310;
    Edit13.Width := 150;
    Edit13.Height := 20;
    Edit13.TabOrder := 8;
    Edit13.Text := 'NumberOfLoads =';
    Edit13.ReadOnly := True;

    Edit14 := TEdit.Create(frmDesign);
    Edit14.Parent := frmDesign;
    Edit14.Left := 25;
    Edit14.Top := 340;
    Edit14.Width := 150;
    Edit14.Height := 20;
    Edit14.TabOrder := 8;
    Edit14.Text := 'NumberOfPlayers =';
    Edit14.ReadOnly := True;

    Edit15 := TEdit.Create(frmDesign);
    Edit15.Parent := frmDesign;
    Edit15.Left := 25;
    Edit15.Top := 370;
    Edit15.Width := 150;
    Edit15.Height := 20;
    Edit15.TabOrder := 8;
    Edit15.Text := 'StartPlayer =';
    Edit15.ReadOnly := True;

    Edit16 := TEdit.Create(frmDesign);
    Edit16.Parent := frmDesign;
    Edit16.Left := 25;
    Edit16.Top := 400;
    Edit16.Width := 150;
    Edit16.Height := 20;
    Edit16.TabOrder := 8;
    Edit16.Text := 'RunDirection =';
    Edit16.ReadOnly := True;

    Edit17 := TEdit.Create(frmDesign);
    Edit17.Parent := frmDesign;
    Edit17.Left := 25;
    Edit17.Top := 430;
    Edit17.Width := 150;
    Edit17.Height := 20;
    Edit17.TabOrder := 8;
    Edit17.Text := 'MouseSpeed =';
    Edit17.ReadOnly := True;

    Edit18 := TEdit.Create(frmDesign);
    Edit18.Parent := frmDesign;
    Edit18.Left := 25;
    Edit18.Top := 460;
    Edit18.Width := 150;
    Edit18.Height := 20;
    Edit18.TabOrder := 8;
    Edit18.Text := 'DirectionForOres =';
    Edit18.ReadOnly := True;


    End;

    // *************************** //

    Function WizGetData(TheData : String): String;
    var
      tString: String;
    begin
      Result := '';
      tString := TheData + '=';
      if(Pos(tString, cFile) = 0)then
        Exit;
      Result := cFile;
      Delete(Result, 1, Pos(tString, cFile));
      Result := Copy(Result, Length(tString), Pos(Chr(13), Result) - Length(tString));
    end;

    // *************************** //

    procedure LoadSettings;
    var
    afile:integer;
    begin
    //  afile := OpenFile('includes/SRL/SRL/misc/' + FileName + '.srl', False);
      afile := OpenFile(AppPath + FileName + '.srl', False);
      ReadFileString(aFile, cFile, FileSize(aFile));
      CloseFile(aFile);
        begin
          Edit1.Text := WizGetData('OreTol');
          Edit2.Text := WizGetData('SecPOre');
          Edit3.Text := WizGetData('MinPLoad');
          Edit4.Text := WizGetData('NumOfLoads');
          Edit5.Text := WizGetData('NumOfPlayers');
          Edit6.Text := WizGetData('StartPlayer');
          Edit7.Text := WizGetData('RunDir');
          Edit8.Text := WizGetData('MouseSpeed');
          Edit9.Text := WizGetData('DirForOres');
        end;
    end;

    // *************************** //

    procedure SaveSettings;
    var
      afile:integer;
    begin
     aFile := RewriteFile(AppPath + FileName + '.srl', false);
    //  aFile := RewriteFile('includes/SRL/SRL/misc/' + FileName + '.srl', false);

      WriteFileString(aFile, 'OreTol'       + '=' + Edit1.Text + Chr(13));
      WriteFileString(aFile, 'SecPOre'      + '=' + Edit2.text + Chr(13));
      WriteFileString(aFile, 'MinPLoad'     + '=' + Edit3.text + Chr(13));
      WriteFileString(aFile, 'NumOfLoads'   + '=' + Edit4.text + Chr(13));
      WriteFileString(aFile, 'NumOfPlayers' + '=' + Edit5.text + Chr(13));
      WriteFileString(aFile, 'StartPlayer'  + '=' + Edit6.text + Chr(13));
      WriteFileString(aFile, 'RunDir'       + '=' + Edit7.text + Chr(13));
      WriteFileString(aFile, 'MouseSpeed'   + '=' + Edit8.text + Chr(13));
      WriteFileString(aFile, 'DirForOres'   + '=' + Edit9.text + Chr(13));
      CloseFile(aFile);
    end;

    // *************************** //

    Procedure SafeInitForm;

    Var
       V:TVariantArray;
    Begin
      SetArrayLength(V, 0);
      ThreadSafeCall('InitForm',V);
    End;

    Procedure ShowFormModal;

    Begin
      FrmDesign.ShowModal
    End;

    Procedure SafeShowFormModal;
    Var
       V: TVariantArray;
    Begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowFormModal', V)
    End;

    // *******END FORM******** //

    Procedure BitMaps;

    Begin

           Clay := BitmapFromString(4, 4, '86714C89734D8B7650907A52978' +
           '1569781569A8357957E55A1895CA38B5D9F875B9C8559AC9262A8' +
           '8F60A58D5FA1895C');

           PickaxeMask := BitmapFromString(18, 12, 'z78DA3330400037' +
           '3030C001F0CB1203DC3000EDEC22D555F4B48B9E3652622FE5AE2' +
           '5DE04EA86097E7B89497B948418252AA99B472889714CBDF42C1F' +
           '7099498BBC836C26005E85072C');

           OreMask := BitmapFromString(11, 11, 'z78DA73730301033070436' +
           '2238B60024C35B84CC0A5923C13F0BB937813F0EB22DE04CC5022' +
           'CF04CADD404CC890EA0BFCE2F85D4E4C6A212FF470998FCC0600F' +
           'B599CC1');

    End;

    // *************************** //

    Function HandleTrade:Boolean;

    Var
       TradeMark : LongInt;
       
    Begin

      If AcceptTrade Or TradeScreen Then
        Begin
          Result := True;
          Wait(1000+Random(501));
          TraderName := GetTraderName;
       
          ClickAllItemsBmpMaskTolWait('ffer', OreMask, 20, 25, 30+Random(30));
          Wait(1000+Random(501));
       
          Accept;
          MarkTime(TradeMark)
          While (Not PlayerAccepted) And (TimeFromMark(TradeMark) < 20000) Do Wait(1000+Random(501));
          If TimeFromMark(TradeMark) > 20000 Then Decline;
          Accept;
          MarkTime(TradeMark)
          While (TradeScreen2) And (TimeFromMark(TradeMark) < 20000) Do Wait(1000+Random(501));
          If TimeFromMark(TradeMark) > 20000 Then Decline;
          If TimeFromMark(TradeMark) < 20000 Then TypeSend('No Problem '+TraderName)
          Else TypeSend('Nvm '+TraderName)
          Trades := Trades +1;
          CloseWindow;
         
      End;
    End;

    // *************************** //

    Function FindRandoms(DoFindPick:Boolean):Boolean;

    Begin
    //  If HandleTrade Then Result := True;
      If FindNormalRandoms Then Result := True;
      If FindFight Then Begin Result := True; RunTo(RunDir,False); End;
      If DoFindPick Then Begin Result := True; FindPick; End;
      If NoGameTab Then Begin Players[CurrentPlayer].Loc := 'InGameTab'; Logout; Result := True; Exit; End;
    End;

    // *************************** //

    Function IsMultiPick(Equipped:Boolean):Boolean;

    Begin
    If Equipped Then
      Begin
      GameTab(4);
      If CountItemBmpMaskTol(PickaxeMask,20,25) = 0 Then
        Begin
        GameTab(5);
        If Not FindBitMapMaskTolerance(PickaxeMask,x,y,MIX1,MIY1,MIX2,MIY2,20,25) Then Result := False
        Else Result := True;
        End
      Else Result := True;
      End

    Else
      Begin
      If CountItemBmpMaskTol(PickaxeMask,20,25) = 0 Then Result := True
      Else Result := False;
      End;
    End;

    // *************************** //

    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;
    WriteLn('Standard OreColor1 = '+IntToStr(OreColor1)+'; and Standard OreColor2 = '+
    IntToStr(OreColor2)+'; and Standard OreColor3 = '+IntToStr(OreColor3)+';');
    End;

    // *************************** //

    Procedure FindOreByCamera(MaxTol:Integer);

    Var D,Tol:Integer;
    Begin
      Tol:=1;
      While (Not (FindColorTolerance(X, Y, OreColor, MSX1, MSY1, MSX2, MSY2, Tol))
        And Not (D>50) And Not (Tol>MaxTol)) Do
        Begin
          SendArrowSilentWait((Random(2) * 2) +1, 10);
          D:=D+1;
          Tol:=Tol+1;
        End;
      D:=0;
      Tol:=1;
      Wait(400+Random(200));
    End;

    // *************************** //

    Function FindOre(MaxTol:Integer):Boolean;

    Var Tol,Ex,Ey:Integer;

    Begin
    H:=H+1;
      For G := 1 to H do
       Begin
        Case G Of
          1: OreColor:= OreColor1;
          2: OreColor:= OreColor2;
          3: OreColor:= OreColor3;
        End;
       End;
      While (Not (FindColorTolerance(Ex, Ey, OreColor, MSX1, MSY1, MSX2, MSY2, Tol))
      And Not (Tol > MaxTol)) Do
        Begin
          Tol:=Tol+1;
        End;
      If ((FindColorTolerance(Ex, Ey, OreColor, MSX1,MSY1 ,MSX2, MSY2, Tol))
      And Not (Tol > MaxTol)) Then Result:=True;
      Tol:=1;
      Wait(10);
    End;

    // *************************** //

    Function TheMinCount(TheNewRocks:Boolean):Integer;

    Begin
      If Not NewOres Then Result := 6
      Else Result := 3;
    End;

    // *************************** //

    Function PowerMine:Boolean;

    Var
       Dx,Dy,Ex,Ey,TempX,TempY   :  Integer;
       TempCount                 :  Integer;
    Begin
      If FindOre(OreTol) Then
      Begin
        TempCount := InventoryCount;
        Result := True;
        If FindObjOre(Dx, Dy, 'Mine', OreColor, OreTol, TheMinCount(NewOres)) Then
        Begin
          H:=0;
          If Not GasCheck(Dx, Dy) Then
         
          Begin
            If Random (20) < 18 Then Mouse(Dx, Dy, 0, 0, True)
            Else
              Begin
                Mouse(Dx, Dy, 0, 0, False);
                ChooseOption(Ex, Ey, 'ine');
              End;
            If (FlagPresent) Then
              Begin
                Flag;
                Wait(500+Random(500));
              End;
            MarkTime(Mark);
            While Not ((TimeFromMark(Mark) > (1000 * SecondsToWait)) Or (TempCount <> InventoryCount)) Do
              Begin
                GasDir := GasDir+1;
                Dx := TempX;
                Dy := TempY;
                If GasDir > 5 Then GasDir := 1;
                  Case GasDir Of
                    1 : Begin Dx := TempX;     Dy := TempY; End;
                    2 : Begin Dx := MSCX + 20; Dy := MSCX + 20; End;
                    3 : Begin Dx := MSCX - 20; Dy := MSCX - 20; End;
                    4 : Begin Dx := MSCX + 20; Dy := MSCX - 20; End;
                    5 : Begin Dx := MSCX - 20; Dy := MSCX + 20; End;
                  End;
                If GasCheck(Dx, Dy) Then Begin Mouse(MMCX, MMCY, 2, 2, True); Wait(5001+Random(5001)); End;
                Wait(50);
                FindRandoms(True)
              End
          End
          Else Wait(10000+Random(5000));   // If Gas found..... Then wait.
        End;
      End
      Else If H>2 Then H:=0;
    End;

    // *************************** //

    Procedure RunToDropOres(Dir: String; RunFar: Boolean);
    Begin
      If( RunFar )then
      Case UpperCase(Dir) Of
        'N': MouseFlag(648,  83-63, 5, 5)
        'S': MouseFlag(648,  83+63, 5, 5)
        'E': MouseFlag(648+63,  83, 5, 5)
        'W': MouseFlag(648-63,  83, 5, 5)
      End;
      If( Not RunFar )then
      Case UpperCase(dir) Of
        'N':  MouseFlag(648, 83-30, 5, 5)
        'S':  MouseFlag(648, 83+30, 5, 5)
        'E':  MouseFlag(648+30, 83, 5, 5)
        'W':  MouseFlag(648-30, 83, 5, 5)
      End;
    End;

    // *************************** //

    Procedure RunBackToOres(Dir: String; RunFar: Boolean);

    Begin
      If (RunFar) Then
      Case UpperCase(Dir) Of
        'N':  MouseFlag(648, 83+63, 5, 5)
        'S':  MouseFlag(648, 83-63, 5, 5)
        'E':  MouseFlag(648-63, 83, 5, 5)
        'W':  MouseFlag(648+63, 83, 5, 5)
      End;
      If ( Not RunFar ) Then
      Case UpperCase(Dir) Of
        'N':  MouseFlag(648, 83+30, 5, 5)
        'S':  MouseFlag(648, 83-30, 5, 5)
        'E':  MouseFlag(648-30, 83, 5, 5)
        'W':  MouseFlag(648+30, 83, 5, 5)
      End;
      GameTab(4);
    End;

    // *************************** //

    Procedure RandomDirection;

    Var Direction:Integer;

    Begin
      Direction := Direction+1+Random(5);
      Case (Direction) Of
        1: Begin DirectionForOres := 'N';    North   := North+1;  End;
        2: Begin DirectionForOres := 'E';    East    := East+1;   End;
        3: Begin DirectionForOres := 'S';    South   := South+1;  End;
        4: Begin DirectionForOres := 'W';    West    := West+1;   End;
        5: Begin DirectionForOres := 'NONE'; None    := None+1;   End;
      End;
      Direction := 0;
    End;

    // *************************** //

    Procedure ToDirForOres;

    Begin
      If ((DiffOrePlaces=True) And (DropOresInDir=True)) Then RandomDirection;
      If DirectionForOres <> UpperCase('None') Then
        Begin
          If DropOresInDir Then Face('N');
          If DropOresInDir Then RunToDropOres(DirectionForOres,False);
        End;
    End;

    // *************************** //

    Procedure BackDirForOres;

    Begin
      If DirectionForOres <> UpperCase('None') Then
        Begin
          If DropOresInDir Then Face('N');
          If DropOresInDir Then RunBackToOres(DirectionForOres,False);
        End;
    End;

    // *************************** //

    Procedure CountThem;

    Begin
      Players[CurrentPlayer].Integer2:= Players[CurrentPlayer].Integer2+
      CountItemBmpMaskTol(OreMask, 20, 25);

      Players[CurrentPlayer].Integer2:= Players[CurrentPlayer].Integer2+
      CountItemBmpTol(Clay, 10);

      Ores:=Ores+CountItemBmpMaskTol(OreMask, 20, 25);
      Ores:=Ores+CountItemBmpTol(Clay, 10);
    End;

    // *************************** //

    Procedure DropAllOres;

    Begin
      ToDirForOres;
      CountThem;
     
      ClickAllItemsBmpMaskTolWait('rop', OreMask, 20, 25, 30+Random(30));
      ClickAllItemsBmpTolWait('rop', Clay, 10, 30+Random(30));
      DwarfItem;
      Players[CurrentPlayer].Integer1:=Players[CurrentPlayer].Integer1+1;
     
      BackDirForOres;
    End;

    // *************************** //

    Procedure PlayerReport;

    Var Active: String;
    Var I:Integer;

    Begin
    For I  :=  0 to HowManyPlayers - 1 Do
       Begin
       If Players[i].Active=True Then Active := 'True' Else Active := 'False';
       WriteLn( (IntToStr(I))+' : '+Players[I].name+ ' = '+
       Active+'; Mined and dropped : '+IntToStr(Players[I].Integer2)+' Ores;')
       WriteLn(' Mining Level : '+IntToStr(Players[i].Level[15]));
       WriteLn('');
       End;
    End;

    // *************************** //

    Procedure PowerMinerReport;

    Begin
      ClearDebug;
      WriteLn('***********************************************')
      WriteLn('')
      WriteLn('You are using a Powerminer created by Wizzup?.')
      WriteLn('')
      WriteLn('Ores Mined and Dropped : '+IntToStr(Ores));
      Writeln('Worked for '+ TimeRunning);
      WriteLn('')
      WriteLn('***********************************************')
      WriteLn('')
      PlayerReport;
      WriteLn('')
      WriteLn('***********************************************')
    End;
    // *************************** //

    Procedure ConstToVars;

    Begin
      NewOres :=          CheckBox1.Checked;
      AutoColor :=        CheckBox2.Checked;
      BenMouse :=         CheckBox3.Checked;
      DropOresInDir :=    CheckBox4.Checked;
      DiffOrePlaces :=    CheckBox5.Checked;

      OreTol :=           StrToInt(Edit1.Text);
      SecondsToWait :=    StrToInt(Edit2.Text);
      MinutesPerLoad :=   StrToInt(Edit3.Text);
      Loads :=            StrToInt(Edit4.Text);
      HowManyPlayers :=   StrToInt(Edit5.Text);
      StartPlayer :=      StrToInt(Edit6.Text);
      RunDir :=           UpperCase(Edit7.Text);
      MouseSpeed :=       StrToInt(Edit8.Text);
      DirectionForOres := UpperCase(Edit9.Text);
    End;

    // *************************** //

    Function AutoSetColor:Boolean;

    Var Ax,Ay,TempColor:Integer;

    Begin

    Wait(4000);

    WriteLn('AutoColor is now gathering the colors, please wait.');
    Begin
      If FindObj(Ax,Ay,'ine',OreColor1,9) Then
        Begin
          TempColor := OreColor1;
          OreColor1 := GetColor(Ax,Ay);
          If Not SimilarColors(TempColor,OreColor1,14) Then
          Begin
            OreColor1 := TempColor;
            OreTol := 9;
          End
          Else If Players[0].String1 = Players[0].String2 Then Result := True;
          WriteLn('AutoColor OreColor1 = '+IntToStr(OreColor1));
        End;

      If Players[0].String1 <> Players[0].String2 Then

      Begin
        If FindObj(Ax,Ay,'ine',OreColor2,9) Then
        Begin
          TempColor := OreColor2;
          OreColor2 := GetColor(Ax,Ay);
          If Not SimilarColors(TempColor,OreColor2,14) Then
          Begin
            OreColor2 := TempColor;
            OreTol := 9;
          End
          Else If (Players[0].String1 <> Players[0].String3) Or
         (Players[0].String2 = Players[0].String3) Then Result := True;
          WriteLn('AutoColor OreColor2 = '+IntToStr(OreColor2));
        End;
      End;

      If (Players[0].String1 <> Players[0].String3) Or
         (Players[0].String2 <> Players[0].String3) Then

         Begin
         If FindObj(Ax,Ay,'ine',OreColor3,9) Then
           Begin
             TempColor := OreColor3;
             OreColor3 := GetColor(Ax,Ay);
             If Not SimilarColors(TempColor,OreColor3,14) Then
             Begin
               OreColor3 := TempColor;
               OreTol := 9;
             End
             Else Result := True;
             WriteLn('AutoColor OreColor3 = '+IntToStr(OreColor3));
           End;
         End;
    End
    End;

    // *************************** //

    Procedure TheAutoColor;

    Begin
      If AutoColor Then
      Begin
        Repeat
          Wait(50);
          J := J+1;
        Until(AutoSetColor Or (J >4));
        J := 0;
      End;
    End;

    // *************************** //

    Procedure SetupScript;

    Begin
      ClearDebug;
      SetupSRL;
      SetupSRLMining;
      BitMaps;
      ConstToVars;

      DeclarePlayers;
      CurrentPlayer := StartPlayer;
      LoginPlayer;
     
      SetOreColor;
      TheAutoColor;
     
      EquipPick := Players[CurrentPlayer].Boolean1;
      FindPickHeadColor;
     
      Players[CurrentPlayer].Level[15] :=GetSkillLevel('mining');
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    End;

    // *************************** //

    Procedure DoChats;

    Begin
      SetChat('On', 1);
      SetChat('On', 1);
      SetChat('Off', 2);
      SetChat('Off', 2);
      SetChat('On', 3);
      SetChat('On', 3);
    End;

    // *************************** //

    Function HandleNoPick:Boolean;

    Begin
        If NoPick Then
          Begin
          If Not IsMultiPick(Players[CurrentPlayer].Boolean1) Then
            Begin
              Result := True;
              Logout;
            End
          Else NoPick:=False;
          End;
    End;

    // *************************** //

    Begin

    SafeInitForm;
    If FileName = '' then FileName :='chars';
    LoadSettings;
    SafeShowFormModal;
    SaveSettings;
    SetupScript;
    SetMouseMode(False);
    DoChats;
    SetRun(True);
    Repeat
      MarkTime(MyMark)
      Repeat
        PowerMine;
        FindRandoms(False);
        If HandleNoPick Then Break;
      Until (( InventoryCount = 28 )
      Or (TimeFromMark( MyMark ) > 1000 * 60 * MinutesPerLoad))

      If (Random (5) > 3) Then SetRun(True);
      If LoggedIn Then DropAllOres;

      PowerMinerReport;

    If ( LoggedIn And (Players[CurrentPlayer].Integer1 mod Loads = 0 )) Then
      Begin
        LogOut;
        NextPlayer(True);
        SetOreColor;
        TheAutoColor;
        Players[CurrentPlayer].Level[15] :=GetSkillLevel('mining');
        EquipPick := Players[CurrentPlayer].Boolean1;
        FindPickHeadColor;
        FindOreByCamera(OreTol);
        DoChats;
      End;

    If Not LoggedIn Then
      Begin
        NextPlayer(False);
        NoPick:=False;
        SetOreColor;
        TheAutoColor;
        Players[CurrentPlayer].Level[15] :=GetSkillLevel('mining');
        EquipPick := Players[CurrentPlayer].Boolean1;
        FindPickHeadColor;
        FindOreByCamera(OreTol);
        DoChats;
      End;

    Until(False);
    End.

    Lom_server_dude@hotmail.com if ya wanna help me out through MSN

  9. #9
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok, i dunno what the hell you did to it , but first of all i suggest redownloading the powerminer... if it still doesnt work, then around line 472 there is a procedure called LoadSettings, change that entire procedure to :

    SCAR Code:
    procedure LoadSettings;
    var
    afile:integer;
    begin
    //  afile := OpenFile('includes/SRL/SRL/misc/' + FileName + '.srl', False);
        begin
          Edit1.Text := WizGetData('OreTol');
          Edit2.Text := WizGetData('SecPOre');
          Edit3.Text := WizGetData('MinPLoad');
          Edit4.Text := WizGetData('NumOfLoads');
          Edit5.Text := WizGetData('NumOfPlayers');
          Edit6.Text := WizGetData('StartPlayer');
          Edit7.Text := WizGetData('RunDir');
          Edit8.Text := WizGetData('MouseSpeed');
          Edit9.Text := WizGetData('DirForOres');
        end;
    end;

    And don't forget the MakeCompass instead of Face
    Administrator's Warning:


  10. #10
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Downloaded 2.5 now and now its a different error Im really sorry but i wanna get decent mining and i am doin alota legit work in the meanwhile.
    Failed when compiling
    Line 712: [Error] (16546:1): Identifier expected in script C:\Program Files\SCAR 2.03\Scripts\Powerminer 2.5.scar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 04-16-2023, 08:33 PM
  2. Wizzup Ess Miner Problem
    By rsmacro555 in forum OSR Help
    Replies: 2
    Last Post: 07-08-2007, 04:17 PM

Posting Permissions

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