naja, der aktuelle pin kann sich schnell ändern! Je nachdem ob du deine Sleepzeiten Realtime berechenn willst, oder am amfang für alle!
MFG
Ganf
MFG
Ganf
#include <NomadMemory.au3>
Global $start_a , $end_a , $value , $hprocess
Func _Sec_A()
$hprocess = _MemoryOpen(ProcessExists("Gw.exe"))
$start_a = 0x00A00000
Do
$value = _MemoryRead($start_a, $hprocess)
$start_a = $start_a + 1
Until $value == 1697544007 ;// Gw.exe
$start_a = $end_a - 1
EndFunc
until .. stehe ich in dem bereich/spawnpunktQuote:
So lass ich bei mir eine statische Adresse in der Section A finden. Doch fehlt mir da immernoch die Section D. Wie kann ich da denn was finden?
Code:#include <NomadMemory.au3> Global $start_a , $end_a , $value , $hprocess Func _Sec_A() $hprocess = _MemoryOpen(ProcessExists("Gw.exe")) $start_a = 0x00A00000 Do $value = _MemoryRead($start_a, $hprocess) $start_a = $start_a + 1 Until $value == 1697544007 ;// Gw.exe $start_a = $end_a - 1 EndFunc
#include <NomadMemory.au3>
$ah_Handle = _MemoryOpen(ProcessExists ("gw.exe"))
$pattern="558BEC83 EC1056.. ........ ....8B08 890D.... ....8BCF 8B50.... ........ ......8B 400889.."
$timer=TimerInit()
$find=_MemoryScan($ah_Handle, $pattern, true)
$timer=TimerDiff($timer)
$N_SECTION_D_POSX = _MemoryRead($find, $ah_Handle)
$POSX = Round(_MemoryRead($N_SECTION_D_POSX, $ah_Handle, "float"), 0)
msgbox(0, "Found", "Found: " & $find & " in " & Round($timer,0) & "ms." & @LF & "Address: " & Hex($N_SECTION_D_POSX) & " Value: " & $POSX)
Func _MemoryScan($ah_Handle, $pattern, $after=false, $iv_addrStart=0x00400000, $iv_addrEnd=0X00FFFFFF, $step=51200)
If Not IsArray($ah_Handle) Then
SetError(1)
Return -1
EndIf
$pattern=StringRegExpReplace($pattern, "[^0123456789ABCDEFabcdef.]", "")
IF StringLen($pattern)=0 Then
SetError(2)
Return -1
EndIf
For $addr=$iv_addrStart To $iv_addrEnd Step $step-(StringLen($pattern)/2)
StringRegExp(_MemoryRead($addr, $ah_Handle, "byte[" & $step & "]"), $pattern, 1, 2)
If Not @Error Then
If $after Then
return StringFormat("0x%.8X", $addr+((@Extended-2)/2))
Else
return StringFormat("0x%.8X", $addr+((@Extended-StringLen($pattern)-2)/2))
EndIf
EndIf
Next
Return -1
EndFunc
/// <summary>
/// SearchMemoryAdsSectionA() - Searches the MemoryAddresses of SectionA.
/// </summary>
private void SearchMemoryAdsSectionA()
{
do
{
lpBuffer = new byte[4];
{
if (IntPtrSecAPositionX.ToInt32() == 0)
{
ReadProcessMemory(this.GWProcess, this.StartMemSecA, this.lpBuffer, this.nSize, out this.lpNumberOfBytesWritten);
tempVarINT = BitConverter.ToInt32(this.lpBuffer, 0);
if (tempVarINT == 1170800638 || tempVarINT == 1170800639 || tempVarINT == 1170800640)
{
IntPtrSecAPositionX = StartMemSecA;
Debug.WriteLine("SectionA - Position X: " + this.ConvertIntToHex(StartMemSecA.ToInt32(), 1));
}
}
}
}
}
/// <summary>
/// SearchMemoryAdsSectionD() - Searches the MemoryAddresses of SectionD.
/// </summary>
private void SearchMemoryAdsSectionD()
{
do
{
lpBuffer = new byte[4];
{
if (IntPtrSecDPositionX.ToInt32() == 0)
{
ReadProcessMemory(this.GWProcess, this.StartMemSecD, this.lpBuffer, this.nSize, out this.lpNumberOfBytesWritten);
tempVarINT = BitConverter.ToInt32(this.lpBuffer, 0);
if (tempVarINT == 1170800640)
{
IntPtrSecDPositionX = StartMemSecD;
Debug.WriteLine("SectionD - Position X: " + this.ConvertIntToHex(StartMemSecD.ToInt32(), 1));
}
}
}
}
}
Quote:
@ Wadim: Könntest du evtl. wieder Posx/PosY aus Section A und Das Kaufmanns Fenster einfügen? Klar, je weniger desto übersichtlicher ist es aber die 2 vermisse ich schmerzlich (ich denke mal andere auch) ; / Kaufmanns Fenster X ist atm 0xa026DC.