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!

[UPDATE] AKTools V3

Newbie Spellweaver
Joined
Jul 24, 2016
Messages
31
Reaction score
0
Is that mean I can finally using this to host a WAN server?
 

cgi

Newbie Spellweaver
Joined
Sep 24, 2017
Messages
17
Reaction score
15
Note
AKTools now relies on my server for handling IPs which means you need an active internet connection to be able to convert your IPs. This way class A IPs (e.g. 10.10.12.3) should theoretically be supported. Haven't tested it so let me know.

Just noticed this file is different from the one in the thread http://forum.ragezone.com/f937/aura-kingdom-release-files-1158070/ which didn't work for me, I have not tried your up to date file here, but you might be able to see if that is still a issue.
So my network uses 10.0.0.x and AKTools didn't work for me, so I looked into your code and found the issue.

WT5s6Sf - [UPDATE] AKTools V3 - RaGEZONE Forums


A0 00 06 so basically it was converting it to 160.0.6.0 or A0 00 06 00, because an IP is 4 bytes in memory.

So the way I fixed it was by using the IPAddress class, so when you catch it from the text box:

Code:
var ip = IPAddress.Parse(iUserIp.Text);

setting the other box to the bytes:

Code:
iIpToBytes.Text = BitConverter.ToString(ip.GetAddressBytes());

And to use the ip to patch the files(because the last entry needs to be 0):

Code:
var lastOctetToZero = ip.GetAddressBytes();
lastOctetToZero[3] = 0;

Now it works for me with 10.0.0.x IP, hopefully you're still around and can update your tool :)

And instead of converting things to string to compare, it might be easier to do something like this, example for loginserver:
Code:
var ipLastOctetToZero = ip.GetAddressBytes();
ipLastOctetToZero[3] = 0;
using (var fileStream = File.Open(filename, FileMode.Open, FileAccess.ReadWrite))
{
    using (var binaryWriter = new BinaryWriter(fileStream))
    using (var binaryReader = new BinaryReader(fileStream))
    {
        binaryReader.BaseStream.Seek(baseJump, SeekOrigin.Begin);
        var current = binaryReader.ReadByte();
        if (current == 0xCC)
        {
            binaryWriter.BaseStream.Position = 202276;
            binaryWriter.Write(ipLastOctetToZero);
            binaryWriter.BaseStream.Position = 203060;
            binaryWriter.Write(ipLastOctetToZero);
            return;
        }
        Console.WriteLine("Incompatible file...");
    }
}

Hope it helps ;)
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Apr 4, 2021
Messages
13
Reaction score
0
@cgi



Sorry, can you upload the edited program from you here?I'm having a problem that the AKtool program doesn't support files I need to edit
 
Last edited by a moderator:
Back
Top