Advertisement
Guest User

1

a guest
Jul 4th, 2012
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.15 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Threading;
  10. using System.Runtime.InteropServices;
  11. using System.Diagnostics;
  12. using MicrosoftVisual_keys;
  13. using D3;
  14.  
  15. namespace NoBanThnx
  16. {
  17.     public partial class Form1 : Form
  18.     {
  19.         static int proc_id;
  20.         static string[] weapon_array = { "1H","2H" };
  21.         static string[] weap_type_array = { "sword", "axe", "mace", "bow", "xbow" };
  22.         static string[] trade_array = { "WTS ","WTB " };
  23.         static string[] price_array = { " 20MIL", " 30MIL", " 40MIL", " 50MIL", " 60MIL", " 70MIL", " 80MIL", " 90MIL" };
  24.         static string[] dps_array = { " 1500 DPS", " 1600 DPS", " 1200 DPS", " 1400 DPS" };
  25.         public Form1()
  26.         {
  27.             InitializeComponent();
  28.         }
  29.  
  30.         private void Form1_Load(object sender, EventArgs e)
  31.         {
  32.             Process[] p = Process.GetProcessesByName("Diablo III");
  33.             foreach (Process proc in p)
  34.             { comboBox1.Items.Add(proc.Id); }
  35.         }
  36.  
  37.         private void button1_Click(object sender, EventArgs e)
  38.         {
  39.             new Thread(SenderThread).Start();
  40.            
  41.         }
  42.          string Prefix()
  43.         {
  44.             string trade;
  45.             Random rnd = new Random();
  46.  
  47.             trade = trade_array[rnd.Next(0, 2)];
  48.             return trade;
  49.         }
  50.          string Weapon()
  51.          {
  52.              string weapon;
  53.              string weapon_type;
  54.              Random rnd = new Random();
  55.              weapon = weapon_array[rnd.Next(0, 2)];
  56.              weapon_type=weap_type_array[rnd.Next(0,4)];
  57.              return weapon +" "+weapon_type;
  58.          }
  59.          string Price()
  60.          {
  61.              string price;
  62.              Random rnd = new Random();
  63.              price = price_array[rnd.Next(0, 7)];
  64.              return price;
  65.          }
  66.          string DPS()
  67.          {
  68.              string dps;
  69.              Random rnd = new Random();
  70.              dps = dps_array[rnd.Next(0, 3)];
  71.              return dps;
  72.          }
  73.          string Shout()
  74.          {
  75.              string shout = Prefix() + Weapon() + Price() + DPS();
  76.              return shout;
  77.          }
  78.          void SenderThread()
  79.          {
  80.              Invoke((MethodInvoker)delegate
  81.              {
  82.                  proc_id = Convert.ToInt32(comboBox1.SelectedItem);
  83.              });
  84.              VMessages Vm = new VMessages(proc_id);
  85.              while (true)
  86.              {
  87.                  Thread.Sleep(1);
  88.                  Thread.Sleep(new Random().Next(300000, 2400000));
  89.                  Vm.sendKey(MicrosoftVirtualKeys.Return);
  90.                  Thread.Sleep(50);
  91.                  foreach (char c in Shout())
  92.                  {
  93.                      Vm.sendChar(c);
  94.                      Thread.Sleep(7);
  95.                  }
  96.                  Vm.sendKey(MicrosoftVirtualKeys.Return);
  97.              }
  98.          }
  99.  
  100.          private void Form1_FormClosing(object sender, FormClosingEventArgs e)
  101.          {
  102.              Environment.Exit(0);
  103.          }
  104.     }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement