Sign in to follow this  
Followers 0
Leprechaun

Different Choice Each Loop.

3 posts in this topic

#1 ·  Posted (edited)

What I need to do is have this program choose a different "channel" everytime it loops.

MouseClick("left", 265, 364, 1) Sends it to Channel 12. I Want to add other channels that the bot will goto each time it loops. Say it goes to Channel 12 first, on the second Loop I want it to goto Channel 14, Then 3rd loop Channel 3 and so on

HotKeySet("{ESC}", "Terminate")


While 1
    GameLogin()
    Sleep(500)
    GoZapIt()
    Sleep(500)
WEnd

;======================================================================================
; Func GameLogin()                                          Hot Key = None
;======================================================================================
Func GameLogin()
If WinGetState("MapleStory") = 16 Then
   WinSetState("MapleStory", "", @SW_MAXIMIZE)
EndIf 
    Sleep(400)
    MouseClick("left", 419, 334, 1)
    Sleep(400)
    MouseClick("left", 454, 286, 1)
    Send("*****{Enter}")
    Sleep(500)
    MouseClick("left", 163, 157, 1)
    Sleep(300)
    MouseClick("left", 265, 364, 1) [B];<--Channel 12. I Want to add other channels that the bot will goto each time it loops. Say it goes to Channel 12 first, on the second Loop I want it to goto Channel 14, Then 3rd loop Channel 3 and so on.[/B]
    Sleep(300)
    MouseClick("left", 555, 252, 1)
    Sleep(300)
    MouseClick("left", 252, 343, 1)
    Sleep(300)
    MouseClick("left", 624, 159, 1)
    Sleep(3000)
EndFunc;==>GameLogin

;======================================================================================
; Func GoZapIt()                                            Hot Key = None
;======================================================================================
Func GoZapIt()
Dim $coord

While WinActive("MapleStory")
    $coord = PixelSearch(232, 589, 248, 588, 0xBDBEBD)
    If Not @error Then
        Send("p")
    EndIf  
WEnd

    Local $iMax = 40
    Local $iCnt      
    For $iCnt = 1 To $iMax
        Send("a")
        Sleep(200)
If WinGetState("MapleStory") = 16 Then
   WinSetState("MapleStory", "", @SW_MAXIMIZE)
EndIf
    Next
     Return
EndFunc;==>GoZapIt

;======================================================================================
; Func Terminate()                                          Hot Key = Escape
;======================================================================================
Func Terminate()                                          
    MsgBox(0, "Terminating Script", "Script Name: " & @ScriptName & @LF & @LF & "Located: " & @ScriptDir & @LF & @LF & "is now Terminated")
    Exit 0
EndFunc;==>Terminate
Edited by Leprechaun

Share this post


Link to post
Share on other sites



Can't really see what you mean by channel 12?

Share this post


Link to post
Share on other sites

Put all the channels into an array in the order you want, and each time it loops increment the array index by 1... $array[$i].


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

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  
Followers 0