Results 1 to 13 of 13
  1. #1
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic

    [27.7.X10.2] ConsoleKRelay

    ConsoleKRelay
    A modified KRelay console application made to help rotmg section developers.
    Thanks to the KRelay team for the original krelay.

    Images:




    Key features:
    Real time packet sending (with user friendly methods)
    Real time packet blocking (& unblocking)
    Packet debugging with filtering
    Faster load time than normal KRelay (thanks to @toddddd for his better libkrelay)
    Freecam
    OPAutonexus (made by tmwilliam168, updated by crazyjani) built-in for the freecam
    Built-in free client sided name changes
    Much smaller size, and more lightweight.

    Cons:
    No plugins. Other than that, it doesn't have any cons compared to the original krelay

    Read the "Help for consoleKRelay.txt" from the zip.

    VirusTotal
    Jotti

    Enjoy learning about rotmg networking!
    <b>Downloadable Files</b> Downloadable Files
    Last edited by 059; 01-19-2017 at 03:16 PM.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  2. The Following 63 Users Say Thank You to New For This Useful Post:

    181derick (12-28-2016),713jc (03-01-2017),Artus11 (02-07-2017),chance11 (01-19-2017),ChristianCheng (01-30-2017),Creator Atum (05-19-2019),daniels1001 (01-29-2017),Danielyasamii (02-23-2017),DizzyDog22 (01-21-2017),Dj3max (01-20-2017),DonJuan13 (01-29-2017),donloader (01-31-2017),dotskills (02-13-2017),Dragonlogesh1 (01-31-2017),Ecliippse (12-25-2016),ericxd (01-11-2017),erikasv2001 (02-04-2017),FuzzyCakes101 (01-22-2017),Goron1569 (12-31-2016),Grizzi (04-03-2017),hackenberry (12-23-2016),HitechGodZ (01-03-2017),Huspi8888 (12-24-2016),Iggy (01-23-2017),Islykids (08-05-2017),janthedude (01-20-2017),jazr7 (02-07-2017),jrlumba (02-01-2017),LietuvisGal (12-23-2016),MaCheLOL (02-06-2017),mateushoff (12-23-2016),memestergod (02-21-2017),migue582 (03-10-2017),Mike Sellers (12-25-2016),Mismagius (01-21-2017),moot06 (01-21-2017),Plus22 (01-01-2017),rasor (02-09-2017),rdnk killa (12-28-2016),Rosabella (01-18-2020),RotmgSyahid (01-09-2017),rrhigh5 (01-09-2017),Scorchey (01-21-2017),scycher (01-19-2017),scythun (01-29-2017),shadowera13 (01-08-2017),Shazza97 (01-31-2017),ShewMoo (12-28-2016),squiddude123 (12-23-2016),superv2t (01-10-2017),ThereIsNoLogic (02-06-2017),thisisthomas2 (12-23-2016),toddddd (12-23-2016),tuukkas (01-20-2017),vanish2102 (01-20-2017),vaultwig (02-19-2017),vVentured (01-11-2017),wandercpa (12-23-2016),werwwer12345 (12-22-2017),wtfgaming5 (01-11-2017),xFour (12-24-2016),y0y0hax (03-07-2017),zxArth (12-30-2016)

  3. #2
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    Looks good.

    Approved
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

  4. The Following User Says Thank You to Ahl For This Useful Post:

    New (12-23-2016)

  5. #3
    Warlordos's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Austria
    Posts
    281
    Reputation
    10
    Thanks
    14
    crash@server swap to oryx castle

  6. #4
    shadowera13's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Cold
    Could you release the source code for this?

  7. #5
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Bump this still works as nothing was changed
    @059 @Ahlwong change title from 27.7.xmas to 27.7.X10.2 , thanks
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  8. #6
    HackerXXL's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    204
    Reputation
    10
    Thanks
    11
    My Mood
    Angelic
    Last time I used this client, autonexus didn't worked.
    I was using proxy server
    Enabled autonexus thru console. Any ideas?
    @PKTINOS
    Last edited by HackerXXL; 01-20-2017 at 04:04 PM.
    test

  9. #7
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by HackerXXL View Post
    Last time I used this client, autonexus didn't worked.
    I was using proxy server
    Enabled autonexus thru console. Any ideas?
    @PKTINOS
    You enabled it thru console? It is enabled on startup, so you disabled it
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  10. #8
    HackerXXL's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    204
    Reputation
    10
    Thanks
    11
    My Mood
    Angelic
    Quote Originally Posted by PKTINOS View Post


    You enabled it thru console? It was already enabled :/
    I was typing autonexus and it said its enabled at % that i wanted and so but it didn't nexused me.
    test

  11. #9
    scycher's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    how do you change the server for proxy?

  12. #10
    HackerXXL's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    204
    Reputation
    10
    Thanks
    11
    My Mood
    Angelic
    Quote Originally Posted by scycher View Post
    how do you change the server for proxy?
    /con usw


    @PKTINOS
    In old thread you said its possible to bloc K-Relay notifications with this command
    block notification
    Even after entering that command I still get notifications when i join realm or when i nexus
    Welcome to krelay (Server name)

    Last edited by HackerXXL; 01-21-2017 at 03:41 AM.
    test

  13. #11
    scycher's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    /con usw
    how do you connect to another server?
    if I do like /con uswest2 it wont work

    - - - Updated - - -

    nevermind i got it

  14. #12
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    I was requested of the source for this. Here you go:

    Program.cs
    Code:
    using System.Linq;
    using Lib_K_Relay;
    using Lib_K_Relay.GameData;
    using Lib_K_Relay.Utilities;
    using System;
    using System****;
    using System.Collections.Generic;
    using Lib_K_Relay.Networking;
    using Lib_K_Relay.Networking.Packets;
    using Lib_K_Relay.Networking.Packets.Server;
    using System.Text;
    using Lib_K_Relay.Networking.Packets.Client;
    using Lib_K_Relay.Networking.Packets.DataObjects;
    using System.Net;
    
    namespace ConsoleKRelay
    {
    
        /*PlayerShootPacket psp = (PlayerShootPacket)Packet.Create(PacketType.PLAYERSHOOT);
                        Console.WriteLine("Playershoot packet created!");
                        Console.WriteLine("Angle in radians: (floating point: ',')");
                        float rad = 0;
                        try
                        {
                            rad = float.Parse(Console.ReadLine());
                            if ((rad > (float)Math.PI * 2) || (rad < 0))
                                throw new OverflowException();
                        }
                        catch
                        {
                            Console.WriteLine("Invalid radians value. Max: " + Math.PI * 2 + " Min: 0");
                            return;
                        }
                        psp.Angle = rad;
                        psp.Position = curClient.PlayerData.Pos;
                        psp.BulletId = 1;
                        curClient.SendToServer(psp);
                        Console.WriteLine("Playershoot packet send!");*/
        class Program
        {
    
            public static Boolean _enabled = true;
            public static Boolean b;
            public static int health = 6969;
    
            public static Dictionary<int, List<Bullet>> bulletMap = new Dictionary<int, List<Bullet>>();
            public static Dictionary<int, int> objectTypeMap = new Dictionary<int, int>();
            public static readonly Dictionary<int, List<int>> armorPiercingBullets = new Dictionary<int, List<int>>(){
                {1617, new List<int>(){0}},
                {28958, new List<int>(){2}},
                {28956, new List<int>(){2}},
                {29339, new List<int>(){2}},
                {29340, new List<int>(){2}},
                {29021, new List<int>(){2,3}},
                {29039, new List<int>(){1}},
                {5952, new List<int>(){2}},
                {3472, new List<int>(){0}},
                {29070, new List<int>(){6}},
                {29084, new List<int>(){0}},
                {2354, new List<int>(){6}}
            };
            public static Client curClient;
    
            public static Proxy _proxy = new Proxy();
            static string PATH = Directory.GetCurrentDirectory() + "/settings.txt";
            static string server;
            static string filterdbg = "";
            static ConsoleColor oldcolor;
            public static List<string> name = new List<string>();
            public static List<string> accountID = new List<string>();
            public static List<string> blocklist = new List<string>();
          
            static void Main(string[] args)
            {
                Console.WindowWidth += 30;
                oldcolor = ConsoleColor.White;
                Console.Title = "ConsoleKRelay";
                LoadSettings();
                Console.Clear();
                Console.WriteLine("Welcome to ConsoleKRelay, a modified KRelay version by PKTINOS");
                Console.WriteLine("Credits to KRelay team, and especially KrazyShank");
                Console.WriteLine("--------------------------------------------------------------------------------------------------------------");
                CustomCommands.LoadCommandsC();
                Console.Write("[");Console.ForegroundColor = ConsoleColor.Yellow;Console.Write("ConsoleKRelay"); Console.ForegroundColor = oldcolor;Console.Write("]");
                Console.WriteLine(" Loaded custom commands!");
                Console.ForegroundColor = ConsoleColor.Cyan;
                try
                {
                    GameData.Load();
                }catch(Exception ex)
                {
                    Console.WriteLine(ex.InnerException.ToString());
                }
                Console.ForegroundColor = oldcolor;
                Console.ForegroundColor = ConsoleColor.Gray;
                try
                {
                   
                    
                }
                catch { Console.WriteLine("No arguments found. Loading normally..");
                    
                }
    
                
                Console.ForegroundColor = oldcolor;
                _proxy = new Proxy();
                Console.ForegroundColor = ConsoleColor.Green; 
                _proxy.Start();
                Console.ForegroundColor = oldcolor;
                _proxy.HookPacket(Lib_K_Relay.Networking.Packets.PacketType.MAPINFO, onMapInfo);
                Console.WriteLine("Hooked client receiving magic.");
                foreach (PacketType ptype in Enum.GetValues(typeof(PacketType)))
                {
                    try
                    {
                        _proxy.HookPacket(ptype, onDebugMode);
                    }
                    catch { }
                }
                Console.WriteLine("Hooked every packet to debug state. Debugging: OFF");
                _proxy.HookPacket(PacketType.PLAYERHIT, OnPlayerHit);
                _proxy.HookPacket(PacketType.ENEMYSHOOT, OnShoot);
                _proxy.HookPacket(PacketType.SERVERPLAYERSHOOT, OnShoot2);
                _proxy.HookPacket(PacketType.AOE, OnAOE);
                _proxy.HookPacket(PacketType.NEWTICK, OnNT);
                _proxy.HookPacket(PacketType.UPDATE, OnUpdate);
                _proxy.HookPacket(PacketType.MOVE, FreecamManager);
               
                _proxy.HookPacket(PacketType.MAPINFO, onMapInfo);
                _proxy.HookPacket(PacketType.ENEMYSHOOT, CustomCommands.onEnemyShoot);
                _proxy.ClientDisconnected += OnDisconnect;
                Console.WriteLine("## Loaded OpAutonexus - made by Tmwilliamlin168, updated by crazyjani. \n## Type command 'opautonexus' to enable/disable");
                Console.WriteLine("## Currently: Enabled");
                _enabled = true;
                try { server = File.ReadAllText(PATH).Split('|')[1]; } catch { Console.WriteLine("settings.txt not found, or problem occurred. Setting server as EUNorth2"); server = "EUNorth2"; }
                try {  Proxy.DefaultServer = GameData.Servers.ByName(server).Address; }catch { Console.WriteLine("Server not found in settings.. Using EUNorth2"); server = "EUNorth2"; Proxy.DefaultServer = GameData.Servers.ByName(server).Address; }
                Console.Write("["); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("ConsoleKRelay"); Console.ForegroundColor = oldcolor; Console.Write("]");
    
                Console.WriteLine("ConsoleKRelay was loaded - Proxy started - Server:" + server);
                Console.Write("["); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("ConsoleKRelay"); Console.ForegroundColor = oldcolor; Console.Write("]");
    
                Console.WriteLine("You can run commands in the console. Type help for a list of commands.");
    
                do
                {
                    
                   string[] com = Console.ReadLine().Split(' ')
                        ;
                    List<string> args1 = new List<string>();
                    int i = 1;
                    do
                    {
                        try
                        {
                            args1.Add(com[i]);
                            i++;
                        }
                        catch
                        {
                            continue;
                        }
                        
                    } while (i < com.Length);
    
                    if (isCommand(com[0].ToLower()))
                    {
                        Console.ForegroundColor = oldcolor;
                        runCommand(com[0].ToLower(), args1.ToArray());
                    }else
                    {
                        Console.Write("["); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("ConsoleKRelay"); Console.ForegroundColor = oldcolor; Console.Write("]");
    
                        Console.WriteLine(com[0] + " is not a command. Think it should it be added? Let me know.");
                        
                    }
                } while (true);
                
    
            }
    
            
            static bool FreecamActive = false;
            static Location freezer;
            private static void FreecamManager(Client client, Packet packet)
            {
                if (FreecamActive)
                {
                    MovePacket move = (MovePacket)packet;
                    move.NewPosition = freezer;
                    move.Records = new LocationRecord[] { };
                }
            }
    
            static string returnFixed(Packet packet,string s2)
            {
                
                if (s2 == "TEXT")
                {
                    TextPacket t = (TextPacket)packet;
                    s2 += " | " + t.Text.Replace(" ", "") + " | By " + t.Name + " | (*" + t.NumStars.ToString() + ")";
                }else if (s2 == "LOAD")
                {
                    LoadPacket l = (LoadPacket)packet;
                    s2 += " | " + l.CharacterId;
    
                }else if (s2 == "MAPINFO")
                {
                    MapInfoPacket map = (MapInfoPacket)packet;
                    s2 += " | Name:" + map.DisplayName + " | Max x: " + map.Width + " | Max y: " + map.Height;
                }            else if (s2 == "RECONNECT")
                {
                    ReconnectPacket r = (ReconnectPacket)packet;
                    s2 += " | Going to: " + r.Name + " | " + r.Host.ToString();
                }
                else if (s2 == "PLAYERSHOOT")
                {
                    PlayerShootPacket ps = (PlayerShootPacket)packet;
                  s2 += " | Radians: " + ConvertDECAtoRadians(ps.Angle) + " | Deca angle measurement:" + ps.Angle +"| X:" + ps.Position.X + " Y: " + ps.Position.Y + " | BID: " + ps.BulletId.ToString() + " | WeaponID: " + ps.ContainerType.ToString();
                }
                else if (s2 == "MOVE")
                {
                    MovePacket m = (MovePacket)packet;
                    s2 += " | Position of player: (" + m.NewPosition.X + " | " + m.NewPosition.Y + ")" + " | TICKID: " + m.TickId + " | Time:" + m.Time + " | ClientTime:" + curClient.Time + " | PrevTime:" + curClient.PreviousTime;
                }
                else if (s2 == "ENEMYSHOOT")
                {
                    EnemyShootPacket e = (EnemyShootPacket)packet;
                    s2 += " | Radians: " + ConvertDECAtoRadians(e.Angle) + " | BulletAmount: " + e.NumShots.ToString() + " | Damage: " + e.Damage;
                }else if (s2 == "NEWTICK")
                {
                    NewTickPacket n = (NewTickPacket)packet;
                    s2 += " | TickID: " + n.TickId + " | TickTime:" + n.TickTime + " | Statuses length: " + n.Statuses.Count();
                }
                else if (s2 == "ESCAPE")
                {
                    s2 += " | Health at nexus: " + curClient.PlayerData.Health;
                }else if(s2 == "ALLYSHOOT")
                {
                    AllyShootPacket a = (AllyShootPacket)packet;
                    s2 += " | Radians: " + ConvertDECAtoRadians(a.Angle) + " | WeaponID: " + *****ntainerType.ToString() + " | Send by:" + a.OwnerId;
                }else if(s2 == "DAMAGE")
                {
                    DamagePacket d = (DamagePacket)packet;
                    s2 += " | Damage: " + d.Damage + " | Effect: " + d.Effects + " | Target: " + d.TargetId + " | Killed: " + d.Killed.ToString(); 
                }else if (s2 == "PLAYSOUND")
                {
                    PlaySoundPacket ps = (PlaySoundPacket)packet;
                    s2 += " | SoundID: " + ps.SoundId;
                }else if (s2 == "PLAYERHIT")
                {
                    PlayerHitPacket ph = (PlayerHitPacket)packet;
                    s2 += " | Hit by BID: " + ph.BulletId + " | PlayerhitOID:" + ph.ObjectId + " | Your objectID:" + curClient.ObjectId;
                }else if (s2 == "HELLO")
                {
                    HelloPacket h = (HelloPacket)packet;
                    s2 += " | GUID:" + h.GUID + " | Pass:" + h.Password + " | Random1:" + h.Random1 +" | " + h.Random2;
                }else if(s2 == "SHOWEFFECT")
                {
                    ShowEffectPacket s = (ShowEffectPacket)packet;
                    s2 += " | Color:" + s.Color.R + "," + s.Color.G + "," + s.Color.B + " | EffectType:" + (int)s.EffectType + " | TargetID:" + s.TargetId + " | Your ID:" + curClient.ObjectId;
                      ;
                   
                }else if (s2 == "INVSWAP")
                {
                    InvSwapPacket isp = (InvSwapPacket)packet;
                    s2 += " | Loc:" + isp.Position.X + "|" + isp.Position.Y + " | SlotIDS { SlotObject1:" + isp.SlotObject1.SlotId + " SlotObject2:" + isp.SlotObject2.SlotId + " } | ObjectID1:" + isp.SlotObject1.ObjectId + " | " + isp.SlotObject2.ObjectId;
                }
                return s2;
            }
    
            public static byte lastid;
            private static void onDebugMode(Client client, Packet packet)
            {
                string s2 = (packet.ToString().Split('(')[0]);
                if (s2 == "NAMERESULT")
                {
                    NameResultPacket cn = (NameResultPacket)packet;
                    cn.ErrorText = "";
                    cn.Success = true;
                   
                }
                
                if (s2 == "PLAYERSHOOT")
                {
                    PlayerShootPacket ps = (PlayerShootPacket)packet;
                    lastid = ps.BulletId;
                }
                if (blocklis*****ntains(s2.ToLower()))
                {
                    packet.Send = false;
                }
                if (debugging)
                {
                   
                    if (filterdbg == "")
                    {
                        
                        s2 = returnFixed(packet, s2);
                        Console.WriteLine(s2);
                    }
                    else
                    {
                        if(s2 == filterdbg)
                        {
                            s2 = returnFixed(packet, s2);
                            Console.WriteLine(s2);
                        }
                    }
                    
                   
                }
            }
            public static float ConvertDECAtoRadians(float Decadians)
            {
                if (Decadians < 0)
                {
                    return Decadians * -1f;
                }
                else
                {
                    return 2 * float.Parse(Math.PI.ToString()) - Decadians;
                    //x = xCenter + r * cos(theta)
                    //y = yCenter + r * sin(theta)
    
                }
            }
            public static float RadiansToDecadians(float Radians)
            {
                if (Radians < Math.PI)
                {
                    return Radians * -1f;
                }
                else
                {
                    return 2 * (float)Math.PI - Radians;
                    
    
                }
            }
        
            private static void onMapInfo(Client client, Packet packet)
            {
                try
                {
                    name.Clear();
                    accountID.Clear();
                    curClient = client;
                }
                catch
                {
    
                }
                
            }
    
            static bool isCommand(string s)
            {
                if (CustomCommands.customs.ToArray().Contains(s)){
                    CustomCommands.RunCustom(s, curClient);
                    return true;
                }
                else {
                    if (s == ("help") || s == ("customize")  || s == ("send") || s == ("changeserv") || s == ("debugmode") || s == "block" || s == "unblock" || s=="clearblock" || s =="opautonexus" || s == "freecam")
                    {
                        return true;
                    } }
                return false;
            }
            static bool debugging = false;
            static void runCommand(string s, string[] args)
            {
                if (s == "debugmode")
                {
                    if (!debugging)
                    {
                        Console.Title = "ConsoleKRelay - type debugmode and press enter to stop";
                        debugging = true;
                        Console.WriteLine("Debugging mode activated! \n");
                        try { 
                        if (args[0] !="")
                        {
                                filterdbg = args[0].ToUpper();
                            }else
                            {
                                Console.WriteLine("No filter found, will debug each packet");
                                filterdbg = "";
                            }
                        }
                        catch
                        {
                            Console.WriteLine("No filter found, will debug each packet");
                            filterdbg = "";
                        }
                    }
                    else { Console.Title = "ConsoleKRelay"; debugging = false; Console.WriteLine("Debugging mode deactivated!");filterdbg = ""; }
                }
                if (s == "help")
                {
                    if (args.Length < 1)
                    {
                        string sss = "";
                        foreach (string a in CustomCommands.customs)
                        {
                            sss += Environment.NewLine + a;
                        }
                        Console.WriteLine(@"ConsoleKRelay commands:
                                        
    help - Displays this message. 
    help <COMMAND> - Gives extra details about a command.
    
    freecam - Initiates freecam
    
    customize - Lists themes.
    customize <THEME> <SERVER> - Sets theme and default server. (Servers are case sensitive)
                                        
    send - Initializes packet sender
    
    block <PACKET> - Blocks certain packet (EG: block allyshoot (prevents lag)) (Not case sensitive)
    unblock <PACKET> - Unblock certain packet
    clearblock - Unblock each packet
                             
    debugmode - Toggle between debug mode. Debug mode prints each packet you get.
    
    opautonexus - Activates op autonexus. Made by tmwilliamlin168, updated by CrazyJani
    
    (ConsoleKRelay allows you to change your name to whatever you want, visit the golden statue)
    (no gold wasted for that ^, but also only you see it. Great for streamers)
    
    Custom commands ###########################################
    " + sss + Environment.NewLine);
    
    
                        return;
                    }
                    else
                    {
                        if (args[0] == "help") Console.WriteLine("Woah, that's like MetaHelp");
                        if (args[0] == "debugmode") Console.WriteLine("Displays the name of each packet you receive");
                        
                        if (args[0] == "customize") Console.WriteLine("Change default server and theme.");
                        if (args[0] == "send") Console.WriteLine("Initializes packet sender. Follow the instructions from there to create and send a packet.");
                        if (args[0] == "block") Console.WriteLine("Blocks a packet. Packet names are the same as in the packettype enum, but not case sensitive.");
                        if (args[0] == "unblock") Console.WriteLine("Unblocks a packet.");
                        if (args[0] == "opautonexus") Console.WriteLine("Loads OPAutonexus which is built-in consolekrelay.");
                        if (args[0] == "freecam") Console.WriteLine("Freecam mode. Move around without others seeing your position update");
                    }
    
    
                }
    
                else if (s == "send")
                {
                    try
                    {
                        Console.ForegroundColor = ConsoleColor.Cyan;
                        Console.WriteLine(@"Packet sender initialized!
    Select packet to send: (not case sensitive)
    PLAYERTEXT
    ESCAPE
    PLAYERSHOOT
    GOTO (to client) (auto ignore gotoack)");
                        string packetsend = Console.ReadLine();
                        if (packetsend.ToLower() == "playertext")
                        {
                            PlayerTextPacket ptp = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                            Console.WriteLine("Playertext packet created!");
                            Console.WriteLine("Insert text to send:");
                            ptp.Text = Console.ReadLine();
                            curClient.SendToServer(ptp);
                            Console.WriteLine("Packet send successfully!");
                            return;
                        }
                        else if (packetsend.ToLower() == "escape")
                        {
                            EscapePacket esc = (EscapePacket)Packet.Create(PacketType.ESCAPE);
                            Console.WriteLine("Escape packet created! Press enter to escape to the nexus.");
                            Console.ReadLine();
                            curClient.SendToServer(esc);
                            return; 
                        }
                        else if (packetsend.ToLower() == "playershoot")
                        {
                            PlayerShootPacket ps = (PlayerShootPacket)Packet.Create(PacketType.PLAYERSHOOT)
                            ;
                            Console.WriteLine("Angle in radians: (floating point: ',')")
                            ;
                            float rad = float.Parse(Console.ReadLine());
                            if (rad > Math.PI * 2 || rad < 0)
                            {
                                Console.WriteLine("Your angle must be in radians. Min: 0 - Max: pi * 2 (" + (Math.PI * 2).ToString() + ")");
                                Console.ForegroundColor = oldcolor;
                                return;
                            }
                            else
                            {
                                ps.Angle = RadiansToDecadians( rad);
                                ps.ContainerType = (short)curClient.PlayerData.Slot[0];
                                Console.WriteLine(curClient.PlayerData.Slot[0].ToString());
                                lastid++;
                                ps.BulletId = lastid;
                                ps.Position = curClient.PlayerData.Pos;
                                ps.Time = curClient.Time;
                                
                                curClient.SendToServer(ps);
                                
                                Console.WriteLine("Playershoot packet send!");
                            }
                        }else if (packetsend.ToLower() == "goto")
                        {
                            GotoPacket gotox = (GotoPacket)Packet.Create(PacketType.GOTO);
                            Console.WriteLine("Goto packet created!");
                            Console.WriteLine("Current position: " + curClient.PlayerData.Pos.X + "," + curClient.PlayerData.Pos.Y);
                            Console.WriteLine("New X,Y (format like current position):");
                            string temp = Console.ReadLine();
                            gotox.ObjectId = curClient.ObjectId;
                            gotox.Location = new Location(float.Parse(temp.Split(',')[0]), float.Parse(temp.Split(',')[1]));
                            runCommand("block", new string[] { "gotoack" });
                            curClient.SendToClient(gotox);
                            System.Threading.Thread.Sleep(200);
                            runCommand("unblock", new string[] { "gotoack" });
                            Console.WriteLine("Goto send successfully!");
                        }
    
                        else
                        {
                            Console.WriteLine("Invalid packet");
                        }
    
    
                        Console.ForegroundColor = oldcolor;
                    } catch (Exception ex)
                    {
                        Console.WriteLine("\n\nException occurred: \n\n\n\n " + ex.ToString());
                    }
                    return;
                }
    
                else if (s == "customize")
                {
                    if (args.Length < 2)
                    {
                        Console.WriteLine("Themes: \n Default \n Blue \n Pink \n Mustard");
    
                    }
                    else
                    {
                        string sssss = args[0] + "|" + args[1];
                        File.WriteAllText(PATH, sssss);
                        Console.WriteLine("New settings saved!");
                    }
                }else if (s == "freecam")
                {
                    if (!FreecamActive)
                    {
                        freezer = curClient.PlayerData.Pos;
                        FreecamActive = true;
                        
                        Console.WriteLine(" <O> Freecam activated!");
                    }else
                    {
                        
                        GotoPacket gotox = (GotoPacket)Packet.Create(PacketType.GOTO);
                        gotox.ObjectId = curClient.ObjectId;
                        gotox.Location = freezer;
                        runCommand("block", new string[] { "gotoack" });
                        curClient.SendToClient(gotox);
                        System.Threading.Thread.Sleep(500);
                        runCommand("unblock", new string[] { "gotoack" });
                        FreecamActive = false;
                        Console.WriteLine(" <O> Freecam deactivated!");
                    }
                    }
                    else if (s == "opautonexus")
                    {
                        if (_enabled)
                        {
                            _enabled = false;
                            Console.WriteLine("## Opautonexus disabled");
                            return;
                        }
                        else _enabled = true; Console.WriteLine("## Opautonexus enabled");
                    }
                    else if (s == "block")
                    {
                        blocklist.Add(args[0].ToLower());
                        Console.WriteLine("Now blocking " + args[0]);
                    }
                    else if (s == "unblock")
                    {
                        if (blocklis*****ntains(args[0].ToLower()))
                        {
                            blocklist.Remove(args[0].ToLower());
                            Console.WriteLine("Removed from blocking: " + args[0]);
                        }
                    }
                    else if (s == "clearblock")
                    {
                        blocklist.Clear();
                        Console.WriteLine("Cleared block list! Now not blocking any packets!");
                    }
            
            }
            
            static void LoadSettings()
            {
                try
                {
                    string[] s = File.ReadAllText(PATH).Split('|');
                    if (s[0] == "default") return;
                    if (s[0] == "blue") { Console.ForegroundColor = ConsoleColor.White; Console.BackgroundColor = ConsoleColor.Blue; }
                    if (s[0] == "pink") { Console.ForegroundColor = ConsoleColor.White; Console.BackgroundColor = ConsoleColor.DarkMagenta; }
                    if (s[0] == "mustard") { Console.ForegroundColor = ConsoleColor.DarkYellow; Console.BackgroundColor = ConsoleColor.Black; }
                    server = s[1];
                    oldcolor = Console.ForegroundColor;
                } catch(Exception ex)
                {
                    Console.Write("["); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("ConsoleKRelay"); Console.ForegroundColor = oldcolor; Console.Write("]");
    
                    Console.WriteLine("Exception occured while trying to load your settings! \n\n\n" + ex.ToString());
                }
            }
    
            static void OnUpdate(Client client, Packet packet)
            {
                UpdatePacket up = (UpdatePacket)packet;
                foreach (Entity entity in up.NewObjs)
                    if (armorPiercingBullets.ContainsKey(entity.ObjectType) && !objectTypeMap.ContainsKey(entity.Status.ObjectId))
                        objectTypeMap.Add(entity.Status.ObjectId, entity.ObjectType);
            }
    
           static void OnDisconnect(Client client)
            {
                bulletMap.Clear();
                objectTypeMap.Clear();
            }
    
           static void OnNT(Client client, Packet packet)
            {
                //Update health vitality
                health += (int)(0.2 + client.PlayerData.Vitality * 0.024);
                NewTickPacket ntPacket = packet as NewTickPacket;
                foreach (Status status in ntPacket.Statuses)
                    if (status.ObjectId == client.ObjectId && !b)
                        foreach (StatData stat in status.Data)
                            if (stat.Id == StatsType.HP)
                                health = stat.IntValue;
                b = false;
            }
    
         
    
           static void OnPlayerHit(Client client, Packet packet)
            {
                b = true;
                PlayerHitPacket phPacket = packet as PlayerHitPacket;
                int originalDamage = 0;
                int bulletType = -1;
                foreach (Bullet bullet in bulletMap[phPacket.ObjectId])
                {
                    if (bullet.id == phPacket.BulletId)
                    {
                        originalDamage = bullet.damage;
                        bulletType = bullet.type;
                    }
                }
                int damageEstimate = getDamageEstimate(originalDamage, client.PlayerData.Defense);
                //See if armor piercing or not
                if (objectTypeMap.ContainsKey(phPacket.ObjectId))
                    if (armorPiercingBullets[objectTypeMap[phPacket.ObjectId]].Contains(bulletType))
                        damageEstimate = originalDamage;
                health -= damageEstimate;
                if (health < 0.1 * client.PlayerData.MaxHealth && _enabled)
                {
                    packet.Send = false;
                    client.SendToServer(Packet.Create(PacketType.ESCAPE));
                    Console.WriteLine("## OPAutoNexus saved you at " + health + " health");
                }
            }
    
           static void OnShoot(Client client, Packet packet)
            {
                EnemyShootPacket sPacket = (EnemyShootPacket)packet;
                for (int i = 0; i < sPacket.NumShots; i++)
                    if (bulletMap.ContainsKey(sPacket.OwnerId))
                        bulletMap[sPacket.OwnerId].Add(new Bullet { id = sPacket.BulletId + i, type = sPacket.BulletType, damage = sPacket.Damage });
                    else
                        bulletMap[sPacket.OwnerId] = new List<Bullet> { new Bullet { id = sPacket.BulletId + i, type = sPacket.BulletType, damage = sPacket.Damage } };
            }
    
           static void OnShoot2(Client client, Packet packet)
            { 
                ServerPlayerShootPacket sPacket = (ServerPlayerShootPacket)packet;
                if (bulletMap.ContainsKey(sPacket.OwnerId))
                    bulletMap[sPacket.OwnerId].Add(new Bullet { id = sPacket.BulletId, type = -1, damage = sPacket.Damage });
                else
                    bulletMap[sPacket.OwnerId] = new List<Bullet> { new Bullet { id = sPacket.BulletId, type = -1, damage = sPacket.Damage } };
            } 
    
            static void OnAOE(Client client, Packet packet)
            {
                AoEPacket aoePacket = (AoEPacket)packet;
                if (client.PlayerData.Pos.DistanceSquaredTo(aoePacket.Location) <= aoePacket.Radius * aoePacket.Radius)
                {
                    b = true;
                    health -= getDamageEstimate(aoePacket.Damage, client.PlayerData.Defense);
                    if (health < 0.1f * client.PlayerData.MaxHealth && _enabled)
                    {
                        aoePacket.Send = false;
                        client.SendToServer(Packet.Create(PacketType.ESCAPE));
                        Console.WriteLine("AutoNexus saved you at " + health + " health");
                    }
                }
            }
    
            static public int getDamageEstimate(int baseDamage, int defense)
            {
                int damage = baseDamage - defense;
                if (damage < 0.15 * baseDamage)
                    damage = (int)(0.15 * baseDamage);
                return damage;
            }
    
    
               
        }
        public class Bullet
        {
            // Token: 0x04000001 RID: 1
            public int id;
    
            // Token: 0x04000002 RID: 2
            public int type;
    
            // Token: 0x04000003 RID: 3
            public int damage;
        }
    }

    LoadPacketz.cs
    Code:
    using System;
    using System.Linq;
    using Lib_K_Relay.Networking.Packets;
    using Lib_K_Relay.GameData;
    using System.Collections.Generic;
    
    namespace ConsoleKRelay
    {
    
        class LoadPacketz
    
        {
            public static List<string> packets = new List<string>();
            public static List<string> strucPackets = new List<string>();
            private void InitPackets()
            {
               
                    foreach (PacketType type in Enum.GetValues(typeof(PacketType)).Cast<PacketType>())
                        packets.Add(type.ToString());
                
            }
    
            public static string moreInfo(int packetIndex)
            {
                Type type = GameData.Packets.ByName((string)packets.ElementAt(packetIndex)).Type;
                return (Activator.CreateInstance(type) as Packet).ToStructure();
            }
                
                  
            }
        }
    CustomCommands.cs
    Code:
    using Lib_K_Relay.GameData;
    using Lib_K_Relay.Networking;
    using Lib_K_Relay.Networking.Packets;
    using Lib_K_Relay.Networking.Packets.Client;
    using Lib_K_Relay.Networking.Packets.Server;
    using Lib_K_Relay.Utilities;
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System****;
    using System.Linq;
    using System.Net;
    using System.Net.Sockets;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System.Security.Cryptography;
    
    namespace ConsoleKRelay
    {
        class CustomCommands
        {
            static bool showESP = false;
            static bool allah;
            private static TcpClient _serverconnection;
            public static List<string> customs = new List<string>();
            public static void LoadCommandsC()
            {
                customs.Add("logoprint");
                customs.Add("anhero");
                customs.Add("clear");
                customs.Add("restart");
                customs.Add("allah");
                customs.Add("bulletesp");
            }
            public static void RunCustom(string command,Client client)
            {
                try {
    
    
                    if (command == "anhero")
                    {
                        DeathPacket death = (DeathPacket)Packet.Create(PacketType.DEATH);
                        death.KilledBy = " god.";
                        death.AccountId = client.PlayerData.AccountId;
                        death.CharId = (int)Classes****gue;
                        death.ZombieId = -1;
                        death.ZombieType = -1;
                        client.SendToClient(death);
                        Console.WriteLine("He was an hero :(");
                        Console.WriteLine("You are not dead. Restart client.");
                    }
                    else if (command == "logoprint")
                    {
                        logoprint(client);
                    }
                    else if (command == "clear") { clear(); }
                    else if (command == "restart")
                    {
                        try { Process.Start(Directory.GetCurrentDirectory() + "/ConsoleKRelay.exe"); System.Threading.Thread.Sleep(200); Environment.Exit(0); } catch { Console.WriteLine("Rename of consoleKRelay detected! How dare you! We can't restart like this.."); return; }
    
    
                    }
                    else if (command == "allah")
                    {
                        if (!allah)
                        {
                            allah = true;
                            Console.WriteLine("Weapon id to shoot with: (blank for own weapon)");
                            string temp = Console.ReadLine();
                            short container = 3074;
                            if (temp == "")
                            {
                                container = (short)client.PlayerData.Slot[0];
                            }
                            else
                            {
                                try
                                {
                                    container = short.Parse(temp);
                                }
                                catch
                                {
                                    Console.WriteLine("Invalid input.. If you did hexadecimal, try decimal format. \nWill use doom bow.");
                                    container = 3074;
                                }
                            }
                            i = 0; int j = 0;
                            float ang = 0.1f;
                            (new Thread(() =>
                            {
                                Random rand = new Random();
                                do
                                {
                                    AllyShootPacket ally = (AllyShootPacket)Packet.Create(PacketType.ALLYSHOOT);
                                    TextPacket tp = (TextPacket)Packet.Create(PacketType.TEXT);
                                    ally.Angle = Program.RadiansToDecadians(ang);
                                    ang += 0.1f;
                                    if (ang > 6.27f)
                                    {
                                        ang = 0.1f;
                                    }
                                    ally.BulletId = (byte)j;
                                    i++;
                                    j++;
                                    if (j == byte.MaxValue)
                                    {
                                        j = 0;
                                    }
    
                                    ShowEffectPacket show = (ShowEffectPacket)Packet.Create(PacketType.SHOWEFFECT);
                                    show.PosA = new Lib_K_Relay.Networking.Packets.DataObjects.Location((float)(client.PlayerData.Pos.X + 5 * Math.Cos(ang)), (float)(client.PlayerData.Pos.Y + 5 * Math.Sin(ang)));
                                    show.PosB = client.PlayerData.Pos;
                                    show.EffectType = EffectType.Throw;
                                    show.Color = new ARGB(255, 255, 0, 157);
                                    show.TargetId = client.ObjectId;
                                    ally.ContainerType = container;
                                    ally.OwnerId = client.ObjectId;
    
                                    client.SendToClient(ally);
                                    client.SendToClient(show);
                                    System.Threading.Thread.Sleep(15);
                                } while (allah && Program.curClien*****nnected);
                                Console.WriteLine(i.ToString() + " shots sent.");
                            })).Start();
                        }
                        else
                        {
                            allah = false;
                            Console.WriteLine("Deactivated :(");
                        }
    
                    } else if (command == "bulletesp")
                    {
                        onESPCOM(Program.curClient, "", new string[] { });
                    }
                    
                    //Add more commands here with following the pattern (add it in loadcommandsc as well)
    
    
    
    
                }
                catch (Exception ex) { Console.WriteLine("###########" + Environment.NewLine + ex.ToString() + "###########"); }
               
            }
            static uint i;
            private static void clear()
            {
    
                Console.Clear();
               
            }
    
            static void logoprint(Client client) 
            {
                Console.WriteLine("Hooray for ConsoleKRelay");
                ascii(client);
                
            }
            static async void ascii(Client client)
            {
                PlayerTextPacket ptp = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                ptp.Text = "__________[_][=][X]";
                client.SendToServer(ptp);
                await Task.Delay(650);
                PlayerTextPacket ptp1 = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                ptp1.Text = "|Console------------|";
                client.SendToServer(ptp1);
                await Task.Delay(650);
                PlayerTextPacket ptp2 = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                ptp2.Text = "|----------KRelay---|";
                client.SendToServer(ptp2);
                await Task.Delay(650);
                PlayerTextPacket ptp3 = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                ptp3.Text = "|_______________|";
                client.SendToServer(ptp3);
                await Task.Delay(650);
            }
            private static void onESPCOM(Client client, string command, string[] args)
            {
                if (!showESP)
                {
    
    
                    showESP = true;
                    Console.WriteLine("\n\n\nESP activated. Please activate particles on client\n\n\n");
                }
                else
                {
                    showESP = false;
                    Console.WriteLine("ESP de-activated.");
                }
            }
    
            public static void onEnemyShoot(Client client, Packet packet)
            {
                if (showESP)
                {
                    EnemyShootPacket es = (EnemyShootPacket)packet;
                    double distance = Math.Sqrt(Math.Pow((Math****und(es.Location.X - client.PlayerData.Pos.X)), 2) + Math.Pow((Math****und(es.Location.Y - client.PlayerData.Pos.Y)), 2));
                    if (distance >= 10)
                    {
    
                        return;
                    }
                    if (es.NumShots > 1)
                    {
                        int i = 0;
    
                        do
                        {
    
                            ShowEffectPacket sep = (ShowEffectPacket)Packet.Create(PacketType.SHOWEFFECT);
    
                            sep.Color = randomColor(es.Damage);
                            sep.EffectType = EffectType.Stream;
                            sep.PosA = es.Location;
    
                            float newX = es.Location.X + 35f * (float)Math.Cos(RadiansToDecadians(es.Angle + es.AngleInc * i));
                            float newY = es.Location.Y - 35f * (float)Math.Sin(RadiansToDecadians(es.Angle + es.AngleInc * i));
                            sep.PosB = new Lib_K_Relay.Networking.Packets.DataObjects.Location(newX, newY);
                            sep.TargetId = es.OwnerId;
                            client.SendToClient(sep);
                            i++;
                        } while (i < es.NumShots);
                    }
                    else
                    {
                        ShowEffectPacket sep = (ShowEffectPacket)Packet.Create(PacketType.SHOWEFFECT);
    
                        sep.Color = randomColor(es.Damage);
                        sep.EffectType = EffectType.Stream;
                        sep.PosA = es.Location;
    
                        float newX = es.Location.X + 35f * (float)Math.Cos(RadiansToDecadians(es.Angle));
                        float newY = es.Location.Y - 35f * (float)Math.Sin(RadiansToDecadians(es.Angle));
                        sep.PosB = new Lib_K_Relay.Networking.Packets.DataObjects.Location(newX, newY);
                        sep.TargetId = es.OwnerId;
                        client.SendToClient(sep);
                    }
    
                }
            }
            public static float RadiansToDecadians(float Radians)
            {
                if (Radians < Math.PI)
                {
                    return Radians * -1f;
                }
                else
                {
                    return 2 * (float)Math.PI - Radians;
                }
            }
    
            public static ARGB randomColor(int damage)
            {
                return new ARGB(255, 0, 0, 255); 
            }
            
            
        }
    
    
       
    }
    You can add more console commands to the customcommands class.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  15. The Following 2 Users Say Thank You to New For This Useful Post:

    jsomhint.h (01-29-2017),toddddd (02-10-2017)

  16. #13
    JoeyPackedA9's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    1
    i used block notification command and its still saying "welcome to krelay". i tried using command then x-ing out and reopening, no change. how do i get the "welcome to krelay" to go away?
    Also im wondering how reliable the opautonexus is, the autonexus on normal krelay uses its mapcacher plugin and i think that makes it more accurate, not sure on that... but if i were to run into 2 200 damage shots with 210 health, can i count on being nexused or should i go back to normal krelay?

Similar Threads

  1. [Release] Vbmstrs v2.0 hack *Updated for xmas day!*
    By vbmstr in forum WarRock - International Hacks
    Replies: 36
    Last Post: 02-05-2009, 09:41 AM
  2. merry xmas
    By xDustie in forum General
    Replies: 2
    Last Post: 12-24-2008, 08:58 PM
  3. new map for xmas?
    By shishishishi in forum Combat Arms Hacks & Cheats
    Replies: 10
    Last Post: 12-18-2008, 03:03 AM
  4. Xmas sig
    By MrVader in forum Showroom
    Replies: 14
    Last Post: 12-17-2008, 08:20 AM
  5. exchange item bug ;), green chest,xmas event etc : KOL
    By AN1MAL in forum General Game Hacking
    Replies: 0
    Last Post: 12-26-2006, 05:43 AM