public static IntPtr PointRead(IntPtr baseAddres, int[] offsets)
            {
                VAMemory vam = new VAMemory(Process.GetProcessesByName("Lords Mobile").FirstOrDefault());

                for (int i = 0; i < offsets.Count() - 1; i++)
                {
                    baseAddres = (IntPtr)vam.ReadInt64(IntPtr.Add(baseAddres, offsets[i]));
                }
                return(baseAddres + offsets[offsets.Count() - 1]);
            }
Ejemplo n.º 2
0
        public static IntPtr PointRead(IntPtr baseAddres, int[] offsets)
        {
            VAMemory vam = new VAMemory(LordsMobileAPI.Settings.GetProcess);

            for (int i = 0; i < offsets.Count() - 1; i++)
            {
                baseAddres = (IntPtr)vam.ReadInt64(IntPtr.Add(baseAddres, offsets[i]));
            }
            return(baseAddres + offsets[offsets.Count() - 1]);
        }
Ejemplo n.º 3
0
        public static void ToggleThunder()
        {
            //Scan for 128 when thundering and 0 when not
            //63 on and 0 off also works  on == trident shoots lightning
            //63 rain animation also exists  0 would be off. 62 for a very short second in between?
            //128 and 0 also has a weather animation
            //03656F68 798 48 28 E0 138


            int staticPointerOffset = 0x03656F68;

            int[] offsets = new int[] { 0x798, 0x48, 0x28, 0xE0, 0x138 };

            while (true)
            {
                // var pointer = FindPointer(baseAddress, staticPointerOffset, offsets);
                var pointer = new IntPtr(0x1792582093A);
                var value   = vam.ReadInt64(pointer);
                Console.WriteLine(value);
            }
        }
Ejemplo n.º 4
0
        private void InjectResolution(int targetWidth, int targetHeight)
        {
            Process[] processes = Process.GetProcessesByName("DEEMO -Reborn-");

            if (processes.Length > 0)
            {
                IntPtr BaseAddress = GetModuleBaseAddress(processes[0], "UnityPlayer.dll");

                if (BaseAddress != IntPtr.Zero)
                {
                    var ResWidthOffsets  = new int[] { 0xD8, 0x28, 0x0, 0x194 };
                    var ResHeightOffsets = new int[] { 0xE0, 0x18, 0x10, 0xC8 };

                    VAMemory vam = new VAMemory("DEEMO -Reborn-");

                    var ResolutionWidthBaseAddr  = vam.ReadInt64((IntPtr)BaseAddress + 0x01604030);
                    var ResolutionHeightBaseAddr = vam.ReadInt64((IntPtr)BaseAddress + 0x01604030);

                    var widthBuffer  = vam.ReadInt64((IntPtr)(ResolutionWidthBaseAddr + ResWidthOffsets[0]));
                    var heightBuffer = vam.ReadInt64((IntPtr)(ResolutionHeightBaseAddr + ResHeightOffsets[0]));

                    for (int offset = 1; offset < ResWidthOffsets.Length - 1; offset++)
                    {
                        widthBuffer  = vam.ReadInt64((IntPtr)(widthBuffer + ResWidthOffsets[offset]));
                        heightBuffer = vam.ReadInt64((IntPtr)(heightBuffer + ResHeightOffsets[offset]));
                    }

                    IntPtr ResolutionWidth  = (IntPtr)(widthBuffer + ResWidthOffsets[ResWidthOffsets.Length - 1]);
                    IntPtr ResolutionHeight = (IntPtr)(heightBuffer + ResHeightOffsets[ResHeightOffsets.Length - 1]);

                    vam.WriteInt32(ResolutionWidth, targetWidth);
                    vam.WriteInt32(ResolutionHeight, targetHeight);
                }
            }
        }
Ejemplo n.º 5
0
        public static IntPtr FindPointer(IntPtr applicationBaseAddress, int baseAddressOffset, int[] offsets)
        {
            //Get the start address by adding the static offset to the base minecraft memory adress
            var pointer = IntPtr.Add(applicationBaseAddress, baseAddressOffset);

            //Read the first value
            pointer = (IntPtr)vam.ReadInt64(pointer);

            //Itterate through the offsets and add them to the values read to get the next one
            for (int x = 0; x < offsets.Count(); x++)
            {
                var offset = offsets[x];
                pointer = IntPtr.Add(pointer, offset);

                //Only set this if its not the last offset. the last offset is the value we are looking to manipulate
                if (x != offsets.Count() - 1)
                {
                    pointer = (IntPtr)vam.ReadInt64(pointer);
                }
            }
            return(pointer);
        }
        private void UpdateDeathCounterLabel(object myObject, EventArgs myEventArgs)
        {
            UpdateDeathCounter_Timer.Stop();
            UpdateDeathCounter_Timer.Interval = 2000;
            if (currentGameID != -1 && Process.GetProcessesByName(currentGame[currentGameID]).FirstOrDefault() != null)
            {
                IntPtr BaseOffseted = Base;
                for (short i = 0; i < max_offsets; i++)
                {
                    if (currentGameOffset[currentGameID, i] != 0)
                    {
                        if (!NativeMethods.IsWin64Emulator(Process.GetProcessesByName(currentGame[currentGameID]).FirstOrDefault()))
                        {
                            BaseOffseted = (IntPtr)vam.ReadInt64(BaseOffseted) + currentGameOffset[currentGameID, i];
                        }
                        else
                        {
                            BaseOffseted = (IntPtr)vam.ReadInt32(BaseOffseted) + currentGameOffset[currentGameID, i];
                        }
                    }
                    else
                    {
                        break;
                    }
                }

                var deathCount = ((IntPtr)vam.ReadInt32(BaseOffseted)).ToString();

                if (currentDeathCount != int.Parse(deathCount))
                {
                    this.DeathCounter_Label.BeginInvoke((MethodInvoker) delegate() { this.DeathCounter_Label.Text = deathCount; });
                    File.WriteAllText(Directory.GetCurrentDirectory() + "\\deaths.txt", deathCount);
                    currentDeathCount = int.Parse(deathCount);
                    Focus();
                    Refresh();
                    Update();
                }
            }
            else
            {
                currentDeathCount = 0;
                this.DeathCounter_Label.BeginInvoke((MethodInvoker) delegate() { this.DeathCounter_Label.Text = "..."; });
                File.WriteAllText(Directory.GetCurrentDirectory() + "\\deaths.txt", "0");
                DetectGame();
            }

            UpdateDeathCounter_Timer.Start();
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            Chroma.Instance.Keyboard.SetAll(Color.Black);
            Console.WriteLine("");
            Console.ForegroundColor = ConsoleColor.Cyan;
            VAMemory mem = new VAMemory("starwarsbattlefront");

            ColorManager.CRenderer CR = new CRenderer();

            for (;;)
            {
                Int64 pGameContext     = mem.ReadInt64((IntPtr)(0x142AE8080));
                Int64 pPlayerManager   = mem.ReadInt64((IntPtr)(pGameContext + 0x68));
                Int64 pLocalPlayer     = mem.ReadInt64((IntPtr)(pPlayerManager + 0x550));
                Int64 pLocalSoldier    = mem.ReadInt64((IntPtr)(pLocalPlayer + 0x2cb8));
                Int64 pHealthComponent = mem.ReadInt64((IntPtr)(pLocalSoldier + 0x198));
                float pHealth          = mem.ReadFloat((IntPtr)(pHealthComponent + 0x20));
                float pHealthMax       = mem.ReadFloat((IntPtr)(pHealthComponent + 0x24));
                int   health           = (int)((pHealth / pHealthMax) * 100);



                Int64 pAimer   = mem.ReadInt64((IntPtr)(pLocalSoldier + 0x5e0));
                Int64 pWeap    = mem.ReadInt64((IntPtr)(pAimer + 0x1b8));
                Int64 pPrimary = mem.ReadInt64((IntPtr)(pWeap + 0x5130));
                float Heat     = mem.ReadFloat((IntPtr)(pPrimary + 0x1c8));
                int   heat     = (int)(100 - (Heat * 100));
                // Console.WriteLine(heat);
                CR.DrawHeat(health, true);
                //  Console.WriteLine(pHealthMax);

                /*if (GetAsyncKeyState(Keys.Up)) health += 5;
                 * if (GetAsyncKeyState(Keys.Down)) health -= 5;
                 * if (health > 100) health = 100;
                 * if (health < 0) health = 0;*/
                CR.DrawHealth(heat, true);
                Thread.Sleep(100);
            }
        }
Ejemplo n.º 8
0
 public long ReadInt64(long offsets)
 {
     return(vam.ReadInt64((IntPtr)offsets));
 }
Ejemplo n.º 9
0
        public void setupAddresses()
        {
            BaseX = BaseY = BaseZ = BaseMX = BaseMY = BaseMZ = BaseSX = BaseSY = BaseSZ = BaseAX = BaseAY = BaseArmsRotY = GameProcess.MainModule.BaseAddress + 0x0290B008;

            for (int i = 0; i < 5; i++)
            {
                BaseX        = IntPtr.Add((IntPtr)vam.ReadInt64(BaseX), valXOff[i]);
                BaseY        = IntPtr.Add((IntPtr)vam.ReadInt64(BaseY), valYOff[i]);
                BaseZ        = IntPtr.Add((IntPtr)vam.ReadInt64(BaseZ), valZOff[i]);
                BaseMX       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseMX), valMXOff[i]);
                BaseMY       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseMY), valMYOff[i]);
                BaseMZ       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseMZ), valMZOff[i]);
                BaseSX       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseSX), valSXOff[i]);
                BaseSY       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseSY), valSYOff[i]);
                BaseSZ       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseSZ), valSZOff[i]);
                BaseAX       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseAX), valAXOff[i]);
                BaseAY       = IntPtr.Add((IntPtr)vam.ReadInt64(BaseAY), valAYOff[i]);
                BaseArmsRotY = IntPtr.Add((IntPtr)vam.ReadInt64(BaseArmsRotY), valArmsRotYOff[i]);
            }
        }