SofaKingWeTardEd Posted December 19, 2007 Share Posted December 19, 2007 (edited) Hey again, I am still making that PK Bot for my game. But, with the co-ords I used for the Game, using a Windowed (800x600) Client, I am still having difficulties.I want the mouse to move over the detected pixel, and PK them.. But, instead the mouse feels like it's funny to move to the top left hand part of my screen and perform it's actions. And it's not even the right pixel.. I have removed the co-ords from this code, but the ones I used where: 300,400,300,400.expandcollapse popup;Pixels of Enemies $Elephant1 = 0x296163 $Elephant2 = 0x089a08 $Elephant3 = 0xbd9a18 $Elephant4 = 0xc69a08 $Elephant5 = 0xc65929 $Elephant6 = 0xde6542 $Elephant7 = 0xa52000 $Elephant8 = 0x101421 ;Mouse Options $button = "right" $clicks = 1 While 1 $Win = WinGetPos("Game Name","") $search = PixelSearch (0,0,0,0,$Elephant1,0) $search = PixelSearch (0,0,0,0,$Elephant2,0) $search = PixelSearch (0,0,0,0,$Elephant3,0) $search = PixelSearch (0,0,0,0,$Elephant4,0) $search = PixelSearch (0,0,0,0,$Elephant5,0) $search = PixelSearch (0,0,0,0,$Elephant6,0) $search = PixelSearch (0,0,0,0,$Elephant7,0) $search = PixelSearch (0,0,0,0,$Elephant8,0) If UBound($Win) > 0 Then Send ("^a") MouseClick("right",$search,$clicks,8) TrayTip("Congratulations", "You attacked everyone with success",0) Sleep(1000) Else TrayTip ("Error", "Cannot find correct window. Closing...",0) Sleep (5000) Exit EndIf Sleep(1000) Exit WEndAnyone know why? o_O Edited December 19, 2007 by SofaKingWeTardEd Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2007 Share Posted December 19, 2007 (edited) your problem is probably that your using the same variable name 4 every pixel search, try diffrent name or try to use if @error MouseClick("right",$search,$clicks,8) if im not wrong in this case its MouseClick("right",$search[0],$search[1],$clicks,8) Edited December 19, 2007 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 your problem is probably that your using the same variable name 4 every pixel search, try diffrent name or try to use if @error MouseClick("right",$search,$clicks,8) if im not wrong in this case its MouseClick("right",$search[0],$search[1],$clicks,8) I changed the variables to: $search1 = PixelSearch (0,0,0,0,$Elephant1,0) $search2 = PixelSearch (0,0,0,0,$Elephant2,0) $search3 = PixelSearch (0,0,0,0,$Elephant3,0) $search4 = PixelSearch (0,0,0,0,$Elephant4,0) $search5 = PixelSearch (0,0,0,0,$Elephant5,0) $search6 = PixelSearch (0,0,0,0,$Elephant6,0) $search7 = PixelSearch (0,0,0,0,$Elephant7,0) $search8 = PixelSearch (0,0,0,0,$Elephant8,0)oÝ÷ ٩ݶ¦¢ërXÚºÚ"µÍ[ÝÙPÛXÚÊ ][ÝÜYÚ ][ÝË ÌÍÜÙXÚÌWK ÌÍÜÙXÚÌK ÌÍÜÙXÚÌ×K ÌÍÜÙXÚÍK ÌÍÜÙXÚÍWK ÌÍÜÙXÚÍK ÌÍÜÙXÚÍ×K ÌÍÜÙXÚÎK ÌÍØÛXÚÜË But the main problem is that it isn't working within the game screen. It's clicking my desktop Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2007 Share Posted December 19, 2007 (edited) combine it like this MouseClick("right",$search1[0],$search1[1],$clicks,8) MouseClick("right",$search2[0],$search2[1],$clicks,8) MouseClick("right",$search3[0],$search3[1],$clicks,8) MouseClick("right",$search4[0],$search4[1],$clicks,8) MouseClick("right",$search5[0],$search5[1],$clicks,8) MouseClick("right",$search6[0],$search6[1],$clicks,8) MouseClick("right",$search7[0],$search7[1],$clicks,8) MouseClick("right",$search8[0],$search8[1],$clicks,8) what game? does it have protection? and whats the win name? Edited December 19, 2007 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Share Posted December 19, 2007 try this expandcollapse popup;Pixels of Enemies $Elephant1 = 0x296163 $Elephant2 = 0x089a08 $Elephant3 = 0xbd9a18 $Elephant4 = 0xc69a08 $Elephant5 = 0xc65929 $Elephant6 = 0xde6542 $Elephant7 = 0xa52000 $Elephant8 = 0x101421 Global $Button[1] While 1 $Win = WinGetPos("Game Name","") $search1 = PixelSearch (0,0,0,0,$Elephant1,0) $search2 = PixelSearch (0,0,0,0,$Elephant2,0) $search3 = PixelSearch (0,0,0,0,$Elephant3,0) $search4 = PixelSearch (0,0,0,0,$Elephant4,0) $search5 = PixelSearch (0,0,0,0,$Elephant5,0) $search6 = PixelSearch (0,0,0,0,$Elephant6,0) $search7 = PixelSearch (0,0,0,0,$Elephant7,0) $search8 = PixelSearch (0,0,0,0,$Elephant8,0) If UBound($Win) > 0 Then Send ("^a") for $c =1 to 8 Dim $search[$search[0][0]] MouseClick("right",$search[$search[$c]][0],$search[$search[$c]][1],1,0) Next TrayTip("Congratulations", "You attacked everyone with success",0) Sleep(1000) Else TrayTip ("Error", "Cannot find correct window. Closing...",0) Sleep (5000) Exit EndIf Sleep(1000) Exit WEnd [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 19, 2007 Share Posted December 19, 2007 MouseClick doesn't take an array as a point, it takes two separate x and y variables. That is the biggest problem. Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2007 Share Posted December 19, 2007 MouseClick doesn't take an array as a point, it takes two separate x and y variables. That is the biggest problem.maby the problem is that he dont have winactivate command on start of the script ^^ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Share Posted December 19, 2007 (edited) it would be helpfull to know if what game your playing ok. i improved it ;Pixels of Enemies dim $Elephant[8] $Elephant1 = 0x296163 $Elephant2 = 0x089a08 $Elephant3 = 0xbd9a18 $Elephant4 = 0xc69a08 $Elephant5 = 0xc65929 $Elephant6 = 0xde6542 $Elephant7 = 0xa52000 $Elephant8 = 0x101421 While 1 Send ("^a") for $c =1 to 8 $search = PixelSearch (0,0,0,0,$Elephant[$Elephant[$c]],0) if @error = 0 then MouseClick("right",$search[0],$search[1],1,0) EndIf Next sleep(1000) WEnd Edited December 19, 2007 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2007 Share Posted December 19, 2007 Mostly you need these... too! Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client 8) Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 (edited) it would be helpfull to know if what game your playing I can't really discuss the game I am playing, because alot of them lurk this forum for cheats of their own. And if they got hold of this one, it would cause *mayhem* upon them. And the protection is non-existent. All I can say is it's old. And, I know i'm typing everything right within the Window name. But, at most it's size is 800x600, and windowed. Just shoots off and doesn't work @_@ [Edit] Valuater, that helped a ton. It now does the game client. But, now it just goes to the top left hand of the Client :) Edited December 19, 2007 by SofaKingWeTardEd Link to comment Share on other sites More sharing options...
bogQ Posted December 19, 2007 Share Posted December 19, 2007 I have removed the co-ords from this code, but the ones I used where: 300,400,300,400why you use coordinates 300,400,300,400?isn it logical to use 0,0,300,400if you use 300,400,300,400 itl bring almost the same results like PixelGetColor, r you scaning only 1 pixel? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 why you use coordinates 300,400,300,400?isn it logical to use 0,0,300,400if you use 300,400,300,400 itl bring almost the same results like PixelGetColor, r you scaning only 1 pixel?Concering the co-ords:http://www.autoitscript.com/forum/index.php?showtopic=59784 Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2007 Share Posted December 19, 2007 try this for coodinates and colorshttp://www.autoitscript.com/forum/index.ph...st&p=1155158) Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 try this for coodinates and colorshttp://www.autoitscript.com/forum/index.ph...st&p=1155158)Valuater, that's great. It work's great, and I have the co-ords.But... I lack the knowledge of placing them into the Script. Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2007 Share Posted December 19, 2007 (edited) Oh... come-on ok - go to the top-left corner and use the numbers like this left,top goto the bottom right corner and use the numbers like this right,bottom $search1 = pixel search (left,top,right,bottom,$Elephant1, 10, 10) ; change that last 2 numbers to 10 8) Edited December 19, 2007 by Valuater Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Share Posted December 19, 2007 It would be nice to see your final script. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 Oh... come-onok -go to the top-left corner and use the numbers like thisleft,topgoto the bottom right corner and use the numbers like thisright,bottom8)Ohhhhh!!! I'm sooo silly.The Co-ords from left, top, right and bottom where:139,343 - Left767,272 - Right393,60 - Top393,467 - BottomI thought you used the first Co-ord and placed them in to work. (139,767,393,393)! Wow, I really do lack common sense.. Thank you Valuater :"> Link to comment Share on other sites More sharing options...
Valuater Posted December 19, 2007 Share Posted December 19, 2007 ok... show the code you have now 8) Link to comment Share on other sites More sharing options...
SofaKingWeTardEd Posted December 19, 2007 Author Share Posted December 19, 2007 (edited) expandcollapse popupOpt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client HotKeySet ("{F1}", "PK") HotKeySet ("{F2}", "End") ;Elephant Pixels $Elephant1 = 0x296163 $Elephant2 = 0x089a08 $Elephant3 = 0xbd9a18 $Elephant4 = 0xc69a08 $Elephant5 = 0xc65929 $Elephant6 = 0xde6542 $Elephant7 = 0xa52000 $Elephant8 = 0x101421 ;Mouseclick options. $button = "right" $clicks = 1 While 1 Sleep (1) WEnd Func PK() While 1 $Win = WinGetPos("GAME","") $search = PixelSearch (143,143,766,467,$Elephant1,10,10) $search = PixelSearch (143,143,766,467,$Elephant2,10,10) $search = PixelSearch (143,143,766,467,$Elephant3,10,10) $search = PixelSearch (143,143,766,467,$Elephant4,10,10) $search = PixelSearch (143,143,766,467,$Elephant5,10,10) $search = PixelSearch (143,143,766,467,$Elephant6,10,10) $search = PixelSearch (143,143,766,467,$Elephant7,10,10) $search = PixelSearch (143,143,766,467,$Elephant8,10,10) If UBound($Win) > 0 Then Send ("^a") MouseClick("right",$search,$clicks,8,0) TrayTip("Congratulations", "You attacked everyone with success",0) Sleep(1000) Else TrayTip ("Error", "Cannot find correct window. Closing...",0) Sleep (5000) Exit EndIf Sleep(1000) Exit WEnd EndFunc Func End() Exit EndFunc Still jumps up to the left. Edited December 19, 2007 by SofaKingWeTardEd Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Share Posted December 19, 2007 (edited) expandcollapse popupOpt("MouseCoordMode", 2);1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 2);1=absolute, 0=relative, 2=client HotKeySet ("{F1}", "PK") HotKeySet ("{F2}", "End") ;Elephant Pixels $Elephant1 = 0x296163 $Elephant2 = 0x089a08 $Elephant3 = 0xbd9a18 $Elephant4 = 0xc69a08 $Elephant5 = 0xc65929 $Elephant6 = 0xde6542 $Elephant7 = 0xa52000 $Elephant8 = 0x101421 ;Mouseclick options. $button = "right" $clicks = 1 While 1 Sleep (1) WEnd Func PK() While 1 $Win = WinGetPos("GAME","") If UBound($Win) > 0 Then Send ("^a") for $c =1 to 8 $search = PixelSearch (0,0,0,0,$Elephant[$Elephant[$c]],0) if @error = 0 then MouseClick("right",$search[0],$search[1],1,0) endif next TrayTip("Congratulations", "You attacked everyone with success",0) Sleep(1000) Else TrayTip ("Error", "Cannot find correct window. Closing...",0) Sleep (5000) Exit EndIf Sleep(1000) Exit WEnd EndFunc Func End() Exit EndFunc Edited December 19, 2007 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock 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