richardb Posted December 25, 2007 Share Posted December 25, 2007 (edited) I have done some Visual Basic, ASP, PHP, and a little C# earlier so I'm not totally unfamiliar with programming. However, that was 1,5+ years ago so I'm a bit rusty. The script is supposed to sign up, join the game, walk out of the cave and use AV trinket and then just walk up and down every now and then. It will do this based on the color of pixels on the screen. This is part of the code. You can ignore everything below ' Case $BG = "active" '. Basicly; It checks for the color of the pixel where an icon pops up as soon as you've entered a queue. If that pixel has a different color than the icon, mouseclick in the middle of the screen to join the queue. That part works fine. Except that it just keeps clicking in the middle everytime it checks the for the color, even if the icon is there. Anyone who can see any obvious error? CODE$BG_queue = PixelGetColor( 1467, 945 ) ;Cordinates for the BG-icon $BG_join = PixelGetColor( 814, 250 ) ;Cordinates for where the join button pops up $BG = "inactive" $afk = "idle" Sleep(3000) $repeat = 0 Do Select ;If not in BG Case $BG = "inactive" If $BG_queue <> 0xD81801 Then ;If the color where the icon pops up is not equal to the color of the icon MouseClick("right", 857, 507, 1) ;~Click middle of screen EndIf ;If Join button pops up, click it If $BG_join = 0xDD0C00 Then MouseClick("left", 814, 250, 1) ;Click join button $BG = "active" EndIf EndSelect Until $repeat = 1 I'll include the full code also, in case there's something in there that I can't see that screws up. Sorry if it gets messy, I'm really tired atm. Thanks for any help in advance. CODE$BG_queue = PixelGetColor( 1467, 945 ) ;***BG-ICON X&Y*** $BG_join = PixelGetColor( 814, 250 ) ;***JOIN BUTTON X&Y*** $BG = "inactive" $afk = "idle" Sleep(3000) $repeat = 0 Do ;Afk preventing Select ;When not in BG Case $afk = "idle" sleep(10000) send("{w down}") send("{w up}") send("{s down}") send("{s up}") ;Walking out of cave Case $afk = "cave" Send("{F8}") Send("{w down}") sleep (2000) Send("{d down}") sleep (350) Send("{d up}") sleep (15000) Send("{w up}") MouseClick("left", 1074, 947, 1);***TRINKET*** sleep(13000) Send("{d down}") sleep (940) Send("{d up}") Send("{w down}") sleep (14000) Send("{d down}") sleep (200) Send("{d up}") sleep (25000) Send("{w up}") sleep(100) EndSelect Select ;If not in BG Case $BG = "inactive" ;If not queued, click in middle If $BG_queue <> 0xD81801 Then ;***BG-ICON COLOR*** MouseClick("right", 857, 507, 1) ;***MIDDLE OF SCREEN X&Y*** EndIf ;If join button pops up, join game If $BG_join = 0xDD0C00 Then MouseClick("left", 814, 250, 1) ;***JOIN BUTTON X&Y*** $BG = "active" EndIf ;If in BG Case $BG = "active" sleep(30000) ;~Loading time to enter BG $BG_checkdoor = PixelGetColor( 000, 000 ) ;***AV-GATE X&Y*** $BG_leave = PixelGetColor( 000, 000 ) ;***LEAVE BUTTON X&Y*** ;If AV-gate is open If $BG_checkdoor = 0x000000 Then ;***Checks if the door is open somehow, haven't figured out a good way yet*** $afk = "cave" Else $afk = "idle" EndIf ;If leave button has popped up, click it If $BG_leave = 0x000000 Then MouseClick("left", 000, 000, 1) ;***LEAVE BUTTON*** $BG = "inactive" ;Set BG to inactive EndIf EndSelect Until $repeat = 1 Edited December 25, 2007 by richardb 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