rahidyll

error script

5 posts in this topic

#1 ·  Posted (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

 

---------------------

WinActive("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 by Melba23
Added code tags

Share this post


Link to post
Share on other sites



#2 ·  Posted

If $game = True Then MsgBox(0, '', 'Read Forum rules')

1 person likes this

Share this post


Link to post
Share on other sites

#3 ·  Posted

8 minutes ago, kosamja said:

If $game = True Then MsgBox(0, '', 'Read Forum rules')

 

In which line do I hit that?

Share this post


Link to post
Share on other sites

#4 ·  Posted

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 :P

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

Share this post


Link to post
Share on other sites

#5 ·  Posted

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.