Beispiel #1
0
        private void btn_ToggleWallClimb_Click(object sender, EventArgs e)
        {
            Hack wallClimb = HookWardenMemScan.GetHack("WallClimbPatch");

            //setup wall climb patch if unknown to us
            if (wallClimb == null)
            {
                float wc             = 0.5f;
                var   wallClimbPatch = new Hack(ZzukBot.Constants.Offsets.Hacks.Wallclimb, BitConverter.GetBytes(wc), "WallClimbPatch");
                HookWardenMemScan.AddHack(wallClimbPatch);

                wallClimb = HookWardenMemScan.GetHack("WallClimbPatch");
            }

            #region toggle wall climb
            if (!wallClimb.IsActivated)
            {
                wallClimb.Apply();
                return;
            }


            wallClimb.Remove();
            #endregion
        }
Beispiel #2
0
        private DirectX()
        {
            Console.WriteLine("DirectX applied");
            var vTable = GetEndScene.Instance.ToVTablePointer();

            _endSceneOriginal = Memory.Reader.RegisterDelegate <Direct3D9EndScene>(vTable.ReadAs <IntPtr>());
            _endSceneDetour   = new Direct3D9EndScene(EndSceneHook);

            var addrToDetour = Marshal.GetFunctionPointerForDelegate(_endSceneDetour);

            _mtId = Process.GetCurrentProcess().Threads[0].Id;

            var directXvTableHook = new Hack(vTable, BitConverter.GetBytes((int)addrToDetour), "DirectXVTableHook");

            HookWardenMemScan.AddHack(directXvTableHook);
            directXvTableHook.Apply();
        }
Beispiel #3
0
        internal void CtmAreWeStuck(CtmAction e)
        {
            var parType     = e.Type;
            var parPosition = e.Position;

            switch (parType)
            {
            case Enums.CtmType.Move:
                if (Calc.Distance3D(oldPosition, parPosition) > 0.1f)
                {
                    oldPosition       = parPosition;
                    StuckAtPointSince = Environment.TickCount;
                    diffToPoint       = Calc.Distance3D(ObjectManager.Player.Position, parPosition);
                    Col.Remove();
                    Col3.Remove();
                }
                else
                {
                    var newDiffToPoint = Calc.Distance3D(ObjectManager.Player.Position, parPosition);
                    if (Math.Abs(newDiffToPoint - diffToPoint) > 1.5f || newDiffToPoint < 1.3f)
                    {
                        diffToPoint       = newDiffToPoint;
                        StuckAtPointSince = Environment.TickCount;
                    }
                    else if (Environment.TickCount - StuckAtPointSince > 3000)
                    {
                        Col.Apply();
                        Col3.Apply();
                    }

                    CheckForStuck();
                }
                break;

            case Enums.CtmType.None:
            case Enums.CtmType.Idle:
                StuckAtPointSince = Environment.TickCount;
                oldPosition       = new XYZ(0, 0, 0);
                Col.Remove();
                Col3.Remove();
                break;
            }
        }
Beispiel #4
0
        internal void EndLaunchPrepare()
        {
            Memory.Init();
            SettingsManager.LoadSettings();
            CCManager.LoadCCs();

            #region set wow & bot window location and size
            Helpers.WindowInteraction.SetWowWindow();
            Helpers.WindowInteraction.SetBotWindow();
            #endregion

            #region setup world render minimize if enabled in settings
            if (Settings.Settings.MinimizeWorldRender)
            {
                Hack renderWorld = HookWardenMemScan.GetHack("RenderWorlObjectsPatch");

                //setup render world patch if unknown to us
                if (renderWorld == null)
                {
                    var RenderWorldPatch = new Hack(ZzukBot.Constants.Offsets.Hacks.RenderDisable, new byte[] { 0x00 }, "RenderWorlObjectsPatch");
                    HookWardenMemScan.AddHack(RenderWorldPatch);

                    renderWorld = HookWardenMemScan.GetHack("RenderWorlObjectsPatch");
                }

                if (!renderWorld.IsActivated && Settings.Settings.MinimizeWorldRender)
                {
                    renderWorld.Apply();
                }
            }
            #endregion
            IrcMonitor.Instance.MessageReceived += ChannelMessageRecieved;
            GuiCore.SettingsForm.SetupIrc();
            Enums.DynamicFlags.AdjustToRealm();
            GuiCore.MainForm.Enabled   = true;
            ChatHook.OnNewChatMessage += updateChat;
            LoginBlock.Disable();
        }
Beispiel #5
0
        private void btnToggleRender_Click(object sender, EventArgs e)
        {
            Hack renderWorld = HookWardenMemScan.GetHack("RenderWorlObjectsPatch");

            //setup render world patch if unknown to us
            if (renderWorld == null)
            {
                var RenderWorldPatch = new Hack(ZzukBot.Constants.Offsets.Hacks.RenderDisable, new byte[] { 0x00 }, "RenderWorlObjectsPatch");
                HookWardenMemScan.AddHack(RenderWorldPatch);

                renderWorld = HookWardenMemScan.GetHack("RenderWorlObjectsPatch");
            }

            #region toggle render world
            if (!renderWorld.IsActivated && Settings.Settings.MinimizeWorldRender)
            {
                renderWorld.Apply();
                return;
            }


            renderWorld.Remove();
            #endregion
        }
Beispiel #6
0
        private void ApplyActionbarHacks()
        {
            Hack tmpHack;

            if (PlayerSpells.ContainsKey(BowShoot))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("BowShootPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0xBC69CC, BitConverter.GetBytes(ShootBowId), "BowShootPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }

            if (PlayerSpells.ContainsKey(CrossBowShoot))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("CrossbowShootPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0xBC69D0, BitConverter.GetBytes(ShootCrossbowId), "CrossbowShootPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }


            if (PlayerSpells.ContainsKey(AutoShot))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("AutoShotPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0xBC69D4, BitConverter.GetBytes(AutoShotId), "AutoShotPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }

            if (PlayerSpells.ContainsKey(Wand))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("WandPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0x00BC69D8, BitConverter.GetBytes(WandId), "WandPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }

            if ((tmpHack = HookWardenMemScan.GetHack("AttackPlace")) == null)
            {
                tmpHack = new Hack((IntPtr)0xBC69DC, BitConverter.GetBytes(AttackId), "AttackPlace");
                tmpHack.Apply();
                HookWardenMemScan.AddHack(tmpHack);
            }
            else
            {
                tmpHack.Apply();
            }
        }
Beispiel #7
0
        internal unsafe Spells()
        {
            var tmpPlayerSpells = new Dictionary <string, uint[]>();

            uint currentPlayerSpellPtr = 0x00B700F0;
            uint index = 0;

            while (index < 1024)
            {
                var currentSpellId = *(uint *)(currentPlayerSpellPtr + 4 * index);
                if (currentSpellId == 0)
                {
                    break;
                }
                var entryPtr = *(uint *)(*(uint *)(0x00C0D780 + 8) + currentSpellId * 4);

                var entrySpellId = *(uint *)entryPtr;
                var namePtr      = *(uint *)(entryPtr + 0x1E0);
                //var name = Memory.Reader.ReadString((IntPtr) namePtr, Encoding.ASCII);
                var name = namePtr.ReadString(); // Will default to ascii

                if (tmpPlayerSpells.ContainsKey(name))
                {
                    var tmpIds = new List <uint>();
                    tmpIds.AddRange(tmpPlayerSpells[name]);
                    tmpIds.Add(entrySpellId);
                    tmpPlayerSpells[name] = tmpIds.ToArray();
                }
                else
                {
                    uint[] ranks = { entrySpellId };
                    tmpPlayerSpells.Add(name, ranks);
                }
                index += 1;
            }
            PlayerSpells = tmpPlayerSpells;

            Hack tmpHack;

            if (PlayerSpells.ContainsKey(AutoShot))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("AutoShotPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0xBC69D4, BitConverter.GetBytes(AutoShotId), "AutoShotPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }

            if (PlayerSpells.ContainsKey(Wand))
            {
                if ((tmpHack = HookWardenMemScan.GetHack("WandPlace")) == null)
                {
                    tmpHack = new Hack((IntPtr)0x00BC69D8, BitConverter.GetBytes(WandId), "WandPlace");
                    tmpHack.Apply();
                    HookWardenMemScan.AddHack(tmpHack);
                }
                else
                {
                    tmpHack.Apply();
                }
            }

            if ((tmpHack = HookWardenMemScan.GetHack("AttackPlace")) == null)
            {
                tmpHack = new Hack((IntPtr)0xBC69DC, BitConverter.GetBytes(AttackId), "AttackPlace");
                tmpHack.Apply();
                HookWardenMemScan.AddHack(tmpHack);
            }
            else
            {
                tmpHack.Apply();
            }
        }