This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
Actionhacks.netHomeLatest imagesRegisterLog in

 

 Aimbot part 1

Go down 
AuthorMessage
unholyshot99
VIP LVL-1
VIP LVL-1



Posts : 8
Reputation : 0
Join date : 2009-11-03
Age : 30
Location : VA

Aimbot part 1 Empty
PostSubject: Aimbot part 1   Aimbot part 1 EmptyWed Nov 04, 2009 5:08 am

This is alot of text i know but its user friendly the actual code is small as i keep adding to it every section
This is my variation - some people will prefere to code colour aimbots (unreliable) or addressed (useless in most games other than cs. So my way uses world co-ords (including North point/ south point)
What we do, is get our position by co-ordinates, in X,Y and Z (or East/West, North/South and Height), and the same for the enemy. With this, we can work out our relative angle between North (or a different point, which comes up later), our player, and the enemy. So in at the end of that, we get our angle to aim for (away from North) in order to look at the enemy. This is then used to set our rotational look onto the enemy. Then we do the same with the height (between a point which is straight ahead of us, our player, and the enemy) to get the angle we need to aim up/down.
So to start off we want 3 main functions


Code:
PHP Code:
PLAYER_DATA GetMyPlayerData(void)
PLAYER_DATA GetPlayerData(BYTE PlayerNumber)
void SetCrosshairOnEnemy(BYTE PlayerNumber)

PLAYER_DATA - I like to use some structs as well as functions. I was taught this way by evolution so i got used to it mu PLAYER_DATA structure holds valuable information about a player. Such as:



PHP Code:
typedef struct _PLAYER_DATA {
DWORD baseadd; // base address of this current player
DWORD coordEW; // East/West (X) co-ord
DWORD coordNS; // North/South (Y) co-ord
DWORD coordUD; // Up/Down (Z) co-ord
DWORD coordEWa; // The address of the players EW co-ord
DWORD coordNSa; // The address of the players NS co-ord
DWORD coordUDa; // The address of the players UD (up/down..wth was i thinking when naming this) co-ord
DWORD lookX; // The players X-axis look (what will change if you move the mouse side to side)
DWORD lookY; // The players Y-axis look (what will change if you move the mouse forwards and backwards)
DWORD lookXa; // The address of the X look
DWORD lookYa; // The address of the Y look
char name; // Holds the current players name
DWORD namea; // The address of the current players name
} PLAYER_DATA;

I don’t really know why I put all the addresses for everything in the struct, but helloo, might come in use when making something one day. All the stuff in there will come to use when making our aimbot, so here’s how to search for each of them (in DFX at least).
The easiest to start with is name, use Artmoney’s Text search
Co-ords:
NS - Move north, search increased, move south, search decreased
EW - Move east, search increased, move west, search decreased
UD - Move up (a hill/ladder), search increased, move down, search decreased
LookX - Move mouse left/right, search has changed…set your search range to around the other addies to narrow search down (this value may be different to DFX. In DFX, 0 was east, and it increased as you went anti-clockwise until you got to just before east, which was 0xFFFFFFFF)
LookY - Move mouse forward/backward, search has changed
You should be able to get the player base address from near enough any of these, and a pointer to get it in game. I use 2 pointers, 1 which always points to player 0’s (or 1, the 1st player in memory)’s base address, and 1 which always points to the base address of my player. Now we can modify the GetMyPlayerData and GetPlayerData functions to get us this info:

Now at the top of the C++, I define the bases:



PHP Code:
#define mBase 0xBD63D8
#define hBase 0xB0D228
///
PLAYER_DATA GetMyPlayerData(void)
{
PLAYER_DATA Player; // Create a blank PLAYER_DATA struct
ZeroMemory(&Player, sizeof(PLAYER_DATA)); // Initiate it all to 0 (thanks L.Spiro, this solved some problems)
Peek((void*)mBase,(void*)&Player.baseadd,4); // Get our players Base Address from the pointer
/*****made by stickleback******/
Player.coordEWa = Player.baseadd + 0×8; // Get all the addies for everything…the 0×8, 0xC and **** are the offsets I found for DFX
Player.coordNSa = Player.baseadd + 0xC;
Player.coordUDa = Player.baseadd + 0×10;
Player.lookXa = Player.baseadd + 0×14;
Player.lookYa = Player.baseadd + 0×18;
Player.namea = Player.baseadd + 0xF4;
Peek((void*)Player.coordEWa,(void*)&Player.coordEW ,4); // Now we got all the addies, read in the info from em all
Peek((void*)Player.coordNSa,(void*)&Player.coordNS ,4);
Peek((void*)Player.coordUDa,(void*)&Player.coordUD ,4);
Peek((void*)Player.lookXa,(void*)&Player.lookX,4);
Peek((void*)Player.lookYa,(void*)&Player.lookY,4);
Peek((void*)Player.namea,(void*)&Player.name,15);

return Player; // Give our PLAYER_DATA Player, as the return value
}
///
PLAYER_DATA GetPlayerData(BYTE PlayerNum) // Takes the number of the player as a param
{
PLAYER_DATA Player;
ZeroMemory(&Player, sizeof(PLAYER_DATA));
Peek((void*)hBase,(void*)&Player.baseadd,4);

Player.baseadd = Player.baseadd + (PlayerNum*0×388); // 0×388 is the gap between players, starting with player 1

Player.coordEWa = Player.baseadd + 0×8;
Player.coordNSa = Player.baseadd + 0xC;
Player.coordUDa = Player.baseadd + 0×10;
Player.lookXa = Player.baseadd + 0×14;
Player.lookYa = Player.baseadd + 0×18;
Player.namea = Player.baseadd + 0xF4;

Peek((void*)Player.coordEWa,(void*)&Player.coordEW ,4);
Peek((void*)Player.coordNSa,(void*)&Player.coordNS ,4);
Peek((void*)Player.coordUDa,(void*)&Player.coordUD ,4);
Peek((void*)Player.lookXa,(void*)&Player.lookX,4);
Peek((void*)Player.lookYa,(void*)&Player.lookY,4);
Peek((void*)Player.namea,(void*)&Player.name,15);

return Player;
}
///

Now that we’ve made our functions to collect all the data we need, it’s time to get to the core of the aimbot. This will be some Hcore reading so take a brake and make sure you really suck this in
This uses Trigganometry
Maths knowledge is needed to make this! If you’re useless at maths, and still reading, you’re also useless at english for not understanding the knowledge requirements at the top Let’s start with the X look.
Because DFX works around the East point (, facing Directly east = 0×00000000/0xFFFFFFFF), then all our calculations will be made off it. To help the understanding with this tutorial, I’ll include some snazzy little photoshuppered drawings, woo
The aimbot works in 4 sectors. This makes things easier when finding out distances. Here are the sectors and how to determine what sector an enemy is in :

Sector 1 = South-East of our position
Sector 2 = South-West of our position
Sector 3 = North-West of our position
Sector 4 = North-East of our position

So, let’s add these sectors to our source code. Note that also we have to tell our aimbot what to do if they are, for example, east of us, but the same on the NS axis. No need to put the code for if they are the same on both the NS and the EW axis, as otherwise you won’t need it to set an aim for you, you’re on them



PHP Code:
void SetCrosshairOnEnemy(BYTE PlayerNumber)
{
PLAYER_DATA oP = GetPlayerData(PlayerNumber); // oP = Opposition’s Player
PLAYER_DATA cP = GetMyPlayerData(); // cP = Current Player (our player) .. sorry for bad var names

/*Sec 1*/
if(oP.coordEW > cP.coordEW && oP.coordNS <= cP.coordNS)
{
}

/*Sec 2*/
if(oP.coordEW <= cP.coordEW && oP.coordNS < cP.coordNS)
{
}

/*Sec 3*/
if(oP.coordEW < cP.coordEW && oP.coordNS >= cP.coordNS)
{
}

/*Sec 4*/
if(oP.coordEW >= cP.coordEW && oP.coordNS > cP.coordNS)
{
}
}

Now, to get the angle we need to look, we have to make a triangle between the EW axis, us, and the player. Then we have to find the angle of which we are the apex. Here’s 1 of the snazzy little drawings:



This is a top view :
Blue dot = Our player
Red dot = enemy
Green = The triangle we make
Purple = The angle we need to find
Orange = The difference’s we need to work out for the angle

Incase you’ve forgotten Triganometry, then due to the 2 side we can get the easiest we will the Tangent function :
Tan(angle) = Opposite/Adjacent

In all our sectors, the Adjacent is the EW difference, and the Opposite is the NS difference. So let’s add some coding to our function :

Click on link below for the next page!
http://www.actionhacks.net/source-codes-f32/aimbot-part-2-t101.htm
THIS IS NOT MY WORK I DONT TAKE ANY CREDIT FOR THIS


Last edited by unholyshot99 on Wed Nov 04, 2009 7:10 am; edited 1 time in total
Back to top Go down
http://www.quickfixco.webs.com
 
Aimbot part 1
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: C++ :: Source Codes-
Jump to: