public PlayCommand(BotClient testClient)
 {
     Name         = "anim";
     TheBotClient = testClient;
 }
Example #2
0
 public DetachCommand(BotClient testClient)
 {
     Name = "detach";
     TheBotClient = testClient;
 }
Example #3
0
 public PacketLogCommand(BotClient testClient)
 {
     Name = "packetlog";
 }
Example #4
0
 public LowerSimCommand(BotClient testClient)
 {
     Name = "lowersim";
 }
Example #5
0
 public DilationCommand(BotClient testClient)
 {
     Name = "dilation";
 }
Example #6
0
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Example #7
0
 public ScriptCommand(BotClient testClient)
 {
     Name = "Script";
 }
Example #8
0
 public ForwardCommand(BotClient client)
 {
     Name = "forward";
 }
Example #9
0
 public CycShowCommand(BotClient Client)
     : base(Client)
 {
     Name = "CycShow";
 }
Example #10
0
 /// <summary>
 /// Returns if a subscription can run.
 /// They can only run for the client that they were created for.
 /// </summary>
 /// <param name="client">Client to compare against</param>
 /// <returns>True if same bot client; false otherwise</returns>
 public bool CanRun(BotClient client)
 {
     return(client != null && DiscordClient.Clients[_plugin.Name]?.Bot == client);
 }
