 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Fri Apr 04, 2008 2:18 pm Post subject: [Delphi] Code fix? |
|
|
Well, this is the code for the spam portion of my program:
procedure TForm1.Timer11Timer(Sender: TObject);
var
h : Hwnd;
i : integer;
begin
if odd(GetAsyncKeyState(VK_F11)) then
begin
if CheckBox4.Checked=False then
begin
Checkbox4.Checked:=True
end
else
CheckBox4.Checked:=False;
begin
if checkBox4.Checked=True then
begin
if Label1.Caption='Window Found!' then
begin
for i := 1 to Length(Edit1.Text) do
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Char,Integer(Pchar(Edit1.text[i])),1);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keydown, $0D,0);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keyup, $0D,0);
end
else
ShowMessage('Error Spamming! Make sure window name is correctly typed in and typo-free.')
end;
For some reason it only runs once, and that's just not how spam works. I had a working spammer, but I deleted it thinking I had it figured out, but now i'm not too sure. If anyone can tell me how I can make the spam keep coming util the checkbox is unchecked I'd be appreciative.
P.S.: How exactly do I get this into Maplestory because I've read in many places that GG blocks the Postmessage functions, along with mosue event and I'm also makign an AC.
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Fri Apr 04, 2008 2:55 pm Post subject: |
|
|
Well, I think the problem is that you've got the
| Code: | | if odd(GetAsyncKeyState(VK_F11)) then |
inside the same timer. That's why it will only run once, because it only runs, if you hold it down.
Make a timer, called tHotkey, and make it something like
| Code: | if odd(GetAsyncKeyState(VK_F11)) then
Timer11.Enabled := True; |
And how to get it into MS:
Search, there's been alot topics/posts.[/code]
|
|
| Back to top |
|
 |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Fri Apr 04, 2008 2:57 pm Post subject: |
|
|
| Ok thanks, i'll do that. And I guess i'll keep searching...
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Fri Apr 04, 2008 3:47 pm Post subject: |
|
|
| Kalookakoo wrote: | | Ok thanks, i'll do that. And I guess i'll keep searching... |
Well, you need a DLL to bypass the hook, it's called HookHop.dll or PMX.dll, search on google or here.
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Apr 05, 2008 1:25 am Post subject: |
|
|
| Code: | procedure TForm1.Timer11Timer(Sender: TObject);
var
h : Hwnd;
i : integer;
begin
if odd(GetAsyncKeyState(VK_F11)) then
begin
CheckBox4.Checked:= not CheckBox4.Checked;//Toggle CheckBox4
if (checkBox4.Checked) and (Label1.Caption='Window Found!') then
begin
for i := 1 to Length(Edit1.Text) do
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Char,Integer(Pchar(Edit1.text[i])),1);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keydown, $0D,0);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keyup, $0D,0);
end
else
ShowMessage('Error Spamming! Make sure window name is correctly typed in and typo-free.')
end;
end; |
The code will work only if F11 is down.
Try to use a another timer and put the check there, every time the hotkey down toggle Timer11.Enabled.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Apr 05, 2008 10:57 am Post subject: |
|
|
I edited your code a bit, and this will work:
| Code: | procedure TForm1.Timer11Timer(Sender: TObject);
var
h : Hwnd;
i : integer;
begin
if odd(GetAsyncKeyState(VK_F11)) then
begin
if CheckBox4.Checked=False then
Checkbox4.Checked:=True
else
CheckBox4.Checked:=False;
end;
if checkBox4.Checked=True then
begin
if Label1.Caption='Window Found!' then
begin
for i := 1 to Length(Edit1.Text) do
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Char,Integer(Pchar(Edit1.text[i])),1);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keydown, $0D,0);
PostMessage(FindWindowEx(FindWindow(nil,pChar(Edit4.Text)),0,nil,nil),WM_Keyup, $0D,0);
end
else
begin
ShowMessage('Error Spamming! Make sure window name is correctly typed in and typo-free.');
checkbox4.Checked:= false;
end
end
end; |
|
|
| Back to top |
|
 |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Sat Apr 05, 2008 11:06 am Post subject: |
|
|
It's not much different applying this to MS using hookhop is it?
EDIT: Dam, and I just realized I need 2 spam lines so they alternate is MS since you cant type the same line 3 times consecutively....
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sat Apr 05, 2008 11:16 am Post subject: |
|
|
just add a "." or something to the second spam
and no, all you need to do, is to add this procedure to your application:
| Code: | function PMX(
hWnd:HWND;
MSG:UINT;
WPARAM:wParam;
LPARAM:lParam):BOOL;stdcall;
external 'HookHop.dll' name 'hhPostMessageA';
|
and instead of PostMessage, use PMX
|
|
| Back to top |
|
 |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Sat Apr 05, 2008 4:23 pm Post subject: |
|
|
You've been a great help Anden, I'll make sure I add you in credits.
I have my bot working in MS thanks to you. Only 2 questions left. One may be easier to answer than the other, idk.
1) How exactly do you set up an autopot? Obviously I already know how to setup the hotkeys and send they keys in to pot when needed, but how would you read the characters hp/mp and know when to pot exactly? I rather not just made a bot that pots every 15sec no matter what because that could burn alot of pots for no reason.
2) I'm not sure i'll be attempting this right now, but, how do you put actual hacks into the program instead of bot features.(Such as NoKb, NoBlink, etc) I'm not exactly sure how to research on this because everytime I phrase it in a search engine, I get a bunch trash.
And I can't get the spam to come in MS Anden, using your code exactly with the PMX function.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sun Apr 06, 2008 4:13 am Post subject: |
|
|
| Kalookakoo wrote: | You've been a great help Anden, I'll make sure I add you in credits.
I have my bot working in MS thanks to you. Only 2 questions left. One may be easier to answer than the other, idk.
1) How exactly do you set up an autopot? Obviously I already know how to setup the hotkeys and send they keys in to pot when needed, but how would you read the characters hp/mp and know when to pot exactly? I rather not just made a bot that pots every 15sec no matter what because that could burn alot of pots for no reason.
2) I'm not sure i'll be attempting this right now, but, how do you put actual hacks into the program instead of bot features.(Such as NoKb, NoBlink, etc) I'm not exactly sure how to research on this because everytime I phrase it in a search engine, I get a bunch trash.
And I can't get the spam to come in MS Anden, using your code exactly with the PMX function. |
1)
To get the autopot to work, you will need to add another editbox to you app, and in that editbox, you will need to put in the interval in MS, then add this line to your timer:
| Code: | | Timer1.interval:= strtoint(edit1.text); |
Ill send you my source, for the fully working bot i made (not my good looking one, since it uses AlButtons) it has a crap load of buttons, please dont release it to the public... (it has a smuggle function in it aswell, i dont know if you need that one)
2)
I cant help you on that one...
3) (the autochat)
Hmmm... that will be in my source aswell, its lined up, one form to every function, you should be able to figure it out, but im not much of an coder, so the source wont be lined all up...
|
|
| Back to top |
|
 |
Kalookakoo Expert Cheater
Reputation: 0
Joined: 03 Mar 2008 Posts: 117
|
Posted: Sun Apr 06, 2008 7:15 am Post subject: |
|
|
| Thank you Anden
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Sun Apr 06, 2008 7:17 am Post subject: |
|
|
| Kalookakoo wrote: | | Thank you Anden |
I will need to rebuild it first, i threw my source away.. im sorry
|
|
| Back to top |
|
 |
|
|
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
|
|