SHARE
TWEET

Everybody Edits - Send delayed messages

capasha Oct 1st, 2016 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6. namespace EEDelayedMessages
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             StringBuilder builder = new StringBuilder();
  13.             builder.Append("Sed ut perspiciatis unde omnis iste natus error sit voluptatem");
  14.             builder.Append("accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab");
  15.             builder.Append("illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.");
  16.             builder.Append("Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed");
  17.             builder.Append("quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. ");
  18.             builder.Append("Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, ");
  19.             builder.Append("adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et ");
  20.             builder.Append("dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis ");
  21.             builder.Append("nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid");
  22.             builder.Append("ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea ");
  23.             builder.Append("voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem");
  24.             builder.Append("eum fugiat quo voluptas nulla pariatur?");
  25.  
  26.             Thread thread = new Thread(delegate () { sendMessage(builder.ToString(), null); });
  27.             thread.Start();
  28.  
  29.             Console.ReadKey();
  30.         }
  31.         static void sendMessage(string messages, string nick)
  32.         {
  33.             string mas = string.Empty;
  34.             string text = messages;
  35.             if (messages.Length <= 80)
  36.             {
  37.                 if (nick != null) Console.WriteLine("con.Send(\"say\",\"/pm " + nick + " " + messages + "\");");
  38.                 if (nick == null) Console.WriteLine("con.Send(\"say\",\"" + messages + "\");");
  39.             }
  40.             else
  41.             {
  42.  
  43.                 for (int a = 0; a <= messages.Length - 1; a++)
  44.                 {
  45.                     if (mas.Length == 79)
  46.                     {
  47.                         if (nick != null) Console.WriteLine("con.Send(\"say\",\"/pm " + nick + " " + mas + text[a] + "\");");
  48.                         if (nick == null) Console.WriteLine("con.Send(\"say\",\"" + mas + text[a] + "\");");
  49.                         Thread.Sleep(750);
  50.                         mas = string.Empty;
  51.                     }
  52.                     else
  53.                     {
  54.                         mas += text[a];
  55.                     }
  56.                 }
  57.                 if (nick != null) Console.WriteLine("con.Send(\"say\",\"/pm " + nick + " " + mas + "\");");
  58.                 if (nick == null) Console.WriteLine("con.Send(\"say\",\"" + mas + "\");");
  59.                 mas = string.Empty;
  60.             }
  61.         }
  62.     }
  63. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top