Register for your free account! | Forgot your password?

Go Back   elitepvpers > World of Warcraft > WoW Bots
You last visited: Today at 01:43

  • Please register to post and access all features, it's quick, easy and FREE!

 

paswtian - play a sound when there is a node (autoit source)

Reply
 
Old   #1
 
elite*gold: LOCKED
Join Date: Aug 2006
Posts: 3,292
Received Thanks: 866
paswtian - play a sound when there is a node (autoit source)

Quote:
Originally Posted by mnbvc
i know, my name finding skills are just great! :P
the idea from this guy: was not bad but the implementation sucked, so i implemented it in better

it uses memory reading instead of pixel scanning which means you don't need to set the scan area, it works in background, it doesn't care how your minimap looks etc... and it can scan for different types (herbs, minerals...) of objects at the same time
if it detects a object in the herbs list it plays a different sound than if the object is in the minerals list then you know you should change your tracking skill
if you want it to trigger on other gameobjects (for example eggs at the easter event) you can simply add the object's name to one of the lists
if you only have one of the farm skills set the other value to an empty string like:

Code:
$Herbs = ""
if you don't have herbalism

Code:
$StaticClientConnection = 0xC79CD8; 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 = 0x2ED0; 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!
install autoit
create a new file, copy/paste the code, save it with the correct ending (.au3) and run it!

if you are using vista/win7 you will most likely have to rightclick on the file and choose "compile script", then run the .exe file as admin
if it doesn't work you are most likely not starting it as admin properly and you can have a look in this thread, it works exactly the same way: (auto queue & auto join & anti afk [autoit source])
i don't know if the sound files at this path still exist at vista/win7, but you can simply change them

because it uses only memory reading it is ofc currently undetected, and most likely it will never be detected
$StaticClientConnection & $ObjectManagerOffset hab ich schon auf 3.3.5 geupdated.

Credits: mnbvc



scenebase is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein. Funktionsweise: 1. in CE Rechtsklick...
6 Replies - AutoIt
Kann man autoit auf einen sound reagieren lassen?
Hallo, ich wollte wissen ob man autoit iwie auf einen sound reagieren lassen kann? Also zum beispiel, wenn in einem spiel der sound xyz zu hören...
18 Replies - AutoIt
Play every sound in WoW
Original von sfalco
19 Replies - WoW Exploits, Hacks, Tools & Macros



All times are GMT +1. The time now is 01:43.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.