Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Lineage 2 > Lin2 Exploits, Hacks, Bots, Tools & Macros
You last visited: Today at 20:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



ReadProcessMemory From Lineage II

Discussion on ReadProcessMemory From Lineage II within the Lin2 Exploits, Hacks, Bots, Tools & Macros forum part of the Lineage 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2005
Posts: 11
Received Thanks: 0
Hello, This is my second thread, and I hope someone can have some benefit from it.

[ Read from Lineage II Memory using the ( ReadProcessMemory function ) ]

Why do this? well maybe make an status bar to display health,mana, etc or
maybe you want to write data to the process, But in this article I show how to read.

First of all you need to inculde some files:

#include <Tlhelp32.h> to have access to:

PROCESSENTRY32
CreateToolhelp32Snapshot
Process32First
Process32Next

#incude <windows.h> to have access to:

ReadProcessMemory / WriteProcessMemory

Well lets begin.

#define PROCESS_NAME "L2.exe" //Lineage II Exe.
HANDLE pLineageProcess; //Lineage II Process.

Now you have defined the process name to search for( l2.exe ) and made an handle named ( pLineageProcess ) to hold the Lineage II Process.

Now to the function ( GetProcess( PROCESS_NAME ) to return the process.

Code:
int GetProcess&#40; char *pName &#41; 
{
        int pCount=0;

        PROCESSENTRY32 pEntry = { 0 };

        pEntry.dwSize = sizeof&#40;PROCESSENTRY32&#41;;

        HANDLE pSnapShot = CreateToolhelp32Snapshot&#40; TH32CS_SNAPPROCESS, 0 &#41;; //Create an 32SnapShot.

        if&#40;Process32First&#40; pSnapShot, &pEntry &#41;&#41;
        {
                while&#40; Process32Next&#40; pSnapShot, &pEntry &#41; && pCount &#60; MAX_PROCESS-1 &#41; //Loop through all processes.
                {
                        HANDLE hProcess = OpenProcess&#40; PROCESS_ALL_ACCESS,FALSE, pEntry.th32ProcessID &#41;; //Open the current Process.

                        if&#40;!strcmpi&#40; pEntry.szExeFile, PROCESS_NAME &#41; &#41; //Check if the current process is the PROCESS_NAME &#40; &#34;l2.exe &#34; &#41;
                        {
                                pLineageProcess = hProcess; //Lineage II Process found! Copy it to your pLineageProcess.

                                pCount++; //useless just count the number of processes.
                        } 
                }
        }

        CloseHandle&#40; pSnapShot &#41;; //Close the SnapShot.
	
        return pCount; 
}
And thats it!

Now you can use it like this.

Code:
int main&#40;&#41;
{
    int pCount = GetProcess&#40; PROCESS_NAME &#41;;
 
    int pHealth=0;

    DWORD address = Address for health;

    ReadProcessMemory&#40; pLineageProcess, &#40;LPVOID&#41;offset, &pHealth, sizeof&#40; pHealth &#41;, NULL&#41;;

    char pString&#91; 32 &#93;;

    sprintf&#40; pString, &#34;Health&#58; %i&#092;n&#34;, pHealth &#41;;

    printf&#40; pString &#41;;
}

Well I hope anyone understood what I wrote, Im not that good at english

Good luck and cheers!
xsocom is offline  
Old 12/27/2006, 11:12   #2
 
elite*gold: 0
Join Date: Dec 2006
Posts: 21
Received Thanks: 0
thanks for the code


Anyway we need to know some addresses too :P
dioladrone is offline  
Old 12/27/2006, 15:37   #3
 
elite*gold: 0
Join Date: Sep 2005
Posts: 11
Received Thanks: 0
I will post some pointers and offsets when I get some time.
xsocom is offline  
Old 02/08/2007, 23:18   #4
 
elite*gold: 0
Join Date: Sep 2005
Posts: 1
Received Thanks: 0
Great Post. Tank you very much
askimos is offline  
Old 03/03/2007, 04:52   #5
 
elite*gold: 0
Join Date: Oct 2006
Posts: 2
Received Thanks: 0
Tutorial please ^^
Jadinho is offline  
Old 04/24/2010, 13:34   #6
 
elite*gold: 0
Join Date: Nov 2007
Posts: 9
Received Thanks: 0
provide lineage 2final offsets and codes to freeze thanks you
NOR3CA is offline  
Old 04/25/2010, 00:25   #7
 
elite*gold: 0
Join Date: Apr 2010
Posts: 2
Received Thanks: 0
Hey, I am building my own bot, I also have experience on memory reading from WoW, but, I cant seem to find any pointers and offsets that "stick", they work sometimes but not always.
MrBigg is offline  
Old 04/27/2010, 03:04   #8
 
elite*gold: 0
Join Date: Nov 2006
Posts: 49
Received Thanks: 11
Ah, reminds me when I made a sniffer for L2Walker that uploaded their HP, MP and Exp to a website so I could watch my bots from work. And it graphed their exp gain.
FoxFire is offline  
Old 03/03/2011, 21:57   #9
 
elite*gold: 0
Join Date: Jan 2010
Posts: 28
Received Thanks: 0
hi.
How i can find monster hp bar offset ?
i need real hp or hp in %.
wongerlt is offline  
Reply




All times are GMT +1. The time now is 20:35.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.