Jump to content

The User Selected Numbers are Wrong


Recommended Posts

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$BotMain = GUICreate("MaxBot Mana", 200, 100, -1, -1)
$Input1 = GUICtrlCreateInput("", 40, 32, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
GUICtrlSetLimit(-1, 10)
$Exura = GUICtrlCreateButton("Exura", 136, 64, 59, 25, 0)
$ExuraVita = GUICtrlCreateButton("ExuraV", 8, 64, 59, 25, 0)
$TUV = GUICtrlCreateButton("TUV", 72, 64, 59, 25, 0)
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Exura
            $nCurVar = Int(GUICtrlRead($Input1))
            If $nCurVar <= 30 Then
                Do
                    For $i=0 To $nCurVar
                        Call(_Exura(), $i)
                    Next
                UNTIL $i > $nCurVar
            ElseIf $nCurVar > 30
                MsgBox(0, "MaxBotMana" "You Messed it up. Maximum Amount is 30.")
            EndIf
            
                    Case $GUI_EVENT_CLOSE
            Exit
        Case $ExuraVita
            $nCurVar = Int(GUICtrlRead($Input1))
            If $nCurVar <= 30 Then
                Do
                    For $i=0 To $nCurVar
                        Call(_ExuraVita(), $i)
                    Next
                UNTIL $i > $nCurVar
            ElseIf $nCurVar > 30
                MsgBox(0, "MaxBotMana" "You Messed it up. Maximum Amount is 30.")
            EndIf
            
            
                    Case $GUI_EVENT_CLOSE
            Exit
        Case $TUV
            $nCurVar = Int(GUICtrlRead($Input1))
            If $nCurVar <= 30 Then
                Do
                    For $i=0 To $nCurVar
                        Call(_TUV(), $i)
                    Next
                UNTIL $i > $nCurVar
            ElseIf $nCurVar > 30
                MsgBox(0, "MaxBotMana" "You Messed it up. Maximum Amount is 30.")
            EndIf
        EndSwitch
    WEnd
                
            
                    
                    
                

Func _Exura()
WinActivate("Tibia")
MouseMove(257, 703)
MouseClick("Left")
Send("Exura")
Send("{Enter}")
Sleep(1000)
EndFunc




Func _ExuraVita()
    WinActivate("Tibia")
    MouseMove(257, 703)
    MouseClick("Left")
    Send("Exura Vita")
    Send("{Enter}")
    Sleep(1000)
EndFunc




Func _TUV()
    WinActivate("Tibia")
    MouseMove(257, 703)
    Mouseclick("Left")
    Send("Utana Vid")
    Send("{Enter}")
    Sleep(1000)
EndFunc

Hey.. This was suppose to be for Casting Spells in a game. After the User Says how much he/she wants it to cast. It casts but not the Amount you Put in. So if you put in 5 it will send 13 times or so. Any Help Here?

Edited by Tweekin
Link to comment
Share on other sites

  • Moderators

How about changing the title to something useful.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...