Jump to content

Curveball player


trickytroy
 Share

Recommended Posts

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. :D

Updated: hey the new updated version is in the link! :)

Pong_player.zip

Edited 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

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

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

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

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

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

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

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

Global $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 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

Slightly better

Global $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

I tries once for that game too, but i ran into problems

The 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

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

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

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

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 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...