Ejemplo n.º 1
0
 public CharacterSelectionForm(string result)
 {
     InitializeComponent();
     ResultString = result;
     ParseSite();
     MQOEvents.TestEvent("Select a Character");
 }
Ejemplo n.º 2
0
        void MQOEvents_onRequestLogin(object obj)
        {
            MQOEvents.TestEvent("Loggin requested");
            if (!LoginWebClient.IsBusy)
            {
                string[] parsed = obj.ToString().Split(',');

                var values = new NameValueCollection
                {
                    { "User", parsed[0] },
                    { "Pass", parsed[1] },
                };

                // Upload values
                string tempStringUri = "http://midenquest.com/UserLogin.aspx";
                LoginWebClient.UploadValues(tempStringUri, values);

                // Get Character Page
                string charPage = LoginWebClient.DownloadString("http://midenquest.com/UserCharacterSelection.aspx");

                SetCookies();

                MQOEvents.OpenCharacterSelection(charPage);
            }
            else
            {
                MQOEvents.TestEvent("Busy");
            }
        }
Ejemplo n.º 3
0
 void MQOEvents_onDoWork(object obj)
 {
     if (!SkillWebClient.IsBusy)
     {
         MQOEvents.TestEvent("Doing work");
         Uri tempUri = new Uri("http://midenquest.com/useWork.aspx?start=" + obj.ToString() + "&null=");
         SkillWebClient.DownloadString(tempUri);
     }
 }
Ejemplo n.º 4
0
 void MQOEvents_onLoadFight(object obj)
 {
     if (!FightWebClient.IsBusy)
     {
         Uri tempUri = new Uri("http://midenquest.com/loadFight.aspx?id=" + obj.ToString() + "&sid=" + GetSID().ToString());
         FightWebClient.DownloadString(tempUri);
         MQOEvents.TestEvent("Loading Monster ID: " + obj.ToString());
     }
 }
Ejemplo n.º 5
0
        void MQOEvents_onRequestCharacterLogin(object obj)
        {
            if (!LoginWebClient.IsBusy)
            {
                MQOEvents.TestEvent("Attempting to login...");
                var values = new NameValueCollection
                {
                    { "CharId", (string)obj.ToString() },
                };

                // Upload the values
                string tempUri = "http://midenquest.com/Game.aspx";
                LoginWebClient.UploadValues(tempUri, values);

                MQOEvents.Connected(true);
            }
            else
            {
                MQOEvents.TestEvent("Login Client is busy");
            }
        }
Ejemplo n.º 6
0
 public LoginForm()
 {
     InitializeComponent();
     MQOEvents.TestEvent("Logging in");
 }
Ejemplo n.º 7
0
 private void btnPlay3_Click(object sender, EventArgs e)
 {
     MQOEvents.TestEvent("Logging into: " + lblPlayerName3.Text);
     MQOEvents.RequestCharacterLogin(PlayerIDs[2]);
 }
Ejemplo n.º 8
0
        public object ParseStats(string str)
        {
            if (isConnected)
            {
                string   unparsed = CharacterShort;
                string[] parsed   = unparsed.Split('|');

                if (parsed.Length > 5)
                {
                    StatsActive = true;
                    if (parsed[0] != "1")
                    {
                        isConnected = false;
                    }

                    if (str == "PlayerName")
                    {
                        return(parsed[4]);
                    }
                    else if (str == "PlayerHP")
                    {
                        return(parsed[12]);
                    }
                    else if (str == "PlayerMana")
                    {
                        return(parsed[20]);
                    }
                    else if (str == "PlayerLevel")
                    {
                        return(parsed[8]);
                    }
                    else if (str == "PlayerLevelPercent")
                    {
                        return(parsed[79]);
                    }
                    else if (str == "Gold")
                    {
                        return(parsed[82]);
                    }
                    else if (str == "Elements")
                    {
                        return(parsed[89]);
                    }
                    else if (str == "Chests")
                    {
                        int  number;
                        bool result = Int32.TryParse(parsed[116].ToString(), out number);
                        if (result)
                        {
                            return(number);
                        }
                        else
                        {
                            return(0);
                        }
                    }
                    else if (str == "Relics")
                    {
                        return(parsed[117]);
                    }
                    else if (str == "Chests")
                    {
                        return(parsed[116]);
                    }
                    else if (str == "StatPoints")
                    {
                        return(parsed[88]);
                    }
                    else if (str == "Workload")
                    {
                        if (parsed[115] == "")
                        {
                            return(0);
                        }
                        else
                        {
                            return(parsed[115]);
                        }
                    }
                    else if (str == "Enemy1HP")
                    {
                        if (parsed[18] != "")
                        {
                            return(parsed[18]);
                        }
                        return(0);
                    }
                    else if (str == "Enemy2HP")
                    {
                        if (parsed[19] != "")
                        {
                            return(parsed[19]);
                        }
                        return(0);
                    }
                    else if (str == "Enemy1")
                    {
                        if (parsed[2] != "")
                        {
                            return(parsed[2]);
                        }
                        else
                        {
                            return(0);
                        }
                    }
                    else if (str == "Enemy2")
                    {
                        if (parsed[3] != "")
                        {
                            return(parsed[3]);
                        }
                        else
                        {
                            return(0);
                        }
                    }
                    else if (str == "State")
                    {
                        if (parsed[114] == "Working")
                        {
                            return("Working");
                        }
                        else
                        {
                            return("Idle");
                        }
                    }
                    else if (str == "Skill1Percent")
                    {
                        return(parsed[80]);
                    }
                    else if (str == "Skill1")
                    {
                        return(parsed[90]);
                    }
                    else if (str == "Skill2Percent")
                    {
                        return(parsed[81]);
                    }
                    else if (str == "Skill2")
                    {
                        return(parsed[91]);
                    }
                    else
                    {
                        MQOEvents.TestEvent("(Parse Stat)Command not found: " + str);
                        return(0);
                    }
                }
                else
                {
                    StatsActive = false;
                    return(0);
                }
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 9
0
 void MQOEvents_onConnected(object obj)
 {
     MQOEvents.TestEvent("Connected");
     isConnected = true;
 }