harekrishna320 Posted December 3 Posted December 3 Hello guys, I'm making a simple testing bot. But there is a problem with my script. Everthing works fine, just pixelsearch does nothing. There is a color bar, which fills up with specific color. I wanted, to search for that color at specific point. That bot would know, when to enter the command, if there's not such color, than search for it again, until it found's it. After detecting, color write specific command's. But it seems that it cant detect the color, or my script is bad. Mby someone, could bring me to the right point? And give me some info, what im doing wrong? here's my script. Thanks ! mu.au3
harekrishna320 Posted December 3 Author Posted December 3 #RequireAdmin #include <Misc.au3> HotKeySet("{UP}","StartBot") HotKeySet("{DOWN}","StopBot") Global $isRunning = False Func Bot() While $isRunning ; 0. Activates game window. WinActivate("main.exe") Sleep(500) ; 1. Click's ENTER Send("{ENTER}") Sleep(3000) ; 2. sets str to : /str 300 Send("/str 300") Sleep(2000) ; 3. Enter Send("{ENTER}") Sleep(2000) ; 4. /agi 32749 Send("{ENTER}") Sleep(1000) Send("/agi 32749") Sleep(2000) ; 5. Enter Send("{ENTER}") Sleep(2000) ; 6. /ene 15000 Send("{ENTER}") Sleep(2000) Send("/ene 15000") Sleep(2000) Send("{ENTER}") Sleep(2000) ; 8. Opens MAP MouseMove(1124, 175, 10) ; Sleep(1000) MouseClick("left") Sleep(1000) MouseMove(683, 678, 10) ; MouseClick("left") MouseMove(1124, 175, 10) ; Sleep(1000) MouseClick("left") Sleep(3000) ; 9. Moves mouse to teleportation MouseMove(486, 246, 10) ; Sleep(1000) MouseClick("left") Sleep(1000) ; 10. party member MouseMove(1098, 227, 10); Sleep(1000) MouseClick("left") Sleep(1000) ; 11. OK button MouseMove(730, 506, 10) ; Sleep(1000) MouseClick("left") Sleep(1000) ; 12. Wait 1min Sleep(60000) ; Search for color in a bar. $searchcolor = False While (Not($searchcolor)) $pixels = PixelSearch(106, 626, 108, 628, 0x9F19D1, 1) If Not (@error) Then Send("{ENTER}") Sleep(500) Send("/reset") Sleep(500) Send("{ENTER}") Sleep(10000) EndIf WEnd WEnd EndFunc Func StartBot() If Not $isRunning Then $isRunning = True MsgBox(0,"BOT","STARTED") Bot() EndIf EndFunc Func StopBot() If $isRunning Then $isRunning = False MsgBox(0,"BOT","STOPED") EndIf EndFunc While True Sleep(100) WEnd
Musashi Posted December 3 Posted December 3 1 hour ago, harekrishna320 said: ; 9. Moves mouse to teleportation ... ; 10. party member That sounds pretty much of a game automation to me. I would therefore recommend taking a look at the . "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Moderators Melba23 Posted December 4 Moderators Posted December 4 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team 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
Recommended Posts