Jump to content



Photo

Freeze.Au3


  • Please log in to reply
5 replies to this topic

#1 liten

liten

    Adventurer

  • Active Members
  • PipPip
  • 104 posts

Posted 23 July 2009 - 09:06 AM

Welcome-
hi this is a UDF for people like me who always wanted to freeze value just like in Cheat engine, with an easier method, i present to you Freeze.Au3 a simple function that freezes values just liek cheat engine, this is my first UDF so ANY input would be appreciated, Good or Bad (to be honest bad news helps more, tells me what Im doing wrong so i can improve)

UPDATE: TOOK OUT SV TYPE
-Fixed some Minor Issues
-Included an Exzample

Credits:
Who ever made #Nomad-memory
Jax - reason i made this, he needed it
God - helps me excel and succed in everthing.

Functions:

_Freeze_Value()

Download:
At bottom of page

Plain Text         
#include "Nomadmemory.au3" ;=============================================================================== ; Function Name:    _Freeze_Value() ; Description:          Freezes a Value just like Cheat Engine ; Syntax: ; Parameter(s):     $Address - Address you want to freesze ;                   $ID ;                   An array containing the Dll handle and the handle ;                   of the open process as returned by _MemoryOpen() ;                   $Value - Value you want to freeze it at ;                   $sv_Type - (optional) The "Type" of value you intend to read. ;                   This is set to 'dword'(32bit(4byte) signed integer) ;                   by default.  See the help file for DllStructCreate ;                   for all types.  An example: If you want to read a ;                   word that is 15 characters in length, you would use ;                   'char[16]' since a 'char' is 8 bits (1 byte) in size. ;                   Your main While 1 loop in the Script duplicated, put into a function ; Requirement(s):   Need #Nomadmemory, Need 2 Main while 1 one reg while one, the other func() EX. ; ; ;while 1 ---------> Main while in script ;       $nMsg = GUIGetMsg() ;   Switch $nMsg ;   Case $GUI_EVENT_CLOSE ;       SoundPlay (@HomeDrive& "\Windows\System\t1alarm.wav")   ;           Exit ;Endswitch ;WEnd ; ;Func While -------->While 1 loop duplicated, into a function (this is the one that  = $mainloop, without the ()),  (you must have Both) ;       $nMsg = GUIGetMsg() ;   Switch $nMsg ;   Case $GUI_EVENT_CLOSE ;           Exit ;EndSwitch ;EndFunc ; Return Value(s):  Success = Freezes Value ; Author(s):   Liiten \ tri407tiny ; Modification(s): ;=============================================================================== Func _Freeze_Value($ID, $Address, $value, $mainloop)     SetPrivilege("SeDebugPrivilege", 1)     $M1 = _Memoryread($Address)     if $M1 <> $Value then         while 1         _memorywrite($ID, $address, $Value)         $mainloop ()         WEnd     EndIf EndFunc



Exzample:

Plain Text         
;ExZample ;#Include "Freeze.au3" ;Func FreezeRunSpeed() ;$Loop = Loop() ;$ID = _MemoryOpen(ProcessExists("Game.exe")) ;$Runspeed  = 0x000000 ;_Freeze_Value( $ID, $Runspeed, 2000, $Loop) ;EndIf ;While 1 ;$nMsg = GUIGetMsg() ;Switch $nMsg ;Case $GUI_EVENT_CLOSE ;Exit ;EndSwitch ;WEnd ;func Loop() ;$nMsg = GUIGetMsg() ;Switch $nMsg ;Case $GUI_EVENT_CLOSE ;Exit ;EndSwitch ;EndFunc

Attached Files


Edited by liten, 01 August 2009 - 05:08 AM.

My UDF:Freeze.au3-Freeze values like CE, ML, ETC







#2 liten

liten

    Adventurer

  • Active Members
  • PipPip
  • 104 posts

Posted 01 August 2009 - 05:09 AM

Please, Comment, need advice on my wrongs if any
My UDF:Freeze.au3-Freeze values like CE, ML, ETC

#3 Kip

Kip

    When done learning: die

  • Active Members
  • PipPipPipPipPipPip
  • 1,685 posts

Posted 01 August 2009 - 10:39 AM

Please, Comment, need advice on my wrongs if any

Well, to start it's Example instead of ExZample.

Second: Have you even tested the script?
I don't think this will run:
$mainloop ()


Based on this it's pretty sure you didn't test at all:
$Loop = Loop() _Freeze_Value( $ID, $Runspeed, 2000, $Loop)

Because $Loop doesn't return anything, and you are trying to call Loop again in the function like this:
$Loop();

....

Edited by Kip, 01 August 2009 - 10:42 AM.

There's a big chance this post has been edited.Posted Image

#4 Info

Info

    :D

  • Active Members
  • PipPipPipPipPipPip
  • 730 posts

Posted 01 August 2009 - 11:07 AM

$M1 = _Memoryread($Address)

There is a second parameter for Nomad's _MemoryRead function.

#5 liten

liten

    Adventurer

  • Active Members
  • PipPip
  • 104 posts

Posted 02 August 2009 - 07:02 PM

duid some modifications, tested, and works, will upload soon, off to church
My UDF:Freeze.au3-Freeze values like CE, ML, ETC

#6 hot202

hot202

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 339 posts

Posted 07 August 2009 - 11:40 PM

how to use with muti pointers?

AutoIt         
#include <MemoryConstants.au3> #include <NomadMemory.au3> SetPrivilege("SeDebugPrivilege", 1) HotKeySet('{ESC}', '_TerminateLoop') $pid = ProcessExists("Tutorial.exe") ;Step 8: Multilevel pointers: (PW=525927) Global $fLoop = True Global $Offset1[5] $Offset1[0] = 0 ; Is ALWAYS 0. $Offset1[1] = Dec("c") $Offset1[2] = Dec("14") $Offset1[3] = Dec("0") $Offset1[4] = Dec("18") $StaticOffset = Dec("60c20") $openmem = _MemoryOpen($pid) ; Open the memory $baseADDR = _MemoryGetBaseAddress($openmem, 1) $finalADDR = "0x" & Hex($baseADDR + $StaticOffset) ; Creates the final static address you read from. $Value = _MemoryPointerRead($finalADDR, $openmem, $Offset1) ConsoleWrite ( "Address = " & $Value[0] & @CRLF & "Value = " & $Value[1] & @CRLF) ; Click change pointer and press Esc before 3 seconds passes away. :) While $fLoop     Sleep(10) WEnd $Value = _MemoryPointerRead($finalADDR, $openmem, $Offset1) ConsoleWrite ( "Address = " & $Value[0] & @CRLF & "Value = " & $Value[1] & @CRLF) _MemoryWrite($Value[0], $openmem, 5000) _MemoryClose($openmem) Func _TerminateLoop()     $fLoop = False EndFunc  





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users