Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Sign in to follow this  
Artista

Basic Aimbot

Recommended Posts

I am trying to write an aimbot for fps game but couldn't. Here i get a compiler error.

 

 

program BasicAimbot;var clientWidth, clientHeight: Integer;   targetColor: Integer;               targetX, targetY: Integer; procedure GetClientDimensions(var Width, Height: Integer); begin   GetBoxSize(GetClient.ImageArea, clientWidth, clientHeight);     end;           begin   ClearDebug;   GetClient.Activate;   GetClientDimensions(clientWidth, clientHeight);     targetColor := 1386178;   repeat                         if FindColorSpiralTol(targetX, targetY, targetColor, clientWidth, clientHeight, 5) then       ClickMouse(targetX, targetY, mbLeft);         until False; end.

 

 

Error Message:

 

 

Invalid number of parameters @ line 23

 

 

Which is " if FindColorSpiralTol(targetX, targetY, targetColor, clientWidth, clientHeight, 5) then" this. Thanks.

Share this post


Link to post
Share on other sites

If you are not familiar with Ctrl-Space, it opens up a list of all possible procedures and functions available to you. When you open it and start typing in the name of the function you want to call it will reduce the list as more and more of the letters are typed. You can use arrows or mouse to scroll through the list as it displays and a click, space or enter on the highlighted command you want appears.

 

This is just to ensure the command you want still exists in the current version. It will also give a description of what the format of the command requires. I am thinking that the FindColorSpiralTol method you are using is for an older version as the version I have has a few more parameters.

 

I'm not entirely sure what you are trying to do, but I did modify your code so that the FindColorSpiralTol worked. It ended up in an endless loop for me, but I'm guessing you have a specific environment you will run it in.

 

 

program BasicAimbot;var clientWidth, clientHeight: Integer;   targetColor: Integer;               x,y,StartPointX,StartPointY,StartX,StartY,EndX,EndY,Tolerance: Integer; procedure GetClientDimensions(var Width, Height: Integer); begin   GetBoxSize(GetClient.ImageArea, clientWidth, clientHeight);     end;           begin   ClearDebug;   GetClient.Activate;   GetClientDimensions(clientWidth, clientHeight);     targetColor := 1386178;   startx := 0; //<-- Starting X point of your search area   starty := 0; //<-- Starting Y point of your search area   EndX := clientwidth; //<-- Ending X point of your search area   EndY := clientwidth; //<-- Ending Y point of your search area   StartPointX := clientwidth div 2; //<-- X coordinate of where you want spiral to start   StartPointY := clientheight div 2;//<-- Y coordinate of where you want spiral to start   Tolerance := 5;   repeat                         if FindColorSpiralTol(x,y,StartPointX,StartPointY,targetColor,StartX,StartY,EndX,EndY,Tolerance) then       ClickMouse(X, Y, mbLeft);         until False; end.

 

First two parameters (x,y) are the coord the function returns, the second two (StartPointX and StartPointY) are the coordinates where you want the spiral to start, the next 4 (startx,starty,endx,endy) is the area that you want to spiral search in, and last is the tolerance.

 

I'm not any kind of expert on Scar, but I did get it to run without the error and maybe it will be enough for you to work with until one of the true experts looks in on the forums.

Share this post


Link to post
Share on other sites
If you are not familiar with Ctrl-Space, it opens up a list of all possible procedures and functions available to you. When you open it and start typing in the name of the function you want to call it will reduce the list as more and more of the letters are typed. You can use arrows or mouse to scroll through the list as it displays and a click, space or enter on the highlighted command you want appears.

 

This is just to ensure the command you want still exists in the current version. It will also give a description of what the format of the command requires. I am thinking that the FindColorSpiralTol method you are using is for an older version as the version I have has a few more parameters.

 

I'm not entirely sure what you are trying to do, but I did modify your code so that the FindColorSpiralTol worked. It ended up in an endless loop for me, but I'm guessing you have a specific environment you will run it in.

 

 

program BasicAimbot;var clientWidth, clientHeight: Integer;   targetColor: Integer;               x,y,StartPointX,StartPointY,StartX,StartY,EndX,EndY,Tolerance: Integer; procedure GetClientDimensions(var Width, Height: Integer); begin   GetBoxSize(GetClient.ImageArea, clientWidth, clientHeight);     end;           begin   ClearDebug;   GetClient.Activate;   GetClientDimensions(clientWidth, clientHeight);     targetColor := 1386178;   startx := 0; //<-- Starting X point of your search area   starty := 0; //<-- Starting Y point of your search area   EndX := clientwidth; //<-- Ending X point of your search area   EndY := clientwidth; //<-- Ending Y point of your search area   StartPointX := clientwidth div 2; //<-- X coordinate of where you want spiral to start   StartPointY := clientheight div 2;//<-- Y coordinate of where you want spiral to start   Tolerance := 5;   repeat                         if FindColorSpiralTol(x,y,StartPointX,StartPointY,targetColor,StartX,StartY,EndX,EndY,Tolerance) then       ClickMouse(X, Y, mbLeft);         until False; end.

 

First two parameters (x,y) are the coord the function returns, the second two (StartPointX and StartPointY) are the coordinates where you want the spiral to start, the next 4 (startx,starty,endx,endy) is the area that you want to spiral search in, and last is the tolerance.

 

I'm not any kind of expert on Scar, but I did get it to run without the error and maybe it will be enough for you to work with until one of the true experts looks in on the forums.

 

Oh thanks. I missed 2 args right there. :confused:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...