Comments (3)
private Boolean Inited=false;
private const Int64 StartAddress=0x5FB0000; //i found this by "x96dbg"
private const String AobHex="?? 06 0C 00 ?? 05 0D 00 00"; //may entity struct
private Nullable<IntPtr> PlayerStructAddress; // Nullable for dispose
private Int32 PlayerDefaultHp;
private Timer LockTimer=new Timer(){AutoReset=true,Intvel=100,Enable=false};
private Boolean LockTimerInAction=false;
private Memory.mem GameProcessMemory;
public EventHandler GameProcessExited;
public ctor(Memory.mem mem){
GameProcessMemory=mem;//from MainWindow,all cheat Class share this instance
GameProcessExited+=(sender,eventAreg)=>{
LockTimer.Enable=false;
LockTimerInAction=false;
PlayerStructAddress=null;
Inited=false;
};
LockTimer.Elapsed+=(sender,eventArgs)=>{
if(LockTimerInAction){return;}
LockTimerInAction=true;
CheatEngine.WriteProcessMemoryAsInt32(GameProcessMemory.pHandle,PlayerStructAddress+0x0C,PlayerDefaultHp);
LockTimerInAction=false;
};
}
private Boolean Init(){
if(Inited){return true;}
//i guess EndAddress is 0x7FFFFFFF because this region is not in Visible module
Int64[] addressArray=GameProcessMemory.AobScan(StartAddress,0x7FFFFFFF,AobHex,true,true);
if(addressArray.GetLength(0)<1){return false;}
foreach(Int64 address in addressArray){
//I have some method myself to read or write memory,and use IntPtr,not hex String
//the address+0x0c is entity's hp value
IntPtr p1=new IntPtr(address+0x0c);
//the address+0x14 is entity's type,player(0) or enemy(257) or frindly(1)
IntPtr p2=new IntPtr(address+0x14);
Nullable<Int32> i1=CheatEngine.ReadProcessMemoryAsInt32(GameProcessMemory.pHandle,p1);
if(i1==null || !i1.HasValue || i1.Value<1){continue;}//hp always > 0,and died eneity i don't care
Nullable<Int32> i2=CheatEngine.ReadProcessMemoryAsInt32(GameProcessMemory.pHandle,p2);
if(i2==null || !i2.HasValue || i2.Value==257){continue;}//i only care myself hp,and you can extend this for friendly entity
PlayerStructAddress=new IntPtr(address);
break;}
return PlayerStructAddress!=null;
}
public Boolean Enable(){
if(!Init()){return false;}
LockTimer.Enable=true;
}
public Boolean Disable(){
if(Inited){return false;}
LockTimer.Enable=false;
}
public void Dispose(){
// dispose mode see MSDN for more
LockTimer.Dispose();
}
and here is the trainer,you can download and decompile this exe.
unzip password is "skydust".
from memory.dll.
@chinasmu You gotta show all your code for us to know what's going on.
@ragnaroks idk why you posted this here.
Closing this issue ticket. If you have questions, you can visit our Discord channel.
from memory.dll.
@chinasmu You gotta show all your code for us to know what's going on.
@ragnaroks idk why you posted this here.Closing this issue ticket. If you have questions, you can visit our Discord channel.
it's a csharp example for read/write/lock/find
from memory.dll.
Related Issues (20)
- WriteMemory with the option bytes crashes the game
- Discord Link Has Expired HOT 1
- Will writeMemory function cause Crash? HOT 1
- OpenProcess Always Returned NULL
- Have you translated the following C + + code?VirtualAlloc
- Add GetModuleToPointer HOT 2
- Fix GetCode now work in 32bit&64bit HOT 1
- Using custom AoB scan regions causes no results. HOT 1
- I am astonished HOT 1
- Can we hook functions with this library? HOT 1
- UNIT64 error HOT 1
- Is Cheat Engine and Cheat Table Support added ? HOT 7
- I have a reading error HOT 2
- Not a bug but I have a question HOT 1
- WriteMemory function doesn't work in specifical condition HOT 2
- I am having some issues! HOT 5
- How can i change opcode values inline, or load a full auto assembler script from cheat engine HOT 1
- issue HOT 1
- Estouro no AoBScan memory.dll C# / Overflow in AoBScan memory.dll C#
- Can't use memory read/write functions on addresses within module that has name containing "main" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memory.dll.