コード例 #1
0
        /// <summary>
        /// Finds the matchmaking information
        /// </summary>
        /// <param name="ignoreBots">Should bots be ignored?</param>
        /// <param name="steamInfo">Should steam info be shown?</param>
        /// <returns>Formatted string with information</returns>
        private string getMatchmakingInfoAsString(bool ignoreBots, bool steamInfo, FilterTypes filter)
        {
            offsets.RenewOffsets();
            if (!offsets.IsIngame())
            {
                return("Not ingame");
            }

            List <Offsets.Player> playerList = offsets.GetPlayers(ignoreBots, filter);

            if (playerList == null)
            {
                return("No valid player was found");
            }

            string temp = "";

            for (int i = 0; i < playerList.Count; i++)
            {
                if (playerList[i].name.Length <= 0)
                    continue; }

                temp += "[" + (i + 1) + "]        " + (i + 1 < 10 ? " " : "") + playerList[i].name + " \n";
                temp += "Rank:       " + Offsets.RANKS[playerList[i].rank] + "\n";
                temp += "Wins:       " + playerList[i].winCount + "\n";
                if (steamInfo)
                {
                    temp += "SteamID:    " + playerList[i].steamID + "\n";
                    temp += "SteamID3:   " + playerList[i].steamID3 + "\n";
                    temp += "SteamID64:  " + playerList[i].steamID64 + "\n";
                    temp += "Profile:    " + playerList[i].profileLink + "\n";
                }
                if (i + 1 < playerList.Count)
                    temp += "\n\n"; }
コード例 #2
0
        /// <summary>
        /// Beauty Stuff... Not really usefull and makes it 10000000x longer to load.. For the memes I guess?
        /// Don't know if that Invoke on the window is efficient, but that is anyways just a troll, lol....
        /// </summary>
        private void Start()
        {
            Invoke(new Action(() => {
                progressBar.Value   = 0;//0
                progressOutput.Text = "Initializing";
            }));

            //Write to screen that it is being initialized
            Debug.WriteLine("Beginning initialization");

            Thread.Sleep(1000);
            Invoke(new Action(() => {
                progressBar.Value   = 5; //5
                progressOutput.Text = "Fetching CS:GO Process";
            }));

            //Fetch the CS:GO Process/Wait for it
            if (!WaitAndFetchProcess())
            {
                abort("Can not fetch the CS:GO process"); return;
            }                                                                                 // 30

            Thread.Sleep(3000);
            Invoke(new Action(() => {
                progressBar.Value   = 30; //30
                progressOutput.Text = "Validating";
            }));

            //Create a new memory control instance
            if (mem.client == null || mem.engine == null)
            {
                abort("Memory Controller was not created successfully. Abort."); return;
            }                                                                                                                          //55

            Thread.Sleep(1000);
            Invoke(new Action(() => {
                progressBar.Value   = 55; //55
                progressOutput.Text = "Scanning for offsets and addresses";
            }));

            //Fetch all addresses
            if (!(offsets = new Offsets()).PatternScan())
            {
                abort("Can not fetch the offsets. Abort."); return;
            }                                                                                                     // 80
            offsets.RenewOffsets();

            Thread.Sleep(2000);
            Invoke(new Action(() => {
                progressBar.Value   = 90; //90
                progressOutput.Text = "Validating";
            }));

            //Setup the timer
            timer = new FTimer {
                Interval = 10
            };
            timer.Tick += new EventHandler(RunThread);
            Thread.Sleep(1000);
            Invoke(new Action(() => {
                progressBar.Value   = 100; //100
                progressOutput.Text = "Preparing Rank Reveal.";
            }));

            //Write to screen that it succeded(, else close application)
            Debug.WriteLine("Suceeded.");

            Thread.Sleep(2500);
            Invoke(new Action(() => {
                progressBar.Value   = 100; //100
                progressOutput.Text = "Successfully loaded";
            }));

            Thread.Sleep(1000);
            Invoke(new Action(() => {
                LoadingScreen.Visible = false;
            }));
        }