Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Gunz dll Trainer .... :D

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Mon Aug 13, 2007 9:37 am    Post subject: [Delphi] Gunz dll Trainer .... :D Reply with quote

Here is a source of uall for Counter-Strike hack: Laughing (hope it helps some ppl)

Code:
library hook;

uses windows;

var nextglBegin: procedure(mode: cardinal); stdcall;
    nextglEnable: procedure(mode: cardinal); stdcall;
    nextglDisable: procedure(mode: cardinal); stdcall;
    nextglTexEnvi: procedure(a,b,c: cardinal); stdcall;

procedure myglBegin(mode: cardinal); stdcall;
var keystate: tKeyboardstate;
begin
  getkeyboardstate(keystate);
  if keystate[VK_NUMPAD1] > 0 then
  if (mode = $5) or (mode = $6) then
    nextglDisable($0B71)  else
    nextglEnable($0B71);

  if keystate[VK_NUMPAD2] > 0 then
  if (mode = $5) or (mode = $6) then
    nextglTexEnvi($2300, $2200, $2101);
  nextglBegin(mode);
end;

procedure schleife;
begin
  while getmodulehandle('opengl32.dll') = 0 do sleep(1000);
  sleep(2000);
  @nextglDisable := getprocaddress(getmodulehandle('opengl32.dll'),'glDisable');//pointer($6955d800);
  @nextglEnable := getprocaddress(getmodulehandle('opengl32.dll'),'glEnable');//pointer($6955f030);
  @nextglTexEnvi := getprocaddress(getmodulehandle('opengl32.dll'),'glTexEnvi');//pointer($6955f030);
  asm
    mov eax, [$7FFDE7CC]
    mov [nextglBegin], eax
    mov eax, offset myglBegin
    mov [$7FFDE7CC], eax
  end;
end;

var tid: cardinal;
begin
  messagebox(0,'injected','bla',0);
  createthread(nil,0,@schleife,nil,0,tid);
end.


So i want to make something like this ...

if keystate[VK_NUMPAD3] > 0 then
"something like patch memory"
(enables it) $479143 := $77
else
(disables it) $479143 := $74


How to do that, please people? I know it's easy about 1 - 2 lines ... i hope somebody will help me.

P.S. It's for PrivateServers in Gunz

_________________

Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Aug 13, 2007 2:00 pm    Post subject: Reply with quote

I'm really not sure what you're talking about, but what I think you want is a way to determine if you've already enabled it, and should disable it, or if it's disabled, and you should enable it.

If that's the case (which it may or may not be), then you should have a bool, so like

Code:

OnFormLoad //I don't know what this is in Delphi
var
  HackEnabled : boolean
begin
  HackEnabled := false;
end;

HackProcedureThing
var
  //vars...
begin
  if {whatever that thing was... the VK numpad whatever}
    begin
      if HackEnabled = false
        {enable the hack}
      else
        {disable the hack}
    end
end;


Hope I helped.
Back to top
View user's profile Send private message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Tue Aug 14, 2007 10:31 am    Post subject: Reply with quote

samuri25404 wrote:
I'm really not sure what you're talking about, but what I think you want is a way to determine if you've already enabled it, and should disable it, or if it's disabled, and you should enable it.

If that's the case (which it may or may not be), then you should have a bool, so like

Code:

OnFormLoad //I don't know what this is in Delphi
var
  HackEnabled : boolean
begin
  HackEnabled := false;
end;

HackProcedureThing
var
  //vars...
begin
  if {whatever that thing was... the VK numpad whatever}
    begin
      if HackEnabled = false
        {enable the hack}
      else
        {disable the hack}
    end
end;


Hope I helped.


Well ... i need those three lines (in bold):

..............
OnFormLoad //I don't know what this is in Delphi
.............
if HackEnabled = false
{enable the hack}
else
{disable the hack}
end
.............

_________________

Back to top
View user's profile Send private message
MadDoom
Cheater
Reputation: 0

Joined: 27 Dec 2006
Posts: 38

PostPosted: Wed Aug 15, 2007 12:08 pm    Post subject: Reply with quote

here is a new one for delphi:
samuri25404 wrote:

Code:

var
HackEnabled :boolean;




TForm1.FormCreate(Sender :TObject);//I don't know what this is in Delphi
begin
  HackEnabled := false;
end;

SomeHackProcedure;
begin
  if {whatever that thing was... the VK numpad whatever}then
        if not HackEnabled then
        HackEnabled :=true;
        {wat the hotkey do}
      else
        HackEnabled:=false;
        {the orginal code}
end;


Hope I helped.
Back to top
View user's profile Send private message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Thu Aug 16, 2007 7:16 am    Post subject: Reply with quote

MadDoom wrote:
here is a new one for delphi:
samuri25404 wrote:

Code:

var
HackEnabled :boolean;




TForm1.FormCreate(Sender :TObject);//I don't know what this is in Delphi
begin
  HackEnabled := false;
end;

SomeHackProcedure;
begin
  if {whatever that thing was... the VK numpad whatever}then
        if not HackEnabled then
        HackEnabled :=true;
        {wat the hotkey do}
      else
        HackEnabled:=false;
        {the orginal code}
end;


Hope I helped.


O_O why do you quote him?

_________________

Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Thu Aug 16, 2007 7:24 am    Post subject: Re: [Delphi] Gunz dll Trainer .... :D Reply with quote

h4c0r-BG wrote:
Here is a source of uall for Counter-Strike hack: Laughing (hope it helps some ppl)

Code:
library hook;

uses windows;

var nextglBegin: procedure(mode: cardinal); stdcall;
    nextglEnable: procedure(mode: cardinal); stdcall;
    nextglDisable: procedure(mode: cardinal); stdcall;
    nextglTexEnvi: procedure(a,b,c: cardinal); stdcall;

procedure myglBegin(mode: cardinal); stdcall;
var keystate: tKeyboardstate;
begin
  getkeyboardstate(keystate);
  if keystate[VK_NUMPAD1] > 0 then
  if (mode = $5) or (mode = $6) then
    nextglDisable($0B71)  else
    nextglEnable($0B71);

  if keystate[VK_NUMPAD2] > 0 then
  if (mode = $5) or (mode = $6) then
    nextglTexEnvi($2300, $2200, $2101);
  nextglBegin(mode);
end;

procedure schleife;
begin
  while getmodulehandle('opengl32.dll') = 0 do sleep(1000);
  sleep(2000);
  @nextglDisable := getprocaddress(getmodulehandle('opengl32.dll'),'glDisable');//pointer($6955d800);
  @nextglEnable := getprocaddress(getmodulehandle('opengl32.dll'),'glEnable');//pointer($6955f030);
  @nextglTexEnvi := getprocaddress(getmodulehandle('opengl32.dll'),'glTexEnvi');//pointer($6955f030);
  asm
    mov eax, [$7FFDE7CC]
    mov [nextglBegin], eax
    mov eax, offset myglBegin
    mov [$7FFDE7CC], eax
  end;
end;

var tid: cardinal;
begin
  messagebox(0,'injected','bla',0);
  createthread(nil,0,@schleife,nil,0,tid);
end.


So i want to make something like this ...

if keystate[VK_NUMPAD3] > 0 then
"something like patch memory"
(enables it) $479143 := $77
else
(disables it) $479143 := $74


How to do that, please people? I know it's easy about 1 - 2 lines ... i hope somebody will help me.

P.S. It's for PrivateServers in Gunz


Is it a german source? cuz "Schleife" is a german word for "loop"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites