Download Dead Frontier Radar

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
Hi,

I started game hacking a week ago. Watching fleep's aimbot tutorial in c# for Assault Cube helped me alot getting started.

The game I was focusing on after Assault Cube is called Dead Frontier, a 2D zombie MMO. I decided to build a radar as my first real project.
After about 1 week of trial and error using Cheat Engine and C# I finally managed to build a basic external radar.
This radar is not perfect to be honest. Maybe you can figure out what's wrong with it. Could be an unrealiable enemy player list base address!? Any help is appreciated!

This is my basic radar: :eek:


Addresses:


The 38 is the player offset.
EC holds. the y coordinate
E4 holds the x coordinate.

Sources:

ProcessList
C#:
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms;

namespace DFRadar
{
    public partial class frmProcessList : Form
    {
        public frmProcessList()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            SelectProcess();
        }

        private void SelectProcess()
        {
            this.Hide();
            frmRadar radarForm = new frmRadar();
            radarForm.ShowRadar((Process)dgvProcesses.SelectedRows[0].Tag);
        }

        private void FillProcessList()
        {
            Process[] processes = Process.GetProcesses();
            foreach (var curProcess in processes)
            {
                var index = dgvProcesses.Rows.Add();
                dgvProcesses.Rows[index].Cells[0].Value = curProcess.ProcessName;
                dgvProcesses.Rows[index].Cells[1].Value = Convert.ToString(curProcess.Id);
                dgvProcesses.Rows[index].Tag = curProcess;
            }
            dgvProcesses.Sort(this.dgvProcesses.Columns["colName"], ListSortDirection.Ascending);
        }

        private void cbProcesses_DropDown(object sender, EventArgs e)
        {
            FillProcessList();
        }

        private void frmProcessList_Load(object sender, EventArgs e)
        {
            FillProcessList();
        }

        private void dgvProcesses_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            SelectProcess();
        }
    }
}
Radar:
C#:
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;

namespace DFRadar
{
    public partial class frmRadar : Form
    {
        ProcessMemoryManager _memMgr = new ProcessMemoryManager();
        List<int> _bestEntities = new List<int>(new int[] { });

        public frmRadar()
        {
            InitializeComponent();
        }

        public void DrawPoint(float x, float y)
        {
            float xPlayer;
            float yPlayer;
            GetPlayerCoords(out xPlayer, out yPlayer);

            //center it
            x = xPlayer - x;
            y = yPlayer - y;

            //scale up
            x = x * 5;
            y = y * 5;

            //make it move in the right direction
            x = x * -1;
            y = y * -1;

            //center it
            x = (picRadar.Width / 2) + x;
            y = (picRadar.Height / 2) + y;


            Graphics g = Graphics.FromHwnd(picRadar.Handle);
            SolidBrush brush;
            brush = new SolidBrush(Color.Red);
            Point dPoint = new Point(Convert.ToInt32(x), (picRadar.Height - Convert.ToInt32(y)));
            dPoint.X = dPoint.X - 2;
            dPoint.Y = dPoint.Y - 2;
            Rectangle rect;
            rect = new Rectangle(dPoint, new Size(4, 4));
            g.FillRectangle(brush, rect);
            g.Dispose();
        }

        /// <summary>
        /// We want to get the best entity base. This Method find the entity base with the most valid player coordinates in it. 
        /// This entity base will be used by the radar.
        /// </summary>
        private void GetBestEntityBase()
        {
            try
            {
                Dictionary<int, int> dictEntities = new Dictionary<int, int>();

                for (int j = 0; j < 310; j++)
                {
                    int numValidEntities = 0;

                    for (int i = 0; i < 256; i++)
                    {
                        int enemyX = _memMgr.ReadMemory(0xCE2CC4, "", new int[] { 0x8, j * 4, i * 4, 0x28C, 0xE4 });
                        int enemyY = _memMgr.ReadMemory(0xCE2CC4, "", new int[] { 0x8, j * 4, i * 4, 0x28C, 0xEC });

                        if (enemyX > 0 && enemyY > 0)
                        {
                            float enemyXVal = _memMgr.ReadFloat(enemyX);
                            float enemyYVal = _memMgr.ReadFloat(enemyY);
                            if (enemyXVal < 70000.0F && enemyYVal < 70000.0F && enemyXVal > 0.1F && enemyYVal > 0.1F)
                            {
                                numValidEntities++;
                            }
                        }
                    }

                    if (dictEntities.ContainsKey((j * 4)))
                    {
                        dictEntities[j * 4] += numValidEntities;
                    }
                    else
                    {
                        dictEntities.Add((j * 4), numValidEntities);
                    }
                }

                var results = (from entry in dictEntities orderby entry.Value descending select entry).Take(1);

                foreach (var item in results)
                {
                    _bestEntities.Add(item.Key);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        public void ShowRadar(Process process)
        {
            this.Show();
            _memMgr.OpenProcess(process);
            GetBestEntityBase();
            if (_bestEntities.Count > 0)
            {
                tmrReadMemory.Start();
            }
            else
            {
                MessageBox.Show("Radar initialization error.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void tmrReadMemory_Tick(object sender, EventArgs e)
        {
            picRadar.Refresh();
            DrawAllEntities();
        }

        private void GetPlayerCoords(out float x, out float y)
        {
            int xAddrs = _memMgr.ReadMemory(0x008602E4, "DeadFrontier.exe", new int[] { 0x620, 0x3B0, 0x72C, 0x200, 0xA8 });
            int yAddrs = _memMgr.ReadMemory(0x008602E4, "DeadFrontier.exe", new int[] { 0x620, 0x3B0, 0x72C, 0x200, 0xAC });
            x = _memMgr.ReadFloat(xAddrs);
            y = _memMgr.ReadFloat(yAddrs);
        }

        private void DrawAllEntities()
        {
            try
            {
                foreach (var curBaseEntity in _bestEntities)
                {
                    for (int i = 0; i < 4000; i++)
                    {
                        int enemyX = _memMgr.ReadMemory(0xCE2CC4, "", new int[] { 0x8, curBaseEntity, i * 4, 0x28C, 0xE4 });
                        int enemyY = _memMgr.ReadMemory(0xCE2CC4, "", new int[] { 0x8, curBaseEntity, i * 4, 0x28C, 0xEC });

                        if (enemyX > 0 && enemyY > 0)
                        {
                            float enemyXVal = _memMgr.ReadFloat(enemyX);
                            float enemyYVal = _memMgr.ReadFloat(enemyY);
                            if (enemyXVal < 70000.0F && enemyYVal < 70000.0F && enemyXVal > 0.1F && enemyYVal > 0.1F)
                            {
                                DrawPoint(enemyXVal, enemyYVal);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                
            }
        }

        private void frmRadar_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
    }
}


If you have any questions, let me know.
 

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
Nice work, you should put more effort into the GUI, seeing as you're working in C# you have easy access to modify the layout/theme.
Also you said its not perfect, can you expand on whats wrong with it?
 

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
The player list address "1F8" is not realiable. Sometimes enemies are not visible on the radar but are clearly visible inside the game. I don't know why.
This is why I wrote the method GetBestEntityBase() which loops through the possible player arrays and looks for valid coordinates. The radar then uses the base address with the most valid coordinates in it. Its better than relying on the 1F8 address alone but its still not perfect. There are still people disappearing from the radar.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,105
78,998
2,374
great project ranseier, welcome to GH!
 

Al1

Newbie
Full Member
Jun 11, 2014
16
164
0
what if i say, "how to use it" :/ just injecting the codes with cheat engine?
 

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
guys, I am still struggling with the enemy array. sometimes enemies disappear from the pointer i have found the enemy coordinates in.
I am facing the same problem with another MMO.

does it mean I have to do the pointer scan more often to find a better pointer?

I am about to try the AOB sig scan but the guys here https://forum.cheatengine.org/viewtopic.php?t=584634 tell me that its not suited for finding an array of players.

any advice?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,105
78,998
2,374
Focus on finding a new pointer to a player array. Also can't you decompile the game because it's unity and find out how the game logic works?
 

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
Decompiling it isn't that easy since this game is protected/obfuscated.

Is there a trick using CE in online games/MMOs? I am still using the pointer scanner but it takes a while to find pointers and then it turns out they are unstable. Is there a better way finding structures that contain all enemies?

Maybe I have to upgrade my PC to perform faster pointer scans!?
 

Al1

Newbie
Full Member
Jun 11, 2014
16
164
0
can someone send me the compiled file? i am suking at c# . it gives me lots of errors.
 

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
can someone send me the compiled file? i am suking at c# . it gives me lots of errors.
I will release an exe when the radar is finished. right now the radar has the problem that it doesn't show all players/zombies sometimes. and its ugly :)

The problem is, that I don't have a realiable player list pointer. Any help is appreciated.
 

ranseier

Jr.Coder
Full Member
Nobleman
Sep 26, 2015
53
303
3
Dunno exactly. I just had trouble using the "dissect mono" feature of CE. It showed obfuscated parts of the assembly.
But I will try a complely new approach using Fleeps C++ Mid Function Hooking/Codecaving Tutorial.

I will posts results, when I have something to show.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods