DsBotter Posted December 9, 2011 Posted December 9, 2011 Hey guys, I am new to this and only know a few things so hard. My problem is really simple to other people with knowledge of doing this, I would assume. I am making a mining bot for this 2d game.. It's very simple, i got the movements down, and i got the mouse were it needs to go to start a quest, but sometimes the mob it needs to click on isn't at the same exact part of the client were it was before, it might be under a picture of another mob, and it will attack that mob instead of clicking the quest mob and getting a quest. Can someone help me out with pixelsearch so that i can select this mob only? And here is my script so far. WinMove("Dark swords", "", 0,0) < Moves client top left $coord = PixelSearch( 0, 0, 155, 9, 0xF0F857 ) < need help mouseclick ("") sleep(4000) mousemove(163,39) < Moves mouse to quest mob MouseClick ("") < clicks quest mob, opens up new box showing quests you can take sleep(2000) mousemove(678,297) goes to the mining quest mouseclick("") clicks mining quest, opens up new box with accept/deny sleep(6000) mousemove(623,533) moves mouse to accept mouseclick("") clicks accept sleep(6000) Send("{RIGHT}") Sleep(6000) Send("{RIGHT}") sleep(6000) Send("{RIGHT}") sleep(6000) Send("{RIGHT}") sleep(6000) Send("{RIGHT}") sleep(6000) Send("{LEFT}") Sleep(6000) Send("{LEFT}") sleep(6000) Send("{LEFT}") sleep(6000) Send("{LEFT}") sleep(6000) Send("{LEFT}") I have all the movements down, i just need the bot to do a pixelcheck, and once it finds the color i want, to click it.
Moderators Melba23 Posted December 9, 2011 Moderators Posted December 9, 2011 DsBotter,Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now and then you will understand why you will get no help and this thread will shortly be locked. See you soon with a legitimate question I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
DsBotter Posted December 9, 2011 Author Posted December 9, 2011 >>>> Window <<<< Title: DarkSwords (v 1.2.4.1) Class: TMainForm Position: 244, 0 Size: 717, 729 Style: 0x16CE0000 ExStyle: 0x00010100 Handle: 0x00000000003C0170 >>>> Control <<<< Class: TdsPanel Instance: 2 ClassnameNN: TdsPanel2 Name: Advanced (Class): [CLASS:TdsPanel; INSTANCE:2] ID: 1770324 Text: Position: 0, 0 Size: 702, 414 ControlClick Coords: 155, 10 Style: 0x56000000 ExStyle: 0x00010000 Handle: 0x00000000001B0354 >>>> Mouse <<<< Position: 407, 40 Cursor ID: 0 Color: 0xEBFF0B ^ There is the finder tool information on the spot were i need the mouse to click for the pixel check thing.
Valik Posted December 9, 2011 Posted December 9, 2011 I feel like I'm the only person on the planet who bothers to read forum rules before registering/posting on a forum. Thread locked.
Recommended Posts