$selected_time = 360 ; время накопления манны в секундах
$selected_clicks = 10 ; количество кликов
;------------------------------------------
AutoItSetOption ( "PixelCoordMode", 2);относительные координаты клиентской области активного окна
AutoItSetOption ( "MouseCoordMode", 2)
Global $L2_win = WinGetHandle ("Lineage II", "")
If $L2_win = "" Then Exit
Opt("MouseClickDelay", 500); период кликов 0,5 сек
Global $onoff = 0
HotKeySet ("{HOME}","start")
HotKeySet ("{END}","stop")
While 1
If $onoff = 1 Then
$current_time = TimerDiff ($start_timer)
$current_time_ceil = Ceiling ($current_time)
If $current_time_ceil >= $selected_time_ms Then
clickk()
EndIf
EndIf
sleep (100)
WEnd
Func clickk()
$state = WinGetState($L2_win)
If BitAnd($state, 16) Then
WinSetState ($L2_win, "", @SW_RESTORE )
sleep (4000)
EndIf
WinActivate ($L2_win)
sleep (1000)
MouseClick( "left", $pos[0] ,$pos[1] ,$selected_clicks)
Global $start_timer = TimerInit ()
EndFunc
Func start()
Global $pos = MouseGetPos()
Global $selected_time_ms = $selected_time * 1000
Global $start_timer = TimerInit ()
Global $onoff = 1
EndFunc
Func stop()
Global $onoff = 0
EndFunc