BusinessLord Posted April 24, 2020 Posted April 24, 2020 Hey guys, this is my first post and my first try of "coding". I learned something from videos etc. to develop a level bot for an old MMORPG. I`m using some Pixelsearch functions in the script. The part: Tab_Mob_Attack_Mob_Using_Skills () -- works till the line "while ($needRest) ;Do we get attacked by another Mob? - means that we can't rest" I tried to implement this function in the part before (I did not know how, so maybe there is bug/mistake?) The Func Check_If_Dead () also doesn't work -- The Mouse does not move or click at the position (or at all); Maybe Function is also in the wrong position?.. I hope somebody could help me, would be really glad;) Im a newbie, so I gave my best.. Maybe you could have a look at it. If you need more Information, ask me😊 expandcollapse popupwhile(1) Tab_Mob_Attack_Mob_Using_Skills () Refresh_Buffs () Check_If_Dead () Wend Func Check_If_Dead () ;Checks The Dead (Revive)_button $cords = PixelSearch(357,409,494,434,0x71BA82,5) if not @error then MouseClick($MOUSE_CLICK_LEFT,414,420,1,10) Sleep(1000) Else EndIF EndFunc Func Refresh_Buffs () ;Not found Buff Icon 1 ? = uses key - & + (2 Buffs) $cords = PixelSearch(751,33,852,56,0x48F08B,5) if @error then send ("{-}") Sleep(1000) send("{+}") Sleep(1250) Else EndIf EndFunc Func Tab_Mob_Attack_Mob_Using_Skills () Send("{Tab}") Sleep (250) ;Found a Mob? Icon $cords = PixelSearch(531,31,560,53,0x6385AB,5) if not @error then Send("1") Sleep(1000) Send("2") Sleep (250) Send("1") Sleep(2000) Send("3") Sleep (3000) Send("1") Sleep (3000) ;Using the Looting Function Looting(2) Sleep (3000) while ($attacking) ;Are we still attacking the mob? $isAttacking = Pixelsearch (539,42,541,44, 0x5D7DA1,1) if not(@error) then Else $attacking = false EndIF WEnd ;Are we healthy enough to continue attacking? $needrest = true $hpbar = PixelSearch (134,61,136,63,0xFF1465,1) if @error then Send("z") Sleep (3000) while ($needrest) $hpbar2 = PixelSearch (203,60,205,62,0xAF1C37,1) if not(@error) Then $needRest = False EndIf WEnd Else $needRest = False EndIf while ($needRest) ;Do we get attacked by another Mob? - means that we can't rest $isAttacking = Pixelsearch (340,98,765,498, 0xB7B8B6,5) if not(@error) then Send("{Tab}") Sleep (250) Send("1") Sleep(1000) Send("5") Sleep (1000) Send("6") Sleep(250) Else EndIF WEnd Else EndIF EndFunc Func Looting($count) for $x = 1 to $count send("x") Sleep(250) Next EndFunc Func myExit () msgbox(0, "Ending","Bot has exited") Exit EndFunc
Moderators Melba23 Posted April 24, 2020 Moderators Posted April 24, 2020 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