Attention je manque de tests sur cette fonction, votre bot peut rester bloqué à un moment ou à un autre bien que j'ai récemment essayer d'effectuer une modif à ce sujet.
Pour l'instant je déconseille de laisser le bot tourner toute la nuit avec cette fonction.
J'ai aussi rajouté une expèce de sécurité qui vous fait normalement ignorer définitivement le coffre au bout de 4 secondes si celui-ci n'est pas pris à une distance de 5 et plus.
Merci aux mecs de la section dev pour les conseils (xoum,euclide,chrissou, et les autres j'en oublie^^).
Dans main.au3, aux lignes juste avant et juste après sequence() vous rajoutez :
Global $banlist = ""
A copier dans toolkit.au3 :
;
;coffs()
;
Func coffs($name, $offset, $guid)
Local $begin=timerinit()
While iterateactoratribs($guid, $Atrib_chest_open) <> 1 and _playerdead()= false
If getdistance(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float')) >= 5 Then
If timerdiff($begin)>4000 Then
checkforpotion()
checkforspell()
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)
Endif
Interact(_MemoryRead($offset + 0xB0, $d3, 'float'), _MemoryRead($offset + 0xB4, $d3, 'float'), _MemoryRead($offset + 0xB8, $d3, 'float'))
Wend
Endfunc ;coffs
Et dans toolkit.au3 vous recherchez attack() et vous remplacez :
If $item[0] <> "" And $item[0] <> 0xFFFFFFFF And $item[9] < 120 And StringInStr($IgnoreList, $item[8]) == 0 And StringInStr($IgnoreItemList, $item[1]) = 0 Then
par :
$mypos = getcurrentpos() If $item[0] <> "" and $item[0] <> 0xFFFFFFFF And $item[9] < 120 and abs($item[4]-$mypos[2])<=10 and StringInStr($IgnoreList, $item[8]) = 0 and checkfromlist($banlist, $item[8]) = 0 And StringInStr($IgnoreList, $item[8]) == 0 Then
Vous rajoutez juste après :
If stringinstr($item[1],'chest') or stringinstr($item[1],'container') or stringinstr($item[1],'rack') and stringinstr($item[1],'chestarmor')=false and stringinstr($item[1],'bloodcontainer')=false and IterateActorAtribs($item[0], $Atrib_chest_open) <> 1 Then
If coffs($item[1], $item[8], $item[0])=false Then
_log('chest is banlisted')
$banlist = $banlist &"|"& $item[8]
Endif
EndIfRetours bienvenus.
Modifié par plpp, 29 October 2012 - 03:46.


Ce sujet est fermé




