Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1.     internal class Program
  2.     {
  3.         private static bool _running = true;
  4.  
  5.         private static async Task Main(string[] args)
  6.         {
  7.             var client = new Instance();
  8.  
  9.             client.OnWorldDisconnect += delegate {
  10.                 _running = false;
  11.             };
  12.  
  13.             client.OnAvatarEnter += delegate(Instance sender, AvatarEnterEventArgsT<Avatar> t)
  14.             {
  15.                 Console.WriteLine($"{t.Avatar.Name} Entered.");
  16.             };
  17.  
  18.             await client.ConnectAsync();
  19.             await client.LoginAsync("username", "password", "botname");
  20.             await client.EnterAsync("worldname");
  21.             await client.LoginAndEnterAsync();
  22.  
  23.             while (_running)
  24.             {
  25.                 /* Wait */
  26.             }
  27.         }
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement