Ir para conteúdo
Faça parte da equipe! (2024) ×
Conheça nossa Beta Zone! Novas áreas a caminho! ×
  • Quem está por aqui   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.

Criando um aimbot completo


f3knight
 Compartilhar

Posts Recomendados

bm galera esse é um codigo completo de aimbot é somente aim estou fazendo isso pq vi q varias pessoas so querem aim e chams entao breve volto aki e coloko chams com color e td mais...

 

#include "Aimbot.h"

 

#define DISABLE_ASSERTS

#include "LTEulerAngles.h"

 

int BoneWeights[] = {35, 40, 10, 10, 5};

const char* AllBoneList[] = {"Torso", "Upper_torso", "Neck", "Bip01 Neck", "Head", "Bip01 Head", "Left_pelvis", "Left_hand", "Right_hand",

"Left_armu", "Right_armu", "Left_arml", "Right_arml", "Left_legu", "Right_legu", "Left_legl", "Right_legl",

"Left_foot", "Right_foot"};

float AllBoneOffsets[] = {0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};

 

CAimbot::CAimbot() : LockedOn(false), AimLastTicks(0), AimTimeLeft(0), AimTimeInitial(0), DontTarget(false)

{}

 

struct CALTTransform

{

LTVector m_vPos;

LTRotation m_rRot;

float m_fScale;

char idk[32];

};

 

int GetRandomBone()

{

// float BoneWeights[] = {0.35f, 0.35f, 0.10f, 0.15f, 0.05f};

int RandNum = rand() % 100;

for (int i = 0; i < 5; ++i)

{

if (RandNum < BoneWeights)

return i + 1;

RandNum -= BoneWeights;

}

return 1;

}

 

bool TryGetVisibleBone(const LTVector& MyPos, CharacterFX* CharFX, int& Bone, LTVector& BonePos)

{

HMODELNODE hNode;

LTVector EnemyPos;

CALTTransform BoneTrans;

for (int i = 0; i < sizeof(AllBoneList) / sizeof(const char*); ++i)

{

g_ModelLT->GetNode(CharFX->hObj, AllBoneList, &hNode);

if (hNode != INVALID_MODEL_NODE)

{

if (g_ModelLT->GetNodeTransform(CharFX->hObj, hNode, (LTTransform*) &BoneTrans, true) == LT_OK)

{

BoneTrans.m_vPos.y += AllBoneOffsets;

// LTVector Offset = BoneTrans.m_rRot****tateVector(LTVector(0.0f, 0.0f, AllBoneOffsets));

// EnemyPos += Offset;

 

if (IsVisible(MyPos, BoneTrans.m_vPos))

{

Bone = i;

BonePos = BoneTrans.m_vPos;

return true;

}

}

}

}

 

return false;

}

 

int GetBonePos(CharacterFX* CharFX, int AimType, LTVector& Pos)

{

if (CharFX->ObjInfo == 0)

return -1;

 

const char* BoneName[][5] = {{"Torso", "Upper_torso", "Neck", "Head", "Torso"}, {"Torso", "Upper_torso", "Bip01 Neck", "Bip01 Head", "Torso"}};

float BoneOffsets[] = {0.0f, 0.0f, 0.0f, 5.0f, -11.0f};

 

LTVector EnemyPos;

HMODELNODE hNode = INVALID_MODEL_NODE;

CALTTransform BoneTrans;

g_ModelLT->GetNode(CharFX->hObj, BoneName[0][AimType - 1], &hNode);

if (hNode == INVALID_MODEL_NODE)

{

g_ModelLT->GetNode(CharFX->hObj, BoneName[1][AimType - 1], &hNode);

if (hNode == INVALID_MODEL_NODE)

return -1;

}

if (g_ModelLT->GetNodeTransform(CharFX->hObj, hNode, (LTTransform*) &BoneTrans, true) != LT_OK)

return -1;

EnemyPos = BoneTrans.m_vPos;

// LTVector Offset = BoneTrans.m_rRot****tateVector(LTVector(0.0f, 0.0f, BoneOffsets[AimType - 1]));

// EnemyPos += Offset;

EnemyPos.y += BoneOffsets[AimType - 1];

Pos = EnemyPos;

 

return 0;

}

 

bool IsVisible(const LTVector& StartPos, const LTVector& EndPos);

 

int CAimbot:: DoAimbot(const AimInfo& d)

{

if (d.AimType == 0)

return 0;

 

static float MovementDivisor = 40.0f;

 

unsigned int LocalID;

g_LTClient->GetLocalID(&LocalID);

 

CLIENT_INFO* MyI[nfo = g_ClientInfoMgr->GetClientByID(LocalID);

if (MyInfo == 0)

return -1;

if (MyInfo->ObjInfo == 0)

return -1;

 

CLIENT_INFO* Player;

 

CharacterFX** CharFXList = g_SFXMgr->pCharFX;

int NumCharFX = g_SFXMgr[[->NumChars;

CharacterFX* CharFX;

 

if (d.DrawAimspot)

{

LTVector BonePos;

for (int i = 0; i < NumCharFX; ++i)

{

CharFX = CharFXList;

if (CharFX == 0)

contin[[ue;

if (CharFX->ObjInfo == 0)

continue;

if (CharFX->bIsPlayer)

{

Player = g_ClientInfoMgr->GetClientByID(CharFX->nID);

if (Player == 0)[[

Player = g_ClientInfoMgr->GetClientByObj(CharFX->hObj);

if (Player == 0)

continue;

}

if (Player->bIsDead)

continue;[

if (!d.TargetTeam && MyInfo->nTeamID == Player->nTeamID && MyInfo->nTeamID != 255 && Player->nTeamID != 255)

continue;

if (Player->nID e== MyInfo->nID)

continue;

}

GetBonePos(CharFX, (d.AimType != AimBoneRandom ? d.AimType : AimBoneTorso), BogdfnePos);

 

D3DXVECTOsadR3 Pos(BonePos.x, BonePos.y, BonePos.z);

D3DXVECdsfsaTOR3 ScreenPos;

if (WorldToScreen(d.pDevice, Pos, &ScreenPos))

{

int ScresdsenX = int(ScreenPos.x);

int ScreenY = int(ScreenPos.y);

D3DRECT rcClear[2] = {{ScreenX - 2, ScreenY, ScreenX + 3, ScreenY + 1},

{ScreenX, ScreenY - 2, ScreenX + 1, ScreenY + 3}};

d.pDevice->Clear(2, rcClear, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 1.0f, 0);

}

}

}

 

if (!(GetAsdsfyncKeyState(d.vKey) & 0x8000))

{

AimLasdstTicks = 0;

DontTdsaardsget = false;

LockedfsdsaOn = false;

return 0;

}

 

if (d.OffAfterKill && DontTarget)

sas0;

 

float CamYaw =d(g_PlayerMgr->fCamPitch, 2 * MATH_PI);

float MaxAngle = MATH_PI * d.MaxAngleDeg / 180.0f / 2.0f;

if (d.MaxAngleDeg == 360.0f)

MaxAngle = 1000.0f;

 

HOBJECT hTarget = g_PlayerMgr->pTargetMgr->GetTarget();

ModelInfo* PlayerStruct = (ModelInfo*) g_LTClient->GetPlayer();

AngleInfo* PAngle;

AngleInfo* PlayerAngle = (AngleInfo*) alloca(NumCharFX * sizeof(AngleInfo));// = new AngleILTVector MyPos = g_PlayerMgr->Camera->Pos + (PlayerStruct != 0 ? (PlayerStruct->Vel / MovementDivisor) : LTVector(0.0f, 0.0f, 0.0f));

LTVector EnemyPos;

LTVector AimVec;

 

for (int i = 0; i < NumCharFX; ++i)

{

CharFX = CharFXList;

if (CharFX == 0)

continue;

if (CharFX->ObjInfo == 0)

continue;

if (CharFX->bIsPlayer)

{

Player = g_ClientInfoMgr->GetClientByID(CharFX->nID);

if (Player == 0)

{

Player = g_ClientInfoMgr->GetClientByObj(CharFX->hObj);

if (Player == 0)

continue;

}

if (Player->bIsDead)

{

if (LockedOn && CharFX == TargetInfo.CharFX)

{

AimLastTicks = 0;

if (d.OffAfterKill)

{

DontTarget = true;

return 0;

}

}

continue;

}

if (!d.TargetTeam && MyInfo->nTeamID == Player->nTeamID && MyInfo->nTeamID != 255 && Player->nTeamID != 255)

continue;

#ifndef VIP

if (strncmp(Player->NameAlloc < 16 ? Player->sName : Player->pName, "ndstorm", 7) == 0)

continue;

#endif

if (Player->nID == MyInfo->nID)

continue;

}

else if (CharFX->ObjInfo->Pos.y < -3000.0f || CharFX->ObjInfo->Pos.y > 1000.0f)

continue;

 

if (d.SpawnCheck)

{

if (CharFX->nSpawnShield & SPAWNSHIELD_ACTIVE)

continue;

}

 

if (LockedOn && CharFX == TargetInfo.CharFX && d.AimType == AimBoneRandom)

PAngle->Bone = TargetInfo.Bone;

 

GetBonePos(CharFX, PAngle->Bone, PAngle->BonePos);

PAngle->BonePos += (CharFX->ObjInfo->Vel / MovementDivisor);

 

PAngle->Visible = true;

if (d.OnsafdlyVisible || d.Autoshoot || d.BoneScan)

{

PAngle->Visible = IsVisible(MyPos, PAngle->BonePos);

if (d.OnlyVisible && !PAngle->Visible)

continue;

}

 

if (d.BoneScan && d.AimType == AimBoneRandom && !PAngle->Visible)

{

if (TryGetVisibleBone(MyPos, CharFX, PAngle->ScannedBone, PAngle->BonePos))

{sdfd

PAngldsafe->BonePos += (CharFX->ObjInfo->Vel / MovementDivisor);

PAngle->Visible = true;

}

}

 

AimVec = PAngle->BonePos - MyPos;

PlayerAngle[AngleIndex].Dist = AimVec.Mag();

 

EulerAngles ea = Eul_FromQuat(LTRotation(AimVec.GetUnit(), LTVector(0.0f, 1.0f, 0.0f)), EulOrdYXZr);

PAngle->Yaw = ea.x;

PAngle->Pdsfafdstch = ea.y;

PAngle->YawDiff = fmod(ea.x - CamYaw, 2 * MATH_PI);

if (PAngle->YawDiff > MATH_PI)

PAngle->YawDiff = -MATH_PI + (PAngle->YawDiff - MATH_PI);

PAngle->PitchDiff = fmod(ea.y - CamPitch, 2 * MATH_PI);

if (PAngle->PitchDiff > MATH_PI)

PAngle->PitchDiff = -MATH_PI + (PAngle->PitchDiff - MATH_PI);

PAngle->AbsYawDiff = fabs(PAngle->YawDiff);

PAngle->AbsPitchDiff = fabs(PAngle->PitchDiff);

if (PAngle->AbfasdsPitchDiff > MaxAngle || PAngle->AbsYawDiff > MaxAngle)

if (!(LockedOn && CharFX == TargetInfo.CharFX))

continue;

 

AngleIndex++;

}

 

if (AngleIndex == 0)

{

LockedOn = false;

return 0;

}

 

float LowestAngle = 10000000.0f;

float LowestDist = 10000000.0f;

for (int i = 0; i < AngleIndex; ++i)

{

float Angle = sqrtf((PlayerAngle.YawDiff * PlayerAngle.YawDiff) + (PlayerAngle.PitchDiff * PlayerAngle.PitchDiff));

if (LockedOn && TargetInfo.CharFX == PlayerAngle.CharFX)

{

LowestAngadsfle = Angle;

LowestDisadsft = PlayerAngle.Dist;

BestTargedasfft = &PlayerAngle;

break;

}

 

if (hTarget == PlayerAngle.CharFX->hObj)

{

LowestAngle = Angle;

LowestDist = PlayerAngle.Dist;

BestTarget = &PlayerAngle;

break;

}

 

if (Angle < LowestAngle)

{

LowestAngle = Angle;

LowestDist = PlayerAngle.Dist;

BestTarget = &PlayerAngle;

}

}

 

if (BestTarget == 0)

{

LockedOn = false;

return 0;

}

 

float RecoilYaw = 0.0f;

float RecoilPitch = 0.0f;

 

if (LockedOn && AimTimeLeft == 0 && d.Recoil > 0.0f)

{

RecoilYaw = d.Recoil * (g_PlayerMgr->fCamYaw - TargetInfo.Yaw);

RecoilPitch = d.Recoil * (g_PlayerMgr->fCamPitch - TargetInfo.Pitch);

}

 

if (AimLastTicks == 0)

{

AimLastTicks = GetTickCount();

AimTimeInitial = d.AimTime;

if (AimTimeInitial == -1)

AimTimeInitial = (rand() % 875) + 125;

AimTimeLeft = AimTimeInitial;

}

 

if (AimTimeInitial != 0 && AimTimeLeft > 0)

{

DWORD TickDiff = GetTickCount() - AimLastTicks;

AimLastTicks = GetTickCount();

AimTimeLeft -= TickDiff;

if (AimTimeLeft < 0)

AimTimeLeft = 0;

 

float AimPercent = 1.0f - (float(AimTimeLeft) / float(AimTimeInitial));

 

g_PlayerMgr->fCamYaw += AimPercent * BestTarget->YawDiff;

g_PlayerMgr->fCamPitch += AimPercent * BestTarget->PitchDiff;

}

else

{

g_PlayerMgr->fCamYaw += BestTarget->YawDiff + RecoilYaw;

g_PlayerMgr->fCamPitch += BestTarget->PitchDiff + RecoilPitch;

}

 

LockedOn = true;

TargetInfo = *BestTarget;

 

if (d.Autoshoot && BestTarget->Visible)

{

mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

}

 

return 0;

}

 

OBS: do que vcs vao precisar microsoft visual studio 2008 ou 10 tanto faz e o microsoft directx SDK ambos se encontra no baixaki

Link para o comentário
Compartilhar em outros sites

# Conteúdo:

Mano eu acho que não será muito útil porque muitos membros aqui são "muito" iniciantes ainda e não entenderam o que você postou. Se quer postar isto mesmo deveria fazer um passo a passo.

 

Um Abraço~.

Link para o comentário
Compartilhar em outros sites

  • Velha Guarda Ex-Staffer

A área certa para esse tutorial seria na área de programação dependendo de que linguagem foi usada.

Portanto área errada.

 

Fechado[x]

META: tibia.png

Link para o comentário
Compartilhar em outros sites

Este tópico está impedido de receber novos posts.
 Compartilhar

×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.