Exemple #1
0
        public static void RefreshNewGameObjects(Vector2 playerpos, BlackMagic w) {
            GameObject TempObject = new GameObject(Initializer.FirstObject);
            int i = 0;
            newGameObjects.Clear();
            while ((uint)TempObject.BaseAddress != 0 && i < 500) {
                i++;
                TempObject.Unit = new WoWModels.WoWUnit();
                TempObject.Unit.RefreshForRadar(w, TempObject);
                bool shit = false;
                foreach(GameObject go in NearbyGameObjects) {
                    if (go.GUID == TempObject.GUID) {
                        shit = true;
                    }
                }
                if (!shit) {
                    newGameObjects.Add(TempObject);
                }
                try {
                    TempObject = new GameObject(w, (UIntPtr)w.ReadUInt(((uint)TempObject.BaseAddress + (uint)ConstOffsets.ObjectManager.NextObject)));
                }
                catch {
                    break;
                }

            }
            foreach(GameObject ngo in newGameObjects) {
                ngo.Unit.Position = new Vector3(w.ReadFloat((uint)newGameObjects[0].BaseAddress + 0x110), w.ReadFloat((uint)newGameObjects[0].BaseAddress + 0x114), 104);
            }
        }
 private void Refresh(BlackMagic w) {
     UInt64 PartyMember1GUID = 0;
     UInt64 PartyMember2GUID = 0;
     UInt64 PartyMember3GUID = 0;
     UInt64 PartyMember4GUID = 0;
     try {
         PartyMember1GUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.PartyMember1GUID);
         PartyMember2GUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.PartyMember2GUID);
         PartyMember3GUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.PartyMember3GUID);
         PartyMember4GUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.PartyMember4GUID);
     }
     catch {
         Program.WowPrinter.Print(ConstStrings.ReadError);
     }
     finally {
         if (PartyMember1GUID != 0) {
             Party.Add(PartyMember1GUID);
             if (PartyMember2GUID != 0) {
                 Party.Add(PartyMember2GUID);
                 if (PartyMember3GUID != 0) {
                     Party.Add(PartyMember3GUID);
                     if (PartyMember4GUID != 0) {
                         Party.Add(PartyMember4GUID);
                     }
                 }
             }
         }
     }
 }
        static void Main(string[] args) {
            wow = new BlackMagic();
            wow.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle(processwindowtitle));
            uint gamebase = (uint)wow.MainModule.BaseAddress;
            uint plvl1 = wow.ReadUInt(gamebase + 0x00A42788);
            uint plvl2 = wow.ReadUInt(plvl1 + 0x9c);
            uint plvl3 = wow.ReadUInt(plvl2 + 0x5c);
            uint plvl4 = wow.ReadUInt(plvl3 + 0x60);
            uint player_guid = plvl3 - 0x10;
            //uint playerbase = wow.ReadUInt(wow.ReadUInt(wow.ReadUInt(0x0A87EC2C+0x40))); //this is the player base
            string playername = wow.ReadASCIIString(0x00DBE820, 256); //reads player name
            Console.WriteLine(wow.ReadUInt(player_guid+(uint)descriptors.Health));
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            /*Console.WriteLine(playername + plvl4);
                for (uint j = 0; j < 1; j++) {
                try {
                    uint c = uint.Parse(Console.ReadLine());

                    for (uint i = 0; i < 2000; i++) {
                        uint temp = wow.ReadUInt(plvl3 + (0x10 * i));
                        if (temp > 0 && temp < 200000) {
                            Console.WriteLine("Value: " + temp + " at 0x{0:X}", (0x10 * i));
                            if (temp == c) {
                                Console.WriteLine("Found it! Press enter to continue...");
                                Console.ReadLine();
                            }
                        }
                    }
                }
                catch {

                }
            }
            for (uint i = 0; i < 100; i++) {
                try {
                    uint offset = uint.Parse(Console.ReadLine());
                    Console.WriteLine(wow.ReadUInt(plvl3 + offset));
                }
                catch {

                }
            }
            */
            //////////////////
            Console.ReadLine();
        }
Exemple #4
0
 public DPSBot(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(tt) {
     this.wow = wowProcess;
     this.wowinfo = globalinfo;
     this.wowinfo.Refresh(wowProcess);
     Player = new GameObject(wowProcess, this.wowinfo.PlayerGUID);
     Target = new GameObject(wowProcess, this.wowinfo.TargetGUID);
     Focus = new GameObject(wowProcess, this.wowinfo.FocusGUID);
 }
Exemple #5
0
 private void Refresh(BlackMagic w) {
     Raidmembercount = w.ReadUInt((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.RaidMembers.TotalNumber);
     RaidMembers.Clear();
     for (uint i = 0; i < Raidmembercount; i++) {
         uint tempaddr=w.ReadUInt((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.RaidMembers.FirstRaidMemberAddress + i*(uint)ConstOffsets.RaidMembers.NextRaidMemberAddres);
         RaidMembers.Add(w.ReadUInt64(tempaddr));
     }
 }
Exemple #6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     application = new BlackMagic(processes[0].Id);
     functionManager = new FunctionManager(application);
     string appPath = Path.GetDirectoryName(Application.ExecutablePath);
     IniFile ini = new IniFile(appPath + @"\config.ini");
     functionManager.LuaDoString("print(\"|cffff6060<|r|cFF00FFFFiKick|cffff6060>|r Ready !\")");
 }
 public WalkBehindBot(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt, WalkTargetType wtf, float posThreshhold) : base(tt) {
     this.wow = wowProcess;
     this.wowinfo = globalinfo;
     this.wowinfo.Refresh(wowProcess);
     this.WhatToFollow = wtf;
     this.PositionThreshhold = posThreshhold;
     Player = new GameObject(wowProcess, this.wowinfo.PlayerGUID);
     setWalkTarget(out WalkTarget);
 }
Exemple #8
0
        public HookManager(BlackMagic process)
        {
            this.process = process;

            this.mainThreadHooked = false;
            this.ExecutingCode = false;

            this.codeCave = 0;
            this.injectionAddress = 0;
            this.returnAddress = 0;
        }
Exemple #9
0
 public Form1()
 {
     InitializeComponent();
     BlackMagic application;
     FunctionManager functionManager;
     application = new BlackMagic(processes[0].Id);
     functionManager = new FunctionManager(application);
     hook.KeyPressed +=
         new EventHandler<KeyPressedEventArgs>(hook_KeyPressed);
     hook.RegisterHotKey(HotKeysHandler.ModifierKeys.Alt, Keys.X);
 }
 public void Refresh(BlackMagic w) {
     try {
         this.PlayerGUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.PlayerGUID);
         this.TargetGUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.CurrentTargetGUID);
         this.FocusGUID = w.ReadUInt64((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.FocusTargetGUID);
         this.ComboPoints = w.ReadByte((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.ComboPoints);
         this.SpellIsPending = !(w.ReadByte((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.SpellIsPending) == 0);
         this.runes = w.ReadByte((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.Runes);
         this.Markers = new MarkerGUIDs(w.ReadBytes((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.Globals.Markers,64));
     }
     catch {
         Program.WowPrinter.Print(ConstStrings.ReadError);
     }
 }
        static void Main(string[] args) {
            //Open the proccess
            wow = new BlackMagic();
            wow.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle(PROCESS_WINDOW_TITLE));
            //Setup Object Manager and First object base address
            ObjMgrAddr = wow.ReadUInt(wow.ReadUInt((uint)wow.MainModule.BaseAddress + (uint)Constants.Const.ObjectManager.CurMgrPointer) + (uint)Constants.Const.ObjectManager.CurMgrOffset);
            FirstObject = new GameObject(wow.ReadUInt(ObjMgrAddr + (uint)Constants.Const.ObjectManager.FirstObject));
            //Read TargetGUID from globals and find in the Object Manager
            //UInt64 CurrTargetGUID = wow.ReadUInt64((uint)wow.MainModule.BaseAddress + (uint)Const.Globals.CurrentTargetGUID);
            UInt64 CurrTargetGUID = wow.ReadUInt64((uint)wow.MainModule.BaseAddress + (uint)Constants.Const.Globals.CurrentTargetGUID);
            PlayerObject = new GameObject(wow.ReadUInt64((uint)wow.MainModule.BaseAddress + (uint)Constants.Const.Globals.PlayerGUID));
            TargetObject = new GameObject(CurrTargetGUID);
            PlayerObject.Wowclass = wow.ReadByte(PlayerObject.DescriptorArrayAddress + (uint)Const.descriptors.Class8);

            System.Timers.Timer aTimer = new System.Timers.Timer();
            aTimer.Interval = 100;
            if (PlayerObject.Wowclass == 9) {
                Console.WriteLine("Initiate Affliction Warlock DPS BOT v1.0");
                aTimer.Elapsed += WarlockDPS.DpsEvent;
            }
            else if (PlayerObject.Wowclass == 11) {
                Console.WriteLine("Initiate Feral Druid DPS BOT v0.1");
                aTimer.Elapsed += DruidDPS.DpsEvent;
            }
            aTimer.AutoReset = true;
            aTimer.Enabled = true;
            while (true) {
                switch (Console.ReadLine()) {
                    case "stop":
                        Console.WriteLine("STOP");
                        aTimer.Elapsed -= DruidDPS.DpsEvent;
                        aTimer.Elapsed -= WarlockDPS.DpsEvent;
                        aTimer.Elapsed -= PrinterEvent;
                        break;
                    case "printer":
                        aTimer.Elapsed += PrinterEvent;
                        break;
                    case "start":
                        if (PlayerObject.Wowclass == 9) {
                            Console.WriteLine("Initiate Affliction Warlock DPS BOT v1.0");
                            aTimer.Elapsed += WarlockDPS.DpsEvent;
                        }
                        else if (PlayerObject.Wowclass == 11) {
                            Console.WriteLine("Initiate Feral Druid DPS BOT v0.1");
                            aTimer.Elapsed += DruidDPS.DpsEvent;
                        }
                        break;
                }
            }
        }
Exemple #12
0
 public Tester(BlackMagic w, GameObject Player, float threshhold) {
     GameObject TempObject = new GameObject(Initializer.FirstObject);
     int i = 0;
     while ((uint)TempObject.BaseAddress != 0) {
         i++;
         Console.WriteLine(TempObject.Unit.Position.X + " " + TempObject.Unit.Position.X + " " + TempObject.Unit.Position.Z);
         Console.WriteLine(Player.Unit.Position.X + " " + Player.Unit.Position.X + " " + Player.Unit.Position.Z);
         if (Vector3.Distance(TempObject.Unit.Position, Player.Unit.Position) < threshhold && TempObject.GUID != Player.GUID) {
             gameobjects.Add(TempObject);
             Console.WriteLine("Found one");
         }
         TempObject = new GameObject(w, (UIntPtr)w.ReadUInt(((uint)TempObject.BaseAddress + (uint)ConstOffsets.ObjectManager.NextObject)));
     }
 }
 public static bool ConnectToGame(out BlackMagic w, string title) {
     w = new BlackMagic();
     try {
         if (!w.OpenProcessAndThread(SProcess.GetProcessFromWindowTitle(title))) {
             return false;
         }
         Console.WriteLine("Process found...");
         uint ObjMgrAddr = w.ReadUInt(w.ReadUInt((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.ObjectManager.CurMgrPointer) + (uint)ConstOffsets.ObjectManager.CurMgrOffset);
         Console.WriteLine("Object Manager found... at x{0:X}",ObjMgrAddr);
         FirstObject = new GameObject(w,(UIntPtr)w.ReadUInt(ObjMgrAddr + (uint)ConstOffsets.ObjectManager.FirstObject));
         Console.WriteLine("First Object found...");
         return true;
         
     }
     catch {
         return false;
     }
 }
Exemple #14
0
        public static void GetEveryObject(ref List<RadarPlayer> players, Vector2 playerpos, BlackMagic w) {
            players.Clear();
            GameObject TempObject = new GameObject(Initializer.FirstObject);
            int i = 0;
            while ((uint)TempObject.BaseAddress != 0 && i < 300) {
                i++;
                TempObject.Unit = new WoWModels.WoWUnit();
                TempObject.Unit.RefreshForRadar(w, TempObject);
                if (Vector3.Distance(TempObject.Unit.Position, new Vector3(playerpos, TempObject.Unit.Position.Z)) < 50) {
                    players.Add(new RadarPlayer(TempObject));
                }
                try {
                    TempObject = new GameObject(w, (UIntPtr)w.ReadUInt(((uint)TempObject.BaseAddress + (uint)ConstOffsets.ObjectManager.NextObject)));
                }
                catch {
                    return;
                }
            }

        }
Exemple #15
0
        public static void RefreshNearbyGameObjects(Vector2 playerpos, BlackMagic w, int threshhold) {
            GameObject TempObject = new GameObject(Initializer.FirstObject);
            int i = 0;
            NearbyGameObjects.Clear();
            while ((uint)TempObject.BaseAddress != 0) {
                i++;
                TempObject.Unit = new WoWModels.WoWUnit();
                TempObject.Unit.RefreshForRadar(w, TempObject);
                //if (Vector3.Distance(TempObject.Unit.Position, new Vector3(playerpos, TempObject.Unit.Position.Z)) < threshhold) {
                NearbyGameObjects.Add(TempObject);
                //}
                try {
                    TempObject = new GameObject(w, (UIntPtr)w.ReadUInt(((uint)TempObject.BaseAddress + (uint)ConstOffsets.ObjectManager.NextObject)));
                }
                catch {
                    break;
                }

            }

        }
Exemple #16
0
        static void Main(string[] args)
        {
            uint dwCodeLoc;
            BlackMagic wow = new BlackMagic();
            if (wow.OpenProcessAndThread(SProcess.GetProcessFromProcessName("wow")))
            {
                Console.WriteLine(wow.GetModuleFilePath());
                DateTime dt = DateTime.Now;

                //dwCodeLoc = SPattern.FindPattern(wow.ProcessHandle, wow.MainModule, PATTERN_CLIENT_CONNECTION, MASK_CLIENT_CONNECTION, ' ');
                dwCodeLoc = wow.FindPattern(PATTERN_CLIENT_CONNECTION, MASK_CLIENT_CONNECTION);
                Console.WriteLine("Pattern found in {0}ms", DateTime.Now.Subtract(dt).TotalMilliseconds);
                Console.WriteLine("Code loc: 0x{0:X08}", dwCodeLoc);
                Console.WriteLine("CLIENT_CONNECTION: 0x{0:X08}", wow.ReadUInt(dwCodeLoc + 0x16));
                Console.WriteLine("CURMGR_OFFSET: 0x{0:X08}", wow.ReadUInt(dwCodeLoc + 0x1C));

            }
            else
            {
                Console.WriteLine("World of Warcraft could not be opened for read/write.");
            }

            Console.ReadLine();
        }
 public WarriTank(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Warrior Tank bot");
 }
 public ShamanRestoPartyHeal(BlackMagic wowProcess, WoWGlobal globalinfo, uint healinterval, uint walkerinterval) : base(wowProcess, globalinfo, healinterval) {
     Console.WriteLine("Initialize Shaman Resto Heal bot");
     focusfollow = new WalkerBot(wow, wowinfo, walkerinterval, WalkTargetType.CurrentFocus,10);
 }
 public ShamanRestoPartyHeal(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Shaman Resto Heal bot");
 }
Exemple #20
0
        public GameObject(BlackMagic w, UInt64 guid) {
            try {
                this.GUID = guid;
                if (this.GUID != 0) {
                    GameObject TempObject = new GameObject(Initializer.FirstObject);
                    while ((uint)TempObject.BaseAddress != 0) {
                        if (TempObject.GUID == this.GUID) {
                            this.BaseAddress = TempObject.BaseAddress;
                            this.GUID = TempObject.GUID;
                            this.DescriptorArrayAddress = TempObject.DescriptorArrayAddress;
                            this.BuffBigArrayAddress = TempObject.BuffBigArrayAddress;
                            this.BuffSmallArrayAddress = TempObject.BuffSmallArrayAddress;
                            this.MovementArrayAddress = (UIntPtr)w.ReadUInt((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalMovementArray);
                            this.RefreshUnit(w);
                            return;
                        }
                        else {
                            TempObject = new GameObject(w, (UIntPtr)w.ReadUInt(((uint)TempObject.BaseAddress + (uint)ConstOffsets.ObjectManager.NextObject)));
                        }
                    }
                    //Program.WowPrinter.Print(new Error(String.Format("Couldnt Find Gameobject with GUID 0x{0:X16}", guid)));
                }
                this.Unit = new WoWUnit();

            }
            catch {
                this.Unit = new WoWUnit();
                //Program.WowPrinter.Print(ConstStrings.GameObjectConstructorError);
            }
        }
Exemple #21
0
 public DruidDPS(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Druid Feral(cat) DPS bot");
 }
 public static void RefreshObjectMangaer(BlackMagic w) {
     uint ObjMgrAddr = w.ReadUInt(w.ReadUInt((uint)w.MainModule.BaseAddress + (uint)ConstOffsets.ObjectManager.CurMgrPointer) + (uint)ConstOffsets.ObjectManager.CurMgrOffset);
     FirstObject = new GameObject(w, (UIntPtr)w.ReadUInt(ObjMgrAddr + (uint)ConstOffsets.ObjectManager.FirstObject));
 }
Exemple #23
0
 public void RefreshUnit(BlackMagic w) {
     if (this.BaseAddress != (UIntPtr)0) {
         this.Unit = new WoWUnit(w, this);
     }
 }
Exemple #24
0
 public GameObject(BlackMagic w, UIntPtr baddr) {
     try {
         this.BaseAddress = baddr;
         this.GUID = w.ReadUInt64((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalGUID);
         this.descriptorArrayAddress = (UIntPtr)w.ReadUInt((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalDescriptorArray) + 0x10;
         this.BuffBigArrayAddress = (UIntPtr)w.ReadUInt((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalBuffBigArray) + 0x4;
         this.BuffSmallArrayAddress = (UIntPtr)((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalBuffSmallArray);
         this.MovementArrayAddress = (UIntPtr)w.ReadUInt((uint)this.BaseAddress + (uint)ConstOffsets.ObjectManager.LocalMovementArray);
         this.Unit = new WoWUnit();
     }
     catch {
         //Program.WowPrinter.Print(ConstStrings.GameObjectConstructorError);
         this.Unit = new WoWUnit();
     }
 }
 public PaladinDPS(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Paladin Retribution DPS bot");
 }
 public WoWGlobal(BlackMagic w) {
     this.Refresh(w);
 }
Exemple #27
0
 public WoWParty(BlackMagic w) {
     this.Refresh(w);
 }
        public static Structs.PatternList FindPatternList(Structs.PatternList patternList)
        {
            Structs.PatternList newPatternList = new Structs.PatternList();
            newPatternList.processName = patternList.processName;
            uint baseModule = 0;

            BlackMagic memread = new BlackMagic();
            if (memread.OpenProcessAndThread(SProcess.GetProcessFromProcessName(patternList.processName)))
            {
                try
                {
                    // Dump module
                    ProcessModuleCollection modules = Process.GetProcessById(memread.ProcessId).Modules;
                    foreach (ProcessModule o in modules)
                    {
                        Structs.ModuleList m = new Structs.ModuleList();
                        m.Name = o.ModuleName;
                        m.baseAddressDec = (int)o.BaseAddress;
                        m.baseAddressHex = (o.BaseAddress).ToString("X");
                        patternList.Modules.Add(m);

                        // Check module base if exist.
                        if (patternList.baseModuleName != "")
                            if (patternList.baseModuleName.ToLower() == o.ModuleName.ToLower())
                                baseModule = (uint)o.BaseAddress;
                    }
                }
                catch { }

                foreach (Structs.Pattern p in patternList.Patterns)
                {
                    try
                    {
                        uint dwCodeLoc = memread.FindPattern(p.pattern, p.mask);
                        uint offset = memread.ReadUInt((uint)((int)dwCodeLoc + p.offsetLocation));
                        if (offset > 0)
                        {
                            offset = offset - baseModule;
                            dwCodeLoc = dwCodeLoc - baseModule;
                        }

                        if (offset > 0)
                        {
                            // Dump offset
                            p.offset = offset.ToString("X");
                            p.offsetDec = offset;
                            p.offsetUsedAtDec = (uint)((int)dwCodeLoc + p.offsetLocation);
                            p.offsetUsedAt = ((int)dwCodeLoc + p.offsetLocation).ToString("X");
                            try
                            {
                                switch (p.type)
                                {
                                    case "int64":
                                        p.value = Convert.ToString(memread.ReadUInt64(p.offsetDec));
                                        break;
                                    case "int":
                                        p.value = Convert.ToString(memread.ReadInt(p.offsetDec));
                                        break;
                                    case "float":
                                        p.value = Convert.ToString(memread.ReadFloat(p.offsetDec));
                                        break;
                                    case "string":
                                        p.value = Convert.ToString(memread.ReadASCIIString(p.offsetDec, 30));
                                        break;
                                }
                            }
                            catch { p.value = "No Found"; }
                        }
                        else
                            p.offset = "No Found";

                    }
                    catch
                    { p.offset = "No Found"; }
                    newPatternList.Patterns.Add(p);
                }
                memread.Close();
            }
            else
            {
                MessageBox.Show("Process no found.");
            }
            return patternList;
        }
 public PaladinPVEDPS(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt, uint walkerTimerInterval) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Paladin PVE Retribution DPS bot");
     followBot = new WalkerBot(this.wow, this.wowinfo, walkerTimerInterval, WalkTargetType.CurrentTarget, 5);
 }
 public WarlockDPS(BlackMagic wowProcess, WoWGlobal globalinfo, uint tt) : base(wowProcess, globalinfo, tt) {
     Console.WriteLine("Initialize Warlock Affliction DPS bot");
 }