Ejemplo n.º 1
0
 public static void createGTSBot(int iP, int iPtF, int iPtFGender, int iPtFLevel, bool bBlacklist, bool bReddit, int iSearchDirection, string waittime, string consoleName, bool useLedySync, string ledySyncIp, string ledySyncPort, int game, bool tradeQueue)
 {
     gtsBot = new GTSBot7(iP, iPtF, iPtFGender, iPtFLevel, bBlacklist, bReddit, iSearchDirection, waittime, consoleName, useLedySync, ledySyncIp, ledySyncPort, game, tradeQueue, helper, PKTable, data, scriptHelper);
     gtsBot.onChangeStatus += f1.ChangeStatus;
     gtsBot.onItemDetails  += f1.ReceiveItemDetails;
     Data.GtsBot7           = gtsBot;
 }
Ejemplo n.º 2
0
        private async void btn_Start_Click(object sender, EventArgs e)
        {
            if (giveawayDetails.Count() == 0)
            {
                MessageBox.Show("No details are set!", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            btn_Stop.Enabled  = true;
            btn_Start.Enabled = false;
            Program.gd.disableButtons();
            botWorking = true;
            botStop    = false;
            botNumber  = 3;

            int tradeDirection = 0;

            if (rb_frontfpo.Checked)
            {
                tradeDirection = 1;
            }
            else if (rb_front.Checked)
            {
                tradeDirection = 2;
            }
            GTSBot7 = new GTSBot7(pid, combo_pkmnList.SelectedIndex + 1, combo_gender.SelectedIndex, combo_levelrange.SelectedIndex, cb_Blacklist.Checked, cb_Reddit.Checked, tradeDirection, tb_waittime.Text, tb_consoleName.Text, cb_UseLedySync.Checked, tb_LedySyncIP.Text, tb_LedySyncPort.Text, game, true, "127.0.0.1", "3001");
            Task <int> Bot    = GTSBot7.RunBot();
            int        result = await Bot;

            if (botStop)
            {
                result = 8;
            }
            switch (result)
            {
            case 1:
                MessageBox.Show("All Pokemon Traded.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            case 8:
                MessageBox.Show("Bot stopped by user.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            default:
                MessageBox.Show("An error has occurred.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
            Program.gd.enableButtons();
            btn_Stop.Enabled  = false;
            btn_Start.Enabled = true;
            botWorking        = false;
            botNumber         = -1;
        }
Ejemplo n.º 3
0
        private async void btn_Start_Click(object sender, EventArgs e)
        {
            if (giveawayDetails.Count() == 0)
            {
                MessageBox.Show("No details are set!", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            btn_Stop.Enabled  = true;
            btn_Start.Enabled = false;
            Program.gd.disableButtons();
            botWorking = true;
            botStop    = false;
            botNumber  = 3;
            GTSBot7    = new GTSBot7(pid, tb_PokemonToFind.Text, cb_Blacklist.Checked, cb_Reddit.Checked);
            Task <int> Bot    = GTSBot7.RunBot();
            int        result = await Bot;

            if (botStop)
            {
                result = 8;
            }
            switch (result)
            {
            case 1:
                MessageBox.Show("All Pokemon Traded.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            case 8:
                MessageBox.Show("Bot stopped by user.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            default:
                MessageBox.Show("An error has occurred.", "GTS Bot", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
            Program.gd.enableButtons();
            btn_Stop.Enabled  = false;
            btn_Start.Enabled = true;
            botWorking        = false;
            botNumber         = -1;
        }