示例#1
0
        public static TTOTDWordObject load(int addr, ProcessMemoryInterface iface)
        {
            var wO = new TTOTDWordObject();

            wO.address     = addr;
            wO.enabled     = iface.getU16(addr + 0x4D) != 0x0001;
            wO.proximity   = iface.getF32(addr + 0x48);
            wO.wordLength  = iface.getU8(addr + 0x98);
            wO.typedLength = iface.getU8(addr + 0x99);
            wO.word        = iface.getStringL(addr + 0x58, wO.wordLength);
            wO.pmI         = iface;
            return(wO);
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.Write("Waiting for process....");
            while ((ttotdProcess = getTTODProcess()) == null)
            {
                Thread.Sleep(10);
            }
            Console.WriteLine($"Gotcha! {ttotdProcess.Id:X6}");
            todInterface = new ProcessMemoryInterface(ttotdProcess);
            while (true)
            {
                var words = getWordList();
                for (int i = 0; i < words.Length; i++)
                {
                    Console.WriteLine($"\t{words[i].word}\t0x{words[i].MemoryAddress:X}\t{words[i].proximity}");
                }
                if (words.Length > 0)
                {
                    var bestWord = getBestWord(words);
                    if (bestWord == null)
                    {
                        Thread.Sleep(3);
                        continue;
                    }

                    try
                    {
                        Console.WriteLine($"Selected best word 0x{bestWord.MemoryAddress:X}\t{bestWord.word}");
                        typeWord(bestWord);
                    } catch (Exception E)
                    {
                        Console.WriteLine($"!{E.Message}");
                    }
                }
                Thread.Sleep(3);
            }
        }