Sign in to follow this  
Followers 0
CoBJType

help with game bots

22 posts in this topic

#1 ·  Posted (edited)

Hi i am writing a bot for an online game "Dream Mirror Online"

Basically it involves searching specific color pixels on the screen and click.

I've tested my program outside the game and it does what I want.

Once I am in the game (window mode), AutoIt returns the coord of the pixel found correctly, but fails to move the cursor to that coordinate and click.

After a little bit of testing, I found AutoIt fails to do anything in the game, e.g. not even sending a key.

Any ideas?

Thanks in advance.

Edited by CoBJType

Share this post


Link to post
Share on other sites



Is this game protected by gameguard or anything of the sorts?

Share this post


Link to post
Share on other sites

thanks for swift response

no as I could send keys using other programs like quickmacro :)

Share this post


Link to post
Share on other sites

thanks again, just tried but no luck.

the problem is that nothing really works inside the game beside the pixel checking.

e.g. i ordered autoit to move the mouse and it doesnt work :)

Share this post


Link to post
Share on other sites

Cool, I like the look of the game. What did you try with ControlSend and ControlClick... I really thought those would work.

I cannot download the game for testing right now because I am at work, and they frown on downloading online games.

Share this post


Link to post
Share on other sites

Cool, I like the look of the game. What did you try with ControlSend and ControlClick... I really thought those would work.

I cannot download the game for testing right now because I am at work, and they frown on downloading online games.

heh

tried control click but i do not know what the ID should be

tried finding the id of the chat box inside the game but nth shown in the autoit window info tool

I really wonder why autoit doesnt work while qmacro works :)

Share this post


Link to post
Share on other sites

Try::

$Coord = PixelSearch()

i dont know if this will work but try :)

Share this post


Link to post
Share on other sites

Try::

$Coord = PixelSearch()

i dont know if this will work but try :)

thanks

pixel search works fine

its just that other inputing functions doesnt work

e.g. moving the cursor, sending key strokes etc

Share this post


Link to post
Share on other sites

Would using winactive help at all?

Share this post


Link to post
Share on other sites

See if hotkeys work,

HotKeySet("{F3}", "Test")

While 1
Sleep(10)
WEnd

Func Test()
MsgBox(0, "", "")
EndFunc
hey thanks

ur code does work while i am inside the game (i.e. a box popped up)

i tried chaning the content of function 'test' to move the mouse / send a key

nothing happened :)

Share this post


Link to post
Share on other sites

I am having the same problem with a game using GameGuard(The game is Flyff). You can pop boxes and stuff but not send keystrokes. Shouldn't it be allowed or so when it allows you to pop boxes? As I know GameGuard just checks the memory or something and checksums the files of the game.

Share this post


Link to post
Share on other sites

I am having the same problem with a game using GameGuard(The game is Flyff). You can pop boxes and stuff but not send keystrokes. Shouldn't it be allowed or so when it allows you to pop boxes? As I know GameGuard just checks the memory or something and checksums the files of the game.

have u tried qmacro?

it works with my game while autoit doesnt

Share this post


Link to post
Share on other sites

maybe this will help, dug it up on google (turned out to be an AutoIt archive...)

DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0)

set the variables to different numbers to simulate relative mouse movement. May help though. Might be able to couple it with MouseGetPos() ?

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Reply to crzftx:

Func _user32_MouseMove($x, $y)
   $pos  = MouseGetPos()
   $xAmount = $x- $pos[0]
   $yAmount = $y- $pos[1]
   DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0)
EndFunc

#)

edit: was bored, and did it for the heck of it.

Edited by nfwu

Share this post


Link to post
Share on other sites

i dont really know anything about dll calls, but is it necessary to have a zero -type "long" ? couldn't that be "short" and save some time. it does work.

$xAmount = 50
$yAmount = 50
DllCall("user32.dll","none","mouse_event","short",1,"short",$xAmount,"short",$yAmount,"short",0,"short",0)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

CODE
HotKeySet("{F11}", "_user32_MouseMove")

While 1

Sleep(10)

WEnd

Func _user32_MouseMove($x, $y)

$pos = MouseGetPos()

$xAmount = 50+ $pos[0]

$yAmount = 50+ $pos[1]

DllCall("user32.dll","none","mouse_event","long",1,"long",$xAmount,"long",$yAmount,"long",0,"long", 0)

MsgBox(0, "", "")

EndFunc

added a line to test if the hotkey is detected. on desktop it should move your cursor and then pop up an empty dialogue.

when in game (window mode still), the cursor didnt move but the empty dialogue popped up.

i am confused..anway, thanks crzftx and nfwu

Edited by CoBJType

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0