[Fonction] Gestion De Déchirure

Bonjour,

voulant jouer avec le template déchirure plusieurs problèmes se posent:

Spammer un buff n'est pas très "humain"
Ca coupe le sprint
Ca demande énormément de fury car trop souvent utilisé
C'est souvent mal utilisé

Et à force de voir le code (Les fonctions de Plpp ont été mon inspiration) j'me suis dit mais oui si j'essayais de mieux gérer l'affaire.
Vu mon niveau en programmation, c'est la première fois que je poste un bout de code de ma création et j'en suis pas peu fier ! :D


Dans Killmob()on rajoute
If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 15 Then

                If getfury()> 0.50 and timerdiff($timerrend)>=3000 Then
                          send('é'); Remplacez par votre touche de déchirure
                          $timerrend = timerinit()
                Endif
        Endif
et la fonction devient :

;;--------------------------------------------------------------------------------
;;      KillMob()
;;--------------------------------------------------------------------------------
Func KillMob($name, $offset, $guid)
	$return = True
	$begin = TimerInit()
	;Local $IgnorePoint = 9000 ; Been remplaced by a_time in settings.ini <-- If something is not grabbed/killed in this time we give it up
	$Coords = FromD3toScreenCoords(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float'))
	MouseMove($Coords[0], $Coords[1], 3)

	;Send("{SHIFTDOWN}")
	If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 15 Then

		If getfury()> 0.50 and timerdiff($timerrend)>=3000 Then
                  	  send('é'); Remplacez par votre touche de déchirure
                 	  $timerrend = timerinit()
		Endif
	Endif
	MouseDown("left")
	

	;loop the attack until the mob is dead
	_log("Attacking : " & $name) ;FOR
While IterateActorAtribs($guid, $Atrib_Hitpoints_Cur) > 0

If _playerdead_revive() then
                        $return = False
                        ExitLoop
                EndIf
		
		checkforpotion()
          	maffmove(); A supprimer si pas de gestion des affixes

                $Coords = FromD3toScreenCoords(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float'))
                MouseMove($Coords[0], $Coords[1], 3)
		If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 15 Then

			If getfury()> 0.50 and timerdiff($timerrend)>=3000 Then
                  	  	  send('é'); Remplacez par votre touche de déchirure
                 	  	  $timerrend = timerinit()
			Endif
		Endif
                MouseDown("left")
		CheckForSpell()
		;Sleep(10)
		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
	MouseUp("left")
	;Send("{SHIFTUP}")
	Return $return
EndFunc   ;==>KillMob

dans Main.au3 déclarer la variable
Global $timerrend = timerinit()

Et voilà déchirure n'est plus spammer à tout va mais à bon escient et de fait économie de fury, sprint au poil = efficacité

Enjoy
Bonjour j'ai ajouter les deux nouvelles fonctions que tu as faites "Vengeance/Déchirure" au bot.
La fonction Vengeance marche nickel il la spam plus comme un fou, par contre j'ai un problème avec déchirure il continue de spam entre les packs comme avant.

La fonction donne ça :

Spoiler
;;--------------------------------------------------------------------------------
;;      KillMob()
;;--------------------------------------------------------------------------------
Func KillMob($name, $offset, $guid)
        $return = True
        $begin = TimerInit()
        ;Local $IgnorePoint = 9000 ; Been remplaced by a_time in settings.ini <-- If something is not grabbed/killed in this time we give it up
        $Coords = FromD3toScreenCoords(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float'))
        MouseMove($Coords[0], $Coords[1], 3)

        ;Send("{SHIFTDOWN}")
        If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 20 Then
                If IsBuffActive($__ACTOR[$ACD_Hero][3], $Barbarian_Revenge_Buff) then
                        If timerdiff($timerrevenge)>=3000 Then
                                send('&'); Remplacez par votre touche de vengeance
                                $timerrevenge = timerinit()
                        Endif
                Endif
        Endif
        MouseDown("left")
        
		;Send("{SHIFTDOWN}")
		If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 15 Then

                If getfury()> 0.50 and timerdiff($timerrend)>=3000 Then
                          send('é'); Remplacez par votre touche de déchirure
                          $timerrend = timerinit()
                Endif
        Endif
        MouseDown("left")


        ;loop the attack until the mob is dead
        _log("Attacking : " & $name) ;FOR
While IterateActorAtribs($guid, $Atrib_Hitpoints_Cur) > 0

If _playerdead_revive() then
                        $return = False
                        ExitLoop
                EndIf
                

                $Coords = FromD3toScreenCoords(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float'))
                MouseMove($Coords[0], $Coords[1], 3)
                If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 20 Then
                        If IsBuffActive($__ACTOR[$ACD_Hero][3], $Barbarian_Revenge_Buff) then
                                If timerdiff($timerrevenge)>=3000 Then
                                        send('&'); Remplacez par votre touche de vengeance
                                        $timerrevenge = timerinit()
                                Endif
                        Endif
                Endif
				If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) <= 15 Then

                        If getfury()> 0.50 and timerdiff($timerrend)>=3000 Then
								  send('é'); Remplacez par votre touche de déchirure
                                  $timerrend = timerinit()
                        Endif
                Endif
			   
				MouseDown("left")
                CheckForSpell()
                ;Sleep(10)
                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
        MouseUp("left")
        ;Send("{SHIFTUP}")
        Return $return
EndFunc   ;==>KillMob

(et impossible de metre sur "4" soit " ' " sinon ca bug)

ou ca peut venir du setting j'ai mis les "delay" à 3000

Spoiler

PreBuff1=false
ToucheBuff1=&
delaiBuff1=3000

PreBuff2=false
ToucheBuff2=é
delaiBuff2=3000

PreBuff3=true
ToucheBuff3="
delaiBuff3=55000

PreBuff4=true
ToucheBuff4='
delaiBuff4=20000



Spell1Activated=True
LifeForEmergencyClick=60
LifeForSpell3=100
DefayForSpell3=3000
EnergySpell3=
EnergyNeedsSpell3=
KeyForSpell1=&

Spell2Activated=true
LifeForSpell2=100
DefayForSpell2=3000
EnergySpell2=Fury
EnergyNeedsSpell2=20
KeyForSpell2=é

Spell3Activated=false
LifeForSpell3=100
DefayForSpell3=55000
EnergySpell3=Fury
EnergyNeedsSpell3=20
KeyForSpell3="

Spell4Activated=false
LifeForSpell4=100
DefayForSpell4=20000
EnergySpell4=
EnergyNeedsSpell4=
KeyForSpell4='

enlève le du setting.
Je crois qu'il y à un bug avec le false si la touche et le timer sont désigné pour les buffs.

moi j'ai mis uniquement false et ça fonctionne bien.
Euh pour ne pas qu'il le fasse entre les combats il ne suffit pas de retirer la ligne delaiBuff ? chez moi il n'essaie pas de le lancer lorsqu'il court sous le seuil que je lui ai indiqué (enfin pas de ce que j'ai vu)

ma config sur Déchirure
Spoiler
PreBuff4=true
ToucheBuff4='

Spell4Activated=true
LifeForSpell4=75
DefayForSpell4=3000
EnergySpell4=
EnergyNeedsSpell4=20
KeyForSpell4='
Ok merci je vais test comme ça

Edit : j'ai supprimer les lignes Prébuff du setting il marche nickel merci !
Du coup avec cette fonction modifier il faut mettre toutes les variables du setting.ini sur false, ou juste le prebuff et conserver les timers et touches de la partie attaque ?
Question V7 ? une modif a faire ou tout marche ?

Question V7 ? une modif a faire ou tout marche ?


euh ya eu un changement de la gestion des combats donc en théorie cette fonction n'est plus à jour mais la V7 n'empêche pas la gestion de Déchirure = Rend, sachant qu'il y a une gestion du rayon d'effet du saignement, le reste devrait t'être accessible je pense