coucou vi voila
Func Attack()
If _playerdead_revive() Then
Return
EndIf
If _playerdead() Or ($GameFailed = 1) Then
$GameFailed = 1
_log("Return Cuz : If _playerdead or gamefailed ")
Return
EndIf
Local $IgnoreList = ""
Local $item[10]
Dim $test_iterateallobjectslist = IterateFilterAttack($IgnoreList)
If IsArray($test_iterateallobjectslist) Then
While IsArray($test_iterateallobjectslist)
If _playerdead_revive() Then
ExitLoop
EndIf
If _playerdead() Or ($GameFailed = 1) Then
$GameFailed = 1
_log("Return Cuz : If _playerdead or gamefailed ")
ExitLoop
EndIf
For $i = 0 To 9
$item[$i] = $test_iterateallobjectslist[0][$i]
Next
If Is_Interact($item, $IgnoreList) Then
If Is_Shrine($item) Then
handle_Shrine($item)
ElseIf Is_Mob($item) Then
handle_Mob($item, $IgnoreList, $test_iterateallobjectslist)
ElseIf Is_Loot($item) Then
handle_Loot($item, $IgnoreList, $test_iterateallobjectslist)
EndIf
EndIf
Dim $buff_array = UpdateArrayAttack($test_iterateallobjectslist, $IgnoreList)
Dim $test_iterateallobjectslist = $buff_array
WEnd
EndIf
EndFunc ;==>Attack
Func DetectElite($Guid)
Return _MemoryRead(GetACDOffsetByACDGUID($Guid) + 0xB8, $d3, 'int')
EndFunc ;==>DetectElite
;;--------------------------------------------------------------------------------
;; KillMob()
;;--------------------------------------------------------------------------------
Func KillMob($name, $offset, $Guid)
$return = True
$begin = TimerInit()
Dim $pos = UpdateObjectsPos($offset)
$Coords = FromD3toScreenCoords($pos[0], $pos[1], $pos[2])
MouseMove($Coords[0], $Coords[1], 3)
$elite = DetectElite($Guid)
;loop the attack until the mob is dead
_log("Attacking : " & $name & "; Type : " & $elite);
While IterateActorAtribs($Guid, $Atrib_Hitpoints_Cur) > 0
$myposs_aff = getcurrentpos()
If _playerdead_revive() Then
$return = False
ExitLoop
EndIf
If $gestion_affixe = "true" Then maffmove($myposs_aff[0], $myposs_aff[1], $myposs_aff[2])
Dim $pos = UpdateObjectsPos($offset)
$Coords = FromD3toScreenCoords($pos[0], $pos[1], $pos[2])
MouseMove($Coords[0], $Coords[1], 3)
GestSpellcast($pos[3], 1, $elite)
If TimerDiff($begin) > $a_time Then
$killtimeout += 1
; after this time, the mob should be dead, otherwise he is probly unkillable
$return = False
ExitLoop
EndIf
WEnd
Return $return
EndFunc ;==>KillMob
;;--------------------------------------------------------------------------------
;; Grabit()
;;------------------------------------
bon dimanche a tous