Results 1 to 6 of 6

Thread: Random Double Clicking

  1. #1
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Random Double Clicking

    Hi,
    Today i made my first script but after using ACA when finding a ore to mine to seems to randomly click the ore twice.. and in the debug AutoColor = 5149181
    AutoColor = 8893177
    AutoColor = 8827384
    AutoColor = 9155836
    AutoColor = 4687078
    Anyway to make it stay to one ore and no double clicking?

    Thanks!

  2. #2
    Join Date
    Feb 2012
    Location
    UK
    Posts
    909
    Mentioned
    10 Post(s)
    Quoted
    191 Post(s)

    Default

    You're going to have to give some more information to get an answer. Post some or all of the script that is relevant.
    Solar from RiD.

  3. #3
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Well here it is:

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}


    function CopperColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.02, 1.48);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 6329580, MSX1, MSY1, MSX2, MSY2, 13);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 33.24) and (X <= 61.86) and (Y >= 26.81) and (Y <= 55.88) and (Z >= 8.26) and (Z <= 32.74) then
        begin
          Result := arC[i];
          Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Procedure Antiban;   //Thanks to Solidone40
    Begin

      Case Random(100) Of
        1: HoverSkill('Mining', False);
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: HoverSkill('smithing', False);
        6: PickUpMouse;
        7: RandomMovement;
        8: RandomRClick;
      end;
    end;

    Procedure MiniBreaker;
    Begin

      Case Random (160) Of
        1: Wait(40000 + random(7400));
        2: Wait(25500 + random(8550));
        3: Wait(60040 + random(6759));
        4: Wait(20400 + random(2549));
      end;
    end;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

    Procedure DropCopper;
    begin

    if(InvFull) then
    DropAllExcept([1]);// keep my pickaxe

    end;


    Procedure FullCheck;
    begin
      if(InvFull) then
      begin
      writeln('Dropping now');
      DropCopper;
      end;

    end;


    Procedure FindCopper;
    var x, y: integer;
    begin
       repeat
      if FindObj(x, y, 'ine', CopperColor, 1)Then
      mouse(x, y, 1, 1,1);
      ChooseOption('ine');
      repeat
      wait(1200+random(450));
      AntiBan;
      FullCheck;
      FindNormalRandoms;
           until not(IsUpText('opper')or(invFull))
      until(InvFull)

    end;


    begin

      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      repeat
    FindCopper;
    FullCheck;
    DropCopper;
    until(false)
    end.

  4. #4
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}



    function CopperColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.02, 1.48);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 6329580, MSX1, MSY1, MSX2, MSY2, 13);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 33.24) and (X <= 61.86) and (Y >= 26.81) and (Y <= 55.88) and (Z >= 8.26) and (Z <= 32.74) then
        begin
          Result := arC[i];
          Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Procedure Antiban;   //Thanks to Solidone40
    Begin

      Case Random(100) Of
        1: HoverSkill('Mining', False);
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: HoverSkill('smithing', False);
        6: PickUpMouse;
        7: RandomMovement;
        8: RandomRClick;
      end;
    end;

    Procedure MiniBreaker;
    Begin

      Case Random (160) Of
        1: Wait(40000 + random(7400));
        2: Wait(25500 + random(8550));
        3: Wait(60040 + random(6759));
        4: Wait(20400 + random(2549));
      end;
    end;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure FindCopper;
    var x, y: integer;
    begin
      repeat
        if FindObj(x, y, 'ine', CopperColor, 1)Then
        begin
          mouse(x, y, 1, 1,1);
          ChooseOption('ine');
          repeat
            wait(1200+random(450));
            AntiBan;
            FullCheck;
            FindNormalRandoms;
          until not(IsUpText('opper')or(invFull))
        end;
      until(InvFull)
    end;
    begin
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      repeat
        FindCopper;
        if(InvFull) then  //Removed Drop Copper and Full Checked
        begin             //Added it here
          writeln('Dropping now');
          DropAllExcept([1]);
        end;
      until(false)
    end.
    I removed a few things Like there was a if and you had it click no matter if it found it or not, so I wrapped that, also I sorted standards to make life a bit easier .



    ^^

  5. #5
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Mat View Post
    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}



    function CopperColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.02, 1.48);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 6329580, MSX1, MSY1, MSX2, MSY2, 13);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 33.24) and (X <= 61.86) and (Y >= 26.81) and (Y <= 55.88) and (Z >= 8.26) and (Z <= 32.74) then
        begin
          Result := arC[i];
          Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Procedure Antiban;   //Thanks to Solidone40
    Begin

      Case Random(100) Of
        1: HoverSkill('Mining', False);
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: HoverSkill('smithing', False);
        6: PickUpMouse;
        7: RandomMovement;
        8: RandomRClick;
      end;
    end;

    Procedure MiniBreaker;
    Begin

      Case Random (160) Of
        1: Wait(40000 + random(7400));
        2: Wait(25500 + random(8550));
        3: Wait(60040 + random(6759));
        4: Wait(20400 + random(2549));
      end;
    end;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure FindCopper;
    var x, y: integer;
    begin
      repeat
        if FindObj(x, y, 'ine', CopperColor, 1)Then
        begin
          mouse(x, y, 1, 1,1);
          ChooseOption('ine');
          repeat
            wait(1200+random(450));
            AntiBan;
            FullCheck;
            FindNormalRandoms;
          until not(IsUpText('opper')or(invFull))
        end;
      until(InvFull)
    end;
    begin
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      repeat
        FindCopper;
        if(InvFull) then  //Removed Drop Copper and Full Checked
        begin             //Added it here
          writeln('Dropping now');
          DropAllExcept([1]);
        end;
      until(false)
    end.
    I removed a few things Like there was a if and you had it click no matter if it found it or not, so I wrapped that, also I sorted standards to make life a bit easier .
    but still it doesn't fix the problem of the double clicking and also it start mining a ore then switch to another any ideas?
    Last edited by imangry; 09-19-2012 at 06:18 PM.

  6. #6
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Quote Originally Posted by imangry View Post
    but still it doesn't fix the problem of the double clicking and also it start mining a ore then switch to another any ideas?
    Look up pixelshift, flight had a great tutorial on it. I also suggest you read through some working scripts and try to understand what's going on, many scripters comment their code to explain the functions.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

Thread Information

Users Browsing this Thread

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

Posting Permissions

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