Jump to content
Fuzy

How do i make i so that $Start calls Func Autobuff and loop it till pressed again?

Recommended Posts

Fuzy

How do i make i so that $Start calls Func Autobuff and loop it till pressed again? (newbie here) :)
 

InetGet ( "https://i.imgur.com/2yicWdk.jpg", "Database/Image/Background")


$Form1 = GUICreate("Form1", 347, 434, 192, 124)
$Pic1 = GUICtrlCreatePic("Database/Image/Background", 0, 0, 346, 433)
$hk1 = GUICtrlCreateInput("1", 8, 24, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk2 = GUICtrlCreateInput("2", 8, 56, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk3 = GUICtrlCreateInput("3", 8, 88, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk4 = GUICtrlCreateInput("4", 8, 120, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk5 = GUICtrlCreateInput("5", 8, 152, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk6 = GUICtrlCreateInput("6", 8, 184, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk7 = GUICtrlCreateInput("7", 8, 216, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk8 = GUICtrlCreateInput("8", 8, 248, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk9 = GUICtrlCreateInput("9", 8, 280, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$hk10 = GUICtrlCreateInput("0", 8, 312, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$cd = GUICtrlCreateInput("20", 10, 392, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$Start = GUICtrlCreateInput("=", 232, 24, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$Game = GUICtrlCreateInput("9Dragons", 232, 392, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUISetState(@SW_SHOW)

;Atobuff Start------------------------------------------------------------------------------
Func Autobuff()
Send("{$hk1 Down}")
    Sleep("$cd")
Send("{$hk1 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk2 Down}")
    Sleep("$cd")
Send("{$hk2 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk3 Down}")
    Sleep("$cd")
Send("{$hk3 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk4 Down}")
    Sleep("$cd")
Send("{$hk4 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk5 Down}")
    Sleep("$cd")
Send("{$hk5 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk6 Down}")
    Sleep("$cd")
Send("{$hk6 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk7 Down}")
    Sleep("$cd")
Send("{$hk7 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk8 Down}")
    Sleep("$cd")
Send("{$hk8 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk9 Down}")
    Sleep("$cd")
Send("{$hk9 up}")
    Sleep 2000
;Spacer--------------------------------------------------------------------------------------
Send("{$hk10 Down}")
    Sleep("$cd")
Send("{$hk10 up}")
    Sleep 2000
EndFunc ;==>Autobuff-------------------------------------------------------------------------
;Atobuff End





While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites
Melba23

Fuzy,

Welcome to the AutoIt forums.

Quote

$Game = GUICtrlCreateInput("9Dragons",

Is this a script to automate a game?

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
Fuzy

Yea, i play on 2 computers, kinda pain in the ass to keep buffing myself. ;X

 

Share this post


Link to post
Share on other sites
Melba23

Fuzy,

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

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.

×