Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [Work In progress] Humble Beginnings of an L2Server C++ DLL (https://postpacific.mmorpg-game.online/showthread.php?t=4833)

mcrabben7 11.07.2006 09:44

Yea, TestDude and Alien003 were nice to share the pointer information. That was surely a nice hint. But apart from that, all the code has been written from scratch.

Ripper was a bit harsh. He doesn't mean to steer people away. He just started assuming people wanted to leech it. Don't take it personally, I know he didn't mean it that way.

If there were MORE people who actually shared something worthwhile in this thread, then I would share more. All I have seen are a couple attempts at changing clan limits and safe enchant levels. Those are easily hexed in, and don't take more than 5 minutes to code for. That's not going to inspire me to release 18 files and 2500+ lines of source, and 3-4 weeks of work, not to mention hours and hours of debugging and everything. I learned a lot along the way. I shared a foundation so others could possibly learn as well.


About the project itself, apart from all this leecher/sharing talk, it's going pretty well. It grew quiet because I have been working hard on it.

Managed to get Party invites working, as well as the proper party bars and all. Got working AutoSS but it has some lag issues, so I am going to try implementing a threaded queue to pool reload requests and avoid L2Server errors. Maybe i won't have to go that far with it.

Started working on a data system for handling extended User information like CP, Clan Privileges, AutoSS status, Hero, etc.

Some other smaller fixes have been done, like to AVE effects, Heal messages, and some other things.

There is a functional base for RecipeBook as well RecipeShops, though they are not complete without the required ExUser and RecipeBook storage systems.

A lot of work has gone into reorganzing what was 2 files into 18 files, along with header guards and all that comes along with that.

Wrote a Config class, just have to implement a config file later once I get there.

It's NOT a small project. It's a big project, with a lot of work, and a lot of knowledge required. That's probably why it's hard for a lot of 'new' programmers to look at something like this and understand how to do it. But, I was new to this before. But after a couple weeks in the l2Server community, I managed to learn. learned all about hexing the L2Server, using debuggers like Olly, and using tools like IDA Pro. In the end, I have come out with a lot of useful knowledge. It's just taken a long time, patience, and diligence.

mcrabben7 11.07.2006 09:46

Quote:

Originally Posted by serafim
Need Help :) maybe somebody can tell me where a mistake, in dll
push header packet = 0xdf in client got 0xc6, push 0xba got 0xa1.......

That's because there is a packet header table in the L2Server that was changed in the PP exe. It changes the C1 packet headers into C3 packet headers for you.

To get around it you can call CSocket::SendV, or you can change the packet table...or you can push the C1 packet header and it will send the correct C3 header.

Good luck, glad at least one person is trying to do something on their own.

mcrabben7 11.07.2006 10:05

Ok, triple post, my apologies...

Here is a picture of me working in Visual Studio recently. Shows me working on the ExUser struct, and shows the project files layout.

http://img84.imageshack.us/img84/842...ing27iv.th.jpg

I made some changes to that today, but, it's still fairly recent screenshot. As you can probably tell, it's NOT easy to do all this.

Domzelan 11.07.2006 10:41

mcrabben7 great work :)

sparcode 11.07.2006 12:18

If this project will help for private l2 servers scene, respect to mcrabben.
Catch the cash, mcrabben :)

HongK 11.07.2006 15:53

Quote:

Originally Posted by mcrabben7
Yea, TestDude and Alien003 were nice to share the pointer information. That was surely a nice hint. But apart from that, all the code has been written from scratch.

Ripper was a bit harsh. He doesn't mean to steer people away. He just started assuming people wanted to leech it. Don't take it personally, I know he didn't mean it that way.

If there were MORE people who actually shared something worthwhile in this thread, then I would share more. All I have seen are a couple attempts at changing clan limits and safe enchant levels. Those are easily hexed in, and don't take more than 5 minutes to code for. That's not going to inspire me to release 18 files and 2500+ lines of source, and 3-4 weeks of work, not to mention hours and hours of debugging and everything. I learned a lot along the way. I shared a foundation so others could possibly learn as well.


About the project itself, apart from all this leecher/sharing talk, it's going pretty well. It grew quiet because I have been working hard on it.

Managed to get Party invites working, as well as the proper party bars and all. Got working AutoSS but it has some lag issues, so I am going to try implementing a threaded queue to pool reload requests and avoid L2Server errors. Maybe i won't have to go that far with it.

Started working on a data system for handling extended User information like CP, Clan Privileges, AutoSS status, Hero, etc.

Some other smaller fixes have been done, like to AVE effects, Heal messages, and some other things.

There is a functional base for RecipeBook as well RecipeShops, though they are not complete without the required ExUser and RecipeBook storage systems.

A lot of work has gone into reorganzing what was 2 files into 18 files, along with header guards and all that comes along with that.

Wrote a Config class, just have to implement a config file later once I get there.

It's NOT a small project. It's a big project, with a lot of work, and a lot of knowledge required. That's probably why it's hard for a lot of 'new' programmers to look at something like this and understand how to do it. But, I was new to this before. But after a couple weeks in the l2Server community, I managed to learn. learned all about hexing the L2Server, using debuggers like Olly, and using tools like IDA Pro. In the end, I have come out with a lot of useful knowledge. It's just taken a long time, patience, and diligence.

Thank you for an informative post. That's exactly the kind of response I was looking for.

I've just started messing with your dll skeleton and I'm thinking I want to attempt to try hijacking the calls to NPCINFO, USERINFO, and CHARINFO and redoing them completely with the dll rather than hexing them in to l2server.

Have you managed to do this already yourself. Is it a viable option or alternative to manually hexing them in to L2Server?

mcrabben7 11.07.2006 16:29

Yep, those are possible. Currently working on converting some hex fixes I added before into DLL hooks, so I can start injecting CharInfo and UserInfo with my own information.

You can do it almost the same way you hex, just make the jump go to the DLL instead.

Here is an example of how I hooked the AskJoinParty packet function. The code for my rewritten code is back a few posts.

Code:

//AskJoinParty Packet Fix (Yea, related to party, but this is more of a server packet fix)
BYTE * HookAskJoinPartyPacketAddr = (BYTE *)0x00510A35;
*HookAskJoinPartyPacketAddr = (BYTE)0xE9;
DWORD * HookAskJoinPartyPacketAddr2 = (DWORD *)0x00510A36;
*HookAskJoinPartyPacketAddr2 = (DWORD)AskJoinPartyPacketFix;
#ifdef __DEBUG__
        file << "Wrote L2Server." << std::hex << HookAskJoinPartyPacketAddr2 << " with AskJoinParty Packet Fix.  New jump address: " << std::hex << *HookAskJoinPartyPacketAddr2 << ".\n";
        file.flush();
#endif
*HookAskJoinPartyPacketAddr2 -= (0x00510A35+5); //rebase our jmp address
HookAskJoinPartyPacketAddr += 5;
*HookAskJoinPartyPacketAddr = (BYTE)0x90;


mcrabben7 15.07.2006 00:40

http://img140.imageshack.us/img140/9...ress2lr.th.jpg

Hero Glow and Hero Icon are enabled in the ExUser struct I was talking about before. Once I make the proper UseItem packet hook, I can set hero when you equip the hero item for your hair slot.

Just showing off some progress. CP regenerates automatically. Still not done with CP damage yet, but, getting there. Damage registers, but, not finding the proper damage variable just yet ;)

Recommend is fully coded, just no SQL backend yet. Retail Recommend, too, none of that 3 color shit.

Some of the other small things are new login messages, and some bug fixes from C1.

Anyways, back to coding ^^

tpuNIsher 15.07.2006 03:39

Great work =p
Keep it going ^^

hel 15.07.2006 15:32

Look's nice... :)
Wish you good luck in coding. ;)
(very bad, we will never see this dll in use :()

RipperX 15.07.2006 16:19

HowTo Hook (Comments / Code)

BYTE * HookFunction = (BYTE *) 0x00Address; //Address is the Address where is the function.
*HookFunction = (BYTE) 0xE9;
DWORD * HookFunctionAddr = (DWORD *)0x00(Address+1);
*HookFunctionAddr = (DWORD)Function;
*HookFunctionAddr -= (0x00Address+5);
//rebase our jmp

Example:

BYTE * HookTimerExpired = (BYTE *)0x004FAD40;
*HookTimerExpired = (BYTE) 0xE9;
DWORD * HookTimerExpiredAddr = (DWORD *) 0x004FAD41;
*HookTimerExpiredAddr = (DWORD)HookTimer;
*HookTimerExpiredAddr -= (0x004FAD40+5);


Asm code was

4FAD40: 55 push ebp
4FAD41: 8BEC mov ebp,esp
4FAD43: 6AFF push 0FF
4FAD45: blabla(return)
------------------> 55 & 8B & EC & 6A & FF (5 bytes) For this is "+5" in rebase

then

Asm code will be

E9NewFunctionAddr (5 bytes)

so inside our new function we need rewrite the latest code 'cause our function replaced it.

then will look something like this

Naked void HookTimer() {

__asm
{
push ebp
mov ebp,esp
push 0FFFFFFFFh
}

//our code..


__asm
{
push 4FAD45h
//retn addr
retn
}

}


I hope that this be helpfull.

Met45 15.07.2006 16:46

nice hooking tutorial ripper, keep up the good work! :wink:

Aikeleer 15.07.2006 17:33

Thanks :) I guess I'll focus on learning C++ aswell. Pretty awesome to see you guys did so much in only a few weeks of hard work. :)