Example #11
0
 public MovementResynchronizer(BotClient bot)
 {
     _bot = bot;
     _bot.StateChanged  += Bot_StateChanged;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Example #12
0
 public QuestManager(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Example #13
0
 public AutoReconnector(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
 public MeCommand(BotClient testClient)
 {
     Name         = "me";
     TheBotClient = testClient;
 }
Example #15
0
 public TurnToCommand(BotClient client)
 {
     Name = "turnto";
 }
 public DumpOutfitCommand(BotClient testClient)
 {
     Name         = "dumpoutfit";
     TheBotClient = testClient;
 }
 /// <summary>
 ///  The default constructor for BotClient commands
 /// </summary>
 /// <param name="testClient"></param>
 public UploadScriptCommand(BotClient testClient)
 {
     Name = "Upload Script";
 }
Example #18
0
        public PlayersView(BotClient bot)
        {
            InitializeComponent();

            _bot = bot;
        }
 public CreateScriptCommand(BotClient testClient)
 {
     Name = "Create Script";
 }
Example #20
0
 public TeamView(BotClient bot, MainWindow mWin)
 {
     InitializeComponent();
     _bot       = bot;
     MainWindow = mWin;
 }
Example #21
0
 public ParcelVoiceInfoCommand(BotClient testClient)
 {
     Name = "voiceparcel";
     TheBotClient = testClient;
 }
 public BackupCommand(BotClient testClient)
     : base(testClient)
 {
     Name         = "backuptext";
     TheBotClient = testClient;
 }
 public FollowCommand(BotClient testClient)
 {
     Name = "Linden follow";
 }
 public WaitEventCommand(BotClient testClient)
 {
     Name         = "waitevent";
     TheBotClient = testClient;
 }
Example #25
0
 public AnimInfoCommand(BotClient testClient)
 {
     Name = "assetinfo";
     TheBotClient = testClient;
 }
Example #26
0
 public GroupRolesCommand(BotClient testClient)
 {
     Name         = "grouproles";
     TheBotClient = testClient;
 }
Example #27
0
 public HttpGet(BotClient Client)
     : base(Client)
 {
     Name = "HttpGet";
     TheBotClient = Client;
 }
Example #28
0
 public TeamView(BotClient bot)
 {
     InitializeComponent();
     _bot = bot;
 }
 /// <summary>
 /// Constructor for FriendsCommand class
 /// </summary>
 /// <param name="testClient">A reference to the BotClient object</param>
 public RemoveFriendCommand(BotClient testClient)
 {
     // The name of the command
     Name = "Remove Friend";
     TheBotClient = testClient;
 }
Example #30
0
 public ToBotCommand(BotClient testClient)
 {
     Name         = "tobot";
     TheBotClient = testClient;
 }
Example #31
0
 public StopCommand(BotClient Client)
     : base(Client)
 {
 }
Example #32
0
 public AllBotsCommand(BotClient testClient)
 {
     Name         = "AllBots";
     TheBotClient = testClient;
 }
Example #33
0
 public MeCommand(BotClient testClient)
 {
     Name = "me";
     TheBotClient = testClient;
 }
 public ShowEventDetailsCommand(BotClient testClient)
 {
     Name         = "showevent";
     TheBotClient = testClient;
 }
Example #35
0
 public EchoMasterCommand(BotClient testClient)
     : base(testClient)
 {
     Name = "echoMaster";
 }
Example #36
0
        public MainWindow()
        {
#if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            TaskScheduler.UnobservedTaskException      += TaskScheduler_UnobservedTaskException;
#endif
            Thread.CurrentThread.Name = "UI Thread";
            Bot = new BotClient();
            Bot.StateChanged                   += Bot_StateChanged;
            Bot.ClientChanged                  += Bot_ClientChanged;
            Bot.ConnectionClosed               += Bot_ConnectionClosed;
            Bot.ConnectionOpened               += Bot_ConnectionOpened;
            Bot.AutoReconnector.StateChanged   += Bot_AutoReconnectorStateChanged;
            Bot.AutoLootBoxOpener.StateChanged += AutoLootBoxOpener_StateChanged;
            Bot.PokemonEvolver.StateChanged    += PokemonEvolver_StateChanged;
            Bot.MessageLogged                  += Bot_MessageLogged;
            Bot.ColorMessageLogged             += Bot_ColorMessageLogged;


            InitializeComponent();
            IntializeCustomeComponent();

            _viewTabs = new Dictionary <string, TabItem>();
            _views    = new Dictionary <string, UserControl>();

            AutoEvolveSwitch.IsChecked    = Bot.Settings.AutoEvolve;
            OpenLootBox.IsChecked         = Bot.Settings.OpenLootBoxes;
            AutoReconnectSwitch.IsChecked = Bot.Settings.AutoReconnect;

            Bot.AutoReconnector.IsEnabled   = Bot.Settings.AutoReconnect;
            Bot.AutoLootBoxOpener.IsEnabled = Bot.Settings.OpenLootBoxes;
            Bot.PokemonEvolver.IsEnabled    = Bot.Settings.AutoEvolve;

            App.InitializeVersion();

            if (!string.IsNullOrEmpty(Bot.Settings.LastScript) && File.Exists(Bot.Settings.LastScript))
            {
                ReloadScriptMenuItem.Header    = "Reload " + System.IO.Path.GetFileName(Bot.Settings.LastScript) + "\tCtrl+R";
                ReloadScriptMenuItem.IsEnabled = true;
            }
            else
            {
                ReloadScriptMenuItem.IsEnabled = false;
                Bot.Settings.LastScript        = null;
            }

            Team      = new TeamView(Bot);
            Inventory = new InventoryView(Bot);
            Chat      = new ChatView(Bot);
            Players   = new PlayersView(Bot);
            Map       = new MapView(Bot);

            FileLog = new FileLogger();

            _refreshPlayers      = DateTime.UtcNow;
            _refreshPlayersDelay = 5000;

            MainView.TabWindow.SelectionChanged += TabWindow_SelectionChanged;

            AddView("Team", Team, TabsWindow.TeamTab);
            AddView("Inventory", Inventory, TabsWindow.InventoryTab);
            AddView("Chat", Chat, TabsWindow.ChatTab);
            AddView("Players", Players, TabsWindow.PlayersTab);
            AddView("Map", Map, TabsWindow.MapTab);

            SetTitle(null);

            LogMessage("Running " + App.Name + " by " + App.Author + ", version " + App.Version);

            Task.Run(() => UpdateClients());
        }
Example #37
0
 public Follow(BotClient Client)
     : base(Client)
 {
 }
Example #38
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="args">Parameters.</param>
 /// <param name="cancellationToken">The cancellation token to cancel operation.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned. on success. If commands aren't set, an empty list is returned.</returns>
 public static async Task <BotCommand[]> GetMyCommandsAsync(this BotClient bot, GetMyCommandsArgs args, [Optional] CancellationToken cancellationToken) => await bot.GetMyCommandsAsync <BotCommand[]>(args, cancellationToken);
 public GroupMembersCommand(BotClient testClient)
 {
     Name = "groupmembers";
     TheBotClient = testClient;
 }
Example #40
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="scope">A <see cref="BotCommandScope"/> object, describing scope of users. Defaults to <see cref="BotCommandScopeDefault"/>.</param>
 /// <param name="languageCode">A two-letter ISO 639-1 language code or an empty string.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, [Optional] BotCommandScope scope, [Optional] string languageCode) => bot.GetMyCommands <BotCommand[]>(scope, languageCode);
Example #41
0
 public GroupInfoCommand(BotClient testClient)
 {
     Name = "groupinfo";
 }
Example #42
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="args">Parameters.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, GetMyCommandsArgs args) => bot.GetMyCommands <BotCommand[]>(args);
Example #43
0
 public OnFacingTowards(Primitive mover, BotClient bc)
 {
     Mover = mover;
     Client = bc;
 }
Example #44
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="scope">A <see cref="BotCommandScope"/> object, describing scope of users. Defaults to <see cref="BotCommandScopeDefault"/>.</param>
 /// <param name="languageCode">A two-letter ISO 639-1 language code or an empty string.</param>
 /// <param name="cancellationToken">The cancellation token to cancel operation.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static async Task <BotCommand[]> GetMyCommandsAsync(this BotClient bot, [Optional] BotCommandScope scope, [Optional] string languageCode, [Optional] CancellationToken cancellationToken) => await bot.GetMyCommandsAsync <BotCommand[]>(scope, languageCode, cancellationToken);
Example #45
0
 public WalkToCommand(BotClient client)
 {
     Name = "WalkTo";
 }
 public TcpServerCommand(BotClient bc)
     : base(bc)
 {
     Name = "tcpserver";
 }
Example #47
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }
 static internal string EventToString(CogbotEvent evt, BotClient parent)
 {
     return(string.Format("({0} {1})", evt.Verb, parent.argsListString(evt.GetArgs())));
 }
Example #49
0
 public TreeCommand(BotClient testClient)
 {
     Name = "tree";
 }
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Example #51
0
 public Describe(BotClient Client)
     : base(Client)
 {
     Name = "Describe";
 }
Example #52
0
 /// <summary>
 /// Construct a new instance of the SearchLandCommand
 /// </summary>
 /// <param name="testClient"></param>
 public SearchLandCommand(BotClient testClient)
 {
     Name         = "searchland";
     TheBotClient = testClient;
 }
Example #53
0
 public MapImagePaths(BotClient client)
 {
     Name = GetType().Name;
 }
 public ParcelSelectObjectsCommand(BotClient testClient)
 {
     Name = "selectobjects";
 }
Example #55
0
 public Logout(BotClient Client)
     : base(Client)
 {
     Name = "Logout";
 }
 /// <summary>
 /// Quick way to respond to the message
 /// </summary>
 /// <param name="response">What to respond with</param>
 /// <returns></returns>
 public async Task RespondAsync(string response)
 {
     await BotClient.SendTextMessageAsync(ChatId, response);
 }
 public ShowEventDetailsCommand(BotClient testClient)
 {
     Name = "showevent";
     TheBotClient = testClient;
 }
 /// <summary>
 /// BotClient command to download and display a notecard asset
 /// </summary>
 /// <param name="testClient"></param>
 public ViewNotecardCommand(BotClient testClient)
 {
     Name = "viewnote";
 }
 public ChangeDirectoryCommand(BotClient client)
 {
     Name = "cd";
 }
Example #60
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }