Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > 12Sky2
You last visited: Today at 04:08

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

Advertisement



Mouse Simulation.

Discussion on Mouse Simulation. within the 12Sky2 forum part of the MMORPGs category.

Reply
 
Old   #1

 
Mega Byte's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,777
Received Thanks: 1,003
Mouse Simulation.

Whilst looking over some stuff I noticed the game loop Peaks a message from the window message queue.





push 1 ; wRemoveMsg
push 0 ; wMsgFilterMax
push 0 ; wMsgFilterMin
push 0 ; hWnd
lea ecx, [esp+468h+Msg]
push ecx ; lpMsg
call ebp ; PeekMessageA
test eax, eax
jz loc_403854


It may be possible to simulate mouse (and keyboard*) input using PostMessage / SendMessage API.

Rather than the SendInput API.

I know anti hacks detect SendInput but maybe they do not bother to look at PostMessage and SendMessage.

I should note that the game appears to use dinput for keyboard input for most things other than text input.


Anyway sending the messages like this might be a way to script mouse bots that are not detected.



Thoughts?
Mega Byte is offline  
Thanks
1 User
Old 03/25/2016, 19:04   #2
 
elite*gold: 0
Join Date: Feb 2010
Posts: 271
Received Thanks: 108
I remember I was trying to figure out how to send keystrokes to the game which I did, I can also simulate mouse.



Seem'd to do the trick without much trouble.

My Mini-Bot project uses that library to simulate keystrokes & mouse movement. If only I knew memory hacking at its finest I would be able to do a full working bot just like Afterburns did back in the days.
MyDooMJr is offline  
Thanks
1 User
Old 03/26/2016, 05:57   #3

 
Mega Byte's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,777
Received Thanks: 1,003
True, I got sending keyboard input to semi work with some thing.

But I also just hooked and found where dinput8 had its keyboard buffer.

Then in game loop after it was filled with keys but before they were checked.
I would modify the state to set my own keys.


Did the proof in Cheat Engine + some OllyDBG back in the day then coded it into one of the last versions of Map Fun hah.



By the way, If anyone is interested in calling game functions for input and can't just use PostMessage/SendMessage due to Anti Hack hooks.

The game methods are going to be called in the WindowProcedure for click events.

Search in IDA for this, its probably passed to the create window call, or you can look for a constant such as 0x202 which is WM_LBUTTONUP.


Then look for calls after a if or switch case for your value.



Go into the call and see what its calling convention is.
Pressing Y in IDA or right click set function type. Will show you the type.

int __stdcall mouseLButtonUp(int, int)

Well lets assume those two ints are X and Y of the cursor.
And lets say relative to the window? (It might not be I have not bothered to look).



In this particular game it looks like there are many mouseLButtonUp sub functions which can be used in particular circumstances.

Probably different dialog windows or areas of the game eg at login, char select, creation etc..
Inventory?.


Once you have found a function you want to call, try to type def it.

This is as simple as looking at the type IDA says. (Or working it out your self if your capable to do that).
int __stdcall mouseLButtonUp(int x, int y)

Then specifying a type def equivalent so your code knows about this type.
typedef int (__stdcall *t_mouseLButtonUp)(int x, int y);


Now to call this as a function (Assuming you have an injected dll)

You could do this, where ADDRESS is the address of the method you found in hex.
t_mouseLButtonUp mouseLButtonUp = (t_mouseLButtonUp)0xADDRESS;

then call it like so.
mouseLButtonUp(x,y);


To call it from cheat engine script without writing a dll "Useful to test" you could do something like this.

[enable]
alloc(MyCode,1024)
CreateThread(MyCode)

MyCode:
push 0
push 0
call 0xADDRESS
ret // exit thread

[disable]
dealloc(mycode)

Or put the code someplace in a code cave, and use Ctrl+Alt+T to start a thread there .

Mega Byte is offline  
Old 03/26/2016, 12:10   #4
 
elite*gold: 0
Join Date: Jul 2006
Posts: 667
Received Thanks: 990

nice to see that you still using this ^^, i remember the day i showed you the cp hack and you was surprised to see that its possible to do calls from CE
dabnoj is offline  
Old 03/26/2016, 19:17   #5
 
Str8inyou's Avatar
 
elite*gold: 50
Join Date: Jul 2009
Posts: 733
Received Thanks: 446
i c what did u do there
Str8inyou is offline  
Old 03/28/2016, 02:12   #6

 
Mega Byte's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,777
Received Thanks: 1,003
Quote:
nice to see that you still using this ^^, i remember the day i showed you the cp hack and you was surprised to see that its possible to do calls from CE
Yeah haha, thanks its a big help for quickly testing stuff.
Mega Byte is offline  
Thanks
1 User
Old 03/28/2016, 22:42   #7
 
Str8inyou's Avatar
 
elite*gold: 50
Join Date: Jul 2009
Posts: 733
Received Thanks: 446
really got no time. im really srry
Str8inyou is offline  
Reply

« bypass | Str8inyou »

Similar Threads Similar Threads
Mod files simulation
02/18/2014 - DarkOrbit - 9 Replies
Hey Guy's, I wan't help of the people of Epvp, i see a screenshot from owning-peeps, he have got a files for modification on his game... How i can get the files?
[Selling] Steelseries Heat Orange Mouse und Mouse Pad
01/01/2014 - Trading - 3 Replies
Hallo, Leute ich verkaufe Steelseries Mouse ( Sensei ) und Mouse Pad mit dem Desgin Heat Orange http://i.epvpimg.com/3FMob.jpg Alles OVP, nicht geöffnet . Also noch nicht mal angefasst. Es wird alles über DHL gehen und Überweisung wenn Interesse besteht einfach PN .
SRO alchemy simulation *NEW* xD
11/06/2012 - Off Topic - 1 Replies
yoh nubs here some "new" alchemy game with 11D , changing attributes,stones and stuff.. Lemme know ur record http://srosimulation.world-12.com/ have fun :)
Changing Mouse Pointers (for Cool gaming mouse)
04/01/2010 - Soldier Front - 14 Replies
Im Bored today, so as i play im getting more bored, so i seem to try to Edit my mouse pointer (cursor), i have lots of pointers here i got my pointers in my game Red Alert 3, and i try to change it. Just follow my easy tutorials. :) 1.) Download First the Link below. LINK- Mouse Pointers.rar 2.) Create a folder and extract all the files in the folder you create. 3.) Go to Control Panel 4.) Go to Mouse
[MACRO/AHK/Mouse shortcut] hieitk's "mouse wheel button", REVISITED
04/12/2009 - CO2 Exploits, Hacks & Tools - 11 Replies
Since after discovering it I've been an affectoinate user of mbutton. Saves fingers and keys. And stress. Especially when you have to drop/sell stuff. But I had several issues with some of the "features", namely: 1) I couldn't scroll fast enough between the functions, let's say I had it on Jump, and wanted to sell. I had to do three scrolls, but between each there was a delay of more than one second 2) The F10 function wasn't really necessary 3) The functions didn't cycle, when you were...



All times are GMT +1. The time now is 04:09.


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.