RipperX 15.07.2006 17:49

If someone needs help add me to messenger but I must say that
I don't give code
I don't sell it
I don't sell dll compiled
I don't sell anything.
I will only help to the person who wants learn :)

mcrabben7 15.07.2006 18:31

Here is my recently written RequestEvaluate() function. This one is better than any other that have been shared before. I do give props to Torune for sharing a decent one to start with a while ago, but I couldn't use a lot of his so I wrote the entire thing in my style anyways ;) Plus I added lots of stuff he was missing, like the client messages for giving and receiving recommendations, etc.

GetParameter() grabs the value of something at an address.
GetAddress() just gets an address (a pointer).
Here are their prototypes:

Code:

// Returns a value from an address + a given offset
//
// Parameters:
// DWORD * pData - the address of the data to use
// DWORD byteOffset - how many bytes to offset the address
//
DWORD GetParameter(DWORD * pData, DWORD byteOffset);

Code:

// Returns a pointer to an address + a given offset
//
// Parameters:
// DWORD * pAddress - the address of the data to use
// DWORD byteOffset - how many bytes to offset the address
//
DWORD * GetAddress(DWORD * pAddress, DWORD byteOffset);

GetUser() and GetUserData() get a pointer directly to the start of the CUser struct, and also to the CSharedData struct. One is for users, and one is shared by ALL NPCs in the L2Server.

The parameters like AI_LEVEL and USER_SOCKET are const byte offsets (just numbers) that make it easier to grab variables without always looking at a variable offset chart, and makes the code easier to understand.

Sure, it's possible to make a CUser and CSharedData struct yourself and typecast the ones in the L2Server to yours, but yours will be so incomplete, I found making a struct with 50 unknown variables was pointless, ugly, and bad coding style. Also, why copy an ENTIRE L2Server struct when you only need 1 value? Waste..of...cpu..time :)

Here is the function I originally said I would share:

Code:

void RequestEvaluate(DWORD * pSocket, DWORD targetID)
{
        if(pSocket != NULL)
        {
                DWORD * pUser = GetUser(pSocket);
                if(pUser != NULL)
                {
                        ExUser * tempExUser = GetExUser(pUser);
                        DWORD * pUserData = GetUserData(pUser);
                        DWORD objectID = GetParameter(pUser, OBJECT_ID);
                        DWORD * pTargetUser = CCreature::GetCreature(targetID);

                        if( GetParameter(pUserData, AI_LEVEL) < 10 )
                        {
                                CSocket::Send(pSocket, FORMAT_SYS_MSG, 0x64, 898, 0);        //YOU_ARE_NOT_LEVEL_10
                        }
                        else if(tempExUser->EvalLeft == 0)
                        {
                                CSocket::Send(pSocket, FORMAT_SYS_MSG, 0x64, 833, 0);        //YOU_HAVE_NO_RECOMMENDS_LEFT
                        }
                        else if(targetID == objectID)
                        {
                                CSocket::Send(pSocket, FORMAT_SYS_MSG, 0x64, 829, 0);        //YOU_CANT_RECOMMEND_YOURSELF
                        }
                        else if(pTargetUser == NULL)
                        {
                                CSocket::Send(pSocket, FORMAT_SYS_MSG, 0x64, 144, 0);        //TARGET_IS_INCORRECT
                        }
                        else
                        {
                                DWORD * pTargetSocket = (DWORD *)GetParameter(pTargetUser, USER_SOCKET);
                                ExUser * targetExUser = GetExUser(pTargetUser);

                                if(targetExUser->EvalScore == 255)
                                {
                                        //YOU_CAN_NO_LONGER_RECEIVE_RECOMMENDATIONS
                                        CSocket::Send(pSocket, FORMAT_SYS_MSG, 0x64, 1188, 0);
                                }
                                else
                                {
                                        WCHAR * charName = (WCHAR *)GetAddress(pUserData, AI_NAME);
                                        WCHAR * targetName = (WCHAR *)GetAddress( GetUserData(pTargetUser), AI_NAME);

                                        tempExUser->EvalLeft--;
                                        //YOU_HAVE_RECOMMENDED_S1_AND_HAVE_S2_RECOMMENDS_LEFT
                                        CSocket::Send(pSocket, FORMAT_RECOMMEND2, 0x64, 830, 2, 0, targetName, 1, tempExUser->EvalLeft);
                                        targetExUser->EvalScore++;
                                        //YOU_HAVE_BEEN_RECOMMENDED_BY_S1
                                        CSocket::Send(pTargetSocket, FORMAT_RECOMMEND, 0x64, 831, 1, 0, charName);

                                        //Send new UserInfo to both players so their stats update
                                        SendUserInfo(pUser, 0);
                                        SendCharInfo(pTargetUser, 0);

                                        //TODO: SQL saving
                                }
                        }
                }
        }
}

This sends all messages the client would expect, as well as properly updates your EvalScore and Eval left in the client. That's why UserInfo and CharInfo are sent right after this update, otherwise you would recommend and it would look like nothing happened.

If you use this, please give me credit :) Good luck coders of PP :P

HongK 15.07.2006 19:54

That's a good post Ripper .. That's what I'm talkin about :P

Thanks to you too Mcrabben for providing more information ...

[DeV/NuLL] 16.07.2006 00:50

Nice project, and nice Hook for RequestValue, I can show some interesting functions like GetUserData, I'm working on User Data at this moment.

My 2 cents.

I dont test it yet but I think is ok

C4 Warehouse Fix

Code:

void SetHookWarehouse();
void HookWarehouse();

void SetHookWarehouse()
{
        DWORD *HookWarehouseAddr = (DWORD *)0x004567BB;
        *HookWarehouseAddr = (DWORD)HookWarehouse;
        #ifdef __DEBUG__
                file << "Inyectando " << hex << HookWarehouseAddr << " con gancho a la funcion HookWarehouse.  Nueva direccion: " << hex << *HookWarehouseAddr << ".\n";
                file.flush();
        #endif
        *HookWarehouseAddr -= (0x004567BA+2);
}

void HookWarehouse()
{
        const char *format = "chdhb";
        const char *format2 = "cdd";
        DWORD *sub_4567D0 = (DWORD *)0x004567D0;
        DWORD *sub_4DFC70 = (DWORD *)0x004DFC70;
        DWORD *sub_51EE1F = (DWORD *)0x0051EE1F;
        DWORD *sub_474F05 = (DWORD *)0x00474F05;
        __asm
        {
                push        1
                push        54h
                push        format
                mov                edx, [ebp-58h]
                push        edx
                call        sub_4DFC70
                mov                ecx, [ebp-2Ch]
                mov                eax, [ecx]
                add                esp, 20h
                mov                edx, sub_4567D0
                jmp                edx
        }
        __asm
        {
                push        1
                push        53h
                push        format2               
                call        sub_4DFC70
                mov                ecx, [ebp-24h]
                add                esp, 20h
                jmp                sub_51EE1F
        }
        __asm
        {               
                mov                eax, sub_4DFC70
                mov                esi, [eax+19B8h]
                mov                edx, [ebp-14h]
                mov                ecx, [edx+14Ch]
                push        ecx
                mov                eax, [edx+18h]
                push        eax
                push        60h
                push        format2
                push        esi
                call        sub_4DFC70
                add                esp, 14h
                push        sub_474F05
                retn
        }
}

Can I add you to my MSN Mc?

mcrabben7 16.07.2006 03:44

I currently use Hex fixes for Warehouses, Skill Learning, Private Stores, Etc. if it works already, I don't want to spend time redoing it just yet ;)

Yea, you can add me to MSN.

HongK 18.07.2006 01:47

Hey mcrabben is there anyway you could give me a glimpse into your code for handling npcinfo, charinfo, or userinfo? I just need a little bump to get some progress on it ... I'm trying to make it work for C2, so I realize yours will be slightly different, but any help would be awesome! Thanks..

deathz0r 18.07.2006 13:27

wow
 
hey... nice thread here, I just wanted to thank everyone involved in this proyect I've started to learn something about how to hook the l2server and I'm currently documenting myself on C++ RipperX I added you to my msn if you don't mind.

back when there was no fuss about c4 retail server files and everything I believed that hooking the exec was a very good way to keep l2off alive, and I still think so.

RipperX 18.07.2006 14:00

Re: wow
 
Quote:

Originally Posted by deathz0r
hey... nice thread here, I just wanted to thank everyone involved in this proyect I've started to learn something about how to hook the l2server and I'm currently documenting myself on C++ RipperX I added you to my msn if you don't mind.

back when there was no fuss about c4 retail server files and everything I believed that hooking the exec was a very good way to keep l2off alive, and I still think so.

Did you added me ? coz I don't see the Agree window.

mcrabben7 18.07.2006 20:01

Quote:

Originally Posted by HongK
Hey mcrabben is there anyway you could give me a glimpse into your code for handling npcinfo, charinfo, or userinfo? I just need a little bump to get some progress on it ... I'm trying to make it work for C2, so I realize yours will be slightly different, but any help would be awesome! Thanks..

Our DLL only hooks the C3/C4 parameters right now, plus abnormals. But somewhere around 4FECEC is UserInfo's packet send. NpcInfo is around that function, it's inside a different if statement for the UserInfo send packet.

CharInfo is...hmm...where was it. 4FF3A5 and 4FF93F should be both of them. Hope that helps.

MelkorTheStrong 18.07.2006 20:24

hey mcrabben, i'm not sure on this, but don't ppl on retail have the castle door HP bar working so ppl can view it like mobs? beats me, i've never seen it working on any private server, i'm so used to it not being there :p

mcrabben7 18.07.2006 21:42

Quote:

Originally Posted by MelkorTheStrong
hey mcrabben, i'm not sure on this, but don't ppl on retail have the castle door HP bar working so ppl can view it like mobs? beats me, i've never seen it working on any private server, i'm so used to it not being there :p

I noticed it doesn't work. It's probably been broken since C2 or something. There is a packet called DoorStatusUpdate and I think HP is sent in there. I will take a look at that, later, and see how the C1 packet compares to the L2J packet.

Thanks for reminding me.

TheOrder 18.07.2006 22:11

GJ mcrabben7 , i love 1 thing at u you continue your work even if people don't have faith in C1 any more !!! Tnx for everything you great !!!

mcrabben7 19.07.2006 01:06

Quote:

Originally Posted by TheOrder
GJ mcrabben7 , i love 1 thing at u you continue your work even if people don't have faith in C1 any more !!! Tnx for everything you great !!!

Thanks. I still don't believe we'll have the entire retail C4 server fall into PP any time soon.

I also am learning a lot about many programming things, and teaching myself a lot of new programming skills. So, it's not like I am wasting time. I do enjoy doing this, tbh.

Digital 20.07.2006 00:50

i agree...
even if retail c4 server is available...
i'd still find the importance of dll is still needed...
retail c4 server is NOT perfect.... there's more then u could imagine that require fixing and improving...
[Knowledge = Power]

HF 20.07.2006 01:35

Quote:

Originally Posted by mcrabben7
Quote:

Originally Posted by TheOrder
GJ mcrabben7 , i love 1 thing at u you continue your work even if people don't have faith in C1 any more !!! Tnx for everything you great !!!

Thanks. I still don't believe we'll have the entire retail C4 server fall into PP any time soon.

I also am learning a lot about many programming things, and teaching myself a lot of new programming skills. So, it's not like I am wasting time. I do enjoy doing this, tbh.

Quote:

Originally Posted by Digital
i agree...
even if retail c4 server is available...
i'd still find the importance of dll is still needed...
retail c4 server is NOT perfect.... there's more then u could imagine that require fixing and improving...
[Knowledge = Power]

Yes. Sounds well and I shall agree with it. Much that is made here, has assisted me to make for other work. But...
To invent a bicycle is not the best way of development. And even small envy to such big server - too not the best feeling for calm in с1 a server. ;)

mcrabben7 20.07.2006 21:37

Quote:

Originally Posted by HF
Quote:

Originally Posted by mcrabben7
Quote:

Originally Posted by TheOrder
GJ mcrabben7 , i love 1 thing at u you continue your work even if people don't have faith in C1 any more !!! Tnx for everything you great !!!

Thanks. I still don't believe we'll have the entire retail C4 server fall into PP any time soon.

I also am learning a lot about many programming things, and teaching myself a lot of new programming skills. So, it's not like I am wasting time. I do enjoy doing this, tbh.

Quote:

Originally Posted by Digital
i agree...
even if retail c4 server is available...
i'd still find the importance of dll is still needed...
retail c4 server is NOT perfect.... there's more then u could imagine that require fixing and improving...
[Knowledge = Power]

Yes. Sounds well and I shall agree with it. Much that is made here, has assisted me to make for other work. But...
To invent a bicycle is not the best way of development. And even small envy to such big server - too not the best feeling for calm in с1 a server. ;)

I considered making it a completely Open SOurce project, using the Open GPL license and everything. But I'm just not sure that the community here would be able to support such a project. I'm just afraid it'd turn into one giant leech affair where people take the code and use it, and never give anything back. I also see custom L2J servers out there, but I don't think they share their code back with the main l2J branch. Those kinds of things worried me.

But you're right. Reinventing the bicycle sucks. I am still playing catchup with Linex and l2Extend because I am missing a few features they have. I "almost" have Linex functionality replaced, but not quite there yet. Missing some things still.

So, like I said, you are right. If I had source to start out with that was something like zzcat's level, this would of gone faster. But such is life.

[DeV/NuLL] 20.07.2006 21:48

Well, you always can start a project on sourceforge for example and get some coders for the project who are really interested on learn and write code for your project.

HongK 20.07.2006 23:07

Quote:

Originally Posted by mcrabben7
Quote:

Originally Posted by HF
Quote:

Originally Posted by mcrabben7
Quote:

Originally Posted by TheOrder
GJ mcrabben7 , i love 1 thing at u you continue your work even if people don't have faith in C1 any more !!! Tnx for everything you great !!!

Thanks. I still don't believe we'll have the entire retail C4 server fall into PP any time soon.

I also am learning a lot about many programming things, and teaching myself a lot of new programming skills. So, it's not like I am wasting time. I do enjoy doing this, tbh.

Quote:

Originally Posted by Digital
i agree...
even if retail c4 server is available...
i'd still find the importance of dll is still needed...
retail c4 server is NOT perfect.... there's more then u could imagine that require fixing and improving...
[Knowledge = Power]

Yes. Sounds well and I shall agree with it. Much that is made here, has assisted me to make for other work. But...
To invent a bicycle is not the best way of development. And even small envy to such big server - too not the best feeling for calm in с1 a server. ;)

I considered making it a completely Open SOurce project, using the Open GPL license and everything. But I'm just not sure that the community here would be able to support such a project. I'm just afraid it'd turn into one giant leech affair where people take the code and use it, and never give anything back. I also see custom L2J servers out there, but I don't think they share their code back with the main l2J branch. Those kinds of things worried me.

But you're right. Reinventing the bicycle sucks. I am still playing catchup with Linex and l2Extend because I am missing a few features they have. I "almost" have Linex functionality replaced, but not quite there yet. Missing some things still.

So, like I said, you are right. If I had source to start out with that was something like zzcat's level, this would of gone faster. But such is life.

Hehe yea I worked on L2J as a developer for a while and it sucked when zabbix ran off with roberto to start their own branch and close it off even though they should technically get their asses sued for it ...

Enforcement is an impossible thing and if people branch off they will do it .. This was one of the hardest things the devs talked about .. I always suggested closed source, but ultimately the way you beat other developers is by having better code and more functionality .. It's actually a good thing because it fosters competition and competition in turn produces better products because if you don't compete you lose out .. Besides, atm if someone really wanted to they could just take the basic skeleton you have provided and start their own project just like you said .. They would just do it from scratch...You can't worry about people taking your open source code because if someone wants to be like that, they will .. But look at how far l2j came from the beginning .. I can guarantee you there are more things coded in there that would have NEVER been done if not for outside community support ... I used to not believe in open source, but I have seen the positive things that can happen .. Just look at Linux lol

If you don't have the resources to do all the coding yourself, it might help to let other people take a stab at it and see what happens .. I can tell you that there are shitloads of people that didn't know crap about java before they found L2J and now they are learning and becoming much better at it ...

