• Log in or sign up for an account here: https://www.sythe.org/login

SCAR script for "click the button"

  • Thread starter Thread starter hoogli
  • Start date Start date
H

hoogli

Guest
if you thought mining in runescape was boring, check out http://www.braingle.com/games/click/index.php. The name is self-explanatory. The high scores for it go up to 4 million! Personally, I'm up to 50,000. I made a script to auto-click it using SCAR 3.03. It's not perfect, so I'm open to suggestions.

Code:
program clickthebutton;

//Version 1.0. Written by hoogli for
//http://www.braingle.com/games/click/index.php. Find
//the coordinates of the top left corner of the flash
//BEFORE starting the script, and enter them when prompted.
//Press alt+f4 to exit the script, since ctrl+f4 doesn't work.
//Feel free to change the number of saves made (line 45).
//Don't change anything else unless you know what you're doing.
//And don't forget to sign in before starting the script!

var
topleftX, topleftY, Xcoord, Ycoord,
clickssofar, savecount, randomwait, maxclicks, seed : integer;
setupform: TForm;
OKbutton: TButton;
imputX, imputY: TEdit;

procedure click;
begin
savecount := 0;
repeat
   for seed := 3 to 4 do
      begin
      randomwait := seed * seed * seed * seed;
      maxclicks := 555 - seed * seed * seed * seed * 2 + random(50);
      clickssofar := 0;
      repeat
         if findcolor(Xcoord, Ycoord, 3945227,
         topleftX, topleftY, topleftX + 350, topleftY + 300) then
            begin
            clickmouse(Xcoord, Ycoord, true);
            clickssofar := clickssofar + 1;
            wait(randomwait + random(seed * seed * seed));
            end
         else
            begin
            writeln('color not found');
            exit;
            end
      until (clickssofar > maxclicks);
      clickmouse(topleftX + 150, topleftY + 250, true);
      savecount := savecount + 1;
      wait(5000);
   end;
until savecount = 100
end;

procedure ButtonClick(sender: TObject);
begin
topleftX := strtoint(imputX.text);
topleftY := strtoint(imputY.text);
setupform.ModalResult:= mrOk;
click;
end;

procedure setup;
begin
setupform := createform;
setupform.Left := 250;
setupform.Top := 114;
setupform.BorderStyle := bsDialog;
setupform.Caption := 'Setup';
setupform.ClientHeight := 60;
setupform.ClientWidth := 160;
setupform.Visible := false;
OKbutton := TButton.Create(nil);
OKbutton.parent := setupform;
OKbutton.Left := 1;
OKbutton.Top := 25;
OKbutton.Width := 155;
OKbutton.Height := 25;
OKbutton.Caption := 'OK';
OKbutton.TabOrder := 3;
OKbutton.OnClick:= @ButtonClick;
OKbutton.default := true;
imputX := TEdit.Create(nil);
imputX.parent := setupform;
imputX.Autoselect := true;
imputX.Left := 1;
imputX.Top := 1;
imputX.Width := 75;
imputX.Height := 21;
imputX.TabOrder := 1;
imputX.Text := 'X';
imputY := TEdit.Create(nil);
imputY.parent := setupform;
imputY.Autoselect := true;
imputY.Left := 80;
imputY.Top := 1;
imputY.Width := 75;
imputY.Height := 21;
imputY.TabOrder := 2;
imputY.Text := 'Y';
end;

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

procedure ShowFormModal;
begin
setupform.ShowModal;
end;

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

begin
SafeMainInitForm;
SafeShowFormModal;
end.
 
Why so complicated? I made one thats like twice as fast as that, this is it....

Code:
program New;
var x,y:integer;
begin
repeat
findcolor(x, y, 16316664, 42, 38, 306, 262);
clickmouse(x, y, true);
until(false);
end.

If the user selects the screen using th cross hair u dont need todo the x y thing about where the window starts because 0, 0 goes from the fcornedr of ur screen to the corner of the app...
 
crapkiller, no until false :eek:? Can cause a lagg-attack and stop scar from ehm, stopping :p make it check a F-Key or something etc. and put a wait there too (reduces lagg.. Alot).
 
Code:
//Instructions : Drag Crosshair into game. Hold F8 To stop.

program New;
Var
  uX, uY, ButtonBitMap, ButtonBitMap2 : Integer;

Procedure LoadBit;
Begin
  ButtonBitMap := BitmapFromString(3, 3, 'F5F5F5DFE3E3DDE2E2CBD3D3DADFDFE' +
       'CEEEEF2F3F3D9DCDC979E9E');

  ButtonBitMap2 := BitmapFromString(3, 4, 'F8F8F8EDF5EAA5E48BF2F6F1C8ECBAC' +
       '5E9B7A2E188BFE6AFE8ECE7EBEBEBD3E4CD8FCE7A');
end;

Procedure RepeatClicks;
Begin
  Repeat
    If FindBitMapToleranceIn(ButtonBitMap, uX, uY, 0, 0, 350, 300, 20) or
       FindBitMapToleranceIn(ButtonBitMap2, uX, uY, 0, 0, 350, 300, 20) then
    Begin
      ClickMouse(uX - 10, uY - 10, True)
    end;
  Until IsFKeyDown(8)
end;

Begin
  LoadBit;
  Repeat
    RepeatClicks;
  Until IsFKeyDown(8)
end.

Owned...
 
crapkiller, no until false :eek:? Can cause a lagg-attack and stop scar from ehm, stopping :p make it check a F-Key or something etc. and put a wait there too (reduces lagg.. Alot).

No lagg and stops for me... and besides this isnt an SRl member application script... just messing around ya know seeing how messy i can be with scasr and still have it compile
 
Code:
//Instructions : Drag Crosshair into game. Hold F8 To stop.

program New;
Var
  uX, uY, ButtonBitMap, ButtonBitMap2 : Integer;

Procedure LoadBit;
Begin
  ButtonBitMap := BitmapFromString(3, 3, 'F5F5F5DFE3E3DDE2E2CBD3D3DADFDFE' +
       'CEEEEF2F3F3D9DCDC979E9E');

  ButtonBitMap2 := BitmapFromString(3, 4, 'F8F8F8EDF5EAA5E48BF2F6F1C8ECBAC' +
       '5E9B7A2E188BFE6AFE8ECE7EBEBEBD3E4CD8FCE7A');
end;

Procedure RepeatClicks;
Begin
  Repeat
    If FindBitMapToleranceIn(ButtonBitMap, uX, uY, 0, 0, 350, 300, 20) or
       FindBitMapToleranceIn(ButtonBitMap2, uX, uY, 0, 0, 350, 300, 20) then
    Begin
      ClickMouse(uX - 10, uY - 10, True)
    end;
  Until IsFKeyDown(8)
end;

Begin
  LoadBit;
  Repeat
    RepeatClicks;
  Until IsFKeyDown(8)
end.

Owned...

I concur ^^
 
crapkiller, no until false :eek:? Can cause a lagg-attack and stop scar from ehm, stopping :p make it check a F-Key or something etc. and put a wait there too (reduces lagg.. Alot).

sorry, i'm a SCAR newb, so i have no clue what you're talking about.

If the user selects the screen using th cross hair u dont need todo the x y thing about where the window starts because 0, 0 goes from the fcornedr of ur screen to the corner of the app...

whenever you save the clicks, the page refreshes, and the crosshair thingy messes up.

also, it's complicated because there's a rudimentary anti-botting feature where if you click too fast, or with the same speed for two saves in a row, the clicks don't count.
 
duelarena.gg
Back
Top