Exemplo n.º 1
0
 private void spamButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (spamButton.Text.Equals("Spam All"))
         {
             if (packetCenterGrid.SelectedCells.Count <= 0)
             {
                 MessageBox.Show("Please add valid packet(s).");
                 return;
             }
             else
             {
                 int rowCount   = packetCenterGrid.Rows.Count;
                 int currentRow = 0;
                 spammingPacket  = true;
                 spamButton.Text = "Stop Spamming";
                 Thread packetSpammer = new Thread(delegate()
                 {
                     while (spammingPacket & c.clientMode != ClientMode.DISCONNECTED)
                     {
                         c.updateAccountStatus("Spamming packets");
                         string str = packetCenterGrid.Rows[currentRow].Cells[0].Value.ToString();
                         int num    = int.Parse(packetCenterGrid.Rows[currentRow].Cells[1].Value.ToString());
                         c.ses.SendPacket(PacketHandler.Custom(PixelCLB.replacePacketVars(str)).ToArray());
                         Thread.Sleep(num);
                         currentRow++;
                         if (rowCount == currentRow)
                         {
                             currentRow = 0;
                         }
                     }
                     c.updateAccountStatus("Idle");
                 });
                 c.workerThreads.Add(packetSpammer);
                 packetSpammer.Start();
                 return;
             }
         }
         else
         {
             spammingPacket  = false;
             spamButton.Text = "Spam All";
             c.updateAccountStatus("Idle");
             foreach (Thread t in c.workerThreads)
             {
                 try
                 {
                     t.Abort();
                 }
                 catch { }
             }
             return;
         }
     }
     catch { }
 }
Exemplo n.º 2
0
 private void sendAllOnceButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (!sendAllOnceButton.Text.Equals("Sending..."))
         {
             if (packetCenterGrid.SelectedCells.Count <= 0)
             {
                 MessageBox.Show("Please add valid packet(s).");
                 return;
             }
             int rowCount = packetCenterGrid.Rows.Count;
             int row      = 0;
             sendAllOnceButton.Text = "Sending...";
             Thread packetSpammer = new Thread(delegate()
             {
                 while (rowCount != 0 & c.clientMode != ClientMode.DISCONNECTED)
                 {
                     string str = packetCenterGrid.Rows[row].Cells[0].Value.ToString();
                     int num    = int.Parse(packetCenterGrid.Rows[row].Cells[1].Value.ToString());
                     c.ses.SendPacket(PacketHandler.Custom(PixelCLB.replacePacketVars(str)).ToArray());
                     Thread.Sleep(num);
                     row++;
                     rowCount--;
                 }
             });
             c.workerThreads.Add(packetSpammer);
             packetSpammer.Start();
             packetSpammer.Join();
             sendAllOnceButton.Text = "Send All Once";
         }
         else
         {
             foreach (Thread t in c.workerThreads)
             {
                 try
                 {
                     t.Abort();
                 }
                 catch { }
             }
             return;
         }
     }
     catch { }
 }
Exemplo n.º 3
0
        private static void Main()
        {
            /*
             * Database.loadEtcStrings();
             * Database.loadEquipStrings();
             * Database.loadInsStrings();
             * Database.loadSkillStrings();
             * Database.loadConsumeStrings();
             * PacketReader x2 = new PacketReader(new byte[] { 0xC7, 0x4F, 0xFF, 0xA9 });
             * int Packet = x2.ReadInt();
             * MessageBox.Show(Packet.ToString());
             * int y = Packets.CRC32.CalcPortalCRC(Packet, 10702070);
             * MessageBox.Show("PortalCRC: " + y.ToString());
             *
             */
            uint z = Packets.CRC32.CalcItemCRC(2020013);
            //MessageBox.Show("2020013 | " + z.ToString());
            uint z2 = Packets.CRC32.CalcItemCRC(2020013);
            // MessageBox.Show("2020013 | " + z2.ToString());


            uint x = Packets.CRC32.CalcItemCRC(2020015);

            MessageBox.Show("2020015 | " + x.ToString());


            //uint crc = Packets.CRC32.CalcCRC32(176, 4, 0, 0);
            //crc = Packets.CRC32.CalcCRC32(1, 5) ^ crc;
            //crc = Packets.CRC32.CalcCRC32(0, 5) ^ crc;
            //crc = Packets.CRC32.CalcCRC32(0, 5) ^ crc;
            //crc = crc ^ 240000001;
            //MessageBox.Show(crc.ToString());
            //Database.exportAllItemNames();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            checkNecessaryFolders();
            gui = new PixelCLB();
            gui.c.updateLog("[Loading " + loadPercent + "%] Packet CRC Loading...");
            GMSKeys.Initialize();
            gui.c.updateLog("[Loading " + loadPercent + "%] Packet CRC Complete");
            loadPercent = loadPercent + 10;

            gui.c.updateLog("[Loading " + loadPercent + "%] Checking necessary files...");
            checkNecessaryFiles();
            loadPercent = loadPercent + 10;
            gui.c.updateLog("[Loading " + loadPercent + "%] All files accounted for.");

            gui.c.updateLog("[Loading " + loadPercent + "%] Checking settings...");
            checkSettings();
            loadPercent = loadPercent + 10;
            gui.c.updateLog("[Loading " + loadPercent + "%] Settings are all in line...");

            Thread load = new Thread(delegate()
            {
                gui.c.updateLog("[Loading " + loadPercent + "%] Gathering required attributes");
                getAttributes(gui.c);
                loadPercent = loadPercent + 5;
                gui.c.updateLog("[Loading " + loadPercent + "%] All necessary information gathered.");
                gui.c.updateLog("[Loading " + loadPercent + "%] Retrieving the last of it!");
                Thread.Sleep(1000);
                loadPercent = loadPercent + 5;
                while (loadPercent < 100)
                {
                    Thread.Sleep(1000);
                }
                gui.c.updateLog("[" + loadPercent + "% Complete] Complete! Ready for use.");
            });

            load.Start();
            Application.Run(gui);
            load.Join();
        }