Bert Posted October 14, 2008 Share Posted October 14, 2008 I've made a simple bot for a flash game called "Defend your Castle" from XGenStudios.com. What it does is to do the mouse movement for you so your wrist doesn't get sore from flinging dudes to kill them. It works pretty well, but sometimes it doesn't want to work right. I didn't know if someone could make it better. expandcollapse popupDefend Your Castle bot ;saves your wrist. ;Just hold down the "a" key and click on the dude to kill him ;Hold down "s" and click to convert the dude. #include <Misc.au3> $dll = DllOpen("user32.dll") HotKeySet("{ESC}","_exit") $path = "VollyViewer - D:\games\vollyflash\games\Defend_your_castle.swf";or where you have the swf file. while 1 while WinActive($path) Select Case _IsPressed("41", $dll) and _IsPressed("01", $dll);"a" and left mouse - Kill Do $G = _IsPressed("01", $dll) until $G = 0 $m = MouseGetPos() MouseDown("left") MouseMove($m[0]+50, $m[1]-500, 1) MouseUp("left") MouseMove($m[0], $m[1],1) Case _IsPressed("53", $dll)and _IsPressed("01", $dll);"s" and left mouse - Convert Do $G = _IsPressed("01", $dll) until $G = 0 $m = MouseGetPos() MouseDown("left") MouseMove(649, 324, 1) sleep(20) MouseUp("left") MouseMove($m[0], $m[1],1) Case Else sleep(1) EndSelect WEnd sleep(100);idle arounda WEnd DllClose($dll) func _exit() Exit EndFunc The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
monoceres Posted October 14, 2008 Share Posted October 14, 2008 Did you check out the bot in example scripts? You might get a few good tips http://www.autoitscript.com/forum/index.ph...6&hl=Defend Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now