rahidyll Posted June 25, 2017 Share Posted June 25, 2017 (edited) I'm using the translator, sorry if you do not understand, Good afternoon I play a game called Tibia, and when you attack a player is made a red square, I want the mouse to follow the player, and I found this script on the internet but it gives me the following error: line 17 (file "c: / User / jarol ---- / desktop% aimbotmouse.au3 ") If not @error tave hen Error: "if" statements must have a "then" keyword --------------------- expandcollapse popupWinActive("tibia.exe") HotKeySet("k", "_c") ;close func _a() HotKeySet("o", "_d") ;close func _b() HotKeySet("x", "_b") HotKeySet("f", "_a") while 1 sleep(200) WEnd Func _a() $var = 1 while $var = 1 $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) If Not @error Tave hen MouseMove($coord[0], $coord[1]) EndIf wend EndFunc Func _b() $1var = 1 while $1var = 1 $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) $coord = PixelSearch( 0, 0,1024, 768, 0x595854 ) If Not @error Then MouseMove($coord[0], $coord[1]) EndIf WEnd EndFunc Func _c() $var = 0 Endfunc Func _d() $1var = 0 Endfunc Edited June 26, 2017 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
kosamja Posted June 25, 2017 Share Posted June 25, 2017 If $game = True Then MsgBox(0, '', 'Read Forum rules') rahidyll 1 Link to comment Share on other sites More sharing options...
rahidyll Posted June 25, 2017 Author Share Posted June 25, 2017 8 minutes ago, kosamja said: If $game = True Then MsgBox(0, '', 'Read Forum rules') In which line do I hit that? Link to comment Share on other sites More sharing options...
corgano Posted June 26, 2017 Share Posted June 26, 2017 HE means discussion of game automation / game related scripts here is not allowed, which you'd know if you read the rules. You should probably read the forum rules The question itself is generic enough I'll answer it for anyone who finds this post in a search later. IF uses two different formats, single line and multiline: If condition then do stuff here OR If condition then do stuff here do stuff here do stuff here endif That error means you're missing a then somewhere. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 26, 2017 Moderators Share Posted June 26, 2017 rahidyll, cosamja and corgano are quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again. Thread locked. But welcome to the AutoIt forum - and 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 Link to comment Share on other sites More sharing options...
Recommended Posts