_MemoryRead will not work

09/13/2015 03:49 progh0st#1
Hi everyone im trying to make a little script that will click when the value is bigger than certain amount. But _MemoryRead always return to 0. Which is wrong because when i test it in Cheat Engine it works perfect. Does anyone know what is going on here?? Tried running in 32bit and 64bit same result. Maybe anti-cheat X-trap has something to do with it??

Code:
#include <NomadMemory.au3>
#include <Misc.au3>
#RequireAdmin

MsgBox(4096, "", "Hack made by ProGh0st")

If Not _Singleton(@Scriptname, 1) Then
	MsgBox(4096, "Is Running", "Hack is already running .-.")
	Exit
EndIf

Opt("MouseClickDelay", 1)
Opt("MouseCoordMode", 0)
Opt("CaretCoordMode", 0)
Global Const $Crosshair_base = 0x00B4A358


If WinExists("[class:CrossFire]") Then
	Global $PID = WinGetProcess("[class:CrossFire]")
	If $PID = -1 Then
		MsgBox(4096, "","Could Not Get PID")
		Exit
	EndIf
    Global $Mem_Open = _MemoryOpen($PID)
	Call("TriggerBot")
Else
	MsgBox(4096, "Crossfire", "Waiting for Crossfire to start")
	WinWait("[class:CrossFire]")
	Sleep(10000)
	Global $PID = WinGetProcess("[class:CrossFire]")
	If $PID = -1 Then
		MsgBox(4096, "","Could Not Get PID")
		Exit
	EndIf
    Global $Mem_Open = _MemoryOpen($PID)
	Call("TriggerBot")
EndIf




Func TriggerBot()

While ProcessExists($PID)
	;$check = _MemoryRead($Crosshair_base, $Mem_Open)
	;MsgBox(0,"", $check)
    If _MemoryRead($Crosshair_base, $Mem_Open) > 130000000 Then
	While _MemoryRead($Crosshair_base, $Mem_Open) > 130000000
		MouseClick("primary", Default, Default,1,1)
		Sleep(10)
	WEnd
	EndIf
WEnd
EndFunc
09/13/2015 12:00 mlukac89#2
Better use KDeluxe UDF for memory, it works on 32 and 64 bit and u have examples how to use it [Only registered and activated users can see links. Click Here To Register...]