Adblock breaks this site

SCAR script for "click the button"

Discussion in 'Scar/Simba General Discussion' started by hoogli, Apr 22, 2007.

  1. hoogli

    hoogli Guest

    Referrals:
    0
    SCAR script for "click the button"

    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.
    
     
  2. leon64

    leon64 Forum Addict
    Banned

    Joined:
    Apr 28, 2006
    Posts:
    610
    Referrals:
    1
    Sythe Gold:
    0
    SCAR script for "click the button"

    It is kool... I am testing it right now :)....
     
  3. crapkiller

    crapkiller Forum Addict

    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0
    SCAR script for "click the button"

    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...
     
  4. Gofez0r

    Gofez0r Guru

    Joined:
    Jan 21, 2007
    Posts:
    1,820
    Referrals:
    1
    Sythe Gold:
    0
    SCAR script for "click the button"

    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).
     
  5. Fourscape

    Fourscape Active Member

    Joined:
    Jan 24, 2007
    Posts:
    118
    Referrals:
    0
    Sythe Gold:
    0
    SCAR script for "click the button"

    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...
     
  6. crapkiller

    crapkiller Forum Addict

    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0
    SCAR script for "click the button"

    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
     
  7. Cry M O R E

    Cry M O R E Guest

    Referrals:
    0
    SCAR script for "click the button"

    woah sweet
     
  8. Sorrowstfu

    Sorrowstfu Apprentice

    Joined:
    Apr 24, 2007
    Posts:
    754
    Referrals:
    0
    Sythe Gold:
    0
    SCAR script for "click the button"

    I concur ^^
     
  9. Teizhcial

    Teizhcial Guest

    Referrals:
    0
    SCAR script for "click the button"

    [Error] identifier expected in script

    WTF :(
     
  10. Chappers

    Chappers Guru
    Banned

    Joined:
    Apr 30, 2007
    Posts:
    1,039
    Referrals:
    0
    Sythe Gold:
    0
    SCAR script for "click the button"

    Heh, cool script! Made 2m....
     
  11. hoogli

    hoogli Guest

    Referrals:
    0
    SCAR script for "click the button"

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

    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.
     
< Scar Source | wtf this is pissing me off >


 
 
Adblock breaks this site