-
Understanding Development of GameServer Files and Main.exe
Frequently asked questions (+ Reliable Answers)
Q. Why doesn't my server have full s3 items support, i mean i can wear the items, get the added def, but when it comes to viewing them by others, it shows up all wrong?
A. You must first correct the gameservers errorwith the visual interaction bug for the items. Gameserver requires correct procedure and offsets to show the items correct to all.
Q. Why do all the big named servers have all these cool features and when I look on RZ I cant find anything compared to that?
A. They simply leech, buy files, or create them themselves. It is not hard to code, ppl are just too lazy to learn it.
Q. I am running a server, but no one seems to be coming to it, what is the problem?
A. You must advertise it widely, good example is alliance mu or zypher mu, no matter what the admins do bad to the game, its soo widely advertised more ppl will come to it.
Q. I want to add more items to my game, how do i go about doing that?
A. To make the items visible you must first study and understand Q. #1, and the second part is to call new .smd functions from a dll source to memory, then into the mains debugger.
Q. I want Season 3 Server, How to obtain?
A. Make it yourself, you can prolly learn to code and then make your own server perfect in less than 3 months.
Is simple guide to answer basic questions without giving away too much information. Some leechers will understand and some dont, if you dont i suggest you leech files from rz and other forums.
In the past I have released help for ppl to create their own 3d camera on older clients, but now I will release the fully functional 3d for newer s3 compliable servers.
Credits? all go to Rz, this post is to show ppl what to think and how to think, is merely education guides on how to answer / obtain information.
Truel, only a idiot wants fully customizable files without working for them. xD
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
plz you can learn me how to code i want to know and i dont find how to code i so want to code but i dont know if you help i thank you all my life plz learn me to code
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
well.....many of us want to learn how to code those gameservers and mains and all other stuff, but we don't know where to start.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Can you tell us a good start-point to learn devoloping GameServers? I am very interested in developing my own gameservers, but I just don't know where to start.
(Sorry for bad english, I am brazilian).
Marin
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
well here they are (these tutes are for those who have a basic knowledge of coding in any language)
Iczelion's Win32 Assembly Homepage
win32asm - Google Search
masm32.com
masm tutorials - Google Search
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Lol, Assembler? Are you masochist?
Learn C++, or different High-Level language, and a bit asm, only for debug (mov, ptrs, cmp, jxx, push, pop, add).
You must know well Win32Api, understand pointers to datas or functions (because GameServer is simply Framework) in C++ and have PDB (GameServer 0.99.60 and 0.99.62 have it). Additional you can reverse some MuOnline protocol (NPC Talk, skills) and cryptography (C3 and C4 enc/dec).
If you will know this, you can make with MuOnline everything. Simple ;).
Look:
YouTube - Kantru Event Alpha
and look:
YouTube - MuOnline Season 3 Mixes
and look:
YouTube - MuOnline Mu.Net
This is a little piece of my work :).
Salut,
f1x
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
xD that 3d main looks similar to sobiehs full 3d main, but its still goo, any more bit of info to help out is greatful, do it for rz and spread a few good c++ tuts.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
No, it's not similar.
If I remember well, sobieh steered his camera by mouse and screen edges.
My camera using mouse gesture. If you click 3rd button and:
-drag mouse int left or right: camera will rotate,
-drag mouse in up or down: camera will zoom out or zoom in,
-scroll steering camera perspective.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
hmm correct. but its easy to manipulate camera, tho most teams us the 1.2n limited way. Also, I think I saw your compiled source of kanturu even pasted on CzF.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
it also helps to look at any sources u can get your hands on, u can see examples of how a coder would add a simple option...
like here is part of the /post cmd:
Code:
Command = szChatBuff;
if(strcmpi(Command,"/ServerInfo")==0)
{
MyChat.ServerInfo(lpObj);
}
else if(strcmpi(Command,"/Post")==0)
{
MyChat.SendPost(lpObj,Content);
}
else if(strcmpi(Command,"/Test")==0)
this was taken from a czf dll source i found perusing the i-net, but it is gone now :P, the czf added a few other options too, as u can see, i am still too nooby at C++, so i dont rly understand major parts source that much XD, and sry wont post the full source b/c it isnt my source :P
so for this i will give credits to CzF :P
this is a small part of the function...
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
I am reading this thread for the third time and I just can't understand how much insanity it takes to write something like that. A Q&A pretending to be the masterpiece .... ultimate guide to the perfect private Mu server.
Let me ask you this: If all the so called n00bs who want to create a decent private server and are staying here on RZ and read, test and post, learn how to code just following your guide, how many "Active supporters" of CzF would remain?
Your whole post is so disrespectful to the community it leaves me speechless.
Don't get me wrong!!! I do respect the work of CzF and all other coders and teams. They do all of their work for the credits ONLY and they do deserve respect. But you my friend are a hypocrite. You SHOUT as hard as you can how you support the coders and at the same time you are simply a leecher who leeches first hand.
May be I am wrong, may be you are the best coder out there but if that is so why I can't see your name on the credit list of CzF. If you are supporting CzF so damn hard why didn't they put you on the list of credits they give?
As these rows are growing another idea came to me: I haven't heard of CzF members looking for supporters. Really, show me just one post of a CzF member asking for supporters (fans) and I'll apologize.
May be I am wrong again, but my curiosity still grows: Mate, how are you supporting CzF? What are you doing to support them? Really, I want to support them too, I am serious about it. I'd like to see my name in the list of their supporters when they publish it, if there is such a list at all.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
At the end I'll ask you another simple question: Read the two lines on my signature and tell me: Do they seem funny to you? Answer with a simple yes or no.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
kazanliev
I am reading this thread for the third time and I just can't understand how much insanity it takes to write something like that. A Q&A pretending to be the masterpiece .... ultimate guide to the perfect private Mu server.
Let me ask you this: If all the so called n00bs who want to create a decent private server and are staying here on RZ and read, test and post, learn how to code just following your guide, how many "Active supporters" of CzF would remain?
Your whole post is so disrespectful to the community it leaves me speechless.
Don't get me wrong!!! I do respect the work of CzF and all other coders and teams. They do all of their work for the credits ONLY and they do deserve respect. But you my friend are a hypocrite. You SHOUT as hard as you can how you support the coders and at the same time you are simply a leecher who leeches first hand.
May be I am wrong, may be you are the best coder out there but if that is so why I can't see your name on the credit list of CzF. If you are supporting CzF so damn hard why didn't they put you on the list of credits they give?
As these rows are growing another idea came to me: I haven't heard of CzF members looking for supporters. Really, show me just one post of a CzF member asking for supporters (fans) and I'll apologize.
May be I am wrong again, but my curiosity still grows: Mate, how are you supporting CzF? What are you doing to support them? Really, I want to support them too, I am serious about it. I'd like to see my name in the list of their supporters when they publish it, if there is such a list at all.
omg, stfu, u take this too seriously, so wat if ppl are "CzF Supports" it doesnt make that much of a difference... and CockMan gots a very good point, most ppl just use files they find here rather than code themselves... most of the best server dont use files ragezone, they, like cockman said, either buy/code them
the world isn't perfect, but you will just have to live with it
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
all i have to say on this is im not going into this but thx cock for the guide :D
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
CockMan
Frequently asked questions (+ Reliable Answers)
Q. Why doesn't my server have full s3 items support, i mean i can wear the items, get the added def, but when it comes to viewing them by others, it shows up all wrong?
A. You must first correct the gameservers errorwith the visual interaction bug for the items. Gameserver requires correct procedure and offsets to show the items correct to all.
Q. Why do all the big named servers have all these cool features and when I look on RZ I cant find anything compared to that?
A. They simply leech, buy files, or create them themselves. It is not hard to code, ppl are just too lazy to learn it.
Q. I am running a server, but no one seems to be coming to it, what is the problem?
A. You must advertise it widely, good example is alliance mu or zypher mu, no matter what the admins do bad to the game, its soo widely advertised more ppl will come to it.
Q. I want to add more items to my game, how do i go about doing that?
A. To make the items visible you must first study and understand Q. #1, and the second part is to call new .smd functions from a dll source to memory, then into the mains debugger.
Q. I want Season 3 Server, How to obtain?
A. Make it yourself, you can prolly learn to code and then make your own server perfect in less than 3 months.
Is simple guide to answer basic questions without giving away too much information. Some leechers will understand and some dont, if you dont i suggest you leech files from rz and other forums.
In the past I have released help for ppl to create their own 3d camera on older clients, but now I will release the fully functional 3d for newer s3 compliable servers.
Credits? all go to Rz, this post is to show ppl what to think and how to think, is merely education guides on how to answer / obtain information.
Truel, only a idiot wants fully customizable files without working for them. xD
A. GS dont need to show visual things, its a little moron to say than GS show visual, in fact it only send a packet with the new items ID on other bytes and main show the animation, its just a packet send interaction nothing releated to offsets
Quote:
Lol, Assembler? Are you masochist?
Learn C++, or different High-Level language, and a bit asm, only for debug (mov, ptrs, cmp, jxx, push, pop, add).
You must know well Win32Api, understand pointers to datas or functions (because GameServer is simply Framework) in C++ and have PDB (GameServer 0.99.60 and 0.99.62 have it). Additional you can reverse some MuOnline protocol (NPC Talk, skills) and cryptography (C3 and C4 enc/dec).
If you will know this, you can make with MuOnline everything. Simple ;).
Look:
YouTube - Kantru Event Alpha
and look:
YouTube - MuOnline Season 3 Mixes
and look:
YouTube - MuOnline Mu.Net
This is a little piece of my work :).
Salut,
f1x
In fact i code on ASM and my progress is much superior than to mod kantru event, i also got MU S3 mixs, golden fenrir, new class, new wings options and custom events...
ASM its much superior than C++ on speed, it only take time to code it, but some lazy option its to learn C++ xD.
Example of retard C++ code in compilation:
C++:
Code:
mov eax, Local1
add eax, 1
mov Local1, eax
ASM:
MemCopy C++ can be used and most used has a API, on ASM you can produce your own proc less than 8 lines for do the same in a very superior way.
PS: I code also PICs (robotic) and thats why i know most PICs coders use ASM for the compilation, less lines on compile and less resources used.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
FeN$x
In fact i code on ASM and my progress is much superior than to mod kantru event, i also got MU S3 mixs, golden fenrir, new class, new wings options and custom events...
And? You can make this shits using only funcions implemented in GameServer (ItemSerialCreateSend, ChaosBoxInit), sniffer, decryptor and some packets. My Season3 mixes had only ~15 lines code in C++.
Quote:
Originally Posted by
FeN$x
ASM its much superior than C++ on speed
And it's the most bugless way to code something in mu. In C++ you have more advance mechanisms, like polymorphism, inheriting and predefine compile profiles. In ASM you have only procedural coding. In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
C++:
Code:
typedef int(*pItemSerialCreateSend)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD);
pItemSerialCreateSend ItemSerialCreateSend = (pItemSerialCreateSend)0x004036BB;
ItemSerialCreateSend(aIndex, 0xFF, gObj_GetInt(aIndex, gObj_POSX), gObj_GetInt(aIndex, gObj_POSY), WingsId, 0, 255, 0, 0, 0, -1, 0, 0);
ASM:
Code:
PUSH 0
PUSH 0
PUSH -1
PUSH 0
PUSH 0
PUSH 0
PUSH 255
...
...
...
...
(and more)
MOV EAX, 0x004036BB
CALL EAX
Show your code Kanturu Event in ASM and compare it with my Code in C++:
.: Coderz Factory Network :. .
Maybe some day I release my code for Illusion Temple Event and 3rd Level quest, of course in C++, so you can compare coding in ASM and C++ more in detail ;).
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
zimbred
And? You can make this shits using only funcions implemented in GameServer (ItemSerialCreateSend, ChaosBoxInit), sniffer, decryptor and some packets. My Season3 mixes had only ~15 lines code in C++.
And it's the most bugless way to code something in mu. In C++ you have more advance mechanisms, like polymorphism, inheriting and predefine compile profiles. In ASM you have only procedural coding. In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
C++:
Code:
typedef int(*pItemSerialCreateSend)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD);
pItemSerialCreateSend ItemSerialCreateSend = (pItemSerialCreateSend)0x004036BB;
ItemSerialCreateSend(aIndex, 0xFF, gObj_GetInt(aIndex, gObj_POSX), gObj_GetInt(aIndex, gObj_POSY), WingsId, 0, 255, 0, 0, 0, -1, 0, 0);
ASM:
Code:
PUSH 0
PUSH 0
PUSH -1
PUSH 0
PUSH 0
PUSH 0
PUSH 255
...
...
...
...
(and more)
MOV EAX, 0x004036BB
CALL EAX
Show your code Kanturu Event in ASM and compare it with my Code in C++:
.: Coderz Factory Network :. .
Its very easy to know ItemSerialSend but do you know the arguments how they work???... i believe coding its not just copy and paste:
Code:
Push 0
Push 0
Push - 1
Push 0
Push 0
Push 0
Push 0FFH
Push 0
Mov Eax, WingsID
Push Eax
Push 0
Push 0
Push 0FFH
Push Edx
Call CreateItemSend
Mov Eax, MixlpObj
Mov Edx, DWord Ptr Ds:[Eax]
Push Edx
Call InvCommit
Yeah you can some day end coding new class i mean 3 years more xD...
Compare the my wings source code:
Code:
MixRecv Proc
Local TypeMix:DWord
Mov Eax, DWord Ptr Ss:[Ebp + 0CH]
Mov TypeMix, Eax
Xor Eax, Eax
Switch TypeMix
Case 25H
Mov Edx, DWord Ptr Ss:[Ebp + 8]
Invoke NewWingsMix, Edx
Mov Eax, 1
Case 26H
Mov Edx, DWord Ptr Ss:[Ebp + 8]
Invoke FinalMixWings, Edx
Mov Eax, 1
EndSw
ret
14 lines caused first 2 dont count, and only source code, C++ compiler make 15 lines of you to 30 meaby xD.
Can i wonder whats Illusion temple type packet??? caused i got them all, but can you tell me just one?? xD
Quote:
In C++ your code is more clear than assembler and it's more receptive on changes, so you should learn C++. Now i know C++, ASM and some Delphi and coding in C++ is the most effective for me.
SCF team code on C++, they got much more than to code easy wings mixs, i can bet they tell you ASM is superior xD.
If not search on google the compilation, and polymorphism has nothing to do, meaby people think caused you say weird words you know more, but for be more sure, themida packer use polymorphism system on ASM and pholymorphism create much more lines on compilation and in source code, polymorph code it increase lag and speed, i wonder why you name it on MU?? meaby caused weird words make people think you know alot xD.
C++ Retard compilation has we see:
Code:
MOV EAX, 0x004036BB
CALL EAX
ASM Compilation:
(1 line less and no EAX regist used)
Code:
PS: Hey sobieh if you reading this laugh a little, polymorph on C++ make the compilation faster hahahaha xDDD
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
FeN$x
SCF team code on C++, they got much more than to code easy wings mixs, i can bet they tell you ASM is superior xD.
I agree with FeN$x this time, but no always ;), ASM its fast and superior, but a pain of ass if you made for example 6 events, simples can be, but harder, you dont have Objects but its really fast.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
No, polymoprhism and others object oriented featues in C++ doesn't make C++ faster (in several cases) than ASM, but code is more regularized, besides code effectivity it's not only one point (see source of MANGoS emulator).
I saw some your source (example Fenrir mix) and it's very chaotic.
btw. Your source of season 3 miexes is incomplete, it's only protocol core hook ;). Show your mix functions...
Ym, now i must finish code ELF MP3Player for My siemens CX65@70. See you later :).
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
zimbred
No, polymoprhism and others object oriented featues in C++ doesn't make C++ faster (in several cases) than ASM, but code is more regularized, besides code effectivity it's not only one point (see source of MANGoS emulator).
I saw some your source (example Fenrir mix) and it's very chaotic.
btw. Your source of season 3 miexes is incomplete, it's only protocol core hook ;). Show your mix functions and then we can compare our codes...
LoL mix dont need protocol core hook hahahaha, they just need to be hook on looper of mixs proc, its not protocol core xD.
And fenrir mix source was public, my source publics are coded on minutes, mine there its working and for you can test new class and golden fenrir with all working including mixs and custom things enter to my server:
200.104.20.46
Anyone than want to enter allowed, use the account:
user test1
pass test1
New class workings, S3 mixs working, custom events working, golden fenrir full working with options, /Adds commands working, /Post and /ServerInfo, NPC Silent teleport working, S3 custom drops working also.
You can see DeathWay source code GS on C++, and you can still ask him if ASM its more faster and much more complete on compilation than C++.
Also ASM is more bug free, ASM also used for profecional packers like themida, armadillo, ASPack and others.
PS: I need to end coding polymorphic methamorph hiper super dual quantum bathroom (sounds very weird, but people think this way i am pro xD)
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
ProtocolCore call Mix Proc, so you can hook your MixFunctions from DLL into Mix proc or ProtocolCore. Hook in protocol core is more effective, because you can intercept mix packet earlier than mix call - when you intercept mix packet you can jump to end ProtocolCore function without requirements of interpreting packet by GameServer functions.
I don't must test new classes and others Season 3 features on your server, because i test it on my own server :).
Anyway - This logical, that ASM is faster than C++, because ASM is low-level language, BUT code Windows, Office or Mu Emulator in ASM - this is the point for me ;] ;).
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
C++ can be faster as ASM, it depend of your compiler
Code:
CMsg::CMs>/$ 55 PUSH EBP
10001017 |. 8BEC MOV EBP,ESP
10001019 |. 83EC 08 SUB ESP,8
1000101C |. C745 F8 CCCCC>MOV [LOCAL.2],CCCCCCCC
10001023 |. C745 FC CCCCC>MOV [LOCAL.1],CCCCCCCC
1000102A |. 894D F8 MOV [LOCAL.2],ECX
1000102D |. C745 FC 30B00>MOV [LOCAL.1],MuMsg.1001B030 ; ASCII "Msg error"
10001034 |. 6A 34 PUSH 34 ; /n = 34 (52.)
10001036 |. 6A 00 PUSH 0 ; |c = 00
10001038 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
1000103B |. 05 24000200 ADD EAX,20024 ; |
10001040 |. 50 PUSH EAX ; |s
10001041 |. E8 0A080000 CALL MuMsg.memset ; \memset
10001046 |. 83C4 0C ADD ESP,0C
10001049 |. 8B4D F8 MOV ECX,[LOCAL.2]
1000104C |. C701 00000000 MOV DWORD PTR DS:[ECX],0
10001052 |. 8B55 FC MOV EDX,[LOCAL.1]
10001055 |. 52 PUSH EDX ; /src
10001056 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
10001059 |. 05 24000200 ADD EAX,20024 ; |
1000105E |. 50 PUSH EAX ; |dest
1000105F |. E8 FC060000 CALL MuMsg.strcpy ; \strcpy
10001064 |. 83C4 08 ADD ESP,8
10001067 |. 8B45 F8 MOV EAX,[LOCAL.2]
1000106A |. 83C4 08 ADD ESP,8
1000106D |. 3BEC CMP EBP,ESP
1000106F |. E8 3C080000 CALL MuMsg._chkesp
10001074 |. 8BE5 MOV ESP,EBP
10001076 |. 5D POP EBP
10001077 \. C3 RETN
Now Optimized , note that there aren't calls
Code:
CMsg::CMs>/$ 8BD1 MOV EDX,ECX
10001022 |. 53 PUSH EBX
10001023 |. 56 PUSH ESI
10001024 |. 57 PUSH EDI
10001025 |. 8D9A 24000200 LEA EBX,DWORD PTR DS:[EDX+20024]
1000102B |. B9 0D000000 MOV ECX,0D
10001030 |. 33C0 XOR EAX,EAX
10001032 |. 8BFB MOV EDI,EBX
10001034 |. F3:AB REP STOS DWORD PTR ES:[EDI]
10001036 |. BF 30800010 MOV EDI,MuMsg.10008030 ; ASCII "Msg error"
1000103B |. 83C9 FF OR ECX,FFFFFFFF
1000103E |. 8902 MOV DWORD PTR DS:[EDX],EAX
10001040 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
10001042 |. F7D1 NOT ECX
10001044 |. 2BF9 SUB EDI,ECX
10001046 |. 8BC1 MOV EAX,ECX
10001048 |. 8BF7 MOV ESI,EDI
1000104A |. 8BFB MOV EDI,EBX
1000104C |. C1E9 02 SHR ECX,2
1000104F |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS>
10001051 |. 8BC8 MOV ECX,EAX
10001053 |. 8BC2 MOV EAX,EDX
10001055 |. 83E1 03 AND ECX,3
10001058 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[>
1000105A |. 5F POP EDI
1000105B |. 5E POP ESI
1000105C |. 5B POP EBX
1000105D \. C3 RETN
Original
Code:
CMsg::CMsg() // Correct
{
char * szMessageError ="Msg error";
memset(&this->m_szMuMsgError , 0, sizeof(this->m_szMuMsgError ) );
this->m_ListInit = 0;
strcpy(this->m_szMuMsgError , szMessageError);
}
Now i MUST remark that less lines don't means Better perfomance, Registers in ASM were made for increase the speed, thats why many c++ compilers use it on its routines, playing with code like INC DWORD PTR DS[XXXXXXX] is for reduce the code , playing with INC EAX is related with Speed, however ASM can be faster i think
PD: some new compilers also Add an special feature related with Calling procedures, they avoid the classic PUSH , instead of that they reserve a space for the stack, adding the ESP value, and then they use the MOV instruction , this also increase even more the speed, at first look, this should look more "heavy", but it is faster
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Originally Posted by
Deathway
C++ can be faster as ASM, it depend of your compiler
Code:
CMsg::CMs>/$ 55 PUSH EBP
10001017 |. 8BEC MOV EBP,ESP
10001019 |. 83EC 08 SUB ESP,8
1000101C |. C745 F8 CCCCC>MOV [LOCAL.2],CCCCCCCC
10001023 |. C745 FC CCCCC>MOV [LOCAL.1],CCCCCCCC
1000102A |. 894D F8 MOV [LOCAL.2],ECX
1000102D |. C745 FC 30B00>MOV [LOCAL.1],MuMsg.1001B030 ; ASCII "Msg error"
10001034 |. 6A 34 PUSH 34 ; /n = 34 (52.)
10001036 |. 6A 00 PUSH 0 ; |c = 00
10001038 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
1000103B |. 05 24000200 ADD EAX,20024 ; |
10001040 |. 50 PUSH EAX ; |s
10001041 |. E8 0A080000 CALL MuMsg.memset ; \memset
10001046 |. 83C4 0C ADD ESP,0C
10001049 |. 8B4D F8 MOV ECX,[LOCAL.2]
1000104C |. C701 00000000 MOV DWORD PTR DS:[ECX],0
10001052 |. 8B55 FC MOV EDX,[LOCAL.1]
10001055 |. 52 PUSH EDX ; /src
10001056 |. 8B45 F8 MOV EAX,[LOCAL.2] ; |
10001059 |. 05 24000200 ADD EAX,20024 ; |
1000105E |. 50 PUSH EAX ; |dest
1000105F |. E8 FC060000 CALL MuMsg.strcpy ; \strcpy
10001064 |. 83C4 08 ADD ESP,8
10001067 |. 8B45 F8 MOV EAX,[LOCAL.2]
1000106A |. 83C4 08 ADD ESP,8
1000106D |. 3BEC CMP EBP,ESP
1000106F |. E8 3C080000 CALL MuMsg._chkesp
10001074 |. 8BE5 MOV ESP,EBP
10001076 |. 5D POP EBP
10001077 \. C3 RETN
Now Optimized , note that there aren't calls
Code:
CMsg::CMs>/$ 8BD1 MOV EDX,ECX
10001022 |. 53 PUSH EBX
10001023 |. 56 PUSH ESI
10001024 |. 57 PUSH EDI
10001025 |. 8D9A 24000200 LEA EBX,DWORD PTR DS:[EDX+20024]
1000102B |. B9 0D000000 MOV ECX,0D
10001030 |. 33C0 XOR EAX,EAX
10001032 |. 8BFB MOV EDI,EBX
10001034 |. F3:AB REP STOS DWORD PTR ES:[EDI]
10001036 |. BF 30800010 MOV EDI,MuMsg.10008030 ; ASCII "Msg error"
1000103B |. 83C9 FF OR ECX,FFFFFFFF
1000103E |. 8902 MOV DWORD PTR DS:[EDX],EAX
10001040 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
10001042 |. F7D1 NOT ECX
10001044 |. 2BF9 SUB EDI,ECX
10001046 |. 8BC1 MOV EAX,ECX
10001048 |. 8BF7 MOV ESI,EDI
1000104A |. 8BFB MOV EDI,EBX
1000104C |. C1E9 02 SHR ECX,2
1000104F |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS>
10001051 |. 8BC8 MOV ECX,EAX
10001053 |. 8BC2 MOV EAX,EDX
10001055 |. 83E1 03 AND ECX,3
10001058 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[>
1000105A |. 5F POP EDI
1000105B |. 5E POP ESI
1000105C |. 5B POP EBX
1000105D \. C3 RETN
Original
Code:
CMsg::CMsg() // Correct
{
char * szMessageError ="Msg error";
memset(&this->m_szMuMsgError , 0, sizeof(this->m_szMuMsgError ) );
this->m_ListInit = 0;
strcpy(this->m_szMuMsgError , szMessageError);
}
Now i MUST remark that less lines don't means Better perfomance, Registers in ASM were made for increase the speed, thats why many c++ compilers use it own its routines, playint with code like INC DWORD PTR DS[XXXXXXX] is for reduce the code , playing with INC EAX is with Speed,
C++ its not made for playing with regist, in fact its oriented to playing with structured coding, has you put there its a very good example of structured, it can be reduced with ASM much more.
This is SSE scalar definition on VC++ compared with ASM:
VC++ vs assembler code and how to write floating point code using scalar SSE
A good document to see, more if some people think VC++ its superior on scalar fuctions SSEs fuctions and also it explain about FPUs.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
I really wanted to learn c++ before. But it gets frustrating :S
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
omg, i saw "[Guide]Understanding Development of GameServer Files and Main.exe"
where is the guide?
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Dude Chill out, You think a simple guide will teach you how to understand a c++ gameserver? Stuff like that doesn't happen over night. Even if he'd explain every detail I bet it wouldn't help.
I think his topic just says the simple truth. Wanna understand? Learn to read its language.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
[QUOTE=Rmmntqo;2564202]omg, i saw "[Guide]Understanding Development of GameServer Files and Main.exe"
where is the guide?
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
Quote:
Dude Chill out, You think a simple guide will teach you how to understand a c++ gameserver? Stuff like that doesn't happen over night. Even if he'd explain every detail I bet it wouldn't help.
I think his topic just says the simple truth. Wanna understand? Learn to read its language.
no, o dont think, i just think that is a stupid title, no one here want to help, want to teach anothers.
but if i see here something simple, i can make another things, this is for me and for a lot of peoples here.
Quote:
I never sell nothing, but thx for giving the idea :), now for every line of code of my work i will get one dollar ok?.
About adding commands, you don't need to be an advanced programer, its easy, you just need how to use the brain, for example, for a "new command": message.wtf have the commands right?, then how is called the string for get the command?, with a PUSH, then in Olly you search for this command PUSH 0BC3H, (/Stop battle), and then learn how this string is stored and all of that and you will learn how to add a command,
"competitors", i'm not here for a race, i'm here beacause i make this on my free time, in fact i never will learn something related with generic coding, nor programing, because this is not what i like for life. that's why i shouldn't "teach"
And please do NOT say that i don't show you how to deal with programs, i have done 4 tuts relating with GS and Connecservers (specially related with WzAG.dll and how to decompile it), i make a guide for decripting packets sended by Launchers of WZ, i make guides for Get the passwords used in the FTP , specially for get in VTM FTPs, i make a tut on how to trace Packets from mains, i make guide on how to inject code to dump PAckets and then store it on a file, , i make a tut on how to activate the GG with NPGG Checksums, i make a Dev on how to rebuild a DB from applications (specially from MUManager and JoinServer) coz the DB was imcomplete when we got the 0.99.60T, and i released lots of sources codes, as well as protocol documentations, so don't say that i never did something, now if you have never seen this, it's not my fault, ( its fault of RZ that deleted all the DEV thread some time ago)
good luck, you can take a lot of dollars makin that. look fen$x, perhaps now he is rich like bill gates.
about add commands or features, i tried to show how to make a guide.
now peace: when i said "Sobieh, Fen$x, Deathway, bet0x or any other, " i mean "the coders", i dont know you or your work, if a made a error, sorry please, but you know, they any time want money, look the "new" coder at RZ, luciano aibar, he made 24 "Betas" and now stop the releases, and are askin money to give the files, codes etc... like Fen$x did some days before, like Sobieh do.
I'm not sain that "they cant ask by money", or sain that they arent "good guys", im just sain. this is a stupid topic, with a stupid title, nothing or no one here are sain how to understand development, this topic just say "stop ask about that!"
about the "race", perhaps you not, but they are, you know, "who have the best files, with the pest features", i remember a lot of shits, CZF x Codeus x FMG x MX x Anything, Fen$x x L3ser x MG-Stat x DukeGr x the earth.
the fact is: no one here will put anything for the public without return.
the pleoples here show the things only when need something, like luciano needed testers.
again, if i did some error, or injustice, sorry, im sain what i see and what i know.
this is a stupid quarrel.
-
Re: [Guide]Understanding Development of GameServer Files and Main.exe
There is no point of this topic open.
Can a mod delete it?