Code:
$StaticClientConnection = 0xBB43F0 ; this offset will change every patch, but you can get it from the current dump thread in the memory editing stickies, it is also called curobjmgrptr or clientmgr and several other ways, but you will find it :P
$ObjectManagerOffset = 0x2EB0 ; this changes now and then, but not really often but you can also get it from the dump thread if it should change
; the other offsets i used below change very rarely, most likely they won't change until cataclysm and maybe not even then
$Herbs = "Bloodthistle,Peacebloom,Silverleaf,Earthroot,Mageroyal,Briarthorn,Stranglekelp,Bruiseweed,Wild Steelbloom,Grave Moss,Kingsblood,Liferoot,Fadeleaf,Goldthorn,Khadgar's Whisker,Wintersbite,Firebloom,Purple Lotus,Arthas' Tears,Sungrass,Blindweed,Ghost Mushroom,Gromsblood,Golden Sansam,Dreamfoil,Mountain Silversage,Plaguebloom,Icecap,Black Lotus,Felweed,Frozen Herb,Dreaming Glory,Ragveil,Terocone,Flame Cap,Ancient Lichen,Goldclover,Netherbloom,Netherdust Bush,Firethorn,Nightmare Vine,Mana Thistle,Tiger Lily,Talandra's Rose,Adder's Tongue,Frozen Herb,Frozen Herb,Lichbloom,Icethorn,Frost Lotus"
$SoundHerbs = @WindowsDir & "\media\ding.wav" ; this sound is played when it finds a gameobject whose name matches one in the herbs list
$Minerals = "Black Blood of Yogg-Saron,Copper Vein,Enchanted Earth,Enchanted Earth,Strange Ore,Incendicite Mineral Vein,Tin Vein,Lesser Bloodstone Deposit,Ooze Covered Silver Vein,Silver Vein,Iron Deposit,Indurium Mineral Vein,Gold Vein,Ooze Covered Gold Vein,Mithril Deposit,Ooze Covered Mithril Deposit,Dark Iron Deposit,Ooze Covered Truesilver Deposit,Truesilver Deposit,Ooze Covered Thorium Vein,Small Thorium Vein,Hakkari Thorium Vein,Ooze Covered Rich Thorium Vein,Rich Thorium Vein,Fel Iron Deposit,Nethercite Deposit,Large Obsidian Chunk,Small Obsidian Chunk,Adamantite Deposit,Cobalt Deposit,Rich Adamantite Deposit,Ancient Gem Vein,Khorium Vein,Rich Cobalt Deposit,Saronite Deposit,Rich Saronite Deposit,Pure Saronite Deposit,Titanium Vein"
$SoundMinerals = @WindowsDir & "\media\chord.wav" ; this sound is played when it finds a gameobject whose name matches one in the minerals list
$BeepFrequency = 10000 ; 10000 means it will not play a sound more often than every 10000ms = 10 seconds
SetPrivilege("SeDebugPrivilege", 1)
$proc = WinGetProcess("World of Warcraft")
$wow = mem_open($proc)
$ObjectManagerBase = mem_read(mem_read($StaticClientConnection, $wow, "dword") + $ObjectManagerOffset, $wow, "dword")
$begin = 0
While True
$CurrentObject = mem_read($ObjectManagerBase + 0xAC, $wow, "dword")
While $CurrentObject <> 0
If mem_read($CurrentObject + 0x14, $wow, "dword") == 5 Then
$name = mem_read(mem_read(mem_read($CurrentObject + 0x1A4, $wow, "dword") + 0x90, $wow, "dword"), $wow, "char[32]")
If TimerDiff($begin)>$BeepFrequency Then
If StringInStr($Herbs, $name) Then
SoundPlay($SoundHerbs,1)
$begin = TimerInit()
ElseIf StringInStr($Minerals, $name) Then
SoundPlay($SoundMinerals,1)
$begin = TimerInit()
EndIf
EndIf
EndIf
$CurrentObject = mem_read($CurrentObject + 0x3C, $wow, "dword")
WEnd
Sleep(100)
WEnd
Func mem_open($iv_Pid)
Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $iv_Pid)
$ah_Handle[1] = $av_OpenProcess[0]
Return $ah_Handle
EndFunc
Func mem_read($iv_Address, $ah_Handle, $sv_Type = 'dword')
Local $v_Buffer = DllStructCreate($sv_Type)
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
Local $v_Value = DllStructGetData($v_Buffer, 1)
Return $v_Value
EndFunc
Func mem_close($ah_Handle)
DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
DllClose($ah_Handle[0])
Return 1
EndFunc
Func SetPrivilege($privilege, $bEnable)
Const $MY_TOKEN_ADJUST_PRIVILEGES = 0x0020
Const $MY_TOKEN_QUERY = 0x0008
Const $MY_SE_PRIVILEGE_ENABLED = 0x0002
Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
$nTokens = 1
$LUID = DLLStructCreate("dword;int")
If IsArray($privilege) Then $nTokens = UBound($privilege)
$TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
$NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
$hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
$SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _
"int",BitOR($MY_TOKEN_ADJUST_PRIVILEGES,$MY_TOKEN_QUERY),"int*",0)
If $SP_auxret[0] Then
$hToken = $SP_auxret[3]
DLLStructSetData($TOKEN_PRIVILEGES,1,1)
$nTokenIndex = 1
While $nTokenIndex <= $nTokens
If IsArray($privilege) Then
$priv = $privilege[$nTokenIndex-1]
Else
$priv = $privilege
EndIf
$ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _
"ptr",DLLStructGetPtr($LUID))
If $ret[0] Then
If $bEnable Then
DLLStructSetData($TOKEN_PRIVILEGES,2,$MY_SE_PRIVILEGE_ENABLED,(3 * $nTokenIndex))
Else
DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
EndIf
DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
DLLStructSetData($LUID,1,0)
DLLStructSetData($LUID,2,0)
EndIf
$nTokenIndex += 1
WEnd
$ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _
"ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _
"ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int*",0)
$f = DLLCall("kernel32.dll","int","GetLastError")
EndIf
$NEWTOKEN_PRIVILEGES=0
$TOKEN_PRIVILEGES=0
$LUID=0
If $SP_auxret[0] = 0 Then Return 0
$SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
If Not $ret[0] And Not $SP_auxret[0] Then Return 0
return $ret[0]
EndFunc
DOWNLOAD LINK.... NOT!