Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 07.07.2006, 19:22   #51
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

Alien003, i can´t find this HEX in l2server.exe can you help me, how to Hex this files in the server????
seraphii is offline  
Old 08.07.2006, 18:09   #52
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

seraphii it will depend on what l2server.exe you are using? Which one is it? Did it come with the community release recently? Or is it much older?

To Alien:

What were you looking for originally in the code to find NPCINFO? For example your code here:

00496636 . E8 B4E71100 CALL C3server.005B4DEF

004967D1 . E8 19E61100 CALL C3server.005B4DEF

005B4DEF /$ 83EC 14 SUB ESP,14
005B4DF2 |. FF7424 14 PUSH DWORD PTR SS:[ESP+14]
005B4DF6 |. 83C4 1C ADD ESP,1C
005B4DF9 |. 33C9 XOR ECX,ECX
005B4DFB |. 51 PUSH ECX
005B4DFC |. 51 PUSH ECX
005B4DFD |. 51 PUSH ECX
005B4DFE |. 51 PUSH ECX
005B4DFF |. 51 PUSH ECX
005B4E00 |. FFB3 B00A0000 PUSH DWORD PTR DS:[EBX+AB0]
005B4E06 |. 8B4D A8 MOV ECX,[LOCAL.22]
005B4E09 |. 8B55 C4 MOV EDX,[LOCAL.15]
005B4E0C |. 83EC 04 SUB ESP,4
005B4E0F \. C3 RETN

How did you come to find the address 00496636 to tell it to call your address where you wrote your own function? I assume thats just in the right place for npcinfo to get the information it needs from your code. I guess the real question I'm trying to ask is how did you know where NPCINFO was in the l2server.exe? What code around it told you that was NPCINFO?

I only ask because I think the addresses you use here are for a c3 l2server rather than the old c1 one that was modded to c2. So the addresses are completely different.
HongK is offline  
Old 08.07.2006, 19:00   #53
RetaL
Архивный участник
 
Join Date: Mar 2006
Posts: 53
Default

Those worked fine,unless i didn't use linex.dll ...
RetaL is offline  
Old 09.07.2006, 02:07   #54
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

Im use the last l2 server with Linex, Im hex he with C4 party XP and SKill his work fine, but i tried find this hex in the server and not find where inject this , anyone can help me, anybody share the l2 server with this work?
seraphii is offline  
Old 09.07.2006, 02:16   #55
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

I've been searching all referenced text strings in l2server and the only function I can find of the 3 that have been mentioned so far is void CCreature::CheckAbnormalVisualEffect()

The other two(void CNPC::SendNPCInfo(User *pUser, bool NewlyCreated) and void User::SendAbnormalStatusInfo()) I cannot find anywhere.

Can someone confirm these functions actually do exist.

Thanks


EDIT: Nevermind, I found them in IDA
HongK is offline  
Old 10.07.2006, 01:31   #56
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

ok so I'm interested in how the code works and from what I've gathered it looks like this is what's happening (and forgive me if I get something wrong here):

The old packet format for NPCINFO from C1 looks like this:

ddddddddddddddddddffffdddcccccSSddd

The problem here is that in C2 they increased this format to include getabnormaleffect state. The new format in C2 looked like this:

ddddddddddddddddddffffdddcccccSSddd (d)ddddc

The check for abnormal state goes where the "d" is that I put in parenthesis.

Now, what happens in the server is that it has no problem pushing the right values for the old c1 packet format as you can see here:

004966B3 . 8B45 98 MOV EAX,DWORD PTR SS:[EBP-68]
004966B6 . 83FF FF CMP EDI,-1
004966B9 . 0F94C2 SETE DL
004966BC . 51 PUSH ECX
004966BD . 8B4D 94 MOV ECX,DWORD PTR SS:[EBP-6C]
004966C0 . 4A DEC EDX
004966C1 . 23D7 AND EDX,EDI
004966C3 . 52 PUSH EDX
004966C4 . 8B55 8C MOV EDX,DWORD PTR SS:[EBP-74]
004966C7 . 50 PUSH EAX
004966C8 . 8B45 88 MOV EAX,DWORD PTR SS:[EBP-78]
004966CB . 51 PUSH ECX
004966CC . 8B4D 80 MOV ECX,DWORD PTR SS:[EBP-80]
004966CF . 52 PUSH EDX
004966D0 . 8B95 7CFFFFFF MOV EDX,DWORD PTR SS:[EBP-84]
004966D6 . 50 PUSH EAX
004966D7 . 8B45 E4 MOV EAX,DWORD PTR SS:[EBP-1C]
004966DA . 51 PUSH ECX
004966DB . 8B4D E0 MOV ECX,DWORD PTR SS:[EBP-20]
004966DE . 52 PUSH EDX
004966DF . 8B55 A4 MOV EDX,DWORD PTR SS:[EBP-5C]
004966E2 . 50 PUSH EAX
004966E3 . 51 PUSH ECX
004966E4 . 8B45 BC MOV EAX,DWORD PTR SS:[EBP-44]
004966E7 . DD85 40FFFFFF FLD QWORD PTR SS:[EBP-C0]
004966ED . 8B4D 90 MOV ECX,DWORD PTR SS:[EBP-70]
004966F0 . 52 PUSH EDX
004966F1 . 8B55 B4 MOV EDX,DWORD PTR SS:[EBP-4C]
004966F4 . 50 PUSH EAX
004966F5 . 8B45 9C MOV EAX,DWORD PTR SS:[EBP-64]
004966F8 . 51 PUSH ECX
004966F9 . 8B4D AC MOV ECX,DWORD PTR SS:[EBP-54]
004966FC . 52 PUSH EDX
004966FD . 8B55 CC MOV EDX,DWORD PTR SS:[EBP-34]
00496700 . 50 PUSH EAX
00496701 . 8B45 C8 MOV EAX,DWORD PTR SS:[EBP-38]
00496704 . 51 PUSH ECX
00496705 . 8B4D D0 MOV ECX,DWORD PTR SS:[EBP-30]
00496708 . 52 PUSH EDX
00496709 . 8B55 B8 MOV EDX,DWORD PTR SS:[EBP-48]
0049670C . 50 PUSH EAX
0049670D . 8B45 B0 MOV EAX,DWORD PTR SS:[EBP-50]
00496710 . 51 PUSH ECX
00496711 . 8B4D E8 MOV ECX,DWORD PTR SS:[EBP-18]
00496714 . 52 PUSH EDX
00496715 . 50 PUSH EAX
00496716 . 51 PUSH ECX
00496717 . E8 905C0F00 CALL L2Server.0058C3AC
0049671C . DD85 38FFFFFF FLD QWORD PTR SS:[EBP-C8]
00496722 . 50 PUSH EAX
00496723 . E8 845C0F00 CALL L2Server.0058C3AC
00496728 . DD85 30FFFFFF FLD QWORD PTR SS:[EBP-D0]
0049672E . 50 PUSH EAX
0049672F . E8 785C0F00 CALL L2Server.0058C3AC
00496734 . 8A4D 0B MOV CL,BYTE PTR SS:[EBP+B]
00496737 . 33D2 XOR EDX,EDX
00496739 . 84C9 TEST CL,CL
0049673B . 8B4B 18 MOV ECX,DWORD PTR DS:[EBX+18]
0049673E . 0F95C2 SETNE DL
00496741 . 50 PUSH EAX
00496742 . 8B43 1C MOV EAX,DWORD PTR DS:[EBX+1C]
00496745 . 52 PUSH EDX
00496746 . 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
0049674C . 50 PUSH EAX
0049674D . 51 PUSH ECX
0049674E . 6A 22 PUSH 22
00496750 . 68 C80C5E00 PUSH L2Server.005E0CC8 ; ASCII "cddddddddddddddddddffffdddcccccSSddd"
00496755 . 52 PUSH EDX
00496756 . E8 15950400 CALL L2Server.004DFC70
0049675B . 81C4 A8000000 ADD ESP,0A8

The problem we have seeing any abnormal effects on mobs is because it needs one more "d" pushed. So Alien's code looks like it does that:

005B4DEF /$ 83EC 14 SUB ESP,14
005B4DF2 |. FF7424 14 PUSH DWORD PTR SS:[ESP+14]
005B4DF6 |. 83C4 1C ADD ESP,1C
005B4DF9 |. 33C9 XOR ECX,ECX
005B4DFB |. 51 PUSH ECX
005B4DFC |. 51 PUSH ECX
005B4DFD |. 51 PUSH ECX
005B4DFE |. 51 PUSH ECX
005B4DFF |. 51 PUSH ECX
005B4E00 |. FFB3 B00A0000 PUSH DWORD PTR DS:[EBX+AB0]
005B4E06 |. 8B4D A8 MOV ECX,[LOCAL.22]
005B4E09 |. 8B55 C4 MOV EDX,[LOCAL.15]
005B4E0C |. 83EC 04 SUB ESP,4
005B4E0F \. C3 RETN

First he xor's ecx so we got 0, since we aren't concerned with the last part of the new packet format. Then you can see 5 push ecx instructions which just pushes 0000 five times and then the important one is the last push which is PUSH DWORD PTR DS:[EBX+AB0]. Somehow that has to be the check for abnormaleffect state on the mobs. Now I've been trying to figure out how he knew it was EBX+AB0 which I'm sure works obviously from c3-c4, but I think it's wrong for C2. Alien can you explain where you got that instruction and why so it can help more people figure this out rather than just applying the patch and being done with it? Also, why the call to this code at 005B4DEF from those two addresses in NPCINFO? Going back to look at a C1-C2 l2server I see the first pushes for the NPCINFO packet start at 004966B3.
HongK is offline  
Old 10.07.2006, 02:38   #57
Alien003
Архивный участник
 
Join Date: Jun 2005
Posts: 143
Default

the C3 base exe we all use already had that function, with 6 "PUSH 0"
I only changed the last one to "PUSH DWORD PTR DS:[EBX+AB0]"

0xAB0 is the offset in the CSharedData struct to store the active Ave
..it takes a while to find the correct offset values
Alien003 is offline  
Old 10.07.2006, 03:24   #58
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Any pointers on what to look for?
HongK is offline  
Old 10.07.2006, 10:16   #59
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Practice. You can also debug other functions in L2Server to find that.
mcrabben7 is offline  
Old 10.07.2006, 12:19   #60
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

Sorry, i can´t find this Hexa, what software you use for this?
seraphii is offline  
Old 10.07.2006, 13:40   #61
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

I´m use ultra 32edit tool. i cant find the code:

005B4DEF /$ 83EC 14 SUB ESP,14
005B4DF2 |. FF7424 14 PUSH DWORD PTR SS:[ESP+14]
005B4DF6 |. 83C4 1C ADD ESP,1C
005B4DF9 |. 33C9 XOR ECX,ECX
005B4DFB |. 51 PUSH ECX
005B4DFC |. 51 PUSH ECX
005B4DFD |. 51 PUSH ECX
005B4DFE |. 51 PUSH ECX
005B4DFF |. 51 PUSH ECX
005B4E00 |. FFB3 B00A0000 PUSH DWORD PTR DS:[EBX+AB0]
005B4E06 |. 8B4D A8 MOV ECX,[LOCAL.22]
005B4E09 |. 8B55 C4 MOV EDX,[LOCAL.15]
005B4E0C |. 83EC 04 SUB ESP,4
005B4E0F \. C3 RETN

in my L2server.exe. in my l2server the hexa number terminate in
seraphii is offline  
Old 10.07.2006, 13:45   #62
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Quote:
Originally Posted by mcrabben7
Practice. You can also debug other functions in L2Server to find that.
Spending my weekends reversing the opcode for C3-C4 to make some of the patches work for C2 is giving me plenty of practice. Thanks for your one word tip, but it doesn't help too much for the question at hand.

Advice like, oh you don't know where CCreature::CheckAbnormalVisualEffect() is? Try checking .rdata or searching all referenced text strings in Ollydbg or searching the names in IDA. That's a nice informative tip that helps alot more than saying just practice.
HongK is offline  
Old 10.07.2006, 13:49   #63
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

This is sreen for my Hexa in L2server.exe.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
imagem_204.jpg — 138742 байт
seraphii is offline  
Old 10.07.2006, 13:51   #64
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

i´m search in the wrong place?????
seraphii is offline  
Old 10.07.2006, 13:53   #65
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

did you know ultraedit and hiew enumerate addresses different?
toolpunk is offline  
Old 10.07.2006, 14:09   #66
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Quote:
Originally Posted by seraphii
I´m use ultra 32edit tool. i cant find the code:

005B4DEF /$ 83EC 14 SUB ESP,14
005B4DF2 |. FF7424 14 PUSH DWORD PTR SS:[ESP+14]
005B4DF6 |. 83C4 1C ADD ESP,1C
005B4DF9 |. 33C9 XOR ECX,ECX
005B4DFB |. 51 PUSH ECX
005B4DFC |. 51 PUSH ECX
005B4DFD |. 51 PUSH ECX
005B4DFE |. 51 PUSH ECX
005B4DFF |. 51 PUSH ECX
005B4E00 |. FFB3 B00A0000 PUSH DWORD PTR DS:[EBX+AB0]
005B4E06 |. 8B4D A8 MOV ECX,[LOCAL.22]
005B4E09 |. 8B55 C4 MOV EDX,[LOCAL.15]
005B4E0C |. 83EC 04 SUB ESP,4
005B4E0F \. C3 RETN

in my L2server.exe. in my l2server the hexa number terminate in
Use Ollydbg instead. I've found its a hell of alot faster and easier to make changes on the fly in Ollydbg rather than a hex editor. Once you've got L2server loaded up in Ollydbg just right-click over the code and select Go To -> Expression and type the address you want to go to. Alternately, you can do a binary string search and enter a hex string like 83EC 14 and it will find all occurrences of it.

As to why you may not find the above referenced code, it could be a number of things. 1. You are using a pre-C3 server like L2Server311, or L2Server411 2. You are not using the latest L2Server from the PP community release

Even using the latest PP release, you will not find the exact addresses listed above because the PP release uses a different address which I believe is 005B4DF0
HongK is offline  
Old 10.07.2006, 14:32   #67
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

Can you share the last l2server for me?? in my l2server i use last version of linex, im edit the C4 xp party and skilllearning Hexa. its workfine, but effect in mob not show
seraphii is offline  
Old 10.07.2006, 16:53   #68
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

I´m using the software, Ollydbg how the friend sugest, i find the adress in l2server, how to hex in this softaware?? cantake me a hand ^^

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
imagem1_159.jpg — 119189 байт
seraphii is offline  
Old 10.07.2006, 17:55   #69
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

The code from this thread is not there. That may be because you are using a linex.dll that already handles npcinfo, userinfo, and charinfo. If you want to find the code being discussed in this thread, download the PP community release and load that l2server in ollydbg and you will see the code there.
HongK is offline  
Old 11.07.2006, 09:57   #70
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Quote:
Originally Posted by HongK
Quote:
Originally Posted by mcrabben7
Practice. You can also debug other functions in L2Server to find that.
Spending my weekends reversing the opcode for C3-C4 to make some of the patches work for C2 is giving me plenty of practice. Thanks for your one word tip, but it doesn't help too much for the question at hand.

Advice like, oh you don't know where CCreature::CheckAbnormalVisualEffect() is? Try checking .rdata or searching all referenced text strings in Ollydbg or searching the names in IDA. That's a nice informative tip that helps alot more than saying just practice.
Don't have to throw a bit of an attitude just because I told you to debug other functions in the L2Server. You asked how to find such offsets. I gave you the general answer for finding a general offset.

Functions like..

4f15d0 User::SendAbnormalStatusInfo()
4486c0 CCreature::CheckAbnormalVisualEffect()

Lists have been posted on the forums before, and if you're good at using the ITA table you can find where the function table points to, using special tools like LordPE or what some of those other programs are (never used them yet).

Next time please don't get an attitude about it. You act so sensitive to anything that isn't the exact answer you want.
mcrabben7 is offline  
Old 11.07.2006, 12:18   #71
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

Thanks for all help, but i need one how to, i tryed everything, e nothing happens .anybody can help me please, i have many arquives ti share for this help.
seraphii is offline  
Old 11.07.2006, 12:37   #72
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

You have to add a push for AVE, and the other new variables at the end (on top of) the CharInfo packet and the UserInfo packet. There will be 3 places total, as well as added pushes for an NPC packet and somewhere else.

You need to make sure you do this on a PP release EXE, or it will probably be real hard to get it to work if it is your first time.

Alien003 posted the hex code and addresses. You should be able to go there using Olly, or HIEW, or another program and change it.
mcrabben7 is offline  
Old 11.07.2006, 12:58   #73
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

can you share the last l2server.exe? please my msn: thiagoeltz@hotmail.com
seraphii is offline  
Old 11.07.2006, 15:45   #74
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Quote:
Originally Posted by mcrabben7
Quote:
Originally Posted by HongK
Quote:
Originally Posted by mcrabben7
Practice. You can also debug other functions in L2Server to find that.
Spending my weekends reversing the opcode for C3-C4 to make some of the patches work for C2 is giving me plenty of practice. Thanks for your one word tip, but it doesn't help too much for the question at hand.

Advice like, oh you don't know where CCreature::CheckAbnormalVisualEffect() is? Try checking .rdata or searching all referenced text strings in Ollydbg or searching the names in IDA. That's a nice informative tip that helps alot more than saying just practice.
Don't have to throw a bit of an attitude just because I told you to debug other functions in the L2Server. You asked how to find such offsets. I gave you the general answer for finding a general offset.

Functions like..

4f15d0 User::SendAbnormalStatusInfo()
4486c0 CCreature::CheckAbnormalVisualEffect()

Lists have been posted on the forums before, and if you're good at using the ITA table you can find where the function table points to, using special tools like LordPE or what some of those other programs are (never used them yet).

Next time please don't get an attitude about it. You act so sensitive to anything that isn't the exact answer you want.
I didn't ask for a general offset. I asked for what process he used to find a specific offset. I'm well aware of the functions and list of functions and their addresses that Alien provided elsewhere in PP. I've looked at CCreature::CheckAbnormalVisualEffect() a number of times and I'm still trying to figure out how it stores the abnormal effect. Not everyone is a programmer or has had that background in their lives. My time is extremely limited and when I know it will save me a hell of a lot of time trying to figure out the proper procedure to go through to find my solution if someone else already knows it, I don't see any reason why someone can't explain it in more detail. However, some people have very arrogant attitudes and would rather not help out other people or explain to them what they know in detail. I don't see any real logic behind hiding information or only presenting bits and pieces of it. If I know something I'd rather explain it in detail and help save other people a whole lot of time going through what I just went through.

So maybe now you will understand my frustration when I ask a specific (not general) question and I get a general answer like "it takes a long time to find" or "practice". Keep in mind that's not asking for "this is the exact address where ave is stored". It's asking for a method by which you can reach that address. It's asking for your knowledge and explanation of the assembly instructions that LEAD to that address. That is a true answer. If the ultimate goal of these forums is progress and learning about how the Lineage 2 server operates, then I would expect the members of this forum would like to help express what they have learned so that other people may acquire the same knowledge. Instead, I often see people who want to hide what they have learned because they don't want someone having the same benefit of running the same server as they do. That appears to be the ultimate problem here. It's that the people who contribute run private servers in comepetition with each other. So really all everyone here is interested in doing is leeching off each other until they can start their own server and then hopefully get slightly better information to make their servers better than their competitors. I'd rather just do it for the fun and enjoyment of breaking things and taking them apart to learn about them.

Anyway, sorry for the long-winded post. It's just the way it is.
HongK is offline  
Old 11.07.2006, 23:10   #75
Alien003
Архивный участник
 
Join Date: Jun 2005
Posts: 143
Default

sorry ..I didnt answer more directly in the first post coz the offsets are not easy to find, like mcrabben7, practice.

for finding the AVE , you can see in the CheckAbnormalVisualEffect that it has a cycle to calculate the AVE, then in the end of the cycle it sends a packet to the players

if you go see the packet format (lets say ..in a C1 l2j, since in C2+ that packet is not used) you can see that the AVE is the 3º value sent.

so you look at the code and see what register stored it, and look where it came from (or in this case where its going to be used again)

its easy to see

004487BE MOV DWORD PTR DS:[ESI+AB0], EDI

ESI is a register with the pointer to the CCreature struct (I know that coz at the start of the function there is a " MOV ESI, ECX " , and ECX at the start of a __thiscall function (class function) is allways the pointer to the instance)

so AB0 is the offset.

This is ONE way, using the packets is the easyer one.

but unfortunatly most of the times we just have the function flow ..and for that way I dont even know how to explain ...practice
Alien003 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:08.