Results 1 to 7 of 7

Thread: powerminner...

  1. #1
    Join Date
    Jul 2007
    Location
    So Cal
    Posts
    410
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default powerminner...

    SCAR Code:
    program PowerMiner;

    {.include SRL/SRL.scar}

    const
    RockColour1= 1111111;
    RockColour2= 2222222;

    var  x, y, Tries: integer; Copper: integer; Tin: integer; Iron: integer;



    procedure DeclarePlayers;
    begin
      HowManyPlayers := 3;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0
     
      Players[0].Name    := '';
      Players[0].Pass    := '';
      Players[0].Nick    := '';
      Players[0].Active  := True;
     
      Players[1].Name    := '';
      Players[1].Pass    := '';
      Players[1].Nick    := '';
      Players[1].Active  := False;

      Players[2].Name    := '';
      Players[2].Pass    := '';
      Players[2].Nick    := '';
      Players[2].Active  := False;
    end;

    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True, 1,15000);
      FindNormalRandoms;
      FindLamp('Mining');
    end;

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(6) of
        1: RandomRClick;
        2: HoverSkill('Random', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;

    procedure DTMs;
    begin
      Copper := DTMFromString('78DA63F467606030644001E74A8CC1342394C' +
           'F1802243418B002143546D865E16A4076991330C70BD33D18E678' +
           '02096D026AFCB0B99911D3CD9AF8D500000AA60575');
           
      Tin := DTMFromString('78DA6334676060086740010DE5650C5C409A1' +
           '188FF0301A3039011C58006189148206D05246208A8B100120904' +
           'D41812A1460FD3CD58CD8924A0C60848641050E348845DC640229' +
           '0801A4B2011845F0D001AE30BCB');
           
      Iron := DTMFromString('78DA63AC676060B06240015EBA4A0C5C409A1' +
           '188FF030163339061C2801530C2E84E20614C404D2B90B0C12E0B' +
           '57530B249C09A8A9C47433865D65D8DC83C51C3D02E6346053836' +
           '64E3990B0C5AF06007CCE0BCB');
    end;




    {*******************************************************************************
    Function w_WizzupGas(cx,cy: integer): Boolean;
    By: Wizzup?
    Description: Wizzup?'s gas finding!
    *******************************************************************************}

    Function w_WizzupGas(cx,cy: integer): Boolean;

    Var
       CTS, I, Le, T, Time: Integer;
       P, P2: TPointArray;
       C, C2: TIntegerArray;
       R, G, B: Integer;
       H, S, L: Extended;
       X, Y, Z: Extended;
       GP: TPoint;

    Begin
      if not(LoggedIn)then Exit;
      Result := False;

      Time := GetSystemTime;

      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 0.46);
      GP.X := cx;
      GP.Y := cy;
      GP.Y := GP.Y - 20;
      try
        FindColorsTolerance(P, 9083807, GP.x - 25, GP.y - 25, GP.X + 25, GP.Y + 25, 15);
      except
      end;
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      If Length(P) < 60 Then
        Exit;

      try
        C := GetColors(P);
        C2 := C;
        ClearSameIntegers(C);
      except
        Writeln('Memory leakage! Restart scar!!');
        TerminateScript;
      end;


      If Length(C) < 40 Then // Maybe lower the value.
      //If Length(C) < 60 Then
      Begin
        Exit;
      End;

      SetLength(C, 0);
      SetLength(C, Length(C2));
      SetLength(P2, Length(P));

      Le := High(C2);

      For I := 0 To Le Do
      Begin
        ColorToRGB(C2[i], R, G, B);
        //If ((R - G) <= 6) And (G - B > 7) Then
        If ((R - G) <= 10) And (G - B > 7) Then
        Begin
          ColorToHSL(C2[i], H, S, L);
          If (H > 11.5) And (H < 16.0) And (S < 16.0) And (S > 2.0) And (L > 42.0) And (L < 71.0) Then
          Begin
            ColorToXYZ(C2[i], X, Y, Z);
            If (X >= 18.0) And (X <= 45.0) And (Y >= 20.0)
                           And (Y <= 48.0) And (Z >= 15.0)
                           And (Z <= 47.0) And (Abs(X - Y) < 3.0)
                           And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 6.5)
                            Then
            Begin
              C[T] := C2[i];
              P2[T] := P[i];
              T := T + 1;
            End;
          End;
        End;
      End;
      SetLength(C, T);

      ClearSameIntegers(C);

      If Length(C) < 25 Then
      Begin
        Exit;
      End;
      Result := True;
    End;

    {*******************************************************************************
    Function MKFindGas:boolean;
    By: MasterKill
    Description: FindGas by MasterKill.
    *******************************************************************************}

    Function MKFindGas:boolean;
    begin
      if not LoggedIn then Exit;
      if (FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1)) then result:= true;
    end;


    {*******************************************************************************
    procedure AntiGas;
    By: The[Cheese]
    Description: Finds and handles gas.
    *******************************************************************************}

    procedure AntiGas;
    begin
      if not(LoggedIn)then Exit;
      if((w_WizzupGas(269, 188)) or (MKFindGas))then
      begin
        ReportVars[6] := ReportVars[6] + 1;
        Inc(Players[CurrentPlayer].Integers[22]);
        case Random(5) of
          0: TypeSend('Ugh dumb gas');
          1: TypeSend('omg i hate gas');
          2: TypeSend('who passed the gas?');
          3: TypeSend('plz dont kill my pick gas!');
          4: TypeSend('lol gas is annoying.');
          5: TypeSend('ahh gas!');
        end;
        wait(20000 + Random(10000));
        repeat
          wait(100);
        until not((w_WizzupGas(269, 188)) or (MKFindGas));
      end;
    end;


    procedure RockMining;
    begin
    if not LoggedIn then Exit;
      AntiRandoms;
      AntiGas;
      AntiBan;
      if (not (FindObjCustom(x, y, ['Mi', 'ne'], [RockColour1, RockColour2], 7))) then
        Wait(100+random(100));
        Tries := Tries + 1;
        if(Tries = 20) then
          begin
            Logout;
            Exit;
          end else
        AntiGas;
        AntiRandoms;
        AntiBan;
        if FindObjCustom(x, y, ['Min', 'ine'], [RockColour1, RockColour2], 7) then
        repeat
          case (Random(2)) of
          0: begin Mouse(x, y, 4, 4, False); ChooseOption('ine');
            end;
          1: begin Mouse (x, y, 4, 4, True);
          AntiRandoms;
          end;
        end;
      until (InvFull);
    end;

    procedure DropTheOre;
    begin
      if FindDTM(Tin, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 5, 5, false);
        ChooseOption('rop');
    end;

      if FindDTM(Iron, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 5, 5, false);
        ChooseOption('rop');
      end;

       
      if FindDTM(Copper, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 5, 5, false);
        ChooseOption('rop');
      end;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      ActivateClient;
      DTMs;
      DropTheOre;
      FreeDTM(Tin);
      FreeDTM(Iron);
      FreeDTM(Copper);
      repeat
        RockMining;
        AntiBan;
      until (False)
    end.

    This is v 1.2 i fixed the login and it now has dtms for dropping iron,tin, and copper

  2. #2
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Nice script just had quick read of it not bad so far but
    as you might be doing already get a prog on it also your are getting a error
    [Runtime Error] : Out Of Range in line 1211 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
    if you need any help ill try my best i can help you with a prog if u want me to edit your script i will be happy to just private me

    anyway gratz on script

    CRU1Z1N........
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  3. #3
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just a question..
    what of this script is yours?
    i see credits everywhere..
    the cheese, wizzup, masterkill and so on..
    anyway.. congrats on first script

  4. #4
    Join Date
    Jul 2007
    Location
    So Cal
    Posts
    410
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    Nice script just had quick read of it not bad so far but
    as you might be doing already get a prog on it also your are getting a error
    if you need any help ill try my best i can help you with a prog if u want me to edit your script i will be happy to just private me

    anyway gratz on script

    CRU1Z1N........
    odd i never get an error

  5. #5
    Join Date
    Jul 2007
    Location
    So Cal
    Posts
    410
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    v 1.2 released

  6. #6
    Join Date
    May 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it doesnt work for me

  7. #7
    Join Date
    Jun 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    good

    pretty good

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. powerminner..
    By thebob142 in forum First Scripts
    Replies: 2
    Last Post: 04-28-2008, 03:11 AM
  2. lvl 3 powerminner idea
    By dreygoth in forum OSR Help
    Replies: 2
    Last Post: 04-07-2008, 09:20 AM
  3. My Updated Powerminner
    By RudeBoiAlex in forum RS3 Outdated / Broken Scripts
    Replies: 18
    Last Post: 01-28-2008, 11:17 PM
  4. autocolor for powerminner
    By RudeBoiAlex in forum OSR Help
    Replies: 7
    Last Post: 03-20-2007, 06:35 PM
  5. My PowerMinner
    By RudeBoiAlex in forum RS3 Outdated / Broken Scripts
    Replies: 11
    Last Post: 03-04-2007, 06:21 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
  •