Jump to content
Sign in to follow this  
Rydextillxixdiex

"Function" Help

Recommended Posts

Rydextillxixdiex

As you can see i am trying to place a function within my function where it will reference to it. However it does not work, do i need to set it up as a variable??? Anyone give me a hand?

HotKeySet("{F9}", "Start")
HotKeySet("{F10}", "Stop")
AutoItSetOption("WinTitleMatchMode", 4)
Global $handle = WinGetHandle("classname=GxWindowClassD3d")
   WinSetState($handle, "", @SW_SHOW)
   WinSetState($handle, "", @SW_SHOWMAXIMIZED)
While 1
    Sleep(1000)
WEnd

$target = 0x6a0706
    Func start()
        Global $show = 0
        MouseClick("Right", 652, 421, 1, 0)
        Sleep(1000)
        Func Join()
        EndFunc
        Sleep(1000)
        Func Enter()
        EndFunc
        If $show > 0 then ExitLoop
    EndFunc
    
    Func Join()
        While 1
        $Coords = PixelSearch(180, 510, 328, 550, $target, 10)
        If isArray($Coords) then
        MouseClick("Left",$Coords[0], $Coords[1],1,1)
        EndIf
        WEnd
    EndFunc
    
    Func Enter()
        While 1
        $Coords = PixelSearch(472, 192, 640, 222, $target, 10)
        If isArray($Coords) then
        MouseClick("Left",$Coords[0], $Coords[1],1,1)
        EndIf
        WEnd
    EndFunc
    
    Func stop()
        Global $show = 5
    EndFunc

Thanks for any help in advance :)


...will never learn all there is to know about autoit, no worries...i came to the forums :)

Share this post


Link to post
Share on other sites
enaiman

I shouldn't help a WoW botter (I'm playing WoW as well and I hate botters) but here it is:

In order to call a function you only need to put its name there (or to use "Call")

HotKeySet("{F9}", "Start")
HotKeySet("{F10}", "Stop")
AutoItSetOption("WinTitleMatchMode", 4)
Global $handle = WinGetHandle("classname=GxWindowClassD3d")
   WinSetState($handle, "", @SW_SHOW)
   WinSetState($handle, "", @SW_SHOWMAXIMIZED)
While 1
    Sleep(1000)
WEnd

$target = 0x6a0706
    Func start()
        Global $show = 0
        MouseClick("Right", 652, 421, 1, 0)
        Sleep(1000)
        Join()
        Sleep(1000)
        Enter()
        If $show > 0 then ExitLoop
    EndFunc
    
    Func Join()
        While 1
        $Coords = PixelSearch(180, 510, 328, 550, $target, 10)
        If isArray($Coords) then
        MouseClick("Left",$Coords[0], $Coords[1],1,1)
        EndIf
        WEnd
    EndFunc
    
    Func Enter()
        While 1
        $Coords = PixelSearch(472, 192, 640, 222, $target, 10)
        If isArray($Coords) then
        MouseClick("Left",$Coords[0], $Coords[1],1,1)
        EndIf
        WEnd
    EndFunc
    
    Func stop()
        Global $show = 5
    EndFunc

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×