Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

A3-Returns client with Inferno emu v2 (Only see character list)

Newbie Spellweaver
Joined
Jun 12, 2008
Messages
42
Reaction score
3
I hope this will help you for making the emulator.

Edit
---------------------------------
1. crypt.js
---------------------------------
/**
* crypt.js - Has cryptography functions
*/

'use strict';

var config = require(__dirname + '/../config/config.js');

module.exports = {
byteToInt32: function(data, index) {
return (data[index] & 255) |
((data[index + 1] & 255) << 8) |
((data[index + 2] & 255) << 16) |
((data[index + 3] & 255) << 24);
},

IntToByte: function(num) {
var result = [
(num & 4278190080) >> 24,
(num & 16711680) >> 16,
(num & 65280) >> 8,
(num & 255)
];
return result.reverse();
},
encrypt: function (buffer) {
var offset = 14;
var Protocal = this.IntToByte((this.byteToInt32(buffer, 10) << 16 | 0) * config.cryptography.ConstKey_En);
for (var i = 0; i < Protocal.length; i++) {
buffer.fill(Protocal, i + 10, i + 11);
}

for (var i = offset; ((i + 4) | 0) <= buffer.length; i = (i + 4) | 0) {
var DynamicKey = config.cryptography.dynamic_key;
for (var j = i; j < ((i + 4) | 0); j = (j + 1) | 0) {
buffer[j] = ((buffer[j] ^ (DynamicKey >> 8))) & 255;
DynamicKey = ((((((buffer[j] + DynamicKey) | 0)) * config.cryptography.constant_key_1) | 0) + config.cryptography.constant_key_2) | 0;
}
}
return buffer;
},
decrypt: function (buffer) {
//[0]-[11]: Packet Header
var offset = 14;
var Protocal = this.IntToByte(this.byteToInt32(buffer, 10) * config.cryptography.ConstKey_De >> 16);
for (var i = 0; i < Protocal.length; i++) {
buffer.fill(Protocal, i + 10, i + 11);
}

for (var i = offset; ((i + 4) | 0) <= buffer.length; i = (i + 4) | 0) {
var DynamicKey = config.cryptography.dynamic_key;
for (var j = i; j < ((i + 4) | 0); j = (j + 1) | 0) {
var pSrc = buffer[j];
buffer[j] = ((buffer[j] ^ (DynamicKey >> 8))) & 255;
DynamicKey = ((((((pSrc + DynamicKey) | 0)) * config.cryptography.constant_key_1) | 0) + config.cryptography.constant_key_2) | 0;
}
}
return buffer;
}
};

---------------------------------------
2. main-local.json
---------------------------------------
{
"server": {
"login": {
"ip": "127.0.0.1",
"port": 3551
},
"game": {
"ip": "127.0.0.1",
"port": 9867
}
},
"server_name": "Inferno",
"db": {
"mysql": {
"connection": {
"host": "localhost",
"user": "root",
"password": "",
"database": "infernoemu"
}
}
},
"cryptography": {
"constant_key_1": 2366183,
"constant_key_2": 1432754,
"dynamic_key": 79984829,

//Add
"ConstKey_En": 2817553723,
"ConstKey_De": 2868026355

},
"character": {
"default_wear": {
"0": "17408;2145;4294967295;19666;3105;4294967295;19656;4129;4294967295;19661;5153;4294967295;19676;6177;4294967295;19671;7201;4294967295"
},
"default_pet": {
"0": "66536;133824;125829121;2146093568"
}
}
}

-------------------------------------------
3. packet.js
-------------------------------------------

Find:
USER_CREDENTIALS: 56
Change to:
USER_CREDENTIALS: 64

Find:
case 56:
type = PREPARE_USER;
break;
Change to:
case 68:
type = PREPARE_USER;
break;

Find:
getCharacterName: function (packet) {
var stringData = decoder.end(packet);
var temp1 = stringData.substr(12, 12).trim();
Change to:
getCharacterName: function (packet) {
var stringData = decoder.end(packet);
var temp1 = stringData.substr(18, 12).trim();

-------------------------------------------
4. character.js
-------------------------------------------
Find:
var charPacket = [0xB8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x03, 0xFF, 0x05, 0x11];
Change to:
var charPacket = [0xBF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x03, 0xFF, 0x05, 0x11, 0x00, 0x00];

Add after:
charPacket.push(0x00);
charPacket.push(0x00);
charPacket.push(0x00);
charPacket.push(0x00);
charPacket.push(0x00);

Try to run server with this client.
*

** Inferno-emu-v2(Modify for world login character)


Good luck A3 friend.:w00t:
 
Last edited:
Newbie Spellweaver
Joined
Jun 12, 2008
Messages
42
Reaction score
3
I tried and I am able to go into the game. But after that, it's crashing. But anyway good work!

try
** Inferno-emu-v2(Modify for world login character)


I'm modify getCharacterWorldEnterPacket (Show some idia to character login to world )



I tried and I am able to go into the game. But after that, it's crashing. But anyway good work!
Today i try your emu, it's work good for me?:thumbup1::thumbup1:
 
Last edited:
Back
Top