Update your client/source.
You are want to starting learning how to update client, but editing client with JPEXS is really annoying thing?
Well, then you need your own client source!
On this date 05/05/2018 game has have version 25.1.1.
Full source code you can find on my GitHub page:
- Crazy Client
- Vanilla
After downloading, unpack source code to your project folder. (To me it's: D:/IDEA/Projects/)
#Setup
Okay, you have source code, but now you ask yourself: "How to build client?"
To do this, you need to setup development environment with basic SDK's.
All programs, what's you can see here, are cracked, but i'll recommend you use payed version to support developers.
I'm and 059 use IntelliJ IDEA, because it's really great tool.
You can find some tutorials/guides to setup IntelliJ IDEA in google, but in startup plugin window make sure you're check on support "Flex SDK/Air SDK".
To get your IDE fully worked, you need to setup external Flex SDK with updated PlayerGlobal.swc.
Direct link to page with Adobe Flex SDK v4.6 - Click.
Direct link to page with Adobe Flash PlayerGlobal.swc - Click.
After downloading, unpack Flex SDK to permanent folder and make sure you don't delete files.
To update PlayerGlobal.swc, go to folder (or create it) with path FLEX4.6/frameworks/libs/player/11.1/ and replace it.
So, I hope your IDE successfully installed and you already start it up. After starting you can see project menu.

Click on "Open" button and go to folder with downloaded source code, select it.

After you choose project, you can see little window with asking you what's SDK you will use.

Select "..." button and in opened window select plus and choose "Flex SDK", to add new external SDK.

In new window select your Flex SDK path.

After you do that, you can see in configuration menu new added classpath's and sourcepath's.
Click to "Ok" and wait when indexing will be finished.

Main window interface look like this:

Next steps are optional, but i'll recommend that.
Use hotkey "Ctrl + Shift + Alt + S" and open Project Structure window.
On project tab choose your Flex SDK.

Go to modules tab, choose webmain module and rename it.

Go to compiler options and uncheck copying resources to output folder.

Go to libraries and add libs what's included with source code.





After you do that, you can go to the main window and setup building configuration.


#Updating
Okay, here you can find some basic instructions to updating source to current version.
To get assets, data, and pure scripts, you need to install some programs.
- AS3-Sorcerer
- Flash Decompiler Trillix
#Packets and Game Version
To get newest packets you need to download clear game client.
Newest client is uploading on www.realmofthemadgod.com/client
Download it, rename it to "New.swf" and drag & drop to your work folder.
Start AS3-Sorcerer and move client in opened window.

To get all scripts, click on "AS3 Scripts" in top of list and move mouse to your workfolder/desktop, after all scripts will be saved, you can stop press on mouse.

After saving you can close AS3-Sorcerer.
Okay, all scripts successfully saved and it's time to get packets.
Open folder with saved scipts and go to this path: /kabam/rotmg/messaging/impl/ and open file GameServerConnection.as with using Notepad++ or other text editor.

Copy all packets from FAILURE to QUEST_ROOM_MSG.
[IMG]
[/IMG]
Now you need to replace old packets in your project. To do this, start IntelliJ IDEA and using hotkeys Ctrl + Shift + N find file GameServerConnection.as.

And just replace packets to new.
Okay, packets successfully updated, but now we need change game version.
Using hotkeys Ctrl + Shift + N find file Parameters.as and find BUILD_VERSION and MINOR_VERSION, in this lines change game version to current.

After you do that, minor update are ended and you can try to build client. But, if developers change some assets or data files, then you need to update them.
#Assets and Data
Well, you try to update game and after building you see some unknown items without annotation or you just can't enter on Nexus?
This is happened, because developers update assets and data files! You just need to update them on your source and all will be okay.
To do that, you need use Flash Decompiler Trillix.
Start Trillix and choose your client, at top in tab "Manage" choose "Convert to source" and wait when source will be converted.


After conversion you can close Trillix.
Open converted source and go to this path: src/kabam/rotmg/assets/

Now sort files by type and copy all images.
Open same folder in your project source and replace all outdated images.
Images updated, but data files and classes still not updated.
Go back to converted folder and copy all files with type AS and DAT to your project source, but don't copy this files:
- AssetsConfig.as
- EmbeddedAssets.as
- EmbeddedData.as
Images, Data, Classes updated, but their still not loading into client.
I hope you still not delete the scripts what's we get with AS3-Sorcerer?
If you accidentaly delete it, then you need again decompile it.
Find this files and copy their to your project source:
- EmbeddedAssets.as
- EmbeddedData.as
Now you need find file AssetLoader.as and open with Notepad++ or other text editor.
Find functions addImages and addAnimatedCharacters and copy their.


Open AssetLoader.as in IntelliJ IDEA and replace functions to new.
That's all, all assets and data files successfully updated and you can try to build client and starting playing.
#Other changes
"Wait, what? You say 'That's all', but adding something more?" - Yes, because developers change not only images and packets, sometimes they do really big changes and you need to add it in client.
To see what's changed in clients, you need two programs:
- AS3-Sorcerer
- WinMerge
After installing their, go to this site and scroll to bottom of list.
As you can see, there you can find all releases of game.
For example i will show how to update client from build 1522832504 to 1525351612. Well, it's just update from version 24.0.0 to version 25.1.1.
First i download build 1522832504 | Version 24.0.0 and rename swf file to Old.swf.
Second i download build 1525351612 | Version 25.1.1 and rename swf file to New.swf.
Now i decompile their using AS3-Sorcerer and move folders to desktop.

After you need to start WinMerge, in tab "File" select "Open", on left folder choose folder with new scripts, on right folder choose folder with old scripts.

Make sure you're check "Including subfolders"!
And click to OK.
When merging ended, select tab "View" and check "Various" and "Binary files", uncheck other settings.

Now you need to open changed file, using hotkey Alt + Down go to first changed line and do changes in your project source using IntelliJ IDEA.
To see all changes, you can look my commit in Vanilla source, totally 117 files changed (including Assets/Data).
You think that's the end? No, you just add changes in AS files, but what about DAT files?
To do that, decompile clients using Trillix and do WinMerge between decompilled source, also add changes using IntelliJ IDEA.
Okay, that's the real the end. Now you have fully updated source, try to build it, if have errors - fix it, if all successfully compiled, then...
Congratulations! You are smart guy.
#End
This tutorial don't mean what's i'm willing to stop updating Crazy Client, but when in someday i will stop do that, you can continue this.
Links:
- Crazy Client source
- Vanilla souce
- IntelliJ IDEA
- AS3-Sorcerer
- Flash Decompiler Trillix
- WinMerge
- Notepad++
Special Thanks:
- @CrazyJani | Creator of Crazy Client
- @059
- @lolpot132
- @rodzillaz12
- @elisrael
- @Syntes512
- @willfuttbuck
- @sconerdeal
- @Mew
- @Nyaro
- @Oblivien2
- @A_Random_Idiot
- @Syurito
- @kiwi5
VirusTotal to CrazyClient#25.1.1
Jotti to CrazyClient#25.1.1
VirusTotal to Vanilla#25.1.1
Jotti to Vanilla#25.1.1
I like when you ask scans to TXT-files.
Well, then you need your own client source!
On this date 05/05/2018 game has have version 25.1.1.
Full source code you can find on my GitHub page:
- Crazy Client
- Vanilla
After downloading, unpack source code to your project folder. (To me it's: D:/IDEA/Projects/)
#Setup
Okay, you have source code, but now you ask yourself: "How to build client?"
To do this, you need to setup development environment with basic SDK's.
All programs, what's you can see here, are cracked, but i'll recommend you use payed version to support developers.
I'm and 059 use IntelliJ IDEA, because it's really great tool.
You can find some tutorials/guides to setup IntelliJ IDEA in google, but in startup plugin window make sure you're check on support "Flex SDK/Air SDK".
To get your IDE fully worked, you need to setup external Flex SDK with updated PlayerGlobal.swc.
Direct link to page with Adobe Flex SDK v4.6 - Click.
Direct link to page with Adobe Flash PlayerGlobal.swc - Click.
After downloading, unpack Flex SDK to permanent folder and make sure you don't delete files.
To update PlayerGlobal.swc, go to folder (or create it) with path FLEX4.6/frameworks/libs/player/11.1/ and replace it.
So, I hope your IDE successfully installed and you already start it up. After starting you can see project menu.
Image

Click on "Open" button and go to folder with downloaded source code, select it.
Image

After you choose project, you can see little window with asking you what's SDK you will use.
Image

Select "..." button and in opened window select plus and choose "Flex SDK", to add new external SDK.
Image

In new window select your Flex SDK path.
Image

After you do that, you can see in configuration menu new added classpath's and sourcepath's.
Click to "Ok" and wait when indexing will be finished.
Image

Main window interface look like this:

Next steps are optional, but i'll recommend that.
Use hotkey "Ctrl + Shift + Alt + S" and open Project Structure window.
On project tab choose your Flex SDK.
Image

Go to modules tab, choose webmain module and rename it.
Image

Go to compiler options and uncheck copying resources to output folder.
Image

Go to libraries and add libs what's included with source code.
Images





After you do that, you can go to the main window and setup building configuration.
Image


#Updating
Okay, here you can find some basic instructions to updating source to current version.
To get assets, data, and pure scripts, you need to install some programs.
- AS3-Sorcerer
- Flash Decompiler Trillix
#Packets and Game Version
To get newest packets you need to download clear game client.
Newest client is uploading on www.realmofthemadgod.com/client
Download it, rename it to "New.swf" and drag & drop to your work folder.
Start AS3-Sorcerer and move client in opened window.
Image

To get all scripts, click on "AS3 Scripts" in top of list and move mouse to your workfolder/desktop, after all scripts will be saved, you can stop press on mouse.
Image

After saving you can close AS3-Sorcerer.
Okay, all scripts successfully saved and it's time to get packets.
Open folder with saved scipts and go to this path: /kabam/rotmg/messaging/impl/ and open file GameServerConnection.as with using Notepad++ or other text editor.
Image

Copy all packets from FAILURE to QUEST_ROOM_MSG.
Image
[IMG]
[/IMG]Now you need to replace old packets in your project. To do this, start IntelliJ IDEA and using hotkeys Ctrl + Shift + N find file GameServerConnection.as.
Image

And just replace packets to new.
Okay, packets successfully updated, but now we need change game version.
Using hotkeys Ctrl + Shift + N find file Parameters.as and find BUILD_VERSION and MINOR_VERSION, in this lines change game version to current.
Image

After you do that, minor update are ended and you can try to build client. But, if developers change some assets or data files, then you need to update them.
#Assets and Data
Well, you try to update game and after building you see some unknown items without annotation or you just can't enter on Nexus?
This is happened, because developers update assets and data files! You just need to update them on your source and all will be okay.
To do that, you need use Flash Decompiler Trillix.
Start Trillix and choose your client, at top in tab "Manage" choose "Convert to source" and wait when source will be converted.
Images


After conversion you can close Trillix.
Open converted source and go to this path: src/kabam/rotmg/assets/
Image

Now sort files by type and copy all images.
Open same folder in your project source and replace all outdated images.
Images updated, but data files and classes still not updated.
Go back to converted folder and copy all files with type AS and DAT to your project source, but don't copy this files:
- AssetsConfig.as
- EmbeddedAssets.as
- EmbeddedData.as
Images, Data, Classes updated, but their still not loading into client.
I hope you still not delete the scripts what's we get with AS3-Sorcerer?
If you accidentaly delete it, then you need again decompile it.
Find this files and copy their to your project source:
- EmbeddedAssets.as
- EmbeddedData.as
Now you need find file AssetLoader.as and open with Notepad++ or other text editor.
Find functions addImages and addAnimatedCharacters and copy their.
Images


Open AssetLoader.as in IntelliJ IDEA and replace functions to new.
That's all, all assets and data files successfully updated and you can try to build client and starting playing.
#Other changes
"Wait, what? You say 'That's all', but adding something more?" - Yes, because developers change not only images and packets, sometimes they do really big changes and you need to add it in client.
And you ask me 'Лето Зима, так как же это дело обновить?'
And i answer to you 'Не проблема, сейчас все будет!'
And i answer to you 'Не проблема, сейчас все будет!'
- AS3-Sorcerer
- WinMerge
After installing their, go to this site and scroll to bottom of list.
As you can see, there you can find all releases of game.
For example i will show how to update client from build 1522832504 to 1525351612. Well, it's just update from version 24.0.0 to version 25.1.1.
First i download build 1522832504 | Version 24.0.0 and rename swf file to Old.swf.
Second i download build 1525351612 | Version 25.1.1 and rename swf file to New.swf.
Now i decompile their using AS3-Sorcerer and move folders to desktop.
Image

After you need to start WinMerge, in tab "File" select "Open", on left folder choose folder with new scripts, on right folder choose folder with old scripts.
Image

Make sure you're check "Including subfolders"!
And click to OK.
When merging ended, select tab "View" and check "Various" and "Binary files", uncheck other settings.
Image

Now you need to open changed file, using hotkey Alt + Down go to first changed line and do changes in your project source using IntelliJ IDEA.
To see all changes, you can look my commit in Vanilla source, totally 117 files changed (including Assets/Data).
You think that's the end? No, you just add changes in AS files, but what about DAT files?
To do that, decompile clients using Trillix and do WinMerge between decompilled source, also add changes using IntelliJ IDEA.
Okay, that's the real the end. Now you have fully updated source, try to build it, if have errors - fix it, if all successfully compiled, then...
Congratulations! You are smart guy.
#End
This tutorial don't mean what's i'm willing to stop updating Crazy Client, but when in someday i will stop do that, you can continue this.
Links:
- Crazy Client source
- Vanilla souce
- IntelliJ IDEA
- AS3-Sorcerer
- Flash Decompiler Trillix
- WinMerge
- Notepad++
Special Thanks:
- @CrazyJani | Creator of Crazy Client
- @059
- @lolpot132
- @rodzillaz12
- @elisrael
- @Syntes512
- @willfuttbuck
- @sconerdeal
- @Mew
- @Nyaro
- @Oblivien2
- @A_Random_Idiot
- @Syurito
- @kiwi5
Special to moderators
VirusTotal to CrazyClient#25.1.1
Jotti to CrazyClient#25.1.1
VirusTotal to Vanilla#25.1.1
Jotti to Vanilla#25.1.1
I like when you ask scans to TXT-files.


nice work my friend