I don't think that you can find if a spell is ready with attribute.
I think the real question is : how can I check if a speel is on cooldown without memory injection, or memory write, juste with pointer chain.
I don't think that you can find if a spell is ready with attribute.
I think the real question is : how can I check if a speel is on cooldown without memory injection, or memory write, juste with pointer chain.
Actually you can. There are 2 attributes related to power cd: Power_Cooldown (time when cd will end) and Power_Cooldown_Start (time when cd started). To get this attributes you need to mask (bitwise OR) AttributeID (either Power_Cooldown or Power_Cooldown_Start) with powerID you want to query.I don't think that you can find if a spell is ready with attribute.
So if I understand :
Monk_Serenity = 0x177D7
Power_Cooldown = 0x12B
0x177D7 << 12 = 0x177D7000
0x177D7000 + 12B = 0x177D712B
So I pass 0x177D712B to my get attribute, instead of 0xFFFFF33C (Intelligence_Item for sample) for common attribute on objet ?
the problem is, that we don´t know tisful´s complete source.
what´s happening in there? Return $AttribInterop.GetAttributeInt($item[2], $_REQ[0])? nobody knows what this function does internally. if he´s doing stuff similar to joxxe:PHP Code:
Func IterateActorAtribs($_GUID, $_REQ)
Local $index, $offset, $count, $item[4]
startIterateLocalActor($index, $offset, $count)
While iterateLocalActorList($index, $offset, $count, $item)
If $item[0] = "0x" & Hex($_GUID) Then
If $_REQ[1] = 'float' Then
Return $AttribInterop.GetAttributeFloat($item[2], $_REQ[0])
Else
Return $AttribInterop.GetAttributeInt($item[2], $_REQ[0])
EndIf
ExitLoop
EndIf
WEnd
Return False
EndFunc
it´s no whonder that he fails to read the masked attributes... but nobody knows.PHP Code:
If StringLeft($AtribData, 7) = "0xFFFFF" Then
;ConsoleWrite("Debug :" &$data+0x4 & " : " & _MemoryRead($data+0x4, $d3, 'ptr') &@crlf) ;FOR DEBUGGING
If "0x" & StringRight($AtribData, 3) = $_REQ[0] Then
Return _MemoryRead($data + 0x8, $d3, $_REQ[1])
EndIf
EndIf
@bastiflew. yes that is how it works. not only combined with powers, but also for stuff like resistances:
if you are calling the client´s getInt/Float that will work out of the box.PHP Code:
enum eResistances
{
phys = 0,
fire = 1,
cold = 1,
.....
}
attrib_resistance = 0x60
mask = ( fire << 12 ) | 0x60;
Ok, it's just magic !
Now I have a different problem :
I use Mantra of Conviction with my monk, and I recast Mantra of conviction for doing more damages.
I can check if the buff is active with ActorAttribute.Buff_Active and SNOPowerId.Monk_MantraOfConviction
The result is 1, 0 when not active.
How can I check if "overbuff" is active when I recast Mantra of conviction ?
Thanks a lot again.
EDIT : there's an Attribute to know if the power is "fireable" (enough resources) ?
Last edited by bastiflew; 11-17-2012 at 12:40 PM.
Specifically for Mantra of Conviction you can check "Buff_Icon_Count6" attribute for Monk_MantraOfConviction. It should be 1 if overbuff active. This attribute won't work for other mantras though, they seem to use their own attributes (e.g. Buff_Icon_Count3 for Healing mantra). This method is somewhat unreliable, but it works.How can I check if "overbuff" is active when I recast Mantra of conviction ?
Don't know, but you can always check if you have enough resources by yourself.there's an Attribute to know if the power is "fireable" (enough resources) ?
ok thanks.
I try to get the real amount of current resources of my character.
I read on another post that the mask is 0x3000 for Spirit, and attribute Resources_Cur (0x86).
I try to get this attribute like I do for Buff, but it doesn't work.
This attribute must be retreive on PlayerACD ?
resourcetype = getInteger( eGameAttributes::Resource_Type_Primary );
mask = ( resourcetype << 12 ) | eGameAttributes::Resource_Cur;
works for primary and secondary. no matter what class
or use the enum style values to calc your mask 0x3000 is already shifted:
enum eResourceType
{
Mana = 0,
Arcanum = 1,
Fury = 2,
Spirit = 3,
Hatred = 5,
Discipline = 6
}
dunno what 4 is
I try this, but get 0 every time.
you get the attribute on Player acd right ?
for monk, this mask is 0x03000086, so in your code that mean : getInteger( 0x03000086 ) ?
thanks
no it should be 0x00003086 for spirit. 0x3000 is already shifted. if you shift it again you end up with 0x03000000 that would be wrong
(3 << 12 ) | Resource_Cur;
but try to do it this way. that should work universally for all classes!
resourcetype = getInteger( eGameAttributes::Resource_Type_Primary ); // or Resource_Type_Secondary
mask = ( resourcetype << 12 ) | eGameAttributes::Resource_Cur;
getFloat(mask)
ok it's a float !
Works fine, thanks again
Sorry to bother you again boredevil, but I'm looking for Nephalem valor buff.
I'm figured out that I don't have PowerId for Nephalem valor, and don't know how to get the number of stack.
Actually I use UIElement to read the text inside the icon, but it's not clean as reading attribute.
I use CrytalMPQ to extract ActorId, but I didn't find how to extract PowerId.
Can you help me with those two points ? Thanks again.
i don´t know that one.
you can walk the linked list described here to dump the ids
http://www.ownedcore.com/forums/diab...g-mapping.html (LevelArea (and other) id to NLS string mapping)