trickytroy Posted April 19, 2005 Share Posted April 19, 2005 (edited) Hello everyone, i been doing autoit for only a week and i think this is a pretty cool program so enjoy!! i have made a program that opens up firefox, goes to addictingames.com/curvball and plays curveball for you!!, the highest level i've gotten to so far is 9. so goo luck NOTES: as it is now it only work with firefox, but you can go mess with the coordinates and stuff to make it work for internet explorer. leave me feedback and suggestions please. Updated: hey the new updated version is in the link! Pong_player.zip Edited April 20, 2005 by trickytroy [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
Insolence Posted April 19, 2005 Share Posted April 19, 2005 I was very impressed with this after one week of programming expirience, g'job "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
trickytroy Posted April 19, 2005 Author Share Posted April 19, 2005 here the code Run('C:\Program Files\Mozilla Firefox\firefox.exe "http://www.addictinggames.com/curveball.html"'); open firefox and goes to curvball then waits 4 seconds Sleep(4000) MouseClick("left", 499, 358, 1);clicks start game ;searches for certain pixels then moves the mouse to them and clicks While 1 $coord = PixelSearch(271, 217, 735, 525, 15335395, 15, 7) If IsArray($coord) Then MouseClick ( "left", $coord[0], $coord[1], 1, 0 ) EndIf WEnd ;makes a quit function Func quit() Exit EndFunc ;makes a pause function Func pause() $paused = Not $paused While $paused Sleep(100) ToolTip('Script is "Paused, to unpause press pause key"', 480, 78) WEnd ToolTip("") EndFunc [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
steveR Posted April 19, 2005 Share Posted April 19, 2005 Cool, I made one for that game too. It's somewhere in this forum. I haven't tried yours yet. What level can it get to? AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 19, 2005 Share Posted April 19, 2005 Good job, you need to make the mouse move faster though. I almost made one that could play Defend Your Castle, it was hard. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Insolence Posted April 19, 2005 Share Posted April 19, 2005 I tried making the mouse move faster via a DLLCall to directly update its position, didn't make it go any faster. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
buzz44 Posted April 19, 2005 Share Posted April 19, 2005 Nice! I got to level 8, or should I say my mouse did . Xenogis is Defend the Castle the game with stick men and you click on them and throw them away and you can make your own stick mean and fight them or something? qq Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 19, 2005 Share Posted April 19, 2005 Yeah, it's this game [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
trickytroy Posted April 20, 2005 Author Share Posted April 20, 2005 (edited) Hey guys i changed it a little, now it opens up its own little window and loads curveball, so now it will work with any one, not just firefox people!! Heres the code expandcollapse popupGlobal $paused;sets up pause hotkey HotKeySet("{ESC}", "quit");set escape hotkey to exit HotKeySet("{PAUSE}", "pause");set pasue hotkey to pause #include <GUIConstants.au3>; get variable names for this .au3 $dll = DllOpen("cwebpage.dll");opens DLL $gui = GUICreate("CurveBall", 600, 400, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_CAPTION);creates gui $pos = WinGetClientSize($gui) DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $gui) GUISetState() DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $gui, "str", "gladstone.uoregon.edu/~ccassidy/CurveBall.swf");open the the game in gui GUISetState() sleep(3000) MouseClick("left", 512, 391, 1);clicks start game ;makes gui stay and searches for certain pixels on the screen then moves the mouse to them and clicks While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit $coord = PixelSearch(309, 269, 711, 537, 15335395, 15, 7) If IsArray($coord) Then MouseClick("left", $coord[0], $coord[1], 1, 0) EndIf WEnd ;makes a quit function Func quit() Exit EndFunc ;makes a pause function Func pause() $paused = Not $paused While $paused Sleep(100) ToolTip('Script is "Paused, to unpause press pause key"', 480, 78) WEnd ToolTip("") EndFunc enjoy! Pong_player.zip Edited April 20, 2005 by trickytroy [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
buzz44 Posted April 20, 2005 Share Posted April 20, 2005 BTW the co-ords are out of whack if you have your resolution in 600x800. It miss's the "Start Game" button. qq Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 Slightly better expandcollapse popupGlobal $paused;sets up pause hotkey HotKeySet("{ESC}", "quit");set escape hotkey to exit HotKeySet("{PAUSE}", "pause");set pasue hotkey to pause #include <GUIConstants.au3>; get variable names for this .au3 $dll = DllOpen("cwebpage.dll");opens DLL $gui = GUICreate("CurveBall", 600, 400, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_CAPTION);creates gui $pos = WinGetClientSize($gui) DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $gui) GUISetState() DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $gui, "str", "gladstone.uoregon.edu/~ccassidy/CurveBall.swf");open the the game in gui GUISetState() sleep(3000) Opt ( "MouseCoordMode", 0 ) MouseClick("left", 297, 209, 1);clicks start game Opt ( "MouseCoordMode", 1 ) ;makes gui stay and searches for certain pixels on the screen then moves the mouse to them and clicks While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit $coord = PixelSearch(309, 269, 711, 537, 15335395, 15, 7) If IsArray($coord) Then MouseMove ($coord[0],$coord[1],0) MouseClick("left") EndIf WEnd ;makes a quit function Func quit() Exit EndFunc ;makes a pause function Func pause() $paused = Not $paused While $paused Sleep(100) ToolTip('Script is "Paused, to unpause press pause key"', 480, 78) WEnd ToolTip("") EndFunc [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
trickytroy Posted April 20, 2005 Author Share Posted April 20, 2005 cool thanx xenogis [quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote] Link to comment Share on other sites More sharing options...
quick_sliver007 Posted April 20, 2005 Share Posted April 20, 2005 Could this DLL be used to make a control in the gui instead of filling the whole Gui? If so that would be a must have. . Link to comment Share on other sites More sharing options...
steveR Posted April 20, 2005 Share Posted April 20, 2005 I almost made one that could play Defend Your Castle, it was hard I tries once for that game too, but i ran into problems AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 I tries once for that game too, but i ran into problemsThe biggest problem is that the castle is the same color as the guys heads. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Insolence Posted April 20, 2005 Share Posted April 20, 2005 I worked on a bot for that game yesturday, only problem I ran into was I didn't put enough units inside the building in time. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 20, 2005 Share Posted April 20, 2005 My bot doesn't even put units in the building. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted April 20, 2005 Share Posted April 20, 2005 Hm...it doesn't load the webpage into the gui, but if i load the page manually, it works beautifully. Lost after level 6, too many 'super curves' by both sides That's a sweet program though, great job! Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 21, 2005 Share Posted April 21, 2005 (edited) Could this DLL be used to make a control in the gui instead of filling the whole Gui?If so that would be a must have.<{POST_SNAPBACK}>Yes.Edit: Well it could be seen as a control you have to create a child GUI Edited April 21, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] 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