So anyone figured out yet how to vault/blink using this UDF?
So anyone figured out yet how to vault/blink using this UDF?
Great work.
Is it possible that something in IterateActorAtribs function is buggy ? Looting seems to work but sometime it will fail with a critical error.
Refering to if $ACTORatrib = $__ACTOR[$ACDIndex][3] Then(142) : ==> Array variable subscript badly formatted.:
Just ADD
If $ACDIndex = -1 Then Return False
in IterateActorAtribs function
Code:func IterateActorAtribs($_GUID,$_REQ) IterateLocalActor() $ACDIndex = _ArraySearch($__ACTOR,"0x"&hex($_GUID), 0 , 0 , 0 , 1 , 1 , 1) ;this bitch is slow as hell If $ACDIndex = -1 Then Return False ;FIX
@botserver
Perfect, you'r right. While it took me several hours to find that sometime -1 was returned, it took you 15 min to provide a solution ^^.
+rep
anyone have any idea why this code would occasionally cause my game to lock up and not even allow me to click the mouse to move or attack?
the function should check for the cellar and go to it if it exists. I know there is some redundancy in there, but i was just trying anything to try and fix the issue.Code:Func gotoDoor() $log = FileOpen(@DesktopDir & "\DiabloLog\DoorLog.txt",2) $door = 1 While 1 $OBject = IterateObjectList(0) $foundobject = 0 _ArraySort($OBject, 0, 0, 0, 8) For $i = 0 To UBound($OBject, 1) - 1 If StringInStr($OBject[$i][2], "g_Portal_Square_Blue") Then ;checking for door FileWrite($log, $OBject[$i][2] & @CRLF) ;MouseClick("Left", 300, 400, 1, 1) MoveToPos($OBject[$i][3], $OBject[$i][4], $OBject[$i][5]) FileWrite($log,"Moved" & @CRLF) PowerUseGUID($OBject[$i][1], 0x7545) FileWrite($log,"Enter" & @CRLF) $foundobject = 1 $door = 2 Sleep(1000) ExitLoop ; EndIf EndIf Next If $foundobject = 0 Then ExitLoop WEnd Return $door EndFunc ;==>gotoDoor
it doesn't do it all the time either. almost all every time i run it to test it when i am already in game it runs, but if i call it as part of my main script it fails.
You need to add a check for your toon's world position, because when you vault/blink it doesn't update the position in the memory. Clicking anywhere in the world after you vault/blink will return the correct position. Hope that makes sense.
@Siklon - oh god thank you. that was driving me crazy. It is working perfectly now.
Does it serve any purpose to move the character x+1 when using a skill?
Sent from my GT-I9300 using Tapatalk 2
0x7546 is for NPC
0x7545 is for items, portals, etc.
Does anybody know snopower(hex value) for interacting (attacking) an enemy.
So far what I have just follows the enemy around.
I don't want to introduced manual clicks if I got this far. (Want to still be able to run with game minimized)
Code:Func _Kill($name) While _InteractWithObjectContainingString($name, true) WEnd EndFunc Func _InteractWithObjectContainingString($name, $NPC) $snoPower = 0x7545 If $NPC Then $snoPower = 0x7546 EndIf $OBject = IterateObjectList(0) $foundObject = 0 For $i = 0 to UBound ( $OBject ,1 )-1 If $OBject[$i][1] <> 0xFFFFFFFF And StringInStr($OBject[$i][2],$name) Then $foundObject = 1 PowerUseGUID($OBject[$i][1], $snoPower) EndIf ExitLoop EndIf Next Return $foundObject EndFunc
Last edited by goodies4uall; 07-04-2012 at 04:32 PM.
from mooege:
public const int HungeringArrow = 0x0001F8BF;
public const int EvasiveFire = 0x00020C41;
public const int BolaShot = 0x00012EF0;
public const int EntanglingShot = 0x00012861;
public const int Grenades = 0x00015252;
public const int SpikeTrap = 0x00012625;
public const int Strafe = 0x00020B8E;
public const int Impale = 0x00020126;
public const int RapidFire = 0x00020078;
public const int Chakram = 0x0001F8BD;
public const int ElementalArrow = 0x000200FD;
public const int FanOfKnives = 0x00012EEA;
public const int Multishot = 0x00012F51;
public const int ClusterArrow = 0x0001F8BE;
public const int RainOfVengeance = 0x001FF0F;
Works great, i've actually just tested hungering arrow
Biggest problem is that you need to "move" abit to trigger it.
I havnt figured out how to get around that.
I'm also having trouble in locating my barb. But first, I think I found a bug in your code. The $_CurOffset var is never increased in your code.
But I still don't get the $_GUID = 0x77BC0000. Am I doing something wrong?? Any help appreciated :-)Code:for $i = 0 to $_Count step +1 $_GUID = _MemoryRead($_CurOffset+0x4, $d3, 'ptr') $_NAME = _MemoryRead($_CurOffset+0x8, $d3, 'char[64]') if $_GUID = 0x77BC0000 Then ExitLoop EndIf $_CurOffset = $_CurOffset + $_ObjmanagerStrucSize ; this line is missing in your Code Next
Edit: After some playing around and searching for names containing the substring "barb", I found a GUID that at least ends with "0x77BC0000". Is this the normal behaviour? Sry for asking maybe stupid questions...
Last edited by Jack187; 07-04-2012 at 09:04 PM.
converted this project over quite a while ago to C#:
d3adventure - Adventure into a new realm. - Google Project Hosting
for those who haven't ran across it,
but I will be taking it down soon unfortunately due to big b's aggressive nature.