[TUTORIAL] 27.7.X2 AS3 Client to FSOD
For those of you that are unaware, there has been a much better way to work with RotMG clients ever since DECA made the seriously critical mistake of releasing clients that weren't ran through SecureSWF. It made creating a working source code with ActionScript 3 a breeze as well as being much easier to understand due to no obfuscation. The benefits of having such a client is obvious.
You should never need to use RABCDAsm, JPEXS. or any other decompiler to edit the client from this point forward when you can simply edit the actual source code and compile your own version at will.
With that said, I'm going to show you right now how to obtain the absolute cleanest RotMG source code ever created and get it connecting to your FSOD server. This tutorial only covers the basic requirements needed to connect to your private server.
Section A (The Client)
You'll need IntelliJ, Flex SDK 4.9.1 and a working FSOD server to get started here.
Step 1:
Go to github and search for "RotMG_Client_27.7.X2". Download it, fork it, you choose. It is highly recommended to use this as the base of all future projects.
Step 2:
Open the project up in IntelliJ, navigate to com/company/assembleegameclient/parameters/Parameters.as.
Search for this:
Replace the ENTIRE line with this RSA key:
Step 3:
Navigate to kabam/rotmg/ messaging/impl/data/ObjectData.as
Find this:
Change to this:
Step 4:
Navigate to kabam/rotmg/ messaging/impl/GameServerConnectionConcrete.as
Find this:
Change to this:
Step 5:
Navigate to kabam/rotmg/application/impl/ProductionSetup.as
Find this:
Change the realmofthemadgodhrd URL to your Domain Name/IP address, or localhost.
Find this:
Change the "https" to "http".
Save All, Rebuild Project
Section B (The Server)
Step 1:
Navigate to wserver/PacketIds.cs and replace the entire thing with this:
Step 2:
Navigate to wserver/networking/Client.cs
Change Server_Version to "27.7.X2"
Save All, Clean Solution, Build Solution.
-----------------------------------------------
At this point your client will connect to your FSOD server but there are some things you need to know.
1) Functions like the Friends List and Pet Reskins will not work on FSOD for obvious reasons. It's up to you to either code them in or take them out of the client...
2) You should download the latest en.txt and replace the one in your server/app/Languages directory.
3) You should update dat0.xml and dat1.xml with any new items from the client XML's.
4) Remote textures are off by default in the client.
-----------------------------------------------
I take no credit for any of this. The guy that made this doesn't post here. All thanks should go to him for providing this high quality client source.
You should never need to use RABCDAsm, JPEXS. or any other decompiler to edit the client from this point forward when you can simply edit the actual source code and compile your own version at will.
With that said, I'm going to show you right now how to obtain the absolute cleanest RotMG source code ever created and get it connecting to your FSOD server. This tutorial only covers the basic requirements needed to connect to your private server.
Section A (The Client)
You'll need IntelliJ, Flex SDK 4.9.1 and a working FSOD server to get started here.
Step 1:
Go to github and search for "RotMG_Client_27.7.X2". Download it, fork it, you choose. It is highly recommended to use this as the base of all future projects.
Step 2:
Open the project up in IntelliJ, navigate to com/company/assembleegameclient/parameters/Parameters.as.
Search for this:
Code:
public static const RSA_PUBLIC_KEY:String
Code:
public static const RSA_PUBLIC_KEY:String = ((((("-----BEGIN PUBLIC KEY-----\n" + "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbqweYUxzW0IiCwuBAzx6Htskr") + "hWW+B0iX4LMu2xqRh4gh52HUVu9nNiXso7utTKCv/HNK19v5xoWp3Cne23sicp2o") + "VGgKMFSowBFbtr+fhsq0yHv+JxixkL3WLnXcY3xREz7LOzVMoybUCmJzzhnzIsLP") + "iIPdpI1PxFDcnFbdRQIDAQAB\n") + "-----END PUBLIC KEY-----");
Navigate to kabam/rotmg/ messaging/impl/data/ObjectData.as
Find this:
Code:
this.objectType_ = _arg_1.readShort();
Code:
this.objectType_ = _arg_1.readUnsignedShort();
Navigate to kabam/rotmg/ messaging/impl/GameServerConnectionConcrete.as
Find this:
Code:
_local_2.buildVersion_ = ((Parameters.BUILD_VERSION + ".") + "0");
Code:
_local_2.buildVersion_ = ((Parameters.BUILD_VERSION + ".") + Parameters.MINOR_VERSION);
Navigate to kabam/rotmg/application/impl/ProductionSetup.as
Find this:
Code:
private const SERVER:String =;
Find this:
Code:
private const ENCRYPTED:String
Save All, Rebuild Project
Section B (The Server)
Step 1:
Navigate to wserver/PacketIds.cs and replace the entire thing with this:
Code:
namespace wServer
{
public enum PacketID : byte
{
FAILURE = 0, //slotid: 1
CREATE_SUCCESS = 58, //slotid: 2
CREATE = 48, //slotid: 3
PLAYERSHOOT = 41, //slotid: 4
MOVE = 24, //slotid: 5
PLAYERTEXT = 9, //slotid: 6
TEXT = 34, //slotid: 7
SHOOT2 = 1, //slotid: 8
DAMAGE = 52, //slotid: 9
UPDATE = 44, //slotid: 10
UPDATEACK = 96, //slotid: 11
NOTIFICATION = 20, //slotid: 12
NEW_TICK = 31, //slotid: 13
INVSWAP = 64, //slotid: 14
USEITEM = 3, //slotid: 15
SHOW_EFFECT = 78, //slotid: 16
HELLO = 86, //slotid: 17
GOTO = 92, //slotid: 18
INVDROP = 97, //slotid: 19
INVRESULT = 18, //slotid: 20
RECONNECT = 68, //slotid: 21
PING = 8, //slotid: 22
PONG = 83, //slotid: 23
MAPINFO = 28, //slotid: 24
LOAD = 63, //slotid: 25
PIC = 88, //slotid: 26
SETCONDITION = 36, //slotid: 27
TELEPORT = 5, //slotid: 28
USEPORTAL = 23, //slotid: 29
DEATH = 12, //slotid: 30
BUY = 77, //slotid: 31
BUYRESULT = 56, //slotid: 32
AOE = 7, //slotid: 33
GROUNDDAMAGE = 84, //slotid: 34
PLAYERHIT = 37, //slotid: 35
ENEMYHIT = 94, //slotid: 36
AOEACK = 89, //slotid: 37
SHOOTACK = 10, //slotid: 38
OTHERHIT = 6, //slotid: 39
SQUAREHIT = 59, //slotid: 40
GOTOACK = 99, //slotid: 41
EDITACCOUNTLIST = 87, //slotid: 42
ACCOUNTLIST = 53, //slotid: 43
QUESTOBJID = 4, //slotid: 44
CHOOSENAME = 25, //slotid: 45
NAMERESULT = 62, //slotid: 46
CREATEGUILD = 11, //slotid: 47
CREATEGUILDRESULT = 95, //slotid: 48
GUILDREMOVE = 75, //slotid: 49
GUILDINVITE = 85, //slotid: 50
ALLYSHOOT = 49, //slotid: 51
SHOOT = 90, //slotid: 52
REQUESTTRADE = 82, //slotid: 53
TRADEREQUESTED = 51, //slotid: 54
TRADESTART = 74, //slotid: 55
CHANGETRADE = 101, //slotid: 56
TRADECHANGED = 38, //slotid: 57
ACCEPTTRADE = 26, //slotid: 58
CANCELTRADE = 22, //slotid: 59
TRADEDONE = 35, //slotid: 60
TRADEACCEPTED = 100, //slotid: 61
CLIENTSTAT = 57, //slotid: 62
CHECKCREDITS = 27, //slotid: 63
ESCAPE = 16, //slotid: 64
FILE = 33, //slotid: 65
INVITEDTOGUILD = 14, //slotid: 66
JOINGUILD = 67, //slotid: 67
CHANGEGUILDRANK = 81, //slotid: 68
PLAYSOUND = 17, //slotid: 69
GLOBAL_NOTIFICATION = 40, //slotid: 70
RESKIN = 46, //slotid: 71
PETYARDCOMMAND = 79, //slotid: 72
PETCOMMAND = 47, //slotid: 73
UPDATEPET = 39, //slotid: 74
NEWABILITYUNLOCKED = 76, //slotid: 75
UPGRADEPETYARDRESULT = 21, //slotid: 76
EVOLVEPET = 69, //slotid: 77
REMOVEPET = 50, //slotid: 78
HATCHEGG = 30, //slotid: 79
ENTER_ARENA = 45, //slotid: 80
ARENANEXTWAVE = 65, //slotid: 81
ARENADEATH = 55, //slotid: 82
LEAVEARENA = 15, //slotid: 83
VERIFYEMAILDIALOG = 80, //slotid: 84
RESKIN2 = 13, //slotid: 85
PASSWORDPROMPT = 61, //slotid: 86
VIEWQUESTS = 91, //slotid: 87
TINKERQUEST = 98, //slotid: 88
QUESTFETCHRESPONSE = 60, //slotid: 89
QUESTREDEEMRESPONSE = 93, //slotid: 90
PET_CHANGE_FORM_MSG = 42,
KEY_INFO_REQUEST = 66,
KEY_INFO_RESPONSE = 19
}
}
Navigate to wserver/networking/Client.cs
Change Server_Version to "27.7.X2"
Save All, Clean Solution, Build Solution.
-----------------------------------------------
At this point your client will connect to your FSOD server but there are some things you need to know.
1) Functions like the Friends List and Pet Reskins will not work on FSOD for obvious reasons. It's up to you to either code them in or take them out of the client...
2) You should download the latest en.txt and replace the one in your server/app/Languages directory.
3) You should update dat0.xml and dat1.xml with any new items from the client XML's.
4) Remote textures are off by default in the client.
-----------------------------------------------
I take no credit for any of this. The guy that made this doesn't post here. All thanks should go to him for providing this high quality client source.