I for one am interested in C++ .. I always have been, but have never had the time to really sit down and study it properly .. But since I started working with Ollydbg and learning how instructions map to memory addresses, it opened up a whole new world with pointers to me .. I remember two years ago reading about pointers and saying WHOA wth I don't understand any of this .. But looking at coding examples in your DLL and reading a chapter or two on pointers has completely changed my perspective ... So even if you don't open the project up to the public, I still gotta thank you for opening my eyes to hooking and helping me understand pointers :P

cheers

RipperX 20.07.2006 23:11

I don't think that Elhaym project will be open but as I said I can help you to learn. Just if is usefull for you.

gb

HongK 05.12.2006 17:30

Quick question..

I was reading through this thread looking for an answer to my question about getting user values like STR, INT, WIT etc and in comparing the offsets in the l2extension project I'm trying to figure out where you got those values from. For example, in the User struct in l2extension you have AI_X_LOC = 0x08, AI_Y_LOC = 0x10, AI_Z_LOC = 0x18 and on and on. But when I debug userinfo in l2server, the offsets are different numbers. For example at the beginning of the userinfo packet the offsets are EBP-xxx value ... EBP-210 = CharName, EBP-44 = race, EBP-50 = class .. But in the user struct in l2extension the offset for AI_NAME = 0xA0, not 0x210

Sooooo my question is, is my understanding wrong of the offset values? I just figured the offset values in the User struct in l2extension were just the offsets of EBP from data out of userinfo...

mcrabben7 05.12.2006 18:27

UserInfo stores values on the local stack. The original values were copied there from User->CSharedData. My code is right. Trust me.

I already have all the offsets for STR, INT, WIT, DEX, etc. in my code. One or two might be mixed up but they're all there.

It's always User + offset -> CSharedData + offset -> some variable.

I have all the C4 offsets stuck in my head so I can't tell you what the offsets are anymore. See my code :P

humordwarf 05.12.2006 18:38

lol
c++ rulez
maybe someone will start up some public C4 DLL %)
this is small bugfix around striders/wywern without corralllls %)

Code:

bool CP_6A_Ride(CUserSocket *pUserSocket, char *pPacket)
{
        return true; //kick
}


HongK 05.12.2006 18:40

Quote:

Originally Posted by mcrabben7 (Post 73576)
UserInfo stores values on the local stack. The original values were copied there from User->CSharedData. My code is right. Trust me.

I already have all the offsets for STR, INT, WIT, DEX, etc. in my code. One or two might be mixed up but they're all there.

It's always User + offset -> CSharedData + offset -> some variable.

I have all the C4 offsets stuck in my head so I can't tell you what the offsets are anymore. See my code :P

Yes I know they are right .. That's not my question .. I wanted to get more information than is available currently .. So I was wondering how you got those offsets

So like you have User + offset -> CSharedData .. ok good so CSharedData + (offset) -> the variable

Where are you finding (offset)

oh that and what are INFECTED_SKILLS?

humordwarf 05.12.2006 18:51

Quote:

Originally Posted by HongK (Post 73578)
Where are you finding (offset)

some of offsets u can get from AI.OBJ there after //names of variables.. so before - offsets %)

HongK 05.12.2006 19:03

Quote:

Originally Posted by humordwarf (Post 73580)
some of offsets u can get from AI.OBJ there after //names of variables.. so before - offsets %)

Ahhhhh sweet .. thanks HD :P

One last question to Mcrabben, what is your implementation method for the C5 skills you are adding? For example I want to write skill handlers for some new C2 skills so I'm trying to figure out the best way to do it. Any suggestions?

mcrabben7 05.12.2006 19:34

I used a disassembler, of course. You will never get anything done without a good disassembler at your side. How did I find the offsets? L2server assembly. Once you know how to recognize a User *, CSharedData *, etc., things fall into place.

Not really any time for me to teach you right now, but learn to disassemble. HD is right about the AI offsets, because L2Server and L2NPC use Shared Memory IPC (Inter-Process Communication) all the offsets must be the same. I'm sure there are offsets in there I never cared to look up that may be of use to you.

P.S. Skill handlers are a pain in the ass. Alien003 was the master of skill handlers, compared to myself. I've had little experience with changing them, though I have my ideas.

HongK 05.12.2006 20:17

One last question:

What are INFECTED_SKILLS? If those aren't skills that are currently applied to you, was there a way that you know of to check the skills that are currently applied on a character like guidance, focus, etc?


All times are GMT. The time now is 16:10.