Hi
i already posted in another forum, maybe someone could help me, i have the following code to get buffs, but i do not get any spellid, thx for any help!
Code:const $PlayerBase = 0x00CD87A8 const $PlayerBaseOffset1 = 0x34 const $PlayerBaseOffset2 = 0x24 const $AURA_COUNT_1 = 0xDD0 const $AURA_COUNT_2 = 0xC54 const $AURA_TABLE_1 = 0xC50 const $AURA_TABLE_2 = 0xC58 const $AURA_SIZE = 0x18 const $AURA_SPELL_ID = 0x8 $hWnd = WinGetHandle("World of Warcraft") $hProcess = _BMOpenProcess($hWnd, False) Global $pBase = _getpBase($hProcess) Global $CurObject = $pBase $auraTable = _BMReadMemory( $hProcess, $CurObject + $AURA_TABLE_1, "int") $auraCount = _BMReadMemory( $hProcess, $CurObject + $AURA_COUNT_1, "int") if $auraCount == -1 Then $auraTable = _BMReadMemory( $hProcess, $CurObject + $AURA_TABLE_2, "int") $auraCount = _BMReadMemory( $hProcess, $CurObject + $AURA_COUNT_2, "int") EndIf For $i = 0 To $auraCount $spellId = _BMReadMemory($hProcess, $auraTable + ($AURA_SIZE * $i) + $AURA_SPELL_ID, "int") msgbox(0,$i,$spellId) Next Func _getpBase($hProcess) $ptr1 = _BMReadMemory($hProcess, $PlayerBase, "ptr") $ptr2 = _BMReadMemory($hProcess, $ptr1 + $PlayerBaseOffset1, "ptr") return _BMReadMemory($hProcess, $ptr2 + $PlayerBaseOffset2, "ptr") EndFunc
yippi, after five days "googling" and searching the internet i found the error
this is my vb.net code off player buff, ( now learnt c# and will be porting it )
probz get flamed for coding in vb.net but people are still getting stuck so i thought id share my code that works.
Code:Enum UnitBaseGetUnitAura AURA_SPELL_GUID = &H0 ' // 3.3.5a AURA_SPELL_DURATION = &H10 ' // 3.3.5a AURA_SPELL_ENDTIME = &H14 ' // 3.3.5a AURA_SPELL_ID = &H8 ' // 3.3.5a AURA_SPELL_SIZE = &H18 ' // 3.3.5a End Enum ( in addresses class ) Enum UnitBaseGetUnitAura CGUnit_Aura = &H556E10 '// 3.3.5a AURA_COUNT_1 = &HDD0 '// 3.3.5a (3536) AURA_COUNT_2 = &HC54 '// 3.3.5a (3156) AURA_TABLE_1 = &HC50 '// 3.3.5a (3152) AURA_TABLE_2 = &HC58 '// 3.3.5a (3160) End Enum Public Function HasMyBuffID(ByVal SpellID As Integer, ByVal PlayerBase As UInteger) As Boolean Dim Count As Integer Dim Table As UInteger Count = ProcessManager.WoWProcess.ReadInt(PlayerBase + Addresses.UnitBaseGetUnitAura.AURA_COUNT_1) Table = PlayerBase + Addresses.UnitBaseGetUnitAura.AURA_TABLE_1 If (Count = -1) Then Count = ProcessManager.WoWProcess.ReadInt(PlayerBase + Addresses.UnitBaseGetUnitAura.AURA_COUNT_2) Table = ProcessManager.WoWProcess.ReadUInt(PlayerBase + Addresses.UnitBaseGetUnitAura.AURA_TABLE_2) End If Dim LoopSpellID As Integer Dim LoopSpellGUID As ULong For i As Integer = 0 To Count - 1 LoopSpellID = ProcessManager.WoWProcess.ReadInt( _ Table + (UnitBaseGetUnitAura.AURA_SPELL_SIZE * i) _ + UnitBaseGetUnitAura.AURA_SPELL_ID) LoopSpellGUID = ProcessManager.WoWProcess.ReadUInt64( _ Table + (UnitBaseGetUnitAura.AURA_SPELL_SIZE * i)) ' If GUID of spell is same as me ( we casted ) If (WoWMe.GUID = LoopSpellGUID) Then ' If spells are same If (SpellID = LoopSpellID) Then Return True End If End If Next Return False End Function
just to save you the time I lost on finding out what was wrong.. UnitAuraSize is now 28 .not 18..
Pseudocode
from 3.3.5
from 4.0.1Code:result = this + 0x18 * index + 3152;
or maybe I'm wrong;]Code:result = this + 0x28* index + 0xD00;
Last edited by rafalsk; 10-15-2010 at 03:40 PM.
Hello! I am trying to read the player buffs (on 3.3.5a) since about 8 hours now but i dont get what i am doing wrong. Maybe someone of you can help me.
Code:#include <Array.au3> #include <NomadMemory.au3> dim $i dim $wowfenster[1][1] dim $wowaccount = 0x00B6AA40 dim $wow dim $playerbase = 0xCD87A8 dim $playerbaseoffset1 = 0x34 dim $playerbaseoffset2 = 0x24 dim $auracount1 = 0xDD0 dim $auratable1 = 0XC50 dim $auracount2 = 0xC54 dim $auratable2 = 0xC58 dim $aurasize = 0x18 dim $auraspellid = 0x8 dim $base dim $auracount dim $auratable dim $auraid dim $a Opt("SendCapslockMode", 0) ;Array mit [0][0] = Anzahl der fenster, [i][0] = Fenstername, [i][1] = HWND, [i][2] = PID, [i][3] = Accountname $wowfenster = WinList("World of Warcraft") ReDim $wowfenster[UBound($wowfenster, 1)][4] For $i = 1 to $wowfenster[0][0] $wowfenster[$i][2] = WinGetProcess($wowfenster[$i][1]) $wow=_memoryopen($wowfenster[$i][2]) $wowfenster[$i][3] = _MemoryRead($wowaccount ,$wow, 'char[16]') _MemoryClose($wow) if msgbox(48+4,"",$wowfenster[$i][3]) == 6 then ;############################################################################################################### while 1 $wow = _memoryopen($wowfenster[$i][2]) $base = _MemoryRead(_MemoryRead(_MemoryRead($playerbase, $wow, 'dword')+$playerbaseoffset1, $wow, 'dword')+$playerbaseoffset2, $wow, 'dword') $auracount = _MemoryRead($base + $auracount1, $wow, 'dword') $auratable = $base + $auratable1 if $auracount == -1 Then $auracount = _MemoryRead($base + $auracount2, $wow, 'dword') $auratable = _MemoryRead($base + $auratable2, $wow, 'dword') EndIf $auraid = $auratable for $a = 0 to $auracount-1 $auraid = _MemoryRead($auraid + ($a * $aurasize) + $auraspellid, $wow, 'dword') msgbox("","",$auraid) if $auraid == 79061 Then msgbox("","","mark of the wild") endif if $auraid == 48517 Then msgbox("","","sonnenfinsternis") exitloop endif if $auraid == 48518 Then msgbox("","","mondfinsternis") ExitLoop endif next _MemoryClose($wow) exit wend ;############################################################################################################## exitloop endif next
Should be:Code:$auraid = $auratable for $a = 0 to $auracount-1 $auraid = _MemoryRead($auraid + ($a * $aurasize) + $auraspellid, $wow, 'dword')
Verify your offsets, I didn't bother checking them.Code:for $a = 0 to $auracount-1 $auraid = _MemoryRead($auratable + ($a * $aurasize) + $auraspellid, $wow, 'dword')
thx that was the only mistake =) and the -1 must be replaced by > 80.
Last edited by klucky; 02-20-2011 at 12:42 PM.