Hi all im new on this forum.
First of all i got problem with this script, im making a bot for 1 game and bot will must do multi-tasks but i read that this can be done in autoit. My problem is when i want to use multiple tasks script become crazy :)
I made few files, main (main bot and gui), buff(for buffing), cam(camera rotation), pick(for pick items), and now i need to put all that to work together without problems.
here is piece of code that i have problem with
and here is buff script
So problem is next, when i press F9 it start to aim and kill mobs, cam rotation works fine but it buff all time, and what i need is when i press F9 script start, buff once, start attack, pause attack when buff are ready too use again, use buff, start attack again. If you dont understand something like this,
F9 = bot start
1. buff (when done)
2. attack
3. when buff ready again (pause attack)
4. buff again
5. start attack
First of all i got problem with this script, im making a bot for 1 game and bot will must do multi-tasks but i read that this can be done in autoit. My problem is when i want to use multiple tasks script become crazy :)
I made few files, main (main bot and gui), buff(for buffing), cam(camera rotation), pick(for pick items), and now i need to put all that to work together without problems.
here is piece of code that i have problem with
Code:
; main function for start boting when pressed F9
Func _toggleStart()
; if process exists then start
If $proc = True Then
$run = Not $run ; pause script
; main loop
While $run
_checkMob()
If GUICtrlRead($cameraRoation) = $GUI_CHECKED Then
#include <cam.au3>
EndIf
If GUICtrlRead($pickItems) = $GUI_CHECKED Then
#include <pick.au3>
EndIf
#include <buffs.au3>
WEnd
EndIf
EndFunc
Func _checkMob()
$mob = PixelSearch(415, 44, 596, 54, 0xF84B49)
If IsArray($mob) And Not @error Then
ControlSend($win, "", "", "{3}")
Sleep(200)
Else
ControlSend($win, "", "", "{TAB}")
Sleep(200)
EndIf
EndFunc
Code:
Global $win, $Input1, $Input2, $Input3, $Input4, $Input21, $Input22, $Input23, $Input24
Sleep(2000)
Send("{SHIFTDOWN}")
Sleep(100)
ControlSend($win, "", "", "{3}", 0)
Sleep(GUICtrlRead($Input1))
ControlSend($win, "", "", "{4}", 0)
Sleep(GUICtrlRead($Input2))
ControlSend($win, "", "", "{5}", 0)
Sleep(GUICtrlRead($Input3))
ControlSend($win, "", "", "{6}", 0)
Sleep(GUICtrlRead($Input4))
Send("{SHIFTUP}")
Sleep(100)
$Input1 = TimerInit()
$Input2 = TimerInit()
$Input3 = TimerInit()
$Input4 = TimerInit()
If TimerDiff($Input1) > GUICtrlRead($Input21) Then
Send("{SHIFTDOWN}")
Sleep(100)
ControlSend($win, "", "", "{3}", 0)
Sleep(GUICtrlRead($Input1))
Send("{SHIFTUP}")
Sleep(100)
$Input1 = TimerInit()
EndIf
If TimerDiff($Input2) > GUICtrlRead($Input22) Then
Send("{SHIFTDOWN}")
Sleep(100)
ControlSend($win, "", "", "{4}", 0)
Sleep(GUICtrlRead($Input2))
Send("{SHIFTUP}")
Sleep(100)
$Input2 = TimerInit()
EndIf
If TimerDiff($Input3) > GUICtrlRead($Input23) Then
Send("{SHIFTDOWN}")
Sleep(100)
ControlSend($win, "", "", "{5}", 0)
Sleep(GUICtrlRead($Input3))
Send("{SHIFTUP}")
Sleep(100)
$Input3 = TimerInit()
EndIf
If TimerDiff($Input4) > GUICtrlRead($Input24) Then
Send("{SHIFTDOWN}")
Sleep(100)
ControlSend($win, "", "", "{6}", 0)
Sleep(GUICtrlRead($Input4))
Send("{SHIFTUP}")
Sleep(100)
$Input4 = TimerInit()
EndIf
F9 = bot start
1. buff (when done)
2. attack
3. when buff ready again (pause attack)
4. buff again
5. start attack