Пример #1
0
 public PlayCommand(BotClient testClient)
 {
     Name         = "anim";
     TheBotClient = testClient;
 }
Пример #2
0
 public DetachCommand(BotClient testClient)
 {
     Name = "detach";
     TheBotClient = testClient;
 }
Пример #3
0
 public PacketLogCommand(BotClient testClient)
 {
     Name = "packetlog";
 }
Пример #4
0
 public LowerSimCommand(BotClient testClient)
 {
     Name = "lowersim";
 }
Пример #5
0
 public DilationCommand(BotClient testClient)
 {
     Name = "dilation";
 }
Пример #6
0
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Пример #7
0
 public ScriptCommand(BotClient testClient)
 {
     Name = "Script";
 }
Пример #8
0
 public ForwardCommand(BotClient client)
 {
     Name = "forward";
 }
Пример #9
0
 public CycShowCommand(BotClient Client)
     : base(Client)
 {
     Name = "CycShow";
 }
Пример #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);
 }
Пример #11
0
 public MovementResynchronizer(BotClient bot)
 {
     _bot = bot;
     _bot.StateChanged  += Bot_StateChanged;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Пример #12
0
 public QuestManager(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Пример #13
0
 public AutoReconnector(BotClient bot)
 {
     _bot = bot;
     _bot.ClientChanged += Bot_ClientChanged;
 }
Пример #14
0
 public MeCommand(BotClient testClient)
 {
     Name         = "me";
     TheBotClient = testClient;
 }
Пример #15
0
 public TurnToCommand(BotClient client)
 {
     Name = "turnto";
 }
 public DumpOutfitCommand(BotClient testClient)
 {
     Name         = "dumpoutfit";
     TheBotClient = testClient;
 }
Пример #17
0
 /// <summary>
 ///  The default constructor for BotClient commands
 /// </summary>
 /// <param name="testClient"></param>
 public UploadScriptCommand(BotClient testClient)
 {
     Name = "Upload Script";
 }
Пример #18
0
        public PlayersView(BotClient bot)
        {
            InitializeComponent();

            _bot = bot;
        }
Пример #19
0
 public CreateScriptCommand(BotClient testClient)
 {
     Name = "Create Script";
 }
Пример #20
0
 public TeamView(BotClient bot, MainWindow mWin)
 {
     InitializeComponent();
     _bot       = bot;
     MainWindow = mWin;
 }
Пример #21
0
 public ParcelVoiceInfoCommand(BotClient testClient)
 {
     Name = "voiceparcel";
     TheBotClient = testClient;
 }
 public BackupCommand(BotClient testClient)
     : base(testClient)
 {
     Name         = "backuptext";
     TheBotClient = testClient;
 }
Пример #23
0
 public FollowCommand(BotClient testClient)
 {
     Name = "Linden follow";
 }
 public WaitEventCommand(BotClient testClient)
 {
     Name         = "waitevent";
     TheBotClient = testClient;
 }
Пример #25
0
 public AnimInfoCommand(BotClient testClient)
 {
     Name = "assetinfo";
     TheBotClient = testClient;
 }
Пример #26
0
 public GroupRolesCommand(BotClient testClient)
 {
     Name         = "grouproles";
     TheBotClient = testClient;
 }
Пример #27
0
 public HttpGet(BotClient Client)
     : base(Client)
 {
     Name = "HttpGet";
     TheBotClient = Client;
 }
Пример #28
0
 public TeamView(BotClient bot)
 {
     InitializeComponent();
     _bot = bot;
 }
Пример #29
0
 /// <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;
 }
Пример #30
0
 public ToBotCommand(BotClient testClient)
 {
     Name         = "tobot";
     TheBotClient = testClient;
 }
Пример #31
0
 public StopCommand(BotClient Client)
     : base(Client)
 {
 }
Пример #32
0
 public AllBotsCommand(BotClient testClient)
 {
     Name         = "AllBots";
     TheBotClient = testClient;
 }
Пример #33
0
 public MeCommand(BotClient testClient)
 {
     Name = "me";
     TheBotClient = testClient;
 }
 public ShowEventDetailsCommand(BotClient testClient)
 {
     Name         = "showevent";
     TheBotClient = testClient;
 }
Пример #35
0
 public EchoMasterCommand(BotClient testClient)
     : base(testClient)
 {
     Name = "echoMaster";
 }
Пример #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());
        }
Пример #37
0
 public Follow(BotClient Client)
     : base(Client)
 {
 }
Пример #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);
Пример #39
0
 public GroupMembersCommand(BotClient testClient)
 {
     Name = "groupmembers";
     TheBotClient = testClient;
 }
Пример #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);
Пример #41
0
 public GroupInfoCommand(BotClient testClient)
 {
     Name = "groupinfo";
 }
Пример #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);
Пример #43
0
 public OnFacingTowards(Primitive mover, BotClient bc)
 {
     Mover = mover;
     Client = bc;
 }
Пример #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);
Пример #45
0
 public WalkToCommand(BotClient client)
 {
     Name = "WalkTo";
 }
Пример #46
0
 public TcpServerCommand(BotClient bc)
     : base(bc)
 {
     Name = "tcpserver";
 }
Пример #47
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }
Пример #48
0
 static internal string EventToString(CogbotEvent evt, BotClient parent)
 {
     return(string.Format("({0} {1})", evt.Verb, parent.argsListString(evt.GetArgs())));
 }
Пример #49
0
 public TreeCommand(BotClient testClient)
 {
     Name = "tree";
 }
Пример #50
0
 public AtCommand(BotClient testClient)
 {
     Name = "@";
 }
Пример #51
0
 public Describe(BotClient Client)
     : base(Client)
 {
     Name = "Describe";
 }
Пример #52
0
 /// <summary>
 /// Construct a new instance of the SearchLandCommand
 /// </summary>
 /// <param name="testClient"></param>
 public SearchLandCommand(BotClient testClient)
 {
     Name         = "searchland";
     TheBotClient = testClient;
 }
Пример #53
0
 public MapImagePaths(BotClient client)
 {
     Name = GetType().Name;
 }
 public ParcelSelectObjectsCommand(BotClient testClient)
 {
     Name = "selectobjects";
 }
Пример #55
0
 public Logout(BotClient Client)
     : base(Client)
 {
     Name = "Logout";
 }
Пример #56
0
 /// <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;
 }
Пример #58
0
 /// <summary>
 /// BotClient command to download and display a notecard asset
 /// </summary>
 /// <param name="testClient"></param>
 public ViewNotecardCommand(BotClient testClient)
 {
     Name = "viewnote";
 }
Пример #59
0
 public ChangeDirectoryCommand(BotClient client)
 {
     Name = "cd";
 }
Пример #60
0
 public GiveAllCommand(BotClient testClient)
 {
     Name = "Give All Money";
 }