Originally Posted by
lanman92
It's not going to be that simple. You have to find the base address of your player. Then read from that address + 0x8 and then add the offset for energy to that and read and it will give you your energy. There is a lot of examples of autoit scripts that will find your playerbase in here. Just look down a few threads/pages.
Thanks, this is what I have now but it still is giving me the same problem
Code:
;----------------------------------
; Rouge Combat System v1.1
;----------------------------------
#include <NomadMemory.au3>
;----------------------------------
; Hotkeys
;----------------------------------
HotKeySet("{F1}", "ToggleCombat")
HotKeySet("{ESC}", "Terminate")
Global $UnPause
;Setting privilege
SetPrivilege( "SeDebugPrivilege", 1 )
;----------------------------------
; 3.2.2 Updated
;----------------------------------
Global Const $PlayerBaseStatic = 0x010B65F4 ;Static Offset
Global Const $GetSpellIdByName = 0x004ED910
Global Const $CastSpellById = 0x007C4510
Global Const $TargetGuid = 0x12 * 4
Global Const $BaseAttackTime = 0x3D * 4
Global Const $CurrentHealth = 0x17 * 4
Global Const $MaxHealth = 0x1F * 4
;Global Const $CurrentMana = 0x18 * 4 -- Not Used for Rouge Combat System
;Global Const $MaxMana = 0x20 * 4 -- Not Used for Rouge Combat System
;Global Const $CurrentRage = 0x19 * 4 -- Not Used for Rouge Combat System
Global Const $GetCurrentEnergy = 0x1B * 4
Global Const $GetMaxEnergy = 0x23 * 4
Global Const $CurrentComboPoints = 0x0113D849
Global Const $p1 = 0x8
Global Const $wow = _memoryopen(WinGetProcess("World of Warcraft")) ;Open WoW
While 1
Sleep(100)
ToolTip("Rouge Combat System Loaded",0,0)
WEnd
Func ToggleCombat()
$UnPause = NOT $UnPause
While $UnPause
ToolTip("Rogue Combat System Running...",0,0)
Send("{1}")
Sleep(200)
;Gets base addresses
$lvl1Pointer = _MemoryRead('0x' & hex($PlayerBaseStatic), $wow , 'uint')
$lvl2Pointer = _MemoryRead('0x' & hex($lvl1Pointer + 0x34), $wow , 'uint')
$PlayerBase = _MemoryRead('0x' & hex($lvl2Pointer + 0x24), $wow , 'uint')
$En = _MemoryRead('0x' & hex($PlayerBase + $p1), $wow , 'uint')
$CurrentEnergy = _MemoryRead(($En + $GetCurrentEnergy), $wow, 'uint') ; Current Energy
$MaxEnergy = _MemoryRead(($En + $GetMaxEnergy), $wow, 'uint') ; Max Energy
If $CurrentEnergy > 45 Then
Send("{2}")
Sleep(200)
EndIf
WEnd
EndFunc ;==> ToggleCombat
Func Terminate()
Exit 1
EndFunc