Jump to content

Different Choice Each Loop.


Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...