Skip to content

alx2002/RotMG-Net-Lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RotMG-Net-Lib

Realm of the Mad God Networking C# Library

You can use this library to implement your own Realm of the Mad God bots.

Check this if you want to use Java library: https://github.com/tripleys/RotMG-Net-JLib

Example class:

    class Program
    {
        static void Main(string[] args)
        {
            Reconnect reconnect = new Reconnect()
            {
                Host = "54.93.78.148",
                Port = 2050,
                GameId = -2,
                KeyTime = 0,
                Key = new byte[0]
            };
            NetClient client = new NetClient(reconnect);
            client.Hook(PacketType.Failure, (p) =>
            {
                Console.WriteLine("Failure: " + ((FailurePacket)p).ErrorDescription);
            });
            client.Hook(PacketType.MapInfo, (p) =>
            {
                LoadPacket load = new LoadPacket()
                {
                    CharId = 2,
                    IsFromArena = false
                };
                client.SendPacket(load);
            });
            client.Hook(PacketType.Update, (p) =>
            {
                client.SendPacket(new UpdateAckPacket());
            });
            client.Hook(PacketType.NewTick, (p) =>
            {
                Console.WriteLine("NEW_TICK, id: " + ((NewTickPacket) p).TickId);
            });
            HelloPacket hello = new HelloPacket()
            {
                BuildVersion = "X31.2.3",
                GameId = reconnect.GameId,
                Guid = RSA.Instance.Encrypt("your email"),
                Password = RSA.Instance.Encrypt("your password"),
                Secret = RSA.Instance.Encrypt(""),
                GameNet = "rotmg",
                PlayPlatform = "rotmg"
            };

            client.SendPacket(hello);

            Console.ReadKey();
        }
    }

About

Realm of the Mad God Networking C# Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%