First of all forgive me talking in english - I'm from Poland and can hardly read German, not mentioning writing...
I want to make my own fishing tool. The problem I've come to is with SendMessage function.
I used this method for Tibia logging-in program before. It worked perfectly there.
In Metin2, it seems that it works fine when emulating enter key press (opening up chat, typing in the chat box), but it won't work neither with space (fishing with fishing rod equipped) nor with F4 (using it for bait).
One important thing.
I want the tool to be able to work with Metin2 running in the background (so I can do all the other stuff I have to do). Thus most of the macro tools (all that I know/heard of) are useless since those require the target application to be the topmost one.
So...
Any hints anyone ?
PS.
If there are topics I've missed while searching through the forums (and I did use the search tool) please be so kind and lead the way to them.
Thanks in advance.
Google-Übersetzung
Hallo alle.
Zunächst mir verzeihen, sprechen in Englisch - Ich komme aus Polen und können kaum Deutsch lesen, nicht zu erwähnen schriftlich ...
Ich möchte mein eigenes Fischerei-Tool. Das Problem Ich bin gekommen, um sich mit SendMessage Funktion.
Ich habe diese Methode für Tibia Logging-In-Programm vor. Es funktioniert es.
In Metin2, so scheint es, dass es funktioniert, wenn emuliert Enter-Taste drücken (Öffnung Chat, geben Sie in das Chat-Feld), aber es funktioniert nicht, weder mit Leerzeichen (Fischfang mit Angelrute ausgestattet) noch mit F4 (sie für Köder ).
Eine wichtige Sache.
Ich möchte, dass das Tool arbeiten zu können mit Metin2 laufen im Hintergrund (so kann ich alle anderen Dinge habe ich zu tun). So die meisten der Makro-Tools (alle, die ich kenne / gehört) sind nutzlos, da diese die Ziel-Anwendung werden die obersten ein.
So ...
Für Hinweise anyone?
PS.
Wenn es Themen habe ich verpasst, während die Suche durch die Foren (und ich habe mit dem Search-Tool ") wenden Sie sich bitte so freundlich und dazu führen, dass der Weg zu ihnen.
Vielen Dank im Voraus.
Try to hold the Keys you are using down for a while. for example: Send("{F4 down}"); Sleep (500); Send("{F4 up}") as Metin2 sometimes has problems to recognize keystrokes.
If this doesn´t work or you already tried this come back to us, i am very sure that we will find a solution for the first problem you mentioned.
The second one seems to be impossible with auotit at the moment. I know many people are working on a solution to have the metin window in the background. Moreover i am afraid if there is a trick to do so, it won´t be told to everybody^^.
Für alle:
Er kann leider kein Deutsch, aber er möchte einen Angelbot schreiben und hat ein Problem mit dem Autoantworten. Hier funktionieren die Tastaturbefehle nicht so wie sie sollen,. Er kann zwar Enter drücken und in den Chat schreiben, aber mit anderen Tasten F-Tasten oder Space will es nicht so. Zudem möchte er gerne das der Bot mit Metin arbeitet während das Fenster nicht aktiv ist ..
Like °Remus° said: Hiddenbots are hardly possible to make. We tested it a lot of times, but we do not find any solutions. What a program doyou use for making bots?
@Remus
It would be possible with DLL injection and hooking Send/Recv Winsock functions.
Then you could send the packets on your own. Unless there's more protection than encryption...
@Quade
I've been through C/C++, VB6/.NET and now I'm mostly programming in Delphi 7.
Also I didn't know that what I am trying to do is called hiddenbot.
Now I'll know
[edit]
Forgot to say that I know that it's not possible to use SendMessage with minimized applications.
It's all about them beign not on top.
Auf deutch (so gut wie Google kann übersetzen)
@ Remus
Es wäre möglich mit DLL-Injektion und Befestigung Send / Recv Winsock-Funktionen.
Dann könnten Sie senden die Pakete auf Ihrem eigenen. Es sei denn, es gibt mehr Schutz als Verschlüsselung ...
@ Quade
Ich habe bis C / C + +, VB6/.NET und jetzt bin ich meist Programmierung in Delphi 7.
Auch wusste ich nicht, dass das, was ich versuche zu tun, heißt hiddenbot.
Jetzt werde ich wissen
[edit]
Vergessen zu sagen, dass ich weiß, dass es nicht möglich, SendMessage mit minimierten Anwendungen.
It's all about beign sie nicht an der Spitze.
Thanks!
I'll try contacting him after the weekend.
You don't need to do that, I'm here and I'm glad that I found another person programming with Delphi, because actually till now i thought I was the only one.
Well, to your hidden bot problem ... I also thought about this problem and unfortunality it was not possible for me to get it work.
The Problem is that every window of every programm has a spezific Handel which is like the ID of the programm. If you try to send a Message like "A" oder "Space" to Notepad, it's no problem to do this in hidden mode.
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
wnd: HWND;
i: Integer;
s: string;
begin
wnd := FindWindow('notepad', nil);
if wnd <> 0 then
begin
wnd := FindWindowEx(wnd, 0, 'Edit', nil);
// Write Text in Notepad.
// Text ins Notepad schreiben.
s := 'Hello';
for i := 1 to Length(s) do
SendMessage(wnd, WM_CHAR, Word(s[i]), 0);
// Simulate Return Key.
PostMessage(wnd, WM_KEYDOWN, VK_RETURN, 0);
// Simulate Space.
PostMessage(wnd, WM_KEYDOWN, VK_SPACE, 0);
end;
end;
This programm for example is searching the programm "notepad" then (if the programm "notepad" excists) it searchs the window "Edit" of Notepad. If both of this things are able to find, this source code writes the word Hello in Notepad, sends a Return - Message and a Space - Message.
The Problem is, you can't identify Metin2 like Notepad or Word or something like that.
Thats because the Metin2 Window Handel/ID is coded from GameForge to stop manipulating the Metin2 Programm.
Of course there is a way to make a hidden bot working, but actually I don't know it, because it's to hard to understanding for me.
Assistance Needed 03/07/2010 - RF Online - 1 Replies Hi. I'm new to all of this stuff - and currently play rf reactor. Is there any bypass for the server that is proven to work? If anyone can lead me into the right direction, I will not be slow to hit the thanks button and read through the correct materials.
[Assistance Needed] CoEmuv2 06/08/2009 - CO2 Private Server - 2 Replies Hmmm, okay. I think I did everything correctly and I tried to debug it. It only debugged the log in server and didn't debug the game server, does anyone know how to debug the game server? It didn't automatically pop up after it debugged the log in server. Thanks.
http://i459.photobucket.com/albums/qq316/alvinnxd /lll.jpg