Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 07:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[DELPHI] Source: FaceTarget (WoW)

Discussion on [DELPHI] Source: FaceTarget (WoW) within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
piotr55's Avatar
 
elite*gold: 30
Join Date: May 2008
Posts: 201
Received Thanks: 321
Lightbulb [DELPHI] Source: FaceTarget (WoW)

Hi there,

ive made a lil code to Face (and turn camera) to the selected Target (GUID)
by doing Math

maybe some1 needs this. (i'm using it to autokill Tyrannus via port):

Code:
procedure FaceGUID(GUID:UInt64; CenterCam:Bool);
var
  Mx, My, Tx, Ty, Distance1, Distance2, Rota: Extended;
  C_Pointer, C_Offset: Integer;
begin
  if (GUID <> 0) and (GUID <> MemRUInt64(PlayerGUID)) then begin
    Mx := roundto(MemRFloat(MemRBase + PlayerX), -3);
    My := roundto(MemRFloat(MemRBase + PlayerY), -3);
    Tx := roundto(MemRFloat(GetObjectBaseByGuid(GUID) + UnitFieldsX),-3);
    Ty := roundto(MemRFloat(GetObjectBaseByGuid(GUID) + UnitFieldsY),-3);

    Distance1 := roundto(Sqrt(Sqr(Mx-Tx)+Sqr(My-Ty)), -3);
    Distance2 := roundto(Sqrt(Sqr(My-Ty)), -3);
    Rota := ArcSin(Distance2 / Distance1);

    if (Mx < Tx) and (My > Ty) then
    Rota := DegreeToRadian(360) - Rota
    else
    if (Mx > Tx) and (My > Ty) then
    Rota := DegreeToRadian(180) + Rota
    else
    if (Mx > Tx) and (My < Ty) then Rota := DegreeToRadian(180) - Rota;

    MemWFloat(MemRBase + PlayerR, Rota);

    if CenterCam = true then
    begin
      C_Pointer := MemRInt(CameraPointer);
      C_Offset  := MemRInt(C_Pointer + CameraOffset);
      MemWFloat(C_Offset + CameraRotaY, 0);
    end;
  end;
end;
MemRInt = MemoryRead an Integer value
MemWFloat = MemoryWrite a Float value (Extended or Single possible)
^^ u should know how to do that.

Rota <- your Rotation
Mx, ... <- your coords
Tx, ... <- targets coords

3.3.5 offsets are:
Code:
  Base              =   $00CD87A8;
  BaseOffset1       =   $34;
  BaseOffset2       =   $24;
  ObjManagerBase    =   $00C79CE0;
  ObjManagerOffs    =   $2ED0;
  ObjManagerFirst   =   $AC;
  ObjManagerNext    =   $3C;
  PlayerX           =   $798;
  PlayerY           =   $79C;
  PlayerR           =   $7A8;
  UnitFieldsX       =   PlayerX; // $798
  UnitFieldsY       =   PlayerY; // $79C
  CameraPointer     =   $00B7436C;
  CameraOffset      =   $7E20;
  CameraRotaY       =   $11C;
  LocalTargetGUID   =   $00BD07B0;
functions to read playerbase and objectmanager
Code:
function MemRBase: Integer;
begin
  result := MemRInt(MemRInt(MemRInt(Base) + BaseOffset1) + BaseOffset2);
end;

function GetFirstObject: Integer;
begin
  result := MemRInt(MemRInt(MemRInt(ObjManagerBase) + ObjManagerOffs) + ObjManagerFirst);
end;

function GetObjectBaseByGuid(Guid:Uint64): integer;
var
  TOBaseAddress: Integer;
  TOGuid: UInt64;
begin
  if GUID <> 0 then begin
    result := 0;
    TOBaseAddress := GetFirstObject;
     while TOBaseAddress <> 0 do begin
       TOGuid := MemRUInt64(TOBaseAddress + ObjGUIDOffset);
       if TOGuid = Guid then begin
       result := TOBaseAddress;
       break;
       end else
       TOBaseAddress := MemRInt(TOBaseAddress + ObjManagerNext);
     end;
     //result := 0;
  end else result := 0;
end;
think, this should help u a bit.

greetz
piotr
piotr55 is offline  
Thanks
2 Users
Old 10/11/2010, 17:59   #2
 
elite*gold: 0
Join Date: Oct 2007
Posts: 55
Received Thanks: 16
insane - kind a aimbot for wow ))
krotkin is offline  
Reply


Similar Threads Similar Threads
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all. Iwith DELPHI, but a dont now. hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code. ty to all
I need Metin2 AutoAttack (Delphi Source Code)
11/15/2010 - General Coding - 11 Replies
I need Delphi Source Code to Metin2 AutoAttack help me please
BOI SpeedHack with Source (Delphi coded)
09/09/2010 - Battle of the Immortals - 16 Replies
hi @ all i got an idea to make my own speedhack what is multiclent complatible :D // edit // new pointers does not work, i'll try to fix this Here is it, have fun with it:
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot?
03/07/2010 - General Coding - 3 Replies
Hallo liebe com, ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für eine bestimmte Taste senden etc. könnt ihr mir die pls sagen oder per pn geben MfGGGGGG
ArchLord Bot v1.0 Open Source Code Delphi 5
11/08/2008 - Archlord - 2 Replies
ArchLord Bot v1.0 Open Source Code Delphi 5 No Virus No Spam http://i38.tinypic.com/2csjmrq.jpg RapidShare: Easy Filehosting



All times are GMT +1. The time now is 07:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.