Example #1
0
        protected async Task <bool> InitiateLeve()
        {
            // if (Core.Player.IsMounted)
            // {
            // ActionManager.Dismount();
            // await Coroutine.Wait(20000, () => !Core.Player.IsMounted);
            // await Coroutine.Sleep(500);
            // }
            var    patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            IntPtr SearchResult  = patternFinder.Find("48 8D 05 ? ? ? ? 48 89 54 24 ? 48 89 03 Add 3 TraceRelative");
            int    agent         = AgentModule.FindAgentIdByVtable(SearchResult);

            AgentModule.ToggleAgentInterfaceById(agent);
            await Coroutine.Sleep(500);

            AtkAddonControl windowByName = RaptureAtkUnitManager.GetWindowByName("JournalDetail");

            while (windowByName == null)
            {
                await Coroutine.Sleep(500);

                windowByName = RaptureAtkUnitManager.GetWindowByName("JournalDetail");
            }
            if (windowByName != null)
            {
                var leves = LeveManager.Leves;
                if (leves.Length > 0)
                {
                    foreach (ff14bot.Managers.LeveWork leve in leves)
                    {
                        if (leve.GlobalId == LeveId && leve.Step == 1)
                        {
                            ulong globalId = (ulong)leve.GlobalId;
                            windowByName.SendAction(3, 3, 0xC, 3, globalId, 3, 2);                       //Set Quest
                            await Coroutine.Sleep(200);

                            windowByName.SendAction(2, 3, 4, 4, globalId);                         //Initiate
                            if (await Coroutine.Wait(10000, () => SelectYesno.IsOpen))
                            {
                                SelectYesno.ClickYes();
                            }
                            await Coroutine.Sleep(2000);

                            RaptureAtkUnitManager.GetWindowByName("GuildLeveDifficulty").SendAction(1, 3, 0);
                            await Coroutine.Sleep(3000);

                            break;
                        }
                    }
                }
                windowByName = RaptureAtkUnitManager.GetWindowByName("JournalDetail");
                if (windowByName != null)
                {
                    AgentModule.ToggleAgentInterfaceById(agent);
                }
            }

            return(_done = true);
        }
Example #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     using (var patternFinder = new GreyMagic.PatternFinder(Core.Memory))
     {
         IntPtr SendActionBreakpoint = patternFinder.Find("48 85 C0 74 ? 48 89 18 4C 8D 70 ? 49 8B C6 48 85 DB 74 ? 89 30");
         textBox1.Text = ($"ffxiv_dx11.exe+{Core.Memory.GetRelative(SendActionBreakpoint).ToString("X")}");
     }
 }
Example #3
0
        public ContentsInfo() : base(WindowName)
        {
            _name = WindowName;

            var    patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            IntPtr agentVtable   = patternFinder.Find("48 8D 05 ? ? ? ? BF ? ? ? ? 48 89 03 48 8D 73 ? Add 3 TraceRelative");

            _agentId = AgentModule.FindAgentIdByVtable(agentVtable);
        }
Example #4
0
        public void Initialize()
        {
            Logger.WriteInfo("Initializing ...");

            var patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            var intPtr        = patternFinder.Find("Search 48 8D 0D ? ? ? ? E8 ? ? ? ? 48 8D 0D ? ? ? ? E8 ? ? ? ? EB AB Add 3 TraceRelative");
            var languageByte  = Core.Memory.Read <byte>(intPtr);

            switch (languageByte)
            {
            case 1:
                Globals.Language = GameVersion.English;
                break;

            case 2:
                Globals.Language = GameVersion.English;
                break;

            case 3:
                Globals.Language = GameVersion.English;
                break;

            case 4:
                Globals.Language = GameVersion.Chinese;
                break;

            default:
                Globals.Language = GameVersion.English;
                break;
            }

            Logger.WriteInfo($"Current Language: {Globals.Language}");
            RotationManager.Reset();
            ViewModels.BaseSettings.Instance.RoutineSelectedInUi = RotationManager.CurrentRotation.ToString();
            DispelManager.Reset();
            InterruptsAndStunsManager.Reset();
            TankBusterManager.ResetHealers();
            TankBusterManager.ResetTanks();
            TreeRoot.OnStart += OnStart;
            TreeRoot.OnStop  += OnStop;
            CurrentZone       = WorldManager.ZoneId;
            CurrentJob        = Core.Me.CurrentJob;

            Application.Current.Dispatcher.Invoke(delegate
            {
                _form         = new SettingsWindow();
                _form.Closed += (sender, args) =>
                {
                    _form = null;
                };
            });

            TogglesManager.LoadTogglesForCurrentJob();
            Logger.WriteInfo("Initialized");
        }
Example #5
0
        public static SearchResultLayout[] ReadSearchResults()
        {
            GreyMagic.PatternFinder patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            var    off         = patternFinder.Find("48 8B 0D ? ? ? ? 0F 95 C2 E8 ? ? ? ? C7 44 24 ? ? ? ? ? Add 3 TraceRelative");
            var    addr1       = Core.Memory.Read <IntPtr>(off);
            var    addr2       = Core.Memory.Read <IntPtr>(addr1 + 0x308);
            var    addr3       = Core.Memory.Read <IntPtr>(addr2 + 0xA8);
            var    finalAddr   = addr3 + 0x310;
            var    value       = finalAddr + (0x1f6 * 4); //1fc 2nd 202 3rd
            var    resultCount = finalAddr + 0x7d4;
            IntPtr value1;
            int    count = Core.Memory.Read <int>(resultCount);

            return(Core.Memory.ReadArray <SearchResultLayout>(value, count));
        }
Example #6
0
        public async Task ClickSpot(int slot)
        {
            var    patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            IntPtr KupoClick     = patternFinder.Find("E8 ? ? ? ? 32 C0 48 8B 5C 24 ? 48 8B 74 24 ? 48 83 C4 ? 5F C3 48 8B 03 48 8B CB FF 50 ? TraceCall");

            if (IsOpen)
            {
                var agent = WindowByName.TryFindAgentInterface();

                if (agent != null)
                {
                    Core.Memory.CallInjected64 <uint>(KupoClick, new object[2]
                    {
                        agent.Pointer,
                        (uint)1
                    });

                    await Coroutine.Sleep(2000);
                }
            }
        }
Example #7
0
        public static void test()
        {
            GreyMagic.PatternFinder patternFinder = new GreyMagic.PatternFinder(Core.Memory);
            var    off         = patternFinder.Find("48 8B 0D ? ? ? ? 0F 95 C2 E8 ? ? ? ? C7 44 24 ? ? ? ? ? Add 3 TraceRelative");
            var    addr1       = Core.Memory.Read <IntPtr>(off);
            var    addr2       = Core.Memory.Read <IntPtr>(addr1 + 0x308);
            var    addr3       = Core.Memory.Read <IntPtr>(addr2 + 0xA8);
            var    finalAddr   = addr3 + 0x310;
            var    value       = finalAddr + (0x1f6 * 4); //1fc 2nd 202 3rd
            var    resultCount = finalAddr + 0x7d4;
            IntPtr value1;
            int    count = Core.Memory.Read <int>(resultCount);


            for (int index = 0; index < count; index++)
            {
                value1 = value + (index * 0x18);
                //  Log(Core.Memory.Read<int>(value1));//Price
                // Log(Core.Memory.Read<int>(value1 + 4));//Qty
                // Log(Core.Memory.Read<int>(value1 + 8));//HQ
                // Log(Core.Memory.Read<int>(value1 + 12));//icon
            }
            // Log(Core.Memory.Read<int>(resultCount));
        }