Bonjour bonjour,
Alors voilà, je sais je ne suis pas passé par la section présentation, je suis ancien informaticien en reconversion qui aime beaucoup votre travail !
J'avais testé votre bot sous D2 en offline il n'y a pas si lgtps et c'était assez fou ce que vous réussissiez à faire.
Bref on est dans un topic sur le recycle... Alors voilà simplement comment faire pour la version 8.1 du bot, je vais essayer d'expliquer simplement.
J'aimerais avoir des retours car flémar de tester en debug mes tests se font en jeu, en mettant tout simplement la fonction repairafterxxgames dans le setting à 1, comme ça j'observe le comportement du bot.
Actuellement je suis sûr que cela fonctionne dans les cas suivants :
-Action automatique du bot suite au repairafterxxgames
-Inventaire plein
Alors effectivement suite à mes premiers tests je l'ai vu parfaitement réaliser ce qu'il fallait l'inventaire plein, mais je l'ai choppé à déco au lieu de reprendre le tp le petit coquin, donc si l'un d'entre-vous trouve d'où cela peut venir. Je suis déjà en train d'y jeter un oeil. D'ailleurs si vous chercher là où la vérification du if plante c'est sur la fonction TpRepairAndBack, vu que je n'ai pas eu le temps de tester mes modifications sur cette fonction je préfère ne pas vous faire part de conneries.
Bon maintenant que j'ai expliqué à vos risques et périls l'utilisation de ce code très très inspiré du code utilisé pour la version 7.2, voici ce que votre bot doit normalement réaliser :
-tp en ville
-book of cain ( + vérification des items in avec grablist)
-coffre
-recycle
-répare
-vends
-ouvre l'inventaire, je crois que cette étape passe en un clin d’œil, j'ai du oublié un ou deux Sleep ^^ ( pour vérification des items avec grablist)
-coffre (Dépose nos belles petites fioles/sabots/oeil etc.)
-reviens en zone/quitte
Maintenant vous vous demandé mais comment faire ? Alors j'ai vu une méthode tout d'abord pour obtenir une variable modifiable recycle à true or false que l'on peut implémenter dans le setting.au3
ici, mais je ne vois pas comment l'utiliser dans le code en lui même pour qu'il choisisse par la suite de recycler ou de revendre, alors faites une copie de votre dossier du bot avant de faire les manips suivantes.

Dans le toolkit.au3 :
-Remplacer la fonction FilterBackPack par :
Spoiler
Func FilterBackpack()
$Uni_manuel = false
Local $__ACDACTOR = triBackPack(IterateBackpack(0))
Local $iMax = UBound($__ACDACTOR)
If $iMax > 0 Then
Local $return[$iMax][4]
Send("{SPACE}") ; make sure we close everything
Send("i") ; open the inventory
Sleep(100)
CheckWindowD3Size()
_checkbackpacksize()
For $i = 0 To $iMax - 1 ;c'est ici que l'on parcour (tours a tours) l'ensemble des items contenut dans notres bag
$ACD = GetACDOffsetByACDGUID($__ACDACTOR[$i][0])
$CurrentIdAttrib = _memoryread($ACD + 0x120, $d3, "ptr")
$quality = GetAttribute($CurrentIdAttrib, $Atrib_Item_Quality_Level) ;on definit la quality de l'item traiter ici
$itemDestination = CheckItem($__ACDACTOR[$i][0], $__ACDACTOR[$i][1], 1) ;on recupere ici ce que l'on doit faire de l'objet (stash/inventaire/trash)
If $Uni_manuel = true Then
If $quality >= 6 And _MemoryRead($__ACDACTOR[$i][7] + 0x164, $d3, 'int') > 0 And ($itemDestination <> "Stash" Or trim(StringLower($Unidentified)) = "false") Then
;Ici on verifie que la qualité est bien superieur a 6 et que l'item as besoin d'etre identifier, si l'item doit aller dans le stash ou si on definit Unidentified a false
;Il faudra modifier/ajouter quelque chose ici pour gerer les uni sur les oranges et modifier le nom de la variable Unidentified !
; InventoryMove($__ACDACTOR[$i][3], $__ACDACTOR[$i][4]) ;met la souris sur l'item
; If IterateActorAtribs($__ACDACTOR[$i][0], $Atrib_Item_Quality_Level) > 8 Then ;verifie la quality de l'item pour connaitre le temps necessaire a l'identification de ce dernier
; Sleep(Random(250, 400))
; MouseClick("Right")
; Sleep(Random(4000, 4500))
; Else
; Sleep(Random(250, 400))
; MouseClick("Right")
; Sleep(Random(1000, 1500))
; EndIf
EndIf
EndIf
$return[$i][0] = $__ACDACTOR[$i][3] ;definit la collone de l'item
$return[$i][1] = $__ACDACTOR[$i][4] ;definit la ligne de l'item
$return[$i][3] = $quality
If $itemDestination = "Stash_Filtre" And trim(StringLower($Unidentified)) = "false" Then ;Si c'est un item à filtrer et que l'on a definit Unidentified sur false (il faudra juste changer le nom de la variable Unidentifier)
If checkFiltreFromtable($GrabListTab, $__ACDACTOR[$i][1], $CurrentIdAttrib) Then ;on lance le filtre sur l'item
_log('valide', 1)
_log(' - ', 1)
$return[$i][2] = "Stash"
Else
$return[$i][2] = "Trash"
_log('invalide', 1)
_log(' - ', 1)
EndIf
Else
$return[$i][2] = $itemDestination ;row
EndIf
Next
For $i=0 To UBound($return) -1
if $return[$i][2]="Trash" and $return[$i][3]>2 Then ; si trash + qualité >2, soit les bleus et jaunes, mettre 5 pour ne recycler que les jaunes.
$return[$i][2]="Recycle"
EndIf
Next
Send("{SPACE}") ; make sure we close everything
Return $return
EndIf
Return False
EndFunc ;==>FilterBackpack-Remplacer la fonction StashAndRepair par :
Spoiler
Func StashAndRepair()
if trim(StringLower($Unidentified)) = "false" Then
Take_BookOfCain()
Else
$Uni_manuel = true
EndIF
_log("Func StashAndRepair")
$RepairORsell += 1
$item_to_stash = 0
While _checkInventoryopen() = False
Send("i")
Sleep(Random(200, 300))
WEnd
While Not offsetlist()
Sleep(10)
WEnd
Sleep(Random(100, 400))
_log('Filter Backpack')
$items = FilterBackpack()
$ToStash = _ArrayFindAll($items, "Stash", 0, 0, 0, 1, 2)
Sleep(Random(100, 400))
If $ToStash <> -1 Then
Send("{SPACE}")
Sleep(500)
InteractByActorName('Player_Shared_Stash')
Sleep(700)
Local $stashtry = 0
While _checkStashopen() = False
If $stashtry <= 4 Then
_log('Fail to open Stash')
$stashtry += 1
InteractByActorName("Player_Shared_Stash")
Sleep(Random(100, 200))
Else
Send("{PRINTSCREEN}")
Sleep(200)
Log('Failed to open Stash after 4 try')
WinSetOnTop("Diablo III", "", 0)
MsgBox(0, "Impossible d'ouvrir le stash :", "SVP, veuillez reporter ce problème sur le forum. Erreur : s001 ")
Terminate()
EndIf
WEnd
$tabfull = 0
CheckWindowD3Size()
For $i = 0 To UBound($ToStash) - 1
_log($items[$ToStash[$i]][0] & " stash : " & $items[$ToStash[$i]][1])
Sleep(Random(100, 200))
InventoryMove($items[$ToStash[$i]][0], $items[$ToStash[$i]][1])
Sleep(Random(100, 500))
If $items[$ToStash[$i]][3] >= 6 Then
#cs $item_name = fastCheckuiValue("Root.TopLayer.item 2.stack.top_wrapper.stack.name", 1, 354)
$item_stats = fastCheckuiValue("Root.TopLayer.item 2.stack.frame body.stack.stats", 1, 827)
$item_to_stash += 1
;_log("name file -> " & $ftpfilename)
Xml_To_Str(xml_to_item($item_name, $item_stats), $ftpfilename)
#ce
EndIf
MouseClick('Right')
Sleep(Random(50, 200))
If Detect_UI_error(1) Then
_log('Tab is full : Switching tab')
CheckWindowD3Size()
$i = $i - 1
If $tabfull = 0 Then
MouseClick('left', 286, 194, 5)
$tabfull = 1
ElseIf $tabfull = 1 Then
MouseClick('left', 282, 266, 5)
$tabfull = 2
ElseIf $tabfull = 2 Then
_log('Stash is full : Botting stopped')
Terminate()
EndIf
Sleep(5000)
Else
$ItemToStash = $ItemToStash + 1
EndIf
Next
;If $item_to_stash > 0 Then
;Ftp_Upload_To_Xml($ftpfilename)
;EndIf
Sleep(Random(50, 100))
Send("{SPACE}")
Sleep(Random(100, 150))
;****************************************************************
If NOT Verif_Attrib_GlobalStuff() Then
_log("CHANGEMENT DE STUFF ON TOURNE EN ROND (Stash and Repair - Stash)!!!!!")
antiidle()
EndIf
;****************************************************************
EndIf
$ToRecycle = _ArrayFindAll($items, "Recycle", 0, 0, 0, 1, 2)
If $ToRecycle <> -1 Then
Send("{SPACE}")
Sleep(Random(100, 200))
InteractByActorName('Blacksmith_RepairShortcut')
Sleep(Random(100, 200))
Local $stashtry = 0
#cs While _checkStashopen() = False
If $stashtry <= 4 Then
_log('Fail to open Stash')
$stashtry += 1
InteractByActorName("Blacksmith_RepairShortcut")
Sleep(Random(100, 200))
Else
Send("{PRINTSCREEN}")
Sleep(200)
Log('Failed to open Stash after 4 try')
WinSetOnTop("Diablo III", "", 0)
MsgBox(0, "Impossible d'ouvrir le stash :", "SVP, veuillez reporter ce problème sur le forum. Erreur : s001 ")
Terminate()
EndIf
WEnd
#ce
$tabfull = 0
CheckWindowD3Size()
MouseMove(150,150, 2) ; clic sur dez
MouseClick('Left')
For $i = 0 To UBound($ToRecycle) - 1
_log($items[$ToRecycle[$i]][0] & " stash : " & $items[$ToRecycle[$i]][1])
Sleep(Random(100, 200))
InventoryMove($items[$ToRecycle[$i]][0], $items[$ToRecycle[$i]][1]);dez l'objet
Sleep(Random(100, 200))
MouseClick('Left')
Sleep(Random(150, 300))
if $items[$ToRecycle[$i]][3] > 5 then ; si jaune ou plus, clique sur OK
MouseMove(300,210, 2)
Sleep(Random(100, 250))
MouseClick('Left')
endif
Next
;If $item_to_stash > 0 Then
;Ftp_Upload_To_Xml($ftpfilename)
;EndIf
Sleep(Random(50, 100))
Send("{SPACE}")
Sleep(Random(100, 150))
;****************************************************************
If Not Verif_Attrib_GlobalStuff() Then
_log("CHANGEMENT DE STUFF ON TOURNE EN ROND (Stash and Repair - Stash)!!!!!")
antiidle()
EndIf
;****************************************************************
EndIf
Sleep(Random(100, 200))
Send("{SPACE}")
Sleep(Random(100, 200))
Repair()
Sleep(Random(100, 200))
Send("{SPACE}")
Sleep(Random(100, 200))
;Trash
$ToTrash = _ArrayFindAll($items, "Trash", 0, 0, 0, 1, 2)
If $ToTrash <> -1 Then
Sleep(Random(100, 200))
Send("{SPACE}")
Sleep(500)
InteractByActorName($RepairVendor)
Sleep(700)
Local $vendortry = 0
While _checkVendoropen() = False
If $vendortry <= 5 Then
_log('Fail to open vendor')
$vendortry = $vendortry + 1
InteractByActorName($RepairVendor)
Else
Send("{PRINTSCREEN}")
Sleep(200)
_log('Failed to open Vendor after 5 try')
WinSetOnTop("Diablo III", "", 0)
MsgBox(0, "Impossible d'ouvrir le vendeur :", "SVP, veuillez reporter ce problème sur le forum. Erreur : v002 ")
Terminate()
ExitLoop
EndIf
WEnd
CheckWindowD3Size()
For $i = 0 To UBound($ToTrash) - 1
InventoryMove($items[$ToTrash[$i]][0], $items[$ToTrash[$i]][1])
Sleep(Random(100, 500))
$ItemToSell = $ItemToSell + 1
MouseClick('Right')
Sleep(Random(100, 200))
Next
Sleep(Random(100, 200))
Send("{SPACE}")
Sleep(Random(100, 200))
;****************************************************************
If NOT Verif_Attrib_GlobalStuff() Then
_log("CHANGEMENT DE STUFF ON TOURNE EN ROND (Stash and Repair - vendeur)!!!!!")
antiidle()
EndIf
;****************************************************************
EndIf
Sleep(Random(100, 500))
Send("{SPACE}")
Sleep(Random(100, 500))
_log('Filter Backpack')
$items = FilterBackpack()
$ToStash = _ArrayFindAll($items, "Stash", 0, 0, 0, 1, 2)
If $ToStash <> -1 Then
Sleep(500)
InteractByActorName('Player_Shared_Stash')
Sleep(700)
Local $stashtry = 0
While _checkStashopen() = False
If $stashtry <= 4 Then
_log('Fail to open Stash')
$stashtry += 1
InteractByActorName("Player_Shared_Stash")
Sleep(Random(100, 200))
Else
Send("{PRINTSCREEN}")
Sleep(200)
Log('Failed to open Stash after 4 try')
WinSetOnTop("Diablo III", "", 0)
MsgBox(0, "Impossible d'ouvrir le stash :", "SVP, veuillez reporter ce problème sur le forum. Erreur : s001 ")
Terminate()
EndIf
WEnd
$tabfull = 0
CheckWindowD3Size()
For $i = 0 To UBound($ToStash) - 1
_log($items[$ToStash[$i]][0] & " stash : " & $items[$ToStash[$i]][1])
Sleep(Random(100, 200))
InventoryMove($items[$ToStash[$i]][0], $items[$ToStash[$i]][1])
Sleep(Random(100, 500))
If $items[$ToStash[$i]][3] >= 6 Then
#cs $item_name = fastCheckuiValue("Root.TopLayer.item 2.stack.top_wrapper.stack.name", 1, 354)
$item_stats = fastCheckuiValue("Root.TopLayer.item 2.stack.frame body.stack.stats", 1, 827)
$item_to_stash += 1
;_log("name file -> " & $ftpfilename)
Xml_To_Str(xml_to_item($item_name, $item_stats), $ftpfilename)
#ce
EndIf
MouseClick('Right')
Sleep(Random(50, 200))
If Detect_UI_error(1) Then
_log('Tab is full : Switching tab')
CheckWindowD3Size()
$i = $i - 1
If $tabfull = 0 Then
MouseClick('left', 286, 194, 5)
$tabfull = 1
ElseIf $tabfull = 1 Then
MouseClick('left', 282, 266, 5)
$tabfull = 2
ElseIf $tabfull = 2 Then
_log('Stash is full : Botting stopped')
Terminate()
EndIf
Sleep(5000)
Else
$ItemToStash = $ItemToStash + 1
EndIf
Next
;If $item_to_stash > 0 Then
;Ftp_Upload_To_Xml($ftpfilename)
;EndIf
Sleep(Random(50, 100))
Send("{SPACE}")
Sleep(Random(100, 150))
;****************************************************************
If NOT Verif_Attrib_GlobalStuff() Then
_log("CHANGEMENT DE STUFF ON TOURNE EN ROND (Stash and Repair - Stash)!!!!!")
antiidle()
EndIf
;****************************************************************
EndIf
EndFunc ;==>StashAndRepair-Enfin dans votre grablist, sur la ligne où il y a l'or, les gemmes, les plans, les clés etc rajouter :
Spoiler
|Crafting_Tier|Sur ce je vous souhaite une excellente après-midi, en espérant que certains pourront craft tranquillement, tandis que des devs bien plus expérimentés pourront en faire une simple variable modifiable dans le settings.

A Bientôt !