Originally Posted by HaMaDa..
Here's the fix of your code
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <NoMadMemory.au3>
$InfSp = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"D945F88BE55DC3CCCCCCCCCCCCCC558BEC51894D" )
$200hp = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"D945FC8BE55DC3CCCCCCCCCCCCCCCCCCCCCCCCCC558B EC51894DFC8D4508508B0D64")
$GodMode = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"7205E9760B00008B4D90")
$InfAmmo = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"7605E9870000008B55E8")
#Region ### START Koda GUI section ### Form=
$AnimeLover = GUICreate("AnimeLover", 598, 431, 192, 124)
$Pic1 = GUICtrlCreatePic("C:\Users\EMS\Desktop\AnimeLover2 828-3150270_580_600.jpg", 224, 0, 393, 433)
$Checkbox1 = GUICtrlCreateCheckbox("Inf Sp", 40, 16, 153, 57)
GUICtrlSetFont(-1, 10, 800, 0, "DejaVu Sans")
GUICtrlSetColor(-1, 0x800080)
$Checkbox2 = GUICtrlCreateCheckbox("200HP", 40, 80, 153, 57)
GUICtrlSetFont(-1, 10, 800, 0, "DejaVu Serif")
GUICtrlSetColor(-1, 0x800080)
$Checkbox3 = GUICtrlCreateCheckbox("Godmode", 40, 224, 153, 57)
GUICtrlSetFont(-1, 10, 800, 0, "Franklin Gothic Medium")
GUICtrlSetColor(-1, 0x800080)
$Checkbox4 = GUICtrlCreateCheckbox("Inf Ammo", 40, 152, 153, 57)
GUICtrlSetFont(-1, 10, 800, 0, "Franklin Gothic Medium")
GUICtrlSetColor(-1, 0x800080)
$Button1 = GUICtrlCreateButton("Exit", 48, 312, 81, 41)
GUICtrlSetFont(-1, 10, 800, 0, "Franklin Gothic Medium")
GUICtrlSetColor(-1, 0x800080)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Pid = ProcessExists("S4Client.exe")
$OPEN = _MemoryOpen ($Pid)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
Case $Checkbox1
If GUICtrlRead($Checkbox1) = 1 Then
_memorywrite($InfSp,$open,"2348303835","long")
Else
_memorywrite($InfSp,$open,"2348303833","long")
EndIf
Case $Checkbox2
If GUICtrlRead($Checkbox2) = 2 Then
_memorywrite($200HP,$open,"2348565979","long")
Else
_memorywrite($200HP,$open,"2348565977","long")
EndIf
Case $Checkbox3
If GUICtrlRead($Checkbox3) = 3 Then
_memorywrite($Godmode,$open,"1995018384","long")
Else
_memorywrite($Godmode,$open,"1994982770","long")
EndIf
Case $Checkbox4
If GUICtrlRead($Checkbox4) = 4 Then
_memorywrite($InfAmmo,$open,"2280231056","long")
Else
_memorywrite($InfAmmo,$open,"2280195446","long")
EndIf
EndSwitch
WEnd
; Here's the functions of the scans
Func _MemoryScan($ah_Handle, $pattern, $after = False, $iv_addrStart = 0x00000000, $iv_addrEnd = 0X0FFFFFFF, $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 -2
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 -3
EndFunc ;==>_MemoryScan
Here's the fix of your code.
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NoMadMemory.au3>
$InfSp = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"D945F88BE55DC3CCCCCCCCCCCCCC558BEC51894D" )
$InfAmmo = _MemoryScan(_MemoryOpen(ProcessExists("S4Client.ex e")),"7605E9870000008B55E8")
#Region ### START Koda GUI section ### Form=c:\users\ivane\desktop\levani\noname\infsp,am mo...kxf
$Form1_1 = GUICreate("Form1", 615, 437, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("InfSp", 224, 248, 97, 41)
$Button1 = GUICtrlCreateButton("Exit", 176, 312, 225, 81)
$Pic1 = GUICtrlCreatePic("C:\Users\Ivane\Desktop\levani\No Name\0875b981b2b1953c9e2d2f5edd94eddb.gif", 472, 0, 140, 132)
$Checkbox2 = GUICtrlCreateCheckbox("Inf Ammo", 224, 208, 89, 41)
$Pic2 = GUICtrlCreatePic("C:\Users\Ivane\Desktop\levani\No Name\post_thanks.gif", 464, 384, 137, 41)
$Icon1 = GUICtrlCreateIcon("C:\Users\Ivane\Desktop\levani\N oName\S4 League - Launcher.exe", -1, 0, 0, 105, 97)
$Pic3 = GUICtrlCreatePic("C:\Users\Ivane\Desktop\levani\No Name\f87e879b248a273ecf645f51a45013c5.jpg", 152, 16, 209, 113)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Pid = ProcessExists("S4Client.exe")
$OPEN = _MemoryOpen ($Pid)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
case $Checkbox1
If GUICtrlRead($Checkbox1) = 1 Then
_memorywrite($InfSp,$open,"2348303835","long")
Else
_memorywrite($InfSp,$open,"2348303833","long")
EndIf
Case $Checkbox2
If GUICtrlRead($Checkbox2) = 1 Then
_memorywrite($InfAmmo,$open,"2280231056","long")
Else
_memorywrite($InfAmmo,$open,"2280195446","long")
EndIf
EndSwitch
WEnd
Func _MemoryScan($ah_Handle, $pattern, $after = False, $iv_addrStart = 0x00000000, $iv_addrEnd = 0X0FFFFFFF, $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 -2
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 -3
EndFunc ;==>_MemoryScan
